Data mining method and system based on cloud edge-end layered collaboration
Patent Information
- Application Number
- CN202611186504.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-23
AI Technical Summary
但不同边缘节点的数据处理规模、模型版本和识别阈值存在差异,且云端无法获取未上传数据在识别边界附近的分布情况,导致云端难以区分上传结果变化是由真实数据状态变化引起,还是由本地识别机制变化引起,容易使选择性上报偏差在模型聚合和阈值调整过程中持续放大,使得跨边缘数据挖掘的准确性差、稳定性差
[0055]与现有技术相比,本发明的有益效果包括:通过筛选邻域关系稳定、识别类别一致且阈值位置一致的共识锚点样本组,对当前识别机制和参考识别机制下的重放得分进行配对,并构建参考识别坐标指向当前识别坐标的单调分段映射关系,使不同模型版本和本地识别阈值下的重放结果被统一到同一识别坐标中,提高了跨周期挖掘结果的可比性;构建选择状态迁移异构图,并根据双机制重放得分和反事实上传状态确定选择机制敏感度,将待运输质量拆分为状态可比质量和机制诱导质量,使状态可比质量参与非平衡最优传输,机制诱导质量归集至机制残余节点,对真实数据状态变化与本地识别机制变化进行区分,提高了跨边缘数据挖掘的准确性,增强了跨边缘数据挖掘的稳定性。
Smart Images

Figure CN122964491A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data mining, specifically relating to a data mining method and system based on cloud-edge-device hierarchical collaboration. Background Technology
[0002] In data mining processes in scenarios such as smart manufacturing and smart cities, terminal devices continuously generate massive amounts of heterogeneous data. Layered collaboration between cloud, edge, and terminal devices requires terminal devices to complete data collection and initial processing, edge nodes to perform local identification and model fine-tuning, and the cloud to complete model aggregation and cross-regional knowledge fusion. Since the raw data is usually stored on terminal devices or edge nodes, the results obtained in the cloud are mostly those filtered by local models and identification thresholds, making it difficult to directly unify the mining results from different edge nodes.
[0003] In existing technologies, data mining methods based on cloud-edge-device hierarchical collaboration typically involve edge nodes processing terminal data using local lightweight models and recognition thresholds, uploading only alarm events, structured results, and feature summaries, while the cloud performs global model aggregation and recognition threshold adjustment. However, the data processing scale, model version, and recognition threshold vary among different edge nodes, and the cloud cannot obtain the distribution of unuploaded data near the recognition boundary. This makes it difficult for the cloud to distinguish whether changes in uploaded results are caused by changes in the actual data state or by changes in the local recognition mechanism. This can easily lead to amplification of selective reporting bias during model aggregation and threshold adjustment, resulting in poor accuracy and stability in cross-edge data mining. Summary of the Invention
[0004] The purpose of this invention is to provide a data mining method and system based on cloud-edge-device hierarchical collaboration. By constructing a heterogeneous graph of selected state transitions and performing unbalanced optimal transmission with transport quality diversion constraints, the method distinguishes between actual data state changes and selection mechanism transitions, thereby improving the accuracy and stability of cross-edge data mining.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0006] On the one hand, the present invention provides a data mining method based on cloud-edge-device hierarchical collaboration, characterized in that it includes:
[0007] Obtain basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset;
[0008] Based on the edge selection trajectory dataset, cross-version counterfactual replay is completed under consensus anchor constraints, a heterogeneous graph of selection state transition is constructed, and unbalanced optimal transmission with transportation quality diversion constraints is performed to obtain a state correction mining evidence set and a selection mechanism transition representation set.
[0009] Based on the state correction mining evidence set and the selection mechanism transfer representation set, global model aggregation and identification threshold mechanism offset correction are performed to obtain cloud-edge-device hierarchical collaborative data mining results.
[0010] Specifically, based on the edge selection trajectory dataset, cross-version counterfactual replay is performed under consensus anchor constraints to construct a heterogeneous graph of selection state transitions. Unbalanced optimal transport with transport quality diversion constraints is then performed to obtain a state correction mining evidence set and a selection mechanism transition representation set, including:
[0011] Periodic correlation is performed on the edge selection trajectory dataset to determine the current mining cycle and the reference mining cycle. The current identification dataset and the reference identification dataset are extracted, and the current identification mechanism and the reference identification mechanism are constructed. The current identification dataset includes the current boundary neighborhood sample group, the current lightweight machine learning model, the current local identification threshold, the structured mining results, and the local model update amount. The reference identification dataset includes the reference boundary neighborhood sample group, the reference lightweight machine learning model, and the reference local identification threshold.
[0012] Cross-version counterfactual replay and recognition coordinate alignment are performed on the current recognition dataset and the reference recognition dataset with consensus anchor point constraints to obtain a coordinate aligned replay result set.
[0013] Based on the coordinate-aligned replay result set, a heterogeneous graph of selected state transition is constructed, and unbalanced optimal transmission with transportation quality diversion constraints is performed to obtain the representation of actual data state change and the representation of selection mechanism transition.
[0014] Based on the representation of state changes in actual data, state correction and mechanism correlation are performed on the structured mining results and the local model update volume to obtain the state correction mining evidence set and the selection mechanism migration representation set.
[0015] Specifically, cross-version counterfactual replay and recognition coordinate alignment are performed on the current recognition dataset and the reference recognition dataset with consensus anchor constraints, resulting in a coordinate-aligned replay result set, including:
[0016] Extract sample features from the current boundary neighborhood sample group and the reference boundary neighborhood sample group respectively, construct the sample feature association relationship, and obtain the current sample association set and the reference sample association set;
[0017] Input the current sample association set and the reference sample association set into the current lightweight machine learning model and the reference lightweight machine learning model respectively, extract the model feature vector, recognition category and recognition score, and obtain the current model feature space, the reference model feature space, the current model output set and the reference model output set;
[0018] Based on the current model feature space, the reference model feature space, the current model output set, and the reference model output set, neighborhood stability analysis is performed on the current sample association set and the reference sample association set to obtain the consensus anchor point sample group.
[0019] Based on the consensus anchor sample group, the current identification mechanism, and the reference identification mechanism, cross-version counterfactual replay and identification coordinate alignment are performed on the current sample association set and the reference sample association set to obtain the coordinate aligned replay result set.
[0020] Specifically, based on the current model feature space, the reference model feature space, the current model output set, and the reference model output set, neighborhood stability analysis is performed on the current sample association set and the reference sample association set to obtain the consensus anchor point sample group, including:
[0021] Calculate the model feature vector distances between each boundary neighborhood sample group in the current model feature space and the reference model feature space respectively, to obtain the current feature distance matrix and the reference feature distance matrix;
[0022] Based on the current feature distance matrix and the reference feature distance matrix, determine the set of neighboring sample groups of each boundary neighborhood sample group in the current model feature space and the reference model feature space, respectively;
[0023] By comparing the sets of neighboring sample groups in the current model feature space and the reference model feature space for the same boundary neighborhood sample group, the neighborhood stability result is obtained.
[0024] Extract the recognition category and recognition score corresponding to each boundary neighborhood sample group from the current model output set and the reference model output set, perform category consistency comparison and threshold position comparison, and obtain stable recognition results;
[0025] Based on the stable results of neighborhood and identification, a consensus anchor point sample group is obtained by screening boundary neighborhood sample groups with stable neighborhood relationships, consistent identification categories and consistent threshold positions.
[0026] Specifically, based on the consensus anchor sample group, the current identification mechanism, and the reference identification mechanism, cross-version counterfactual replay and identification coordinate alignment are performed on the current sample association set and the reference sample association set to obtain a coordinate-aligned replay result set, including:
[0027] By replaying each boundary neighborhood sample group in the current sample association set and the reference sample association set using the current identification mechanism and the reference identification mechanism, the replay score set of the current mechanism and the replay score set of the reference mechanism are obtained.
[0028] By comparing the replay scores of each current mechanism with the current local recognition threshold, and the replay scores of each reference mechanism with the reference local recognition threshold, the inverse fact transmission state of each boundary neighborhood sample group is determined, and the dual-mechanism replay result set is obtained.
[0029] Extract the dual-mechanism replay scores of consensus anchor point sample groups from the dual-mechanism replay result set, pair the scores of the same group, and associate them with the current local recognition threshold and the reference local recognition threshold to obtain the anchor point coordinate corresponding sequence.
[0030] Based on the anchor point coordinate correspondence sequence, a monotonic piecewise mapping relationship is constructed from the reference recognition coordinates to the current recognition coordinates;
[0031] The reference mechanism replay score is transformed using a monotonic piecewise mapping relationship. The transformed reference mechanism replay score is then associated with the corresponding current mechanism replay score and the inverse real transmission state to obtain a coordinate-aligned replay result set.
[0032] Specifically, based on the coordinate-aligned replay result set, a heterogeneous graph of state transition is constructed, and unbalanced optimal transport with transport quality diversion constraints is performed to obtain a representation of actual data state changes and a representation of selection mechanism transitions, including:
[0033] Based on the coordinate-aligned replay result set, a heterogeneous graph of the selected state transition is constructed to determine the quality to be transported and the sensitivity of the selection mechanism. Quality splitting and mechanism residue aggregation are then performed to obtain the quality diversion result.
[0034] Based on the selected state transition heterogeneity graph, cross-period sample association analysis and same mechanism replay difference measurement are performed to determine the transportation cost;
[0035] Based on the selected state transition heterogeneous graph, quality diversion results, and transportation costs, unbalanced optimal transmission is performed on comparable state quality, and change characterization is collected by combining mechanism-induced quality, resulting in actual data state change characterization and selection mechanism transition characterization.
[0036] Specifically, based on the coordinate-aligned replay result set, a heterogeneous graph of the selection state transition is constructed to determine the quality to be transported and the sensitivity of the selection mechanism. Quality decomposition and mechanism residual aggregation are then performed to obtain the quality diversion results, including:
[0037] Node mapping is performed on the current boundary neighborhood sample group, the reference boundary neighborhood sample group, the dual-mechanism replay results, and the inverse real transmission state, and mechanism residual nodes are set to obtain a heterogeneous node set. The heterogeneous node set includes the current sample node, the reference sample node, the current output node, the reference output node, the current state node, the reference state node, and the mechanism residual node.
[0038] Calculate the sample feature distance between each reference sample node and the boundary neighborhood sample group corresponding to each current sample node, and perform neighbor filtering to obtain cross-period adjacent node pairs;
[0039] Establish a mechanism permutation edge between the current output node and the reference output node associated with the same sample node, establish a state transition candidate edge between adjacent node pairs across cycles, establish an upload state edge between each output node and the corresponding state node, and establish a residual aggregation edge between each state node and the corresponding mechanism residual node. Combine the heterogeneous node set to construct a selection state transition heterogeneous graph.
[0040] Based on the boundary neighborhood sample group corresponding to each sample node, the current mechanism replay score, the reference mechanism replay score, and the inverse transmission state, determine the quality to be transported and the sensitivity of the selected mechanism;
[0041] Based on the sensitivity of the selection mechanism, the quality to be transported is divided into state-comparable quality and mechanism-induced quality. The mechanism-induced quality is then aggregated to the corresponding mechanism residual node along the residual aggregation edge to obtain the quality diversion result.
[0042] Specifically, based on the selected state transition heterogeneity graph, quality diversion results, and transportation costs, non-equilibrium optimal transport is performed on comparable state qualities, and change representations are collected by combining mechanism-induced quality, resulting in actual data state change representations and selected mechanism transition representations, including:
[0043] Based on the current sample node and the reference sample node, the comparable quality of the state in the quality diversion result is aggregated to obtain the current state comparable quality distribution and the reference state comparable quality distribution.
[0044] Based on the current state comparable quality distribution, the reference state comparable quality distribution, and the transportation cost, unbalanced optimal transmission is performed along the state transition candidate edges to obtain cross-cycle state transportation relationships that include matching node pairs and matching transportation quality.
[0045] Based on the cross-cycle state transportation relationship, the difference in replay scores of each matching node pair under the current identification mechanism and the reference identification mechanism is calculated, and the data is aggregated according to the matching transportation quality to obtain the representation of actual data state changes.
[0046] Based on the quality diversion results, the mechanism-induced quality corresponding to the residual nodes of each mechanism is extracted, the replay score difference between the output nodes at both ends of the corresponding mechanism permutation edge is calculated, and the results are aggregated to obtain the selection mechanism migration characterization.
[0047] Specifically, based on the state correction evidence set and the selection mechanism transfer representation set, global model aggregation and threshold mechanism offset correction are performed to obtain the cloud-edge-device hierarchical collaborative data mining results, including:
[0048] The local model update volume in the state correction mining evidence set is aggregated, and the structured mining results are fused across edges to obtain the global data mining model and the cross-edge knowledge fusion results.
[0049] Based on the cross-edge knowledge fusion results and the selection mechanism transfer representation set, the local recognition threshold is corrected by mechanism offset to obtain the target recognition threshold.
[0050] By associating the global data mining model with the target recognition threshold, we can obtain the cloud-edge-device hierarchical collaborative data mining results.
[0051] On the other hand, the present invention provides a data mining system based on cloud-edge-device hierarchical collaboration, comprising:
[0052] The trajectory construction module is used to acquire basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset.
[0053] The heterogeneous graph construction module, based on the edge selection trajectory dataset, completes cross-version counterfactual replay under consensus anchor constraints, constructs a heterogeneous graph of selection state transition, and performs unbalanced optimal transmission under transportation quality diversion constraints, thereby obtaining a state correction mining evidence set and a selection mechanism transition representation set.
[0054] The mining results module, based on the state correction mining evidence set and the selection mechanism migration representation set, performs global model aggregation and identification threshold mechanism offset correction to obtain cloud-edge-device hierarchical collaborative data mining results.
[0055] Compared with existing technologies, the beneficial effects of this invention include: by screening consensus anchor point sample groups with stable neighborhood relationships, consistent identification categories, and consistent threshold positions, pairing replay scores under the current identification mechanism and the reference identification mechanism, and constructing a monotonic piecewise mapping relationship from the reference identification coordinates to the current identification coordinates, the replay results under different model versions and local identification thresholds are unified into the same identification coordinates, improving the comparability of cross-cycle mining results; constructing a heterogeneous graph of selected state transitions, and determining the sensitivity of the selected mechanism based on the replay scores of the dual mechanisms and the inverse fact transmission state, splitting the quality to be transported into comparable state quality and mechanism-induced quality, enabling comparable state quality to participate in unbalanced optimal transmission, and mechanism-induced quality to be aggregated to mechanism residual nodes, distinguishing between changes in real data state and changes in local identification mechanisms, improving the accuracy of cross-edge data mining, and enhancing the stability of cross-edge data mining. Attached Figure Description
[0056] Figure 1 The flowchart of the data mining method based on cloud-edge-device hierarchical collaboration provided by the present invention;
[0057] Figure 2 Flowchart for generating coordinate-aligned replay result set provided by this invention;
[0058] Figure 3The structure diagram of the data mining system based on cloud-edge-device hierarchical collaboration provided by the present invention. Detailed Implementation
[0059] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0060] Example 1:
[0061] See Figures 1-2 This embodiment provides a data mining method based on cloud-edge-device hierarchical collaboration, including the following specific steps:
[0062] Step S1: Obtain basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset.
[0063] In this embodiment, based on a cloud-edge-device layered collaborative data mining scenario, basic edge mining data corresponding to each edge node within a continuous mining cycle is obtained. This basic edge mining data includes terminal data, mining cycle identifier, edge node identifier, lightweight machine learning model, local recognition threshold, recognition result information, structured mining results, and local model update amount. The recognition result information includes the recognition category, recognition score, and upload status corresponding to the data sample. The structured mining results include the data object identifier, recognition category, recognition score, collection time, and feature summary. The local model update amount is the change in model parameters resulting from the edge node fine-tuning the lightweight machine learning model using data from the corresponding mining cycle.
[0064] Based on the mining cycle identifier and the edge node identifier, the basic edge mining data of the same edge node within a continuous mining cycle is sorted by time to obtain a periodic associated data sequence.
[0065] Based on the recognition score and local recognition threshold in the periodic associated data sequence, the recognition score is subtracted from the local recognition threshold, and the absolute value of the difference is taken to obtain the threshold deviation. Data samples whose threshold deviation is not greater than the width of the boundary neighborhood are determined as boundary neighborhood samples, thus obtaining the boundary neighborhood sample set.
[0066] The boundary neighborhood width is set based on the threshold deviation of data samples that have undergone changes in identification category or upload status within a historical stable period. The historical stable period in this step refers to a period in which the terminal data source configuration, acquisition frequency, input feature names and order, and data mining task type remain consistent, and the rate of change in sample size, the amount of change in feature distribution, and the amount of change in the proportion of identification categories all do not exceed the corresponding stable upper limit within three consecutive mining periods. Three consecutive mining periods can form two sets of adjacent period comparisons to reduce the impact of random fluctuations in a single set of adjacent periods on stability determination.
[0067] The method for determining the sample size change rate is as follows: take the difference between the sample sizes of two adjacent mining cycles and take the absolute value, then divide it by the larger of the sample size of the previous mining cycle and 1 to obtain the sample size change rate.
[0068] The method for determining the variation in feature distribution is as follows: Calculate the average value of each data attribute feature within two adjacent mining cycles. Subtract the two average values corresponding to the same data attribute feature and take the absolute value. Then divide this absolute value by the standard deviation of the corresponding data attribute feature in the merged sample of two adjacent mining cycles to obtain the standardized mean variation of that data attribute feature. Sum the standardized mean variations of all data attribute features and divide by the number of data attribute features to obtain the feature distribution variation. When the standard deviation of a corresponding data attribute feature is 0, if the feature average values are the same in adjacent cycles, the standardized mean variation of that data attribute feature is set to 0; otherwise, it is set to 1.
[0069] The method for determining the change in the proportion of identification categories is as follows: Calculate the proportion of each identification category's sample count in two adjacent mining cycles to the total number of samples in the corresponding cycle. Subtract the two proportions corresponding to the same identification category and take the absolute value. Sum the absolute values of the differences for all identification categories and divide by 2 to obtain the change in the proportion of identification categories. This division by 2 ensures that the change in the proportion of identification categories remains between 0 and 1, and avoids the repeated accumulation of increases in the proportion of the same category with decreases in the proportion of other categories.
[0070] The upper limits for sample size change rate, feature distribution change, and category proportion change are set based on historical periods marked as stable and unstable states in the data collection logs and confirmed event records. The specific setting method is as follows: Calculate the three change indicators for each historical period, arrange the indicators in ascending order, and select the indicator values corresponding to the 90th to 99th percentiles as candidate upper limits; identify historical stable periods based on each candidate upper limit, calculate the accuracy and recall of stable period identification, multiply the product of accuracy and recall by 2, and then divide by the sum of accuracy and recall to obtain the stable period judgment value; select the candidate upper limit with the largest stable period judgment value as the stable upper limit for each of the three change indicators.
[0071] The specific method for setting the boundary neighborhood width is as follows: Extract the historical stable period determined according to the above rules; subtract the corresponding local recognition threshold from the recognition score of each data sample and take the absolute value; in order of threshold deviation from smallest to largest, use each threshold deviation as a candidate width; divide the number of samples within the candidate width that have undergone recognition category changes or upload status changes by the total number of changed samples to obtain the changed sample coverage rate; divide the number of samples within the candidate width that have not undergone recognition category changes or upload status changes by the total number of samples within the candidate width to obtain the non-changed sample mixing rate; add the changed sample coverage rate and the result obtained by subtracting the non-changed sample mixing rate from 1, and then divide by 2 to obtain the boundary screening evaluation value; select the candidate width with the largest boundary screening evaluation value as the boundary neighborhood width. When multiple candidate widths correspond to the same boundary screening evaluation value, select the smaller candidate width.
[0072] Based on the boundary neighborhood sample set, data attribute features of each boundary neighborhood sample are extracted and standardized according to the historical mean and historical standard deviation of the same type of feature. Specifically, the feature value is obtained by subtracting the historical mean of the corresponding feature from the feature value and then dividing by the historical standard deviation of the corresponding feature. When the historical standard deviation is 0, the corresponding standardized feature value is set to 0.
[0073] Based on the standardized data attribute features, the feature values of the same dimension in any two boundary neighborhood samples are subtracted, the differences are squared and summed, and then the square root of the sum is calculated to obtain the sample feature distance. Boundary neighborhood samples whose sample feature distance is not greater than the sample aggregation distance threshold are grouped into the same boundary neighborhood sample group.
[0074] The sample aggregation distance threshold is set based on the feature distances between samples of the same category and between samples of different categories within a historical stable period. The historical stable period is determined using the quantitative judgment rules disclosed in this step. Specifically, the setting method is as follows: The distance distributions of samples of the same category and samples of different categories are statistically analyzed separately, and the feature distances of each sample are used as candidate distance thresholds in ascending order of distance. For any candidate distance threshold, the number of sample pairs of the same category whose distance is not greater than the candidate distance threshold is divided by the total number of sample pairs of the same category to obtain the correct aggregation rate; the number of sample pairs of different categories whose distance is not greater than the candidate distance threshold is divided by the total number of sample pairs of different categories to obtain the incorrect aggregation rate; the correct aggregation rate is added to the result of 1 minus the incorrect aggregation rate, and then divided by 2 to obtain the aggregation evaluation value. The candidate distance threshold with the largest aggregation evaluation value is selected as the sample aggregation distance threshold.
[0075] Based on the boundary neighborhood sample groups, lightweight machine learning model, local recognition threshold, recognition result information, structured mining results and local model update amount corresponding to each mining cycle, the correlation between sample status, recognition mechanism status and model update status is established in the order of mining cycle to obtain single-cycle edge selection trajectory records.
[0076] Based on the single-cycle edge selection trajectory records of each edge node within a continuous mining cycle, the edge selection trajectory dataset is obtained by aggregating the edge node identifier and the mining cycle identifier.
[0077] Step S2: Based on the edge selection trajectory dataset, complete cross-version counterfactual replay under consensus anchor constraints, construct a heterogeneous graph of selection state transition, and perform unbalanced optimal transmission with transportation quality diversion constraints to obtain the state correction mining evidence set and the selection mechanism transition representation set.
[0078] The specific steps of step S2 are as follows:
[0079] Step S201: Perform periodic correlation on the edge selection trajectory dataset to determine the current mining cycle and the reference mining cycle, extract the current identification dataset and the reference identification dataset, and construct the current identification mechanism and the reference identification mechanism. The current identification dataset includes the current boundary neighborhood sample group, the current lightweight machine learning model, the current local identification threshold, the structured mining results, and the local model update amount. The reference identification dataset includes the reference boundary neighborhood sample group, the reference lightweight machine learning model, and the reference local identification threshold.
[0080] In this embodiment, based on the mining cycle identifier in the edge selection trajectory dataset, the latest valid cycle to be analyzed is determined as the current mining cycle, and the most recent compatible cycle before the current mining cycle is determined as the reference mining cycle.
[0081] The compatibility period is set based on the terminal data type, input feature definition, and output recognition category. The specific determination method is as follows: the terminal data type, input feature name and order, and output recognition category corresponding to the historical mining period are compared with the current mining period. When all three are consistent, the corresponding historical mining period is determined as the compatibility period. If the most recent historical period does not meet the compatibility conditions, the search continues in ascending order of time until a reference mining period is obtained.
[0082] Based on the current mining cycle, the current boundary neighborhood sample group, current lightweight machine learning model, current local recognition threshold, structured mining results, and local model update amount are extracted from the edge selection trajectory dataset to obtain the current recognition dataset. Based on the reference mining cycle, the reference boundary neighborhood sample group, reference lightweight machine learning model, and reference local recognition threshold are extracted to obtain the reference recognition dataset.
[0083] The current lightweight machine learning model and the current local recognition threshold are associated to construct the current recognition mechanism. A reference lightweight machine learning model and a reference local recognition threshold are associated to construct a reference recognition mechanism. The recognition mechanism is used to describe the recognition score generated after data samples are input into the lightweight machine learning model, and to determine the processing relationship of the upload status based on the local recognition threshold.
[0084] Step S202: Perform cross-version counterfactual replay and recognition coordinate alignment on the current recognition dataset and the reference recognition dataset with consensus anchor constraints to obtain a coordinate aligned replay result set.
[0085] The specific steps of step S202 are as follows:
[0086] Step S2021: Extract sample features from the current boundary neighborhood sample group and the reference boundary neighborhood sample group respectively, construct the sample feature association relationship, and obtain the current sample association set and the reference sample association set.
[0087] In this embodiment, based on the current boundary neighborhood sample group and the reference boundary neighborhood sample group, the terminal data, recognition score, recognition category, upload status and terminal identifier corresponding to each data sample are read.
[0088] Based on terminal data, data attribute features and time statistical features are extracted. Data attribute features are numerical features formed after outlier removal, missing value imputation, and unit unification of the terminal data. Missing values are imputed using the median of the corresponding feature in the model training data. The median is obtained by arranging the corresponding feature values in ascending order and extracting the feature value at the middle position.
[0089] The time statistical features include the mean, standard deviation, magnitude of change, and direction of change for each data attribute feature within the acquisition window. The mean is obtained by summing the feature values within the acquisition window and then dividing the sum by the number of feature values. The standard deviation is obtained by subtracting the mean from each feature value, squaring each difference, summing all the squares, dividing by the number of feature values, and then taking the square root of the result. The magnitude of change is obtained by subtracting the minimum feature value from the maximum feature value within the acquisition window. The direction of change is obtained by subtracting the initial feature value from the feature value at the end of the acquisition window.
[0090] The acquisition window length is set based on the main change cycle of the terminal data and the data processing latency of the edge nodes. The specific setting method is as follows: extract time statistical features using different candidate window lengths, calculate the fluctuation degree and recognition accuracy of the statistical features of adjacent windows respectively, and select the shortest candidate window length that can cover one major data change process, has a high recognition accuracy, and meets the processing latency requirements of real-time edge processing as the acquisition window length.
[0091] Based on the recognition score, local recognition threshold, and upload status, recognition boundary features and selection status features are constructed. Recognition boundary features include the recognition score, local recognition threshold, and the threshold deviation obtained by subtracting the local recognition threshold from the recognition score. Selection status features include the upload status and the upload ratio of the sample group. The upload ratio of the sample group is obtained by dividing the number of uploaded samples within the sample group by the total number of samples in the sample group.
[0092] The features are concatenated in the following order: data attribute features, time statistical features, identification boundary features, and selection state features, to obtain the sample feature vector. The order of these features is determined by their source and remains consistent within the current mining cycle and the reference mining cycle.
[0093] The same dimension of the feature vectors of each sample in the same boundary neighborhood sample group is summed, and then the summation result is divided by the number of samples in the sample group to obtain the sample feature center.
[0094] Based on the sample group identifier, the sample feature vector, sample feature center, recognition score, recognition category, upload status, terminal identifier, and mining cycle identifier are associated to obtain sample feature association records. The sample feature association records corresponding to the current boundary neighborhood sample group are then aggregated to obtain the current sample association set. The sample feature association records corresponding to the reference boundary neighborhood sample group are then aggregated to obtain the reference sample association set.
[0095] Step S2022: Input the current sample association set and the reference sample association set into the current lightweight machine learning model and the reference lightweight machine learning model respectively, extract the model feature vector, the recognition category and the recognition score, and obtain the current model feature space, the reference model feature space, the current model output set and the reference model output set.
[0096] In this embodiment, the current lightweight machine learning model and the reference lightweight machine learning model adopt the same network structure, including an input adaptation module, a first feature transformation module, a second feature transformation module, a feature compression module, and a classification output module connected in sequence. The two models have the same input feature definitions, module connection relationships, parameter names, parameter dimensions, and output category definitions, and respectively load the model parameters corresponding to the current mining cycle and the reference mining cycle.
[0097] The input adaptation module includes a feature order verification unit, a missing feature imputation unit, and a feature standardization unit. The feature order verification unit verifies the number, name, and order of sample features. The missing feature imputation unit fills in missing values using the median of the corresponding feature in the model training data. The feature standardization unit subtracts the mean of the corresponding feature in the training data from the feature value, and then divides by the standard deviation of the corresponding feature to obtain a standardized feature vector. When the standard deviation of the corresponding feature is 0, the standardized feature value is set to 0.
[0098] The first feature transformation module comprises a first fully connected layer, a first batch normalization layer, and a first activation layer connected in sequence. The first fully connected layer multiplies the standardized feature vector by the first weight parameter and adds the first bias parameter to obtain the first linear transformation result. The first batch normalization layer normalizes the first linear transformation result based on the running mean parameter, running variance parameter, scaling parameter, and offset parameter formed during the training phase. The first activation layer uses a modified linear activation function, setting negative values to 0 and retaining non-negative values to obtain the first layer feature vector.
[0099] The second feature transformation module comprises a second fully connected layer, a second batch normalization layer, a second activation layer, and a random deactivation layer, connected sequentially. The second fully connected layer uses the second weight parameter and the second bias parameter to perform dimensionality reduction on the feature vector of the first layer. The second batch normalization layer and the second activation layer employ the same processing method as the first feature transformation module. The random deactivation layer masks some feature nodes according to a random deactivation ratio during model training and is turned off during model inference, resulting in the feature vector of the second layer.
[0100] The feature compression module consists of a fully connected feature compression layer and a vector normalization layer connected sequentially. The fully connected feature compression layer converts the second-layer feature vector into a fixed-dimensional model feature vector based on compression weights and biases. The vector normalization layer squares each feature component of the model feature vector and sums them. The sum is then square-rooted, and each feature component is divided by the square root to obtain the normalized model feature vector. When the square root result is 0, each feature component in the normalized model feature vector is set to 0.
[0101] The classification output module comprises a category mapping layer and a probability output layer connected sequentially. The category mapping layer maps the normalized model feature vectors to category scores for each identified category based on category mapping weight parameters and category mapping bias parameters. The binary classification task converts the target category score into a recognition probability between 0 and 1 using a logistic probability function. The multi-class classification task performs exponential operations on each category score and divides the result of each exponential operation by the sum of the exponential operations for all categories to obtain the category probability for each identified category. The category with the highest probability is determined as the identified category, and the category probability corresponding to the target identified category is determined as the recognition score.
[0102] The number of nodes in the first fully connected layer, the second fully connected layer, and the feature compression fully connected layer is set based on the sample feature dimension, the single inference time of edge nodes, and the recognition accuracy of the validation data. Specifically, the method is as follows: the model is trained using multiple sets of candidate node numbers, and the single inference time and validation accuracy of each candidate model are recorded. The smallest node combination is selected where the inference time meets the requirements for real-time edge processing and the decrease in validation accuracy does not exceed the allowable decrease.
[0103] The allowable decrease range is set based on the recognition accuracy of the uncompressed model and the candidate lightweight model on the same validation data. Specifically, the validation accuracy of the uncompressed model is subtracted from the validation accuracy of the candidate lightweight model, and the target class recall rate of the candidate lightweight model is calculated. The maximum accuracy difference corresponding to when the target class recall rate meets the application requirements and the number of model parameters is significantly reduced is selected as the allowable decrease range. For example, in this embodiment, the allowable decrease range is preferably 0.01 to 0.03, the number of nodes in the first fully connected layer is preferably 1 to 2 times the input feature dimension, the number of nodes in the second fully connected layer is preferably one-half to three-quarters of the number of nodes in the first fully connected layer, and the number of nodes in the feature compression fully connected layer is preferably 4 to 16.
[0104] The random deactivation ratio is set based on the model's training accuracy and validation accuracy. Specifically, it is set by training a model with the same network structure using different candidate random deactivation ratios, calculating the difference between the training accuracy and validation accuracy, and selecting the candidate random deactivation ratio with higher validation accuracy and a smaller difference as the target random deactivation ratio. For example, in this embodiment, the random deactivation ratio is preferably between 0.10 and 0.30.
[0105] Both the current lightweight machine learning model and the reference lightweight machine learning model are trained using historically confirmed data samples of identified categories. Training data, validation data, and test data are divided according to the data collection period to which the data samples belong, ensuring that data from the same collection period is not simultaneously included in the training and validation data sets.
[0106] The model training loss includes class identification loss and parameter regularization loss. Class identification loss uses cross-entropy loss, determined based on the difference between the true class of a sample and its corresponding class probability. Parameter regularization loss is obtained by squaring and summing the weights of each fully connected layer. Multiplying the parameter regularization loss by a regularization coefficient and then adding it to the class identification loss yields the model training loss.
[0107] The regularization coefficient is set based on the validation loss and the magnitude of the model weight parameters. Specifically, the model is trained using different candidate regularization coefficients, and the validation loss, validation accuracy, and weight parameter magnitudes of each model are compared. The candidate regularization coefficient with the smaller validation loss, higher validation accuracy, and no continuous increase in the weight parameters is selected as the target regularization coefficient. For example, in this embodiment, the regularization coefficient is preferably between 0.00001 and 0.001.
[0108] The model employs an adaptive moment estimation (IME) optimization method to update the weight and bias parameters. The IEM optimization parameters include the initial learning rate, the first moment decay coefficient, the second moment decay coefficient, and a numerical stability term. Each optimization parameter is set based on the rate of decrease and volatility of the validation loss. Specifically, different combinations of optimization parameters are used to train for the same number of epochs, selecting the parameter combination that results in a sustained decrease in training loss, no significant oscillations in validation loss, and a shorter number of epochs required to reach a stable state.
[0109] The number of training samples per batch is set based on the available storage space of the edge nodes and the degree of gradient fluctuation. Specifically, the method is as follows: training is performed using different candidate batch training sample numbers, and the largest candidate number that does not exceed the available storage space of the edge nodes and has relatively small fluctuations in training loss between adjacent batches is selected. For example, in this embodiment, the initial learning rate is preferably 0.0001 to 0.01, and the batch training sample number is preferably 16 to 128.
[0110] The number of waiting rounds is set based on the interval between two consecutive valid loss reductions during historical model training. Specifically, the method is as follows: statistically analyze the intervals corresponding to when the validation loss reduction reaches the minimum effective reduction, and determine the maximum value among these historical intervals as the number of waiting rounds. The minimum effective reduction is determined based on the model parameter storage precision, selecting the minimum loss reduction value that causes a detectable change in the model's output recognition score.
[0111] The lightweight machine learning model is trained iteratively. After each training round, the validation loss is calculated until the validation loss continuously reaches a certain level. If the validation loss does not decrease after a certain number of rounds, the iteration stops, and the model parameters corresponding to the lowest validation loss are retained.
[0112] The current sample association set and the reference sample association set are input into the current lightweight machine learning model, respectively. The model sequentially passes through the input adaptation module, the first feature transformation module, the second feature transformation module, the feature compression module, and the classification output module to obtain the current model feature vector, recognition category, and recognition score for each data sample. The current model feature vectors of each data sample within the same boundary neighborhood sample group are summed by dimension and then divided by the number of samples to obtain the current model feature vector for that sample group. All current model feature vectors are aggregated to obtain the current model feature space; the corresponding recognition categories and recognition scores are aggregated to obtain the current model output set.
[0113] Input the current sample association set and the reference sample association set into the reference lightweight machine learning model respectively, and use the same processing procedure to obtain the reference model feature space and the reference model output set.
[0114] Step S2023: Based on the current model feature space, the reference model feature space, the current model output set, and the reference model output set, perform neighborhood stability analysis on the current sample association set and the reference sample association set to obtain the consensus anchor point sample group.
[0115] The specific steps of step S2023 are as follows:
[0116] Step S20231: Calculate the model feature vector distance between each boundary neighborhood sample group in the current model feature space and the reference model feature space respectively, to obtain the current feature distance matrix and the reference feature distance matrix.
[0117] In this embodiment, based on the current model feature space, the current model feature vectors of any two boundary neighborhood sample groups are selected in sequence, the feature components of the same dimension are subtracted respectively, the differences are squared and summed, and the summation result is square rooted to obtain the model feature vector distance between the two sample groups in the current model feature space.
[0118] Based on the reference model feature space, the same processing procedure is used to obtain the model feature vector distance of each boundary neighborhood sample group in the reference model feature space.
[0119] Following the order of the boundary neighborhood sample groups, the feature vector distances of each model are written into the corresponding row and column positions to obtain the current feature distance matrix and the reference feature distance matrix. The main diagonal of both matrices is set to 0, and the same distance is recorded at positions symmetrical about the main diagonal.
[0120] Step S20232: Based on the current feature distance matrix and the reference feature distance matrix, determine the set of neighboring sample groups of each boundary neighborhood sample group in the current model feature space and the reference model feature space, respectively.
[0121] In this embodiment, based on the current feature distance matrix, each boundary neighborhood sample group is sequentially taken as the target sample group. The model feature vector distances between the target sample group and the other sample groups are sorted in ascending order, and the neighboring sample groups with the highest sorting are selected to obtain the current neighboring sample group set.
[0122] The number of neighboring sample groups is set based on the total number of boundary neighborhood sample groups participating in the analysis and the historical neighborhood retention rate. Specifically, the method is as follows: The total number of sample groups is squared and rounded up to obtain the initial number of neighbors; Centered on the initial number of neighbors, within a range not less than 3 and not greater than the total number of sample groups minus 1, integers corresponding to the initial number of neighbors minus 2 to the initial number of neighbors plus 2 are selected sequentially as candidate neighbor numbers; when the number of candidate neighbors exceeds the specified range, that candidate neighbor number is discarded.
[0123] The historical neighborhood retention rate mentioned in this step is determined based on the historical stable model version switching cycle. The historical stable model version switching cycle refers to the adjacent mining cycle in which the data is determined to be stable according to the sample size change rate, feature distribution change amount, and identification category ratio change amount disclosed in step S1, but the lightweight machine learning model version or local identification threshold changes.
[0124] Each candidate neighbor number is used to construct a neighbor sample group set under adjacent model versions. The number of neighbor intersections of the same sample group under the two model versions is divided by the number of neighbor unions to obtain the neighborhood preservation rate. The neighborhood preservation rates of all sample groups are summed and then divided by the number of sample groups to obtain the average neighborhood preservation rate corresponding to the number of candidate neighbors. The average neighborhood preservation rate before and after increasing the number of candidate neighbors by 1 is subtracted. When the increase in the average neighborhood preservation rate is not greater than the neighborhood preservation increment threshold, the smaller candidate neighbor number is selected as the number of neighbor sample groups.
[0125] The neighborhood retention increment threshold is set based on the curve of the average neighborhood retention rate as the number of neighbors increases during the historical stable model version switching cycle. Specifically, the setting method is as follows: calculate the increase in the average neighborhood retention rate corresponding to the number of adjacent candidate neighbors, arrange all increases from smallest to largest, and take half of the median as the neighborhood retention increment threshold; for example, in this embodiment, the neighborhood retention increment threshold is preferably 0.01 to 0.05.
[0126] Based on the reference feature distance matrix, the reference neighbor sample group set is obtained in the same way.
[0127] Step S20233: Compare the sets of neighboring sample groups in the current model feature space and the reference model feature space for the same boundary neighborhood sample group to obtain the neighborhood stability result.
[0128] In this embodiment, based on the current neighboring sample group set and the reference neighboring sample group set of the same boundary neighborhood sample group, sample groups that exist in both sets are extracted to obtain the neighboring intersection; the two sets are merged and duplicate sample groups are removed to obtain the neighboring union.
[0129] Divide the number of sample groups in the nearest intersection by the number of sample groups in the nearest union to obtain the neighborhood overlap ratio.
[0130] The neighborhood stability threshold is set based on the neighborhood overlap ratio during the historical stable model version switching cycle. The historical stable model version switching cycle is determined using the judgment rule disclosed in step S20232. The specific setting method is as follows: calculate the neighborhood overlap ratio of each sample group during each historical stable model version switching cycle, arrange the neighborhood overlap ratios from smallest to largest, and use them as candidate neighborhood stability thresholds in sequence.
[0131] For any candidate neighborhood stability threshold, a sample group with a neighborhood overlap ratio not less than the candidate threshold is selected to obtain a candidate stable sample group; anchor point coordinate pairs are formed based on the candidate stable sample groups, and the historical recognition coordinate transformation is performed using the monotonic piecewise mapping method disclosed in step S20244; the difference between the replay score of the reference mechanism after transformation and the replay score of the corresponding current mechanism is taken and the absolute value is calculated, all absolute differences are summed, and then divided by the number of candidate stable sample groups to obtain the coordinate alignment error.
[0132] When a group of candidate stable samples can cover both the upper and lower sides of the reference local recognition threshold, the corresponding candidate neighborhood stable threshold is retained. From the retained candidate thresholds, the candidate threshold with the smallest coordinate alignment error is selected as the neighborhood stable threshold. When multiple candidate thresholds correspond to the same coordinate alignment error, the candidate threshold that can retain more candidate stable sample groups is selected. For example, in this embodiment, the neighborhood stable threshold is preferably between 0.55 and 0.80.
[0133] When the overlap ratio of neighborhoods is not less than the neighborhood stability threshold, the corresponding sample group is marked as having a stable neighborhood relationship; when the overlap ratio of neighborhoods is less than the neighborhood stability threshold, the corresponding sample group is marked as having an unstable neighborhood relationship, thus obtaining a neighborhood stability result.
[0134] Step S20234: Extract the recognition category and recognition score corresponding to each boundary neighborhood sample group from the current model output set and the reference model output set, perform category consistency comparison and threshold position comparison, and obtain stable recognition results.
[0135] In this embodiment, based on the sample group identifier, the current identification category, reference identification category, current identification score, and reference identification score corresponding to the same boundary neighborhood sample group are extracted from the current model output set and the reference model output set.
[0136] When the current identification category and the reference identification category are the same, the corresponding sample group is marked as having the same identification category; when the two identification categories are different, the corresponding sample group is marked as having inconsistent identification categories.
[0137] Subtracting the current local recognition threshold from the current recognition score yields the current threshold deviation. Subtracting the reference local recognition threshold from the reference recognition score yields the reference threshold deviation. When both threshold deviations are not less than 0, or both are less than 0, the corresponding sample group is marked as having consistent threshold positions; when the two threshold deviations are located on opposite sides of 0, the corresponding sample group is marked as having inconsistent threshold positions.
[0138] When a sample group simultaneously satisfies both the consistency of the recognition category and the consistency of the threshold position, it is marked as recognition stable; otherwise, it is marked as recognition unstable, thus obtaining a recognition stable result.
[0139] Step S20235: Based on the neighborhood stability results and the identification stability results, select the boundary neighborhood sample group with stable neighborhood relationships, consistent identification categories and consistent threshold positions to obtain the consensus anchor point sample group.
[0140] In this embodiment, a boundary neighborhood sample group with stable neighborhood relationships is extracted based on the neighborhood stability result, and a sample group with consistent identification category and consistent threshold position is retained based on the identification stability result to obtain a consensus anchor candidate sample group.
[0141] The consensus anchor candidate sample groups are arranged in ascending order of reference recognition scores, and it is checked whether there are consensus anchor candidate sample groups both above and below the reference local recognition threshold. When candidate sample groups exist on both sides, they are determined as consensus anchor sample groups.
[0142] When no consensus anchor candidate sample group exists on either side of the local identification threshold, the remaining compatible historical periods are selected sequentially according to the compatibility period determination rule in step S201, from most recent to oldest time, and steps S2021 to S20235 are repeated. The number of consensus anchor candidate sample groups, the number of anchors above the threshold, and the number of anchors below the threshold are counted for each compatible historical period.
[0143] When there are compatible historical periods that can cover both sides of the reference local identification threshold, the compatible historical period with the largest number of consensus anchor candidate sample groups is selected as the reference mining period; when the number of candidate sample groups of multiple compatible historical periods is the same, the compatible historical period that is closest to the current mining period in time is selected.
[0144] When none of the compatible historical periods can satisfy the requirement that there are consensus anchor candidate sample groups on both sides of the threshold, the compatible historical period with the largest number of consensus anchor candidate sample groups is selected as the downgrade reference period, and the threshold coordinate pair formed by the reference local identification threshold and the current local identification threshold is determined as the forced anchor coordinate pair.
[0145] When there is at least one consensus anchor candidate sample group in the downgrade reference period, the candidate sample group and the forced anchor coordinate pair are used together as the downgrade consensus anchor point; when there is no consensus anchor candidate sample group, only the forced anchor coordinate pair is used to establish a threshold translation mapping relationship, the reference mechanism replay score is subtracted from the reference local identification threshold, and then added to the current local identification threshold to obtain the transformed reference mechanism replay score, and the transformation result is limited to between 0 and 1.
[0146] When using a downgraded consensus anchor point or threshold translation mapping relationship, the corresponding coordinate alignment record is marked as a downgraded alignment record. In step S204, when determining the result credibility, the original result credibility is multiplied by the downgrade credibility coefficient. The downgrade credibility coefficient is set based on the ratio of historical downgraded alignment error to normal anchor point alignment error. Specifically, the setting method is as follows: divide the historical normal anchor point alignment error by the historical downgraded alignment error, and limit the result to between 0 and 1 to obtain the downgrade credibility coefficient. For example, in this embodiment, the downgrade credibility coefficient is preferably between 0.30 and 0.80.
[0147] Step S2024: Based on the consensus anchor sample group, the current identification mechanism, and the reference identification mechanism, perform cross-version counterfactual replay and identification coordinate alignment on the current sample association set and the reference sample association set to obtain the coordinate alignment replay result set.
[0148] The specific steps of step S2024 are as follows:
[0149] Step S20241: Replay each boundary neighborhood sample group in the current sample association set and the reference sample association set through the current recognition mechanism and the reference recognition mechanism to obtain the current mechanism replay score set and the reference mechanism replay score set.
[0150] In this embodiment, each data sample in the current sample association set and the reference sample association set is input into the current lightweight machine learning model, and then passed through each module of the current lightweight machine learning model in sequence to obtain the current mechanism recognition score of each data sample.
[0151] The current mechanism identification scores of each data sample within the same boundary neighborhood sample group are summed, and the sum is then divided by the number of data samples in that sample group to obtain the current mechanism replay score. The current mechanism replay scores of all sample groups are aggregated to obtain the current mechanism replay score set.
[0152] Each data sample in the current sample association set and the reference sample association set is input into the reference lightweight machine learning model, and the same processing procedure is used to obtain the reference mechanism replay score set.
[0153] Step S20242: Compare the replay scores of each current mechanism with the current local recognition threshold, and the replay scores of each reference mechanism with the reference local recognition threshold, to determine the inverse fact transmission state of each boundary neighborhood sample group and obtain the dual-mechanism replay result set.
[0154] In this embodiment, the replay score of each current mechanism is compared with the current local recognition threshold. When the replay score of the current mechanism is not less than the current local recognition threshold, the current mechanism's reverse fact upload status is determined to be uploaded; when the replay score of the current mechanism is less than the current local recognition threshold, the current mechanism's reverse fact upload status is determined to be not uploaded.
[0155] The replay scores of each reference mechanism are compared with the reference local recognition threshold. When the replay score of the reference mechanism is not less than the reference local recognition threshold, the reference mechanism's reverse fact upload status is determined to be uploaded; when the replay score of the reference mechanism is less than the reference local recognition threshold, the reference mechanism's reverse fact upload status is determined to be not uploaded.
[0156] Based on the sample group identifier, the replay score of the current mechanism, the replay score of the reference mechanism, the reverse transmission status of the current mechanism, the reverse transmission status of the reference mechanism, the mining cycle identifier, and the number of samples are correlated to obtain the dual-mechanism replay result set.
[0157] Step S20243: Extract the dual-mechanism replay scores of consensus anchor point sample groups from the dual-mechanism replay result set, pair the scores of the same group, and associate them with the current local recognition threshold and the reference local recognition threshold to obtain the anchor point coordinate corresponding sequence.
[0158] In this embodiment, based on the sample group identifier of the consensus anchor sample group, the corresponding current mechanism replay score and reference mechanism replay score are extracted from the dual-mechanism replay result set.
[0159] The reference mechanism replay score is used as the reference recognition coordinate, and the current mechanism replay score corresponding to the same sample group is used as the current recognition coordinate to obtain the anchor point coordinate pair.
[0160] By using the reference local recognition threshold as the reference threshold coordinate and the current local recognition threshold as the current threshold coordinate, a threshold coordinate pair is obtained.
[0161] The anchor point coordinate pairs are arranged in ascending order of the reference recognition coordinates, and threshold coordinate pairs are inserted according to the position of the reference local recognition threshold in the reference recognition coordinate sequence to obtain the corresponding sequence of anchor point coordinates.
[0162] Step S20244: Based on the anchor point coordinate correspondence sequence, construct a monotonic piecewise mapping relationship from the reference identification coordinates to the current identification coordinates.
[0163] In this embodiment, anchor point coordinate pairs are arranged in ascending order of reference identification coordinates. When the same reference identification coordinate corresponds to multiple current identification coordinates, the number of samples in each anchor point sample group is divided by the total number of samples to obtain the coordinate weight; each current identification coordinate is multiplied by its corresponding coordinate weight and summed to obtain the merged current identification coordinates.
[0164] Perform a monotonicity check on the current identification coordinates. When a subsequent current identification coordinate is less than the previous current identification coordinate, the continuous coordinate segment where the decrease occurs is identified as the coordinate segment to be corrected. Multiply each current identification coordinate within this coordinate segment by the corresponding anchor point sample number and sum the results. Then divide by the total number of samples within the coordinate segment to obtain the coordinate segment correction value. Replace the current identification coordinates within this coordinate segment with the coordinate segment correction value.
[0165] The current identification coordinates are iteratively corrected until the current identification coordinates remain non-decreasing according to the order of the reference identification coordinates, at which point the iteration stops and a monotonic anchor point coordinate sequence is obtained.
[0166] Adjacent anchor point coordinate pairs in the monotonic anchor point coordinate sequence are defined as mapping intervals. The current coordinate difference is obtained by subtracting the current coordinate of the interval's starting point from the current coordinate of the interval's endpoint. The reference coordinate difference is obtained by subtracting the reference coordinate of the interval's starting point from the reference coordinate of the interval's endpoint. Since identical reference coordinates have been merged, the reference coordinate difference is greater than 0. The initial mapping slope is obtained by dividing the current coordinate difference by the reference coordinate difference.
[0167] The allowable range of mapping slope is set based on the distribution of mapping slopes in the effective mapping intervals within the historical stable model version switching cycle. Specifically, the method is as follows: extract the historical stable model version switching cycle determined in step S20232, calculate the mapping slope of each effective mapping interval, arrange all positive mapping slopes from smallest to largest, and take the mapping slopes corresponding to the 5th percentile and 95th percentile as the lower and upper limits of the slope, respectively; when the initial mapping slope is less than the lower limit, the mapping slope is set as the lower limit; when the initial mapping slope is greater than the upper limit, the mapping slope is set as the upper limit.
[0168] Subtract the starting reference coordinates of the interval from the reference coordinates to be converted to obtain the reference offset within the interval. Multiply the reference offset within the interval by the mapping slope, and then add it to the current recognition coordinates of the starting point of the interval to obtain the converted current recognition coordinates.
[0169] For reference mechanism replay scores below the first reference identification coordinate or above the last reference identification coordinate, infinite linear extrapolation is not performed. The maximum extrapolation distance is set based on the distribution of replay scores outside the anchor point coverage area during the historical stable model version switching cycle. The specific setting method is as follows: different candidate extrapolation distances are used to complete the historical coordinate transformation, the average absolute difference between the reference mechanism replay score and the current mechanism replay score after the extrapolation sample transformation is calculated, and the candidate extrapolation distance with the smallest average absolute difference is selected as the maximum extrapolation distance; for example, in the embodiments of this application, the maximum extrapolation distance is preferably 0.05 to 0.20.
[0170] When the distance by which the reference coordinates to be converted exceeds the coverage area of the anchor point is no greater than the maximum extrapolation distance, extrapolation is performed using the restricted mapping slope of the corresponding end mapping interval; when the distance exceeds the maximum extrapolation distance, only the part corresponding to the maximum extrapolation distance is linearly transformed, while the part exceeding the maximum extrapolation distance retains the end transformation value unchanged. All transformation results are restricted to between 0 and 1, resulting in a monotonically piecewise mapping relationship.
[0171] Step S20245: Transform the reference mechanism replay score using a monotonic piecewise mapping relationship, and associate the transformed reference mechanism replay score with the corresponding current mechanism replay score and the inverse real transmission state to obtain a coordinate-aligned replay result set.
[0172] In this embodiment, based on the mapping interval where the replay score of each reference mechanism is located, the mapping slope and the starting coordinate of the corresponding mapping interval are called, and the conversion process disclosed in step S20244 is followed to obtain the converted reference mechanism replay score.
[0173] Based on the sample group identifier, the replay score of the reference mechanism after conversion, the replay score of the current mechanism, the reverse transmission status of the current mechanism, the reverse transmission status of the reference mechanism, the identification category, the number of samples, and the mining cycle identifier are associated to obtain a single set of coordinate-aligned replay records.
[0174] The coordinate-aligned replay records of all boundary neighborhood sample groups are aggregated to obtain the coordinate-aligned replay result set.
[0175] Step S203: Based on the coordinate-aligned replay result set, construct a heterogeneous graph of selected state transition and perform unbalanced optimal transmission with transportation quality diversion constraints to obtain the actual data state change characterization and selection mechanism transition characterization.
[0176] The specific steps of step S203 are as follows:
[0177] Step S2031: Based on the coordinate-aligned replay result set, construct a heterogeneous graph of the selected state transition, determine the quality to be transported and the sensitivity of the selection mechanism, and perform quality splitting and mechanism residual aggregation to obtain the quality diversion result.
[0178] The specific steps of step S2031 are as follows:
[0179] Step S20311: Map nodes to the current boundary neighborhood sample group, the reference boundary neighborhood sample group, the dual-mechanism replay results, and the inverse real transmission state, and set mechanism residual nodes to obtain a heterogeneous node set. The heterogeneous node set includes the current sample node, the reference sample node, the current output node, the reference output node, the current state node, the reference state node, and the mechanism residual node.
[0180] In this embodiment, based on the mining cycle to which the sample group belongs, the current boundary neighborhood sample group is mapped to the current sample node, and the reference boundary neighborhood sample group is mapped to the reference sample node. The sample node attributes include sample group identifier, number of samples, sample feature center, identification category, edge node identifier, and mining cycle identifier.
[0181] Based on the dual-mechanism replay results, the current mechanism replay result corresponding to each sample node is mapped to the current output node, and the reference mechanism replay result is mapped to the reference output node. Output node attributes include sample group identifier, recognition mechanism identifier, replay score, recognition category, and model version identifier. The replay score in the reference output node is the transformed reference mechanism replay score obtained in step S20245.
[0182] Based on the reverse fact transmission state, the current mechanism's reverse fact transmission state is mapped to a current state node, and the reference mechanism's reverse fact transmission state is mapped to a reference state node. State node attributes include sample group identifier, recognition mechanism identifier, reverse fact transmission state, and threshold deviation direction.
[0183] Set up residual nodes for the current mechanism and residual nodes for the reference mechanism. The current mechanism residual node is used to aggregate the mechanism-induced quality pointing to the current identification mechanism, while the reference mechanism residual node is used to aggregate the mechanism-induced quality pointing to the reference identification mechanism. The residual node attributes include the identification mechanism identifier, model version identifier, local identification threshold, and cumulative mechanism-induced quality value.
[0184] The current sample node, reference sample node, current output node, reference output node, current state node, reference state node, and mechanism residual node are aggregated to obtain a heterogeneous node set.
[0185] Step S20312: Calculate the sample feature distance between each reference sample node and the boundary neighborhood sample group corresponding to each current sample node, and perform neighbor filtering to obtain cross-period adjacent node pairs.
[0186] In this embodiment, based on the sample feature centers of the reference sample node and the current sample node, the feature components of the same dimension are subtracted respectively, the differences are squared and summed, and then the square root operation is performed on the summation result to obtain the sample feature distance.
[0187] For each reference sample node, select the current neighboring node set in ascending order of sample feature distance. For each current sample node, select the reference neighboring node set in the same way.
[0188] The cross-period neighbor count is set based on the current number of sample nodes, the number of reference sample nodes, and the historical correct matching coverage. Specifically, the smaller of the current number of sample nodes and the number of reference sample nodes is taken, its square root is calculated, and then rounded up to obtain the initial cross-period neighbor count. Candidates near the initial cross-period neighbor count are used to filter historically confirmed node correspondences, and the proportion of correct node pairs entering the mutual neighbor set is calculated. Candidates whose correct matching coverage no longer significantly improves and whose candidate edge count is small are selected as the cross-period neighbor count.
[0189] When the reference sample node and the current sample node enter each other's neighboring node set, they are identified as cross-period adjacent node pairs, thus obtaining cross-period adjacent node pairs.
[0190] Step S20313: Establish a mechanism permutation edge between the current output node and the reference output node associated with the same sample node, establish a state transition candidate edge between adjacent node pairs across cycles, establish an upload state edge between each output node and the corresponding state node, and establish a residual aggregation edge between each state node and the corresponding mechanism residual node. Combine the heterogeneous node set to construct a selection state transition heterogeneous graph.
[0191] In this embodiment, a mechanism permutation edge is established between the current output node and the reference output node associated with the same sample node, based on the sample group identifier. The attributes of the mechanism permutation edge include the current mechanism replay score, the reference mechanism replay score after transformation, the difference between the two mechanism replay scores, and the difference between the two mechanism reverse fact transmission states.
[0192] Based on cross-period adjacent node pairs, candidate edge transitions are established between the reference sample node and the current sample node. The candidate association strength is obtained by adding the sample feature distance to 1, using the sum as the denominator and 1 as the numerator. The candidate association strength decreases as the sample feature distance increases, and the candidate association strength is 1 when the sample feature distance is 0.
[0193] Based on the sample group identifier and the recognition mechanism identifier, an upload state edge is established between each output node and its corresponding state node. The attributes of the upload state edge include the replay score, the local recognition threshold, the threshold deviation obtained by subtracting the local recognition threshold from the replay score, and the inverse upload state.
[0194] Based on the identification mechanism identifier, residual aggregation edges are established between each state node and the corresponding residual node of the mechanism. The attributes of the residual aggregation edges include the sample group identifier, the inverse fact propagation state difference, and the induced quality of the mechanism to be aggregated.
[0195] By combining heterogeneous node sets, mechanism permutation edges, state transition candidate edges, uploaded state edges, and residual aggregation edges, a heterogeneous graph for selecting state transitions is obtained.
[0196] Step S20314: Determine the quality to be transported and the sensitivity of the selected mechanism based on the boundary neighborhood sample group corresponding to each sample node, the current mechanism replay score, the reference mechanism replay score, and the inverse transmission state.
[0197] In this embodiment, existing optimal transmission methods typically use the number of samples or the proportion of the number of samples to the total number of samples in a period as the quality to be transported, and then perform cross-period distribution matching based on sample feature distance. This method assumes that the same data selection mechanism is used in different periods, and cannot distinguish whether the change in sample quality is caused by changes in the actual data state or by changes in the model version and local recognition threshold.
[0198] In the scenario described in this application, sample groups within the same boundary neighborhood may have different replay scores and inverse real transmission states under the current recognition mechanism and the reference recognition mechanism. If all sample quality is directly used for cross-cycle transportation, selective reporting differences caused by changes in model version or local recognition thresholds will be included in the actual data state changes.
[0199] Based on the sample count of the corresponding boundary neighborhood sample group for each sample node, the sample count of all sample nodes within the same mining cycle is summed to obtain the total boundary sample count. The sample count of each sample group is divided by the total boundary sample count of the corresponding cycle to obtain the quality to be transported. When the total boundary sample count is 0, the transportation analysis for the corresponding cycle is terminated, and the corresponding cycle is marked as a cycle with no valid boundary samples.
[0200] Based on the current output node and the reference output node, read the replay score of the current mechanism and the replay score of the transformed reference mechanism. Subtract the two replay scores and take the absolute value to obtain the score-sensitive component.
[0201] Based on the current state node and the reference state node, read the current mechanism's reverse factual transmission state and the reference mechanism's reverse factual transmission state. When the two reverse factual transmission states are the same, set the state-sensitive component to 0; when the two reverse factual transmission states are different, set the state-sensitive component to 1.
[0202] The basic selection mechanism sensitivity is obtained by weighting the score-sensitive component and the state-sensitive component. The score-sensitive component is used to characterize the continuous mechanism shift when no upload state reversal occurs, and the state-sensitive component is used to characterize whether the change in the identification mechanism causes the sample group to cross the upload boundary.
[0203] The weights of the score-sensitive component and the state-sensitive component are set based on the mechanism change identification results in the historical mechanism change cycle. The historical mechanism change cycle refers to the adjacent historical cycles that are determined to be stable according to the quantization rules disclosed in step S1, but the current lightweight machine learning model and the reference lightweight machine learning model have different model versions, or the current local identification threshold and the reference local identification threshold are different.
[0204] The candidate values for the score-sensitive component weights range from 0.50 to 0.90, and the state-sensitive component weights are obtained by subtracting the score-sensitive component weights from 1. Candidate weight combinations are generated sequentially with a candidate step size of 0.05, and the initial weight combinations are set to 0.70 and 0.30. The sensitivity of the basic selection mechanism during historical mechanism change cycles is calculated using each candidate weight combination. The sample group whose basic selection mechanism sensitivity is not less than the sensitivity judgment threshold is determined as the mechanism change sample group.
[0205] The sensitivity threshold is set based on the sensitivity of the basic selection mechanism corresponding to the historically confirmed mechanism change sample group and the non-mechanism change sample group. The specific setting method is as follows: All basic selection mechanism sensitivities are sequentially used as candidate thresholds. The accuracy and recall of the mechanism change sample identification are calculated separately. The product of accuracy and recall is multiplied by 2, and then divided by the sum of accuracy and recall to obtain the harmonic evaluation value. The candidate threshold with the largest harmonic evaluation value is selected as the sensitivity threshold. The candidate weight combinations are compared using the same method, and the candidate weight combination with the largest harmonic evaluation value is selected as the weight for the score-sensitive component and the state-sensitive component.
[0206] Multiply the score-sensitive component by its weight to obtain the score-sensitive result. Multiply the state-sensitive component by its weight to obtain the state-sensitive result. Add the two sensitivity results to obtain the sensitivity of the basic selection mechanism.
[0207] To reduce the transmission impact of characteristic state changes and small sample random fluctuations on quality diversion, a characteristic stability coefficient is determined based on the neighborhood overlap ratio obtained in step S20233, and a sample representativeness coefficient is determined based on the sample size of the boundary neighborhood sample group. The neighborhood overlap ratio is restricted to between 0 and 1 to obtain the characteristic stability coefficient. The sample representativeness coefficient is obtained by dividing the sample size of the corresponding boundary neighborhood sample group by the maximum sample size of each boundary neighborhood sample group within the same mining cycle.
[0208] The sensitivity of the selection mechanism is obtained by multiplying the basic selection mechanism sensitivity by the feature stability coefficient, and then by the sample representativeness coefficient. A low feature stability coefficient indicates that the feature neighborhood relationship of the same sample group has changed significantly, and the corresponding score change is more likely to reflect changes in the actual data state, thus reducing its mechanism sensitivity. A low sample representativeness coefficient indicates that the sample group has a small number of samples, and reducing its mechanism sensitivity reduces the amplification of the mechanism-induced quality by accidental samples.
[0209] For example, the quality to be transported in a certain sample group is 0.10, the sensitivity of the basic selection mechanism is 0.356, the neighborhood overlap ratio is 0.80, the number of samples in this sample group is 30 in the same mining cycle, and the number of samples in the largest sample group is 40. Dividing 30 by 40 gives a sample representativeness coefficient of 0.75; multiplying 0.356 by 0.80, and then by 0.75, gives a selection mechanism sensitivity of 0.2136.
[0210] Step S20315: Based on the sensitivity of the selection mechanism, the quality to be transported is divided into state-comparable quality and mechanism-induced quality, and the mechanism-induced quality is aggregated to the corresponding mechanism residual node along the residual aggregation edge to obtain the quality diversion result.
[0211] In this embodiment, ordinary unbalanced optimal transport typically inputs all the mass to be transported directly into the transport model, and allows some mass to be generated or disappear through mass relaxation constraints. This method does not distinguish the cause of the formation of mismatched mass, and easily interprets mass formed by changes in model version or local identification threshold as the addition or disappearance of data state.
[0212] To address the aforementioned issues, this application, before performing unbalanced optimal transmission, divides the quality of the transport to be carried out based on the selection mechanism sensitivity obtained in step S20314.
[0213] Subtracting the selection mechanism sensitivity from 1 yields the state-comparable proportion. Multiplying the mass to be transported by the state-comparable proportion yields the state-comparable mass. Multiplying the mass to be transported by the selection mechanism sensitivity yields the mechanism-induced mass.
[0214] The sum of the state-comparable mass and the mechanism-induced mass equals the mass to be transported, ensuring that the total mass remains consistent before and after the mass split. When numerical storage precision leads to errors in the sum of the two types of mass and the mass to be transported, the state-comparable mass is subtracted from the mass to be transported to obtain the corrected mechanism-induced mass.
[0215] When the reference mechanism's reverse fact upload state is "not uploaded" and the current mechanism's reverse fact upload state is "uploaded," the mechanism-induced quality is aggregated along the residual aggregation edge to the current mechanism's residual node. When the reference mechanism's reverse fact upload state is "uploaded" and the current mechanism's reverse fact upload state is "not uploaded," the mechanism-induced quality is aggregated to the reference mechanism's residual node.
[0216] When two reverse factual states are identical, the aggregation direction is determined based on the replay score of the current mechanism and the replay score of the reference mechanism after the transformation. If the replay score of the current mechanism is higher, the mechanism-induced quality is aggregated to the current mechanism residual node; if the replay score of the reference mechanism after the transformation is higher, the mechanism-induced quality is aggregated to the reference mechanism residual node; if the two replay scores are identical, the mechanism-induced quality is divided by 2, and the two resulting quality sets are aggregated to the current mechanism residual node and the reference mechanism residual node, respectively.
[0217] The mechanism-induced quality received by the residual nodes of the same mechanism is summed to obtain the cumulative value of the mechanism-induced quality. The mechanism-induced quality no longer participates in the cross-cycle state transport corresponding to the candidate edge of state transition, and the comparable state quality is retained in the corresponding sample node and proceeds to step S2033.
[0218] The quality diversion results are obtained by correlating the quality to be transported, comparable quality of state, mechanism-induced quality, sensitivity to selection mechanism, and cumulative value of mechanism-induced quality of residual nodes of each sample node.
[0219] For example, the transport quality of a sample node is 0.10, and the sensitivity of the selection mechanism obtained in step S20314 is 0.2136. Subtracting 0.2136 from 1 yields a state comparability ratio of 0.7864. Multiplying 0.10 by 0.7864 yields a state comparability quality of 0.07864. Multiplying 0.10 by 0.2136 yields a mechanism-induced quality of 0.02136. This sample group changes from not uploading under the reference mechanism to uploading under the current mechanism, and the mechanism-induced quality of 0.02136 is aggregated into the residual nodes of the current mechanism.
[0220] Step S2032: Based on the selected state transition heterogeneous graph, perform cross-period sample association analysis and same-mechanism replay difference measurement to determine the transportation cost.
[0221] In this embodiment, based on each state transition candidate edge, the sample feature distance between the reference sample nodes at both ends of the edge and the current sample node is read.
[0222] Extract the minimum and maximum values of the feature distances corresponding to all candidate edges for state transitions. Subtract the minimum value from each sample's feature distance, and then divide by the range obtained by subtracting the minimum value from the maximum value to get the normalized feature distance, which is used as the feature difference component. When the maximum and minimum values are the same, set each feature difference component to 0.
[0223] Based on the current mechanism replay scores of the sample nodes at both ends of the state transition candidate edge, the current mechanism replay score of the current sample node is subtracted from the current mechanism replay score of the reference sample node, and the absolute value is taken to obtain the replay difference between the current mechanism and the current mechanism.
[0224] Based on the replay scores of the reference mechanism after transformation of the sample nodes at both ends of the candidate edge of state transition, the replay score of the reference mechanism after transformation of the current sample node is subtracted from the replay score of the reference mechanism after transformation of the current sample node, and the absolute value is taken to obtain the replay difference between the reference mechanism and the mechanism.
[0225] Add the replay difference between the current mechanism and the mechanism and the replay difference between the reference mechanism and the mechanism, and then divide by 2 to obtain the replay difference component between the current mechanism and the mechanism.
[0226] The transportation cost is obtained by weighting the feature difference component and the same mechanism replay difference component.
[0227] The weights of the two components are set based on the cross-cycle node matching results in the historical stable matching period. The historical stable matching period refers to the historical period in which the data is determined to be stable according to the quantification rules disclosed in step S1, and the cross-cycle node correspondence can be confirmed through data object identifiers, terminal identifiers, and continuous collection records.
[0228] The candidate values for the feature difference component weights range from 0.40 to 0.80. The replay difference component weights are obtained by subtracting the feature difference component weights from 1. Candidate weight combinations are formed with a candidate step size of 0.05, and the initial weight combinations are set to 0.60 and 0.40. The transport cost of each state transition candidate edge in the historical stable matching cycle is calculated using each candidate weight combination. Candidate matching node pairs are determined according to the transport cost in ascending order, and the matching accuracy and recall are calculated. The candidate weight combination with the highest harmonic evaluation value of accuracy and recall is selected as the target weight combination.
[0229] Multiply the feature difference component by its corresponding weight to obtain the feature transport cost. Multiply the replay difference component of the same mechanism by its corresponding weight to obtain the replay transport cost. Add the two transport costs together to obtain the transport cost corresponding to the state transition candidate edge.
[0230] Step S2033: Based on the selected state transition heterogeneous graph, quality diversion results and transportation costs, perform unbalanced optimal transmission of comparable state quality, and combine it with mechanism-induced quality to collect change characterizations, thereby obtaining the actual data state change characterization and the selected mechanism transition characterization.
[0231] The specific steps of step S2033 are as follows:
[0232] Step S20331: Based on the current sample node and the reference sample node, the comparable quality of the state in the quality diversion result is aggregated to obtain the current state comparable quality distribution and the reference state comparable quality distribution.
[0233] In this embodiment, based on the sample node identifier, the sample feature center and state comparable quality of each current sample node are extracted, and associated according to the arrangement order of the current sample nodes to obtain the current state comparable quality distribution.
[0234] Based on the sample node identifier, the sample feature center and state comparable quality of each reference sample node are extracted, and the reference state comparable quality distribution is obtained by associating them according to the arrangement order of the reference sample nodes.
[0235] The current state comparable quality distribution and the reference state comparable quality distribution retain their respective total quality without further normalization, so that the difference in the total comparable quality between the two mining cycles can be preserved in the unbalanced optimal transmission.
[0236] Step S20332: Based on the current state comparable quality distribution, the reference state comparable quality distribution and the transportation cost, perform unbalanced optimal transmission along the state transition candidate edges to obtain the cross-cycle state transportation relationship, which includes matching node pairs and matching transportation quality.
[0237] In this embodiment, the transportation cost matrix is constructed according to the arrangement order of the reference sample nodes and the current sample nodes. The corresponding transportation cost is written at the position where there is a state transition candidate edge, and the blocking cost is written at the position where there is no state transition candidate edge.
[0238] Before performing unbalanced optimal transport, the abnormal quality distribution is preprocessed. Sample nodes with a comparable state quality of 0 and no candidate edges for state transitions are deleted. For sample nodes with a comparable state quality greater than 0 but no candidate edges for state transitions, the sample node with the smallest feature distance from another period is selected to supplement the candidate edges for state transitions, and the corresponding transport cost is applied. The comparable state quality on the reference side and the comparable state quality on the current side are summed separately, and the larger of the two total mass values is taken as a unified scaling factor. The comparable state quality on both sides is then divided by the unified scaling factor to obtain the scaled quality distribution. After transport is completed, the transport quality is multiplied by the unified scaling factor to restore the original quality scale. This processing preserves the relative difference in the total mass on both sides and reduces the impact of the difference in the order of magnitude of mass on the iterative stability.
[0239] The blocking cost is set based on the maximum effective transport cost and historical mismatches of non-candidate nodes. Specifically, the maximum effective transport cost is multiplied sequentially by different candidate amplification factors. Historical periodic transport calculations are performed, and the transport quality of node pairs without candidate edges is statistically analyzed. The smallest candidate amplification factor that ensures all transport quality in this category is lower than the minimum effective transport quality is selected. The maximum effective transport cost is then multiplied by this candidate amplification factor to obtain the blocking cost. The preferred range for the candidate amplification factor is 5 to 20, with an initial amplification factor set to 10, and testing is conducted with a candidate step size of 1.
[0240] The unbalanced optimal transport objective of this application is to select the transport matrix with the minimum objective function value from all non-negative transport matrices. The objective function is obtained by adding the transport cost term, the entropy regularization term, the reference quality relaxation term, and the current quality relaxation term.
[0241] The method for determining the transportation cost term is as follows: multiply the transportation quality of each reference sample node and the current sample node in the transportation matrix by the corresponding transportation cost, and then sum all the product results.
[0242] The entropy regularization term is determined as follows: For each transport mass in the transport matrix, calculate the natural logarithm of that transport mass, subtract 1 from the natural logarithm, multiply by the corresponding transport mass, sum all the results, and multiply by the entropy regularization coefficient. When the transport mass is 0, the contribution of that position to the entropy regularization term is set to 0.
[0243] The reference quality relaxation term is determined as follows: The reference-side transportation edge quality is obtained by summing all transportation qualities corresponding to the same reference sample node in the transportation matrix; the reference-side transportation edge quality and the comparable quality of the reference state are then measured using a generalized relative entropy, and multiplied by the reference quality relaxation coefficient. The current quality relaxation term is determined using the same method, based on the current-side transportation edge quality and the comparable quality of the current state, and multiplied by the current quality relaxation coefficient.
[0244] The method for determining the generalized relative entropy measure is as follows: For each corresponding component in two non-negative mass vectors, divide the first mass component by the second mass component and take the natural logarithm. Multiply the resulting natural logarithm by the first mass component, subtract the first mass component, and add the second mass component. Sum the results for all corresponding components. When both corresponding mass components are 0, set the result for that component to 0; when the first mass component is greater than 0 and the second mass component is 0, replace the second mass component with the lower limit of numerical stability before calculation.
[0245] The lower limit of numerical stability is set according to the floating-point precision used by the computing device. The specific setting method is as follows: select the smallest positive number that can keep the natural logarithm and division result as a finite value during the calculation process as the lower limit of numerical stability; for example, in the embodiments of this application, the lower limit of numerical stability is preferably from 10 to the power of -12 to 10 to the power of -8.
[0246] Compared to standard unbalanced optimal transport, this application only uses the comparable state quality obtained in step S20315 as the quality distribution on both sides of the objective function, and uses state transition candidate edges to limit the main transport path; the mechanism-induced quality does not enter the objective function, but is instead collected to the mechanism residual nodes. Therefore, the generation and disappearance of quality in unbalanced optimal transport are mainly used to characterize the actual state difference after excluding the influence of the selection mechanism.
[0247] The entropy regularization coefficient is set based on the distribution of effective transportation costs and the stability of historical matching. Specifically, the effective transportation costs are arranged in ascending order, and the transportation cost at the middle position is extracted as the median transportation cost. Different proportions of the median transportation cost are used as candidate entropy regularization coefficients. Historical periodic transportation calculations are performed separately, and candidate coefficients with stable main matching node pairs and a small number of weakly matching nodes are selected as the entropy regularization coefficients. The preferred candidate proportion is 0.05 to 0.20, with an initial proportion set to 0.10 and a candidate step size of 0.01.
[0248] The reference quality relaxation coefficient and the current quality relaxation coefficient are set based on the proportion of unmatched quality in the historical stable period. The historical stable period in this step is determined using the quantitative judgment rule disclosed in step S1. The specific setting method is as follows: statistically analyze the proportion of unmatched quality on the reference side and the proportion of unmatched quality on the current side formed by the addition, disappearance, and changes in sample state in the historical stable period; perform transportation calculations using different candidate relaxation coefficients, and select candidate coefficients whose unmatched quality proportions are close to the corresponding historical proportions and whose main matching node relationships are stable, as the reference quality relaxation coefficient and the current quality relaxation coefficient, respectively. The candidate quality relaxation coefficient is preferably 5 to 20 times the entropy regularization coefficient, with the initial value set to 10 times the entropy regularization coefficient, and the entropy regularization coefficient is used as the candidate step size.
[0249] Based on the transportation cost matrix and the entropy regularization coefficient, each transportation cost is divided by the entropy regularization coefficient, the result is negative, and then an exponential operation is performed to obtain the transportation kernel matrix.
[0250] Arrange the comparable masses of the reference state according to the order of the reference sample nodes to obtain the reference-side mass vector. Arrange the comparable masses of the current state according to the order of the current sample nodes to obtain the current-side mass vector. Initialize each component in the reference scaling vector and the current scaling vector to 1.
[0251] Multiply the transport kernel matrix and the current scaling vector to obtain the reference-side kernel mass vector. Divide each mass component in the reference-side mass vector by the corresponding component in the reference-side kernel mass vector to obtain the reference-side mass ratio. Divide the reference mass relaxation coefficient by the sum of the reference mass relaxation coefficient and the entropy regularization coefficient to obtain the reference-side relaxation exponent. Perform reference-side relaxation exponent calculations on each component in the reference-side mass ratio to obtain the updated reference scaling vector.
[0252] Multiply the transpose of the transport kernel matrix by the updated reference scaling vector to obtain the current side kernel mass vector. Divide each mass component in the current side mass vector by its corresponding component in the current side kernel mass vector to obtain the current side mass ratio. Divide the current mass relaxation coefficient by the sum of the current mass relaxation coefficient and the entropy regularization coefficient to obtain the current side relaxation index. Apply the current side relaxation index to each component in the current side mass ratio to obtain the updated current scaling vector.
[0253] Based on the updated reference scaling vector, transport kernel matrix, and current scaling vector, the components of the reference sample node in the reference scaling vector, the components of the corresponding node pair in the transport kernel matrix, and the components of the current sample node in the current scaling vector are multiplied to obtain the transport quality of the node pair and form the transport matrix.
[0254] The relative change of the transportation matrix is obtained by subtracting the transportation mass at corresponding positions in two adjacent transportation matrices, summing the absolute values of all differences, and then dividing by the sum of all transportation masses in the previous transportation matrix. When the sum of all transportation masses in the previous transportation matrix is 0, the iteration terminates and the corresponding period is marked as having no valid state transportation relationship.
[0255] The convergence threshold is set based on the stability of the transportation matrix and the main matching node pairs. Specifically, it is set as follows: historical periodic transportation calculations are performed using different candidate convergence thresholds; the main matching node pairs and matching transportation quality corresponding to adjacent candidate thresholds are compared; and the candidate threshold with the largest value where the main matching node pairs no longer change after further reduction is selected as the convergence threshold. The preferred candidate convergence threshold is between 0.000001 and 0.0001, with an initial value set to 0.00001.
[0256] The maximum number of iterations is set based on the number of iterations required for the historical transport matrix to reach the convergence threshold. Specifically, the method is as follows: record the number of iterations required for multiple historical stable periods to reach the convergence threshold, arrange these iterations in ascending order, and take the iteration number corresponding to the 95th percentile, rounding it up, as the maximum number of iterations. For example, in this embodiment, the maximum number of iterations is preferably between 100 and 500.
[0257] The reference scaling vector and the current scaling vector are iteratively updated until the relative change in the transport matrix is no greater than the convergence threshold, or the number of iterations reaches the maximum number of iterations, at which point the iteration stops and the final transport matrix is obtained.
[0258] Since the entropy regularization coefficient, the reference mass relaxation coefficient, and the current mass relaxation coefficient are all greater than 0, the transportation cost term is a linear term. The entropy regularization term and the two mass relaxation terms are both convex functions, and the objective function is convex within the domain of the non-negative transportation matrix. The entropy regularization term ensures strict convexity of the objective function on the effective transportation path, thus preventing the existence of distinct local optima. All effective elements in the transportation kernel matrix are positive numbers. Both the reference scaling vector and the current scaling vector are updated starting from the positive number 1, ensuring that each iteration remains non-negative and bounded. The alternating scaling process converges to the unique optimal transportation matrix of the objective function.
[0259] The minimum effective transport quality is set based on the transport quality distribution of historically confirmed matching and non-matching node pairs. Specifically, the non-zero transport quality in the historical final transport matrix is used as a candidate threshold. The accuracy and recall of matching node pair identification are calculated separately, and the candidate threshold with the highest harmonic evaluation value of accuracy and recall is selected as the minimum effective transport quality.
[0260] Extract the positions in the final transportation matrix that are not less than the minimum effective transportation quality, determine the corresponding reference sample node and the current sample node as matching node pairs, and determine the corresponding transportation quality as the matching transportation quality to obtain the cross-cycle state transportation relationship.
[0261] Step S20333: Based on the cross-cycle state transportation relationship, calculate the difference in replay scores of each matching node pair under the current identification mechanism and the reference identification mechanism, and aggregate them according to the matching transportation quality to obtain the actual data state change representation.
[0262] In this embodiment, based on the cross-cycle state transportation relationship, the reference sample node, the current sample node, and the matching transportation quality of each matching node pair are read.
[0263] Subtracting the current mechanism replay score of the reference sample node from the current mechanism replay score of the current sample node yields the cross-cycle replay score difference under the current recognition mechanism.
[0264] Subtracting the replay score of the reference mechanism after the transformation of the current sample node from the replay score of the reference mechanism after the transformation of the reference sample node yields the cross-cycle replay score difference under the reference recognition mechanism.
[0265] Add the differences in scores between the two cross-cycle replays, then divide by 2 to obtain the state change amount within the same mechanism. Multiply the state change amount within the same mechanism by the corresponding matched transport quality to obtain the weighted state change amount.
[0266] The total weighted state changes received by the same current sample node are summed to obtain the total weighted state change; the total matched transport quality received by the same current sample node is summed to obtain the total matched transport quality. The total weighted state change is divided by the total matched transport quality to obtain the actual data state change value. When the total matched transport quality is 0, the actual data state change value is set to 0, and the corresponding current sample node is marked as having no valid matching node.
[0267] The actual data state change value, the matching reference sample node, the matching transportation quality, and the direction of the actual data state change are correlated to obtain a representation of the actual data state change. When the actual data state change value is greater than 0, the change direction is determined to be positive; when it is less than 0, the change direction is determined to be negative; and when it is equal to 0, the change direction is determined to be state unchanged.
[0268] Step S20334: Based on the quality diversion results, extract the mechanism-induced quality corresponding to the residual nodes of each mechanism, calculate the replay score difference between the output nodes at both ends of the corresponding mechanism permutation edge, and aggregate them to obtain the selection mechanism migration characterization.
[0269] In this embodiment, based on the quality diversion results and residual aggregation edges, the sample nodes, output nodes, and mechanism residual nodes corresponding to the quality induced by each mechanism are determined.
[0270] Read the replay scores of the current mechanism and the replay scores of the reference mechanism after transformation at both ends of the mechanism permutation edge, and subtract the replay scores of the reference mechanism after transformation from the replay scores of the current mechanism to obtain the cross-mechanism replay score difference.
[0271] When the reference mechanism's reverse fact upload state is "not uploading" and the current mechanism's reverse fact upload state is "uploading," the direction of the mechanism's upload state change is determined as a positive transition. When the reference mechanism's reverse fact upload state is "uploading" and the current mechanism's reverse fact upload state is "not uploading," the direction of the mechanism's upload state change is determined as a negative transition. When both reverse fact upload states are the same, the direction of the mechanism's upload state change is determined as "state preservation."
[0272] Multiply the cross-mechanism replay score difference by the corresponding mechanism-induced quality to obtain the weighted mechanism migration amount. Sum all weighted mechanism migration amounts corresponding to the same mechanism residual node to obtain the total weighted mechanism migration amount. Sum the mechanism-induced quality received by the mechanism residual node to obtain the total mechanism-induced quality.
[0273] The mechanism migration value is obtained by dividing the weighted total of mechanism migrations by the total mechanism-induced quality. When the total mechanism-induced quality is 0, the mechanism migration value is set to 0.
[0274] By correlating mechanism migration values, total mechanism-induced quality, direction of mechanism upload status changes, and model version changes, a mechanism migration characterization is obtained.
[0275] Step S204: Based on the actual data state change representation, perform state correction and mechanism association on the structured mining results and local model update amount to obtain the state correction mining evidence set and the selection mechanism migration representation set.
[0276] In this embodiment, based on the representation of actual data state changes and cross-cycle state transportation relationships, the actual data state change values corresponding to each current sample node are extracted, and reference sample nodes and transportation quality are matched.
[0277] The transformed reference mechanism replay score of each matched reference sample node is multiplied by the corresponding matched transport quality. The sum of these products is then divided by the total matched transport quality to obtain the reference state baseline score. When the total matched transport quality is 0, the current mechanism replay score is determined as the reference state baseline score.
[0278] The reference state baseline score and the actual data state change value are added together, and the result is limited to between 0 and 1 to obtain the state correction identification score.
[0279] The status correction recognition score is compared with the current local recognition threshold to determine the correction upload status.
[0280] The matching transport quality coverage ratio is obtained by dividing the total matched transport quality received by the current sample node by the comparable state quality of the current sample node, and the obtained ratio is limited to between 0 and 1. When the comparable state quality is 0, the matching transport quality coverage ratio is set to 0.
[0281] The average transportation cost is obtained by multiplying the transportation cost of each matched node pair by the corresponding matched transportation quality, summing the products, and then dividing by the total matched transportation quality. When the total matched transportation quality is 0, the average transportation cost is set to 1.
[0282] Subtracting the average transportation cost (limited to 0-1) from 1 yields the transportation credibility component. Multiplying the matching transportation quality coverage ratio by the transportation credibility component gives the initial result credibility.
[0283] When step S20235 marks the corresponding coordinate alignment record as a downgraded alignment record, the initial result confidence level is multiplied by the downgrade confidence level coefficient to obtain the result confidence level; when it is not marked as a downgraded alignment record, the initial result confidence level is determined as the result confidence level.
[0284] Based on the state correction identification score, the corrected uploaded state, and the result credibility, the structured mining results are updated to obtain the state correction structured mining results.
[0285] When the current mechanism replay score is greater than 0, the state correction recognition score is divided by the current mechanism replay score to obtain the sample node model update correction coefficient; when the current mechanism replay score is 0, the state correction recognition score is determined as the sample node model update correction coefficient.
[0286] The allowable range of model update correction coefficients is set based on the validation results after historical model aggregation. Specifically, different lower and upper limits are used to restrict the model update correction coefficients of historical sample nodes. The local model update amount is adjusted based on the restricted correction coefficients, and the adjusted local model update amount is globally aggregated. The validation accuracy and validation loss of the global model corresponding to each candidate range are compared, and the candidate range with higher validation accuracy and no abnormal increase in validation loss is selected as the allowable range of model update correction coefficients.
[0287] The candidate lower limit ranges from 0.25 to 0.75, and the candidate upper limit ranges from 1.50 to 4.00. Both the candidate lower and upper limits are combined in steps of 0.25, with an initial allowable range of 0.50 to 2.00. The candidate lower limit must be less than 1, and the candidate upper limit must be greater than 1, so that the correction process can both reduce the amount of local updates that are heavily influenced by selective reporting and moderately increase the amount of local updates with sufficient state evidence.
[0288] By limiting the model update correction coefficients of the sample nodes to an allowable range, the model update correction coefficients of the target sample nodes are obtained.
[0289] The model update correction coefficients for edge nodes are obtained by multiplying the target sample node model update correction coefficients for each current sample node by the corresponding comparable state quality, summing the results of each product, and then dividing by the total comparable state quality of all current sample nodes. When the total comparable state quality is 0, the edge node model update correction coefficients are set to 1.
[0290] The corrected local model update amount is obtained by multiplying the edge node model update correction coefficient by the update value corresponding to each model parameter in the local model update amount.
[0291] The confidence level of marginal evidence is obtained by multiplying the confidence level of each current sample node by the corresponding comparable state quality, summing the products, and then dividing by the total comparable state quality. When the total comparable state quality is 0, the confidence level of marginal evidence is set to 0.
[0292] By correlating the state correction structured mining results, the corrected local model update amount, the representation of actual data state changes, the cross-cycle state transport relationship, and the credibility of marginal evidence, a state correction mining evidence set is obtained.
[0293] The selection mechanism migration representation set is obtained by aggregating the selection mechanism migration representation, mechanism-induced quality, cross-mechanism replay score difference, and mechanism upload state change direction according to the edge node identifier and the identification mechanism identifier.
[0294] Step S3: Based on the state correction mining evidence set and the selection mechanism transfer representation set, perform global model aggregation and identification threshold mechanism offset correction to obtain the cloud-edge-device hierarchical collaborative data mining results.
[0295] The specific steps of step S3 are as follows:
[0296] Step S301: Aggregate the local model update amount in the state correction mining evidence set and perform cross-edge fusion on the structured mining results to obtain the global data mining model and cross-edge knowledge fusion results.
[0297] In this embodiment, based on the state correction mining evidence set, the corrected local model update amount, the total state comparable quality, the edge evidence credibility, and the state correction structured mining results corresponding to each edge node are read.
[0298] The global data mining model adopts the same network structure as the lightweight machine learning model, including an input adaptation module, a first feature transformation module, a second feature transformation module, a feature compression module, and a classification output module connected in sequence. The parameter names, parameter order, and parameter dimensions of each module are consistent with the lightweight machine learning model disclosed in step S2022.
[0299] Before model aggregation and fusion of structured mining results, the feature space and recognition coordinates of cross-edge nodes are unified. The global data mining model from the previous mining cycle is determined as the cross-edge reference model. Each edge node inputs its local boundary neighborhood sample group into its local lightweight machine learning model and the cross-edge reference model, respectively, to obtain the local model feature vector, local recognition score, reference model feature vector, and reference recognition score.
[0300] Since the input feature names, arrangement order, and model structure of each edge node have undergone compatibility verification through steps S201 and S2022, each edge node uses the reference model feature vector as a unified feature representation across edges. Based on the data object identifier, identification category, and collection time, consensus anchor point sample groups in each edge node are associated, and according to the methods disclosed in steps S20243 to S20244, monotonic piecewise mapping relationships are constructed from the local identification coordinates of each edge node to the cross-edge reference identification coordinates. This mapping relationship is used to transform the state correction identification scores of each edge node to obtain the cross-edge aligned identification score.
[0301] When any edge node cannot form a cross-edge consensus anchor point covering both sides of the local identification threshold, the degradation processing rule disclosed in step S20235 is adopted to form a forced anchor point coordinate pair with the local identification threshold and the cross-edge reference identification threshold, and the corresponding result is marked as the cross-edge degradation alignment result.
[0302] The effective aggregate quality is obtained by multiplying the total comparable state quality of each edge node by the edge evidence credibility. For cross-edge degradation alignment results, the effective aggregate quality is further multiplied by the corresponding degradation credibility coefficient. The total effective aggregate quality is obtained by summing the effective aggregate quality of all edge nodes. The model aggregation weight is obtained by dividing the effective aggregate quality of each edge node by the total effective aggregate quality. When the total effective aggregate quality is 0, the global data mining model from the previous mining cycle is retained, and the model parameters are not updated in this round.
[0303] Based on the parameter arrangement order of each module, the corrected local model update quantity is aligned and aggregated to obtain the global model parameters, and a global data mining model is constructed.
[0304] Based on the state-corrected structured mining results of each edge node, a cross-edge fusion graph is constructed. Each state-corrected structured mining result is mapped to a cross-edge result node, and the node attributes include data object identifier, identification category, collection time, cross-edge alignment identification score, reference model feature vector, state comparability quality, and result credibility.
[0305] Establish object-consistent edges between cross-edge result nodes with the same data object identifier and the same identification category; establish time-proximity edges between cross-edge result nodes whose acquisition time interval is no greater than the fusion time range; establish feature-similar edges between cross-edge result nodes whose reference model feature vector distance is no greater than the cross-edge feature distance threshold. Cross-edge result nodes that simultaneously have object-consistent edges, time-proximity edges, and feature-similar edges are grouped into the same fusion group.
[0306] The cross-edge feature distance threshold is set based on the distance between the reference model feature vectors of cross-edge result nodes that have been historically confirmed to belong to the same data state and different data states. The specific setting method is as follows: each historical feature distance is used as a candidate threshold in turn; the correct fusion rate of nodes in the same state and the incorrect fusion rate of nodes in different states are calculated; the correct fusion rate and the result obtained by subtracting the incorrect fusion rate from 1 are added together, and then divided by 2 to obtain the cross-edge fusion evaluation value; the candidate threshold with the largest cross-edge fusion evaluation value is selected as the cross-edge feature distance threshold.
[0307] The fusion time range is set based on the duration distribution of similar historical states. The historical similar state period in this step refers to the historical period determined to be stable according to the quantification rules disclosed in step S1, and confirmed through continuous data collection and recording to belong to the same data object and the same identification category. The specific setting method is as follows: Statistically calculate the duration of similar historical states from the first identification to the last identification, use each duration as a candidate fusion time range, calculate the duplicate result merging rate and the false merging rate for different states, and select the shortest candidate time with a high duplicate result merging rate and a false merging rate within the allowable range as the fusion time range.
[0308] The weighted recognition score is obtained by multiplying the cross-edge alignment recognition score within each fusion group by the corresponding result credibility and state comparability quality. The sum of these weighted recognition scores is then divided by the sum of the products of the result credibility and state comparability quality within the fusion group to obtain the fusion recognition score. When the denominator is 0, the fusion recognition score is obtained by summing the cross-edge alignment recognition scores within each fusion group and dividing by the number of results.
[0309] By associating data object identifiers, identification categories, fusion identification scores, collection time ranges, identification of edge nodes participating in fusion, and representations of actual data state changes, cross-edge knowledge fusion results are obtained.
[0310] Step S302: Based on the cross-edge knowledge fusion results and the selection mechanism transfer representation set, the local recognition threshold is corrected by mechanism offset to obtain the target recognition threshold.
[0311] In this embodiment, based on the cross-edge knowledge fusion results, the comparable state quality corresponding to each fusion result is extracted according to the recognition category, and the cross-edge fusion recognition ratio is determined. Based on the state correction mining evidence set, the local correction recognition ratio for each edge node corresponding to the recognition category is determined.
[0312] Subtracting the cross-edge fusion recognition ratio from the local correction recognition ratio yields the local recognition ratio deviation. Multiplying the local recognition ratio deviation by the base threshold adjustment coefficient yields the base threshold adjustment amount.
[0313] The basic threshold adjustment coefficient is set based on the historical threshold stability calibration period. The historical threshold stability calibration period refers to the historical period in which the data is determined to be stable according to the quantification rules disclosed in step S1, and where there are confirmed recognition results before and after the local identification threshold adjustment.
[0314] The candidate values for the basic threshold adjustment coefficient range from 0.05 to 0.30, with an initial value of 0.10 and a candidate step size of 0.01. The historical local recognition threshold is adjusted using each candidate basic threshold adjustment coefficient. Based on the adjusted recognition results, the absolute difference between the local correction recognition ratio and the cross-edge fusion recognition ratio is calculated. The absolute difference over all historical threshold stable calibration cycles is averaged, and the candidate coefficient with the smallest average absolute difference is selected as the basic threshold adjustment coefficient.
[0315] Based on the selected mechanism transfer representation set, the mechanism transfer value and the total mechanism-induced quality of the corresponding edge node and identification category are extracted. The mechanism transfer value is multiplied by the total mechanism-induced quality to obtain the mechanism offset. The mechanism offset is then multiplied by the mechanism offset correction coefficient to obtain the target mechanism correction.
[0316] The mechanism offset correction coefficient is set according to the historical mechanism stability calibration period. The historical mechanism stability calibration period refers to the period during which the data is determined to be stable according to the quantification rules disclosed in step S1, but the model version has changed, and there are historical periods with confirmed identification results before and after the model version change.
[0317] The candidate values for the mechanism offset correction coefficient range from 0.50 to 1.00, with an initial value of 0.75 and a candidate step size of 0.05. The historical local recognition threshold is corrected using each candidate mechanism offset correction coefficient. The absolute difference between the corrected recognition ratio and the recognition ratio before the model version change is calculated. The absolute difference over all historical mechanism stable calibration cycles is averaged, and the candidate coefficient with the smallest average absolute difference is selected as the mechanism offset correction coefficient.
[0318] The candidate target identification threshold is obtained by adding the current local identification threshold, the basic threshold adjustment amount, and the target mechanism correction amount.
[0319] The allowable threshold range is set based on historical effective identification thresholds. The historical effective identification thresholds in this step are derived from historical periods where the data is deemed stable according to the quantization rules disclosed in step S1, and the identification results have been confirmed. Specifically, the setting method is as follows: extract historical local identification thresholds that simultaneously meet application requirements for both false positive and false negative rates, determine the minimum value as the lower allowable threshold, and determine the maximum value as the upper allowable threshold.
[0320] When the candidate target recognition threshold is lower than the lower limit of the threshold, the lower limit of the threshold is determined as the target recognition threshold. When the candidate target recognition threshold is higher than the upper limit of the threshold, the upper limit of the threshold is determined as the target recognition threshold. When the candidate target recognition threshold is within the allowable range of the threshold, the candidate target recognition threshold is determined as the target recognition threshold.
[0321] Step S303: Associate the global data mining model with the target recognition threshold to obtain the cloud-edge-device hierarchical collaborative data mining results.
[0322] In this embodiment, based on a global data mining model, the model version identifier, input feature definition, module structure, module connection relationship, parameters of each module, output recognition category and model generation cycle are recorded.
[0323] Based on the edge node identifiers and recognition categories, a correspondence is established between the recognition thresholds of each target and the output categories of the global data mining model, resulting in model threshold association records.
[0324] By associating the global data mining model, target identification threshold, state correction structured mining results, cross-edge knowledge fusion results, actual data state change representation, and selection mechanism migration representation, collaborative mining records are obtained.
[0325] The collaborative mining records include global model version, edge node identifier, identification category, target identification threshold, state-corrected structured mining results, cross-edge knowledge fusion results, actual data state change values, actual data state change direction, mechanism migration values, and mechanism upload state change direction.
[0326] The collaborative mining records corresponding to each edge node are aggregated to obtain the cloud-edge-device hierarchical collaborative data mining results.
[0327] Example 2:
[0328] See Figure 3 This embodiment provides a data mining system based on cloud-edge-device hierarchical collaboration, including: a trajectory construction module, a heterogeneous graph construction module, and a mining results module.
[0329] The trajectory construction module is used to acquire basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset.
[0330] The heterogeneous graph construction module, based on the edge selection trajectory dataset, completes cross-version counterfactual replay under consensus anchor constraints, constructs a heterogeneous graph of selection state transition, and performs unbalanced optimal transmission under transportation quality diversion constraints, thereby obtaining a state correction mining evidence set and a selection mechanism transition representation set.
[0331] The mining results module, based on the state correction mining evidence set and the selection mechanism migration representation set, performs global model aggregation and identification threshold mechanism offset correction to obtain cloud-edge-device hierarchical collaborative data mining results.
[0332] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.
[0333] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0334] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A data mining method based on cloud-edge-device hierarchical collaboration, characterized in that, include: Obtain basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset; Based on the edge selection trajectory dataset, cross-version counterfactual replay is completed under consensus anchor constraints, a heterogeneous graph of selection state transition is constructed, and unbalanced optimal transmission with transportation quality diversion constraints is performed to obtain a state correction mining evidence set and a selection mechanism transition representation set. Based on the state correction mining evidence set and the selection mechanism transfer representation set, global model aggregation and identification threshold mechanism offset correction are performed to obtain cloud-edge-device hierarchical collaborative data mining results.
2. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 1, characterized in that, The edge-selection trajectory dataset, under consensus anchor constraints, completes cross-version counterfactual replay, constructs a heterogeneous graph of selection state transitions, and performs unbalanced optimal transmission with transport quality diversion constraints, resulting in a state correction mining evidence set and a selection mechanism transition representation set, including: Periodic correlation is performed on the edge selection trajectory dataset to determine the current mining cycle and the reference mining cycle. The current identification dataset and the reference identification dataset are extracted, and the current identification mechanism and the reference identification mechanism are constructed. The current identification dataset includes the current boundary neighborhood sample group, the current lightweight machine learning model, the current local identification threshold, the structured mining results, and the local model update amount. The reference identification dataset includes the reference boundary neighborhood sample group, the reference lightweight machine learning model, and the reference local identification threshold. Cross-version counterfactual replay and recognition coordinate alignment are performed on the current recognition dataset and the reference recognition dataset with consensus anchor point constraints to obtain a coordinate aligned replay result set. Based on the coordinate-aligned replay result set, a heterogeneous graph of selected state transition is constructed, and unbalanced optimal transmission with transportation quality diversion constraints is performed to obtain the representation of actual data state change and the representation of selection mechanism transition. Based on the representation of state changes in actual data, state correction and mechanism correlation are performed on the structured mining results and the local model update volume to obtain the state correction mining evidence set and the selection mechanism migration representation set.
3. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 2, characterized in that, The cross-version counterfactual replay and recognition coordinate alignment, which constrains the current recognition dataset and the reference recognition dataset to obtain a coordinate-aligned replay result set, includes: Extract sample features from the current boundary neighborhood sample group and the reference boundary neighborhood sample group respectively, construct the sample feature association relationship, and obtain the current sample association set and the reference sample association set; Input the current sample association set and the reference sample association set into the current lightweight machine learning model and the reference lightweight machine learning model respectively, extract the model feature vector, recognition category and recognition score, and obtain the current model feature space, the reference model feature space, the current model output set and the reference model output set; Based on the current model feature space, the reference model feature space, the current model output set, and the reference model output set, neighborhood stability analysis is performed on the current sample association set and the reference sample association set to obtain the consensus anchor point sample group. Based on the consensus anchor sample group, the current identification mechanism, and the reference identification mechanism, cross-version counterfactual replay and identification coordinate alignment are performed on the current sample association set and the reference sample association set to obtain the coordinate aligned replay result set.
4. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 3, characterized in that, The process involves performing neighborhood stability analysis on the current sample association set and the reference sample association set based on the current model feature space, the reference model feature space, the current model output set, and the reference model output set, to obtain a consensus anchor point sample group, including: Calculate the model feature vector distances between each boundary neighborhood sample group in the current model feature space and the reference model feature space respectively, to obtain the current feature distance matrix and the reference feature distance matrix; Based on the current feature distance matrix and the reference feature distance matrix, determine the set of neighboring sample groups of each boundary neighborhood sample group in the current model feature space and the reference model feature space, respectively; By comparing the sets of neighboring sample groups in the current model feature space and the reference model feature space for the same boundary neighborhood sample group, the neighborhood stability result is obtained. Extract the recognition category and recognition score corresponding to each boundary neighborhood sample group from the current model output set and the reference model output set, perform category consistency comparison and threshold position comparison, and obtain stable recognition results; Based on the stable results of neighborhood and identification, a consensus anchor point sample group is obtained by screening boundary neighborhood sample groups with stable neighborhood relationships, consistent identification categories and consistent threshold positions.
5. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 3, characterized in that, The consensus anchor point sample group, the current identification mechanism, and the reference identification mechanism are used to perform cross-version counterfactual replay and identification coordinate alignment on the current sample association set and the reference sample association set, resulting in a coordinate-aligned replay result set, including: By replaying each boundary neighborhood sample group in the current sample association set and the reference sample association set using the current identification mechanism and the reference identification mechanism, the replay score set of the current mechanism and the replay score set of the reference mechanism are obtained. By comparing the replay scores of each current mechanism with the current local recognition threshold, and the replay scores of each reference mechanism with the reference local recognition threshold, the inverse fact transmission state of each boundary neighborhood sample group is determined, and the dual-mechanism replay result set is obtained. Extract the dual-mechanism replay scores of consensus anchor point sample groups from the dual-mechanism replay result set, pair the scores of the same group, and associate them with the current local recognition threshold and the reference local recognition threshold to obtain the anchor point coordinate corresponding sequence. Based on the anchor point coordinate correspondence sequence, a monotonic piecewise mapping relationship is constructed from the reference recognition coordinates to the current recognition coordinates; The reference mechanism replay score is transformed using a monotonic piecewise mapping relationship. The transformed reference mechanism replay score is then associated with the corresponding current mechanism replay score and the inverse real transmission state to obtain a coordinate-aligned replay result set.
6. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 2, characterized in that, Based on the coordinate-aligned replay result set, a heterogeneous graph of selected state transitions is constructed, and unbalanced optimal transmission with transport quality diversion constraints is performed to obtain a representation of actual data state changes and a representation of selection mechanism transitions, including: Based on the coordinate-aligned replay result set, a heterogeneous graph of the selected state transition is constructed to determine the quality to be transported and the sensitivity of the selection mechanism. Quality splitting and mechanism residue aggregation are then performed to obtain the quality diversion result. Based on the selected state transition heterogeneity graph, cross-period sample association analysis and same mechanism replay difference measurement are performed to determine the transportation cost; Based on the selected state transition heterogeneous graph, quality diversion results, and transportation costs, unbalanced optimal transmission is performed on comparable state quality, and change characterization is collected by combining mechanism-induced quality, resulting in actual data state change characterization and selection mechanism transition characterization.
7. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 6, characterized in that, The process involves constructing a heterogeneous state transition graph based on the coordinate-aligned replay result set, determining the quality to be transported and the sensitivity of the selection mechanism, and performing quality decomposition and mechanism residual aggregation to obtain the quality diversion result, including: Node mapping is performed on the current boundary neighborhood sample group, the reference boundary neighborhood sample group, the dual-mechanism replay results, and the inverse real transmission state, and mechanism residual nodes are set to obtain a heterogeneous node set. The heterogeneous node set includes the current sample node, the reference sample node, the current output node, the reference output node, the current state node, the reference state node, and the mechanism residual node. Calculate the sample feature distance between each reference sample node and the boundary neighborhood sample group corresponding to each current sample node, and perform neighbor filtering to obtain cross-period adjacent node pairs; Establish a mechanism permutation edge between the current output node and the reference output node associated with the same sample node, establish a state transition candidate edge between adjacent node pairs across cycles, establish an upload state edge between each output node and the corresponding state node, and establish a residual aggregation edge between each state node and the corresponding mechanism residual node. Combine the heterogeneous node set to construct a selection state transition heterogeneous graph. Based on the boundary neighborhood sample group corresponding to each sample node, the current mechanism replay score, the reference mechanism replay score, and the inverse transmission state, determine the quality to be transported and the sensitivity of the selected mechanism; Based on the sensitivity of the selection mechanism, the quality to be transported is divided into state-comparable quality and mechanism-induced quality. The mechanism-induced quality is then aggregated to the corresponding mechanism residual node along the residual aggregation edge to obtain the quality diversion result.
8. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 6, characterized in that, The process involves performing unbalanced optimal transport of comparable state qualities based on the selected state transition heterogeneity graph, quality diversion results, and transport costs, and combining this with mechanism-induced quality change characterization aggregation to obtain actual data state change characterization and selected mechanism transition characterization, including: Based on the current sample node and the reference sample node, the comparable quality of the state in the quality diversion result is aggregated to obtain the current state comparable quality distribution and the reference state comparable quality distribution. Based on the current state comparable quality distribution, the reference state comparable quality distribution, and the transportation cost, unbalanced optimal transmission is performed along the state transition candidate edges to obtain cross-cycle state transportation relationships that include matching node pairs and matching transportation quality. Based on the cross-cycle state transportation relationship, the difference in replay scores of each matching node pair under the current identification mechanism and the reference identification mechanism is calculated, and the data is aggregated according to the matching transportation quality to obtain the representation of actual data state changes. Based on the quality diversion results, the mechanism-induced quality corresponding to the residual nodes of each mechanism is extracted, the replay score difference between the output nodes at both ends of the corresponding mechanism permutation edge is calculated, and the results are aggregated to obtain the selection mechanism migration characterization.
9. The data mining method based on cloud-edge-device hierarchical collaboration according to claim 1, characterized in that, The process involves mining evidence sets based on state correction and selection mechanism transfer representation sets, performing global model aggregation and threshold mechanism offset correction to obtain cloud-edge-device hierarchical collaborative data mining results, including: The local model update volume in the state correction mining evidence set is aggregated, and the structured mining results are fused across edges to obtain the global data mining model and the cross-edge knowledge fusion results. Based on the cross-edge knowledge fusion results and the selection mechanism transfer representation set, the local recognition threshold is corrected by mechanism offset to obtain the target recognition threshold. By associating the global data mining model with the target recognition threshold, we can obtain the cloud-edge-device hierarchical collaborative data mining results.
10. A data mining system based on cloud-edge-device hierarchical collaboration, used to implement the data mining method based on cloud-edge-device hierarchical collaboration as described in any one of claims 1 to 9, characterized in that, include: The trajectory construction module is used to acquire basic edge mining data within a continuous mining cycle, construct edge selection trajectories, and obtain an edge selection trajectory dataset. The heterogeneous graph construction module, based on the edge selection trajectory dataset, completes cross-version counterfactual replay under consensus anchor constraints, constructs a heterogeneous graph of selection state transition, and performs unbalanced optimal transmission under transportation quality diversion constraints, thereby obtaining a state correction mining evidence set and a selection mechanism transition representation set. The mining results module, based on the state correction mining evidence set and the selection mechanism migration representation set, performs global model aggregation and identification threshold mechanism offset correction to obtain cloud-edge-device hierarchical collaborative data mining results.