Method and system for machine forgetting of trajectory learning model based on sampling and fine-tuning

By using sampling and fine-tuning methods, the trajectory learning model is fine-tuned using gridding and representative trajectory subsets. This solves the problem of entangled influences caused by spatial overlap of trajectory data in existing technologies, achieving low-cost forgetting effect and performance preservation, and is applicable to various trajectory learning tasks.

CN122196548APending Publication Date: 2026-06-12SUZHOU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-04-07
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing machine forgetting methods struggle to balance forgetting effectiveness and model performance preservation in trajectory data processing while avoiding complete retraining. Furthermore, the spatial overlap of trajectory data leads to intertwined influences, resulting in a precipitous drop in key performance indicators.

Method used

By using sampling and fine-tuning, the trajectory space is divided into regions using gridding, the importance of the trajectory is calculated and normalized, and a representative subset of trajectories is used to fine-tune the trajectory learning model, replacing complete retraining.

Benefits of technology

It significantly reduces the forgetting cost of trajectory learning models, maintains model performance, and effectively handles the spatial overlap problem of trajectory data. It is applicable to various trajectory learning tasks and meets the requirements for timely updates and privacy protection of trajectory data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122196548A_ABST
    Figure CN122196548A_ABST
Patent Text Reader

Abstract

The application discloses a trajectory learning model machine forgetting method and system based on sampling and fine-tuning, and the method comprises the following steps: obtaining an original training set, a forgetting set, a remaining set and an original trajectory learning model; dividing a space where trajectories are located into grids, determining an influence grid set and a coverage grid set of each trajectory; calculating the importance of the remaining trajectories to the forgetting set and the importance of the remaining trajectories to the remaining set according to a spatial co-occurrence relationship, and obtaining a combined sampling probability accordingly; sampling a representative trajectory subset from the remaining set according to the combined sampling probability, fine-tuning the original model, and obtaining a model after forgetting. Through the probability sampling and fine-tuning guided by the two importance degrees, the forgetting trajectory information can be effectively removed without complete retraining, the task performance of the model on the remaining trajectories is maintained, and the method is suitable for trajectory similarity learning, trajectory simplification, trajectory map matching and trajectory recovery and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine learning model governance technology, and in particular to a machine forgetting method and system based on sampling and fine-tuning trajectory learning model. Background Technology

[0002] With the widespread adoption of GPS devices and the extensive use of location-based services, trajectory data has experienced explosive growth. Trajectories are typically represented as time-ordered sequences of location points and are widely used for tasks such as trajectory similarity learning, trajectory simplification, map matching, and trajectory recovery. Trajectory learning models trained on this data provide crucial support for downstream retrieval, recommendation, navigation, and analysis. From urban traffic flow prediction to individual travel habit mining, trajectory learning models have permeated numerous fields, including smart cities, autonomous driving, and location-based social networks.

[0003] However, trajectory learning models not only need to learn knowledge from data but also face the challenge of information forgetting. On the one hand, trajectory data has significant spatiotemporal timeliness; real-world changes such as road construction, traffic control, and commercial area relocation can rapidly devalue historical data. Continuing to retain this outdated information can mislead model judgments and lead to prediction bias. On the other hand, trajectory data contains information about users' spatiotemporal activities; sensitive information such as residence, workplace, and frequently visited points may be unintentionally remembered by the model. Therefore, service providers must be able to completely remove the influence of specific data from the model upon user request or when the data expires. This practical need has prompted researchers to systematically explore how to achieve accurate and efficient information forgetting in models, i.e., machine forgetting methods.

[0004] The most direct approach among existing machine forgetting methods is to completely retrain the model after deleting the data to be forgotten. While this method can accurately achieve forgetting, it is computationally extremely expensive, especially when the original training set reaches millions of units and the model parameters reach tens of millions. The time and resource consumption of a complete retraining is often prohibitive for enterprises. Recent approximate machine forgetting methods are mainly designed for tasks such as computer vision. For example, forgetting algorithms for image classification typically assume that samples are independent and identically distributed, and that the boundaries between the category to be forgotten and the remaining categories are clear. Forgetting can be achieved by adjusting the classifier head or reversing gradients. However, trajectory data exhibits significant spatial continuity, sharing the same physical space and road network. The trajectory to be forgotten and the remaining trajectories often overlap at the spatial region, road segment, and even sampling point levels, and their influences are intertwined. Simply applying existing methods can easily lead to two types of problems: first, the removal of information from the trajectory to be forgotten may be incomplete, allowing the model to indirectly remember the deleted information through spatially related paths; second, it can significantly damage the useful knowledge carried by the remaining set, causing a sharp decline in the model's performance on key tasks. Summary of the Invention

[0005] Therefore, the technical problem to be solved by the present invention is to overcome the difficulty of existing machine forgetting methods in balancing forgetting effect and model performance maintenance while avoiding complete retraining, and the inability to effectively handle the entanglement of influences caused by spatial overlap of trajectory data.

[0006] To address the aforementioned technical problems, this invention provides a machine forgetting method based on a trajectory learning model using sampling and fine-tuning, comprising the following steps: S1: Obtain the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set; S2: Divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, determine the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. S3: Based on the covered grid set and the affected grid set, for each remaining trajectory, calculate the importance of the remaining trajectory to the set to be forgotten, and calculate the importance of the remaining trajectory to the remaining set; S4: Normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values; S5: Based on the combined sampling probability, a representative trajectory subset is sampled from the remaining set. The original trajectory learning model is then fine-tuned using the representative trajectory subset to obtain the forgotten trajectory learning model.

[0007] In one embodiment of the present invention, in step S2, the method for determining the influence grid set and the coverage grid set corresponding to each trajectory for each trajectory in the set to be forgotten and each remaining trajectory in the remaining set is as follows: Divide the physical space where the trajectory is located into a set of grids. For any trajectory Its covering grid set With influence grid set They are defined as follows: , , in, Represents trajectory points With grid center point The Euclidean distance between them This is the preset influence range parameter.

[0008] In one embodiment of the present invention, the preset influence range parameter is determined based on the grid side length of the grid set.

[0009] In one embodiment of the present invention, in step S3, the method for calculating the importance of each remaining trajectory to the set to be forgotten is as follows: Obtain the set of covering grids for the remaining trajectories and the set of influencing grids for each trajectory to be forgotten in the set to be forgotten; The total number of times each grid in the grid set is covered by the influence grid set of all trajectories to be forgotten in the set to be forgotten is counted to obtain the influence count of the trajectories to be forgotten. The total co-occurrence count of the remaining trajectory and the set of to be forgotten is obtained by summing the influence counts of each grid in the coverage grid set of the remaining trajectory. The importance of the remaining trajectory to the set to be forgotten is calculated based on the total co-occurrence and the length of the remaining trajectory.

[0010] In one embodiment of the present invention, in step S3, the method for calculating the importance of each remaining trajectory to the remaining set is as follows: Obtain the set of covering grids for the remaining trajectory and the set of influencing grids for each other remaining trajectory in the remaining set, excluding the remaining trajectory itself; The total number of times each grid in the grid set is covered by the influence grid sets of all other remaining trajectories in the remaining set (excluding the remaining trajectory itself) is counted to obtain the remaining trajectory influence count; The total co-occurrence count of the remaining trajectory with other trajectories in the remaining set is obtained by summing the influence counts of the remaining trajectory corresponding to each grid in the covered grid set. The importance of the remaining trajectory to the remaining set is calculated based on the total co-occurrence amount and the length of the remaining trajectory.

[0011] In one embodiment of the present invention, in step S4, the importance of each calculated residual trajectory to the set to be forgotten and its importance to the remaining set are normalized respectively. The method for calculating the combined sampling probability corresponding to each residual trajectory based on the two normalized importance values ​​is as follows: Obtain the importance of each remaining trajectory to the set to be forgotten and its importance to the remaining set; The importance of all remaining trajectories to the set to be forgotten is normalized to obtain a first normalized value for each remaining trajectory; the importance of all remaining trajectories to the remaining set is normalized to obtain a second normalized value for each remaining trajectory. The combined sampling probability corresponding to each remaining trajectory is obtained by taking the weighted average of the first normalized value and the second normalized value.

[0012] In one embodiment of the present invention, in step S5, a representative trajectory subset is sampled from the remaining set according to the combined sampling probability, and the original trajectory learning model is fine-tuned using the representative trajectory subset as follows: According to the combined sampling probability, the same number of trajectories as the set to be forgotten are sampled from the remaining set to form the representative trajectory subset; The original trajectory learning model is fine-tuned using the representative subset of trajectories. This fine-tuning is repeated multiple times, with each round of fine-tuning involving resampling according to the combined sampling probability to obtain the forgotten trajectory learning model.

[0013] In one embodiment of the present invention, the trajectory is a time-ordered sequence of points, wherein each point records longitude, latitude and timestamp.

[0014] In one embodiment of the present invention, the set to be forgotten is determined according to a regional scenario or according to a user scenario.

[0015] Based on the same inventive concept, this invention also provides a machine forgetting system based on a trajectory learning model of sampling and fine-tuning, comprising: The data acquisition module is used to acquire the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set. The grid partitioning module is used to divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, the module determines the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. The importance calculation module is used to calculate the importance of each remaining trajectory to the set to be forgotten, based on the coverage grid set and the influence grid set, and to calculate the importance of the remaining trajectory to the remaining set. The sampling probability calculation module is used to normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values. The fine-tuning module is used to sample a representative trajectory subset from the remaining set according to the combined sampling probability, and to fine-tune the original trajectory learning model using the representative trajectory subset to obtain a forgotten trajectory learning model.

[0016] The technical solution of the present invention has the following advantages compared with the prior art: This invention achieves the forgetting effect by replacing full retraining with sampling fine-tuning. Only a few rounds of fine-tuning using a representative subset of trajectories are needed to achieve the forgetting effect, significantly reducing the forgetting cost of trajectory learning models and improving engineering feasibility. Simultaneously, considering the relevance of the remaining trajectories to the set to be forgotten and their representativeness to the remaining set, a dual-importance mechanism ensures that the sampled representative trajectories can both cover the influence of the set to be forgotten for effective forgetting and restore and strengthen the knowledge supported by the remaining set to maintain model performance, thus balancing forgetting effectiveness and performance preservation. Furthermore, this invention uses a gridded method to divide the trajectory space into regions. By designing the influence region and coverage region, it estimates the co-occurrence relationship of trajectories, effectively handling the problems of shared physical space for trajectory data and the entanglement of influences between the set to be forgotten and the remaining set. Grid statistics avoid precise pairwise comparisons of trajectories, reducing computational overhead, and the influence range setting improves robustness to GPS sampling noise. This invention is applicable to various trajectory learning tasks such as trajectory similarity learning, trajectory simplification, trajectory map matching, and trajectory recovery. The set to be forgotten can be determined according to regional or user scenarios, exhibiting good applicability and scalability, and meeting various practical needs such as timely updates of trajectory data and privacy protection. Attached Figure Description

[0017] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0018] Figure 1 This is a flowchart illustrating the machine forgetting method based on sampling and fine-tuning trajectory learning model provided by the present invention. Figure 2 This is a schematic diagram illustrating the estimation of the influence area and coverage area based on the grid in an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the calculation of the importance of the remaining trajectory to the set to be forgotten in an embodiment of the present invention. Detailed Implementation

[0019] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0020] Example 1: like Figure 1 As shown, this invention provides a machine forgetting method for trajectory learning models based on sampling and fine-tuning, comprising the following steps: S1: Obtain the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set; S2: Divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, determine the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. S3: Based on the covered grid set and the affected grid set, for each remaining trajectory, calculate the importance of the remaining trajectory to the set to be forgotten, and calculate the importance of the remaining trajectory to the remaining set; S4: Normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values; S5: Based on the combined sampling probability, a representative trajectory subset is sampled from the remaining set. The original trajectory learning model is then fine-tuned using the representative trajectory subset to obtain the forgotten trajectory learning model.

[0021] This invention first obtains the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model. The physical space covered by the trajectories is divided into a unified grid. For each trajectory to be forgotten and the remaining trajectories, a covering grid set and an influencing grid set are determined. Then, based on these grid sets, the importance of each remaining trajectory to the set to be forgotten and its importance to the remaining set are calculated. After normalization, a combined sampling probability is obtained. Finally, a representative subset of trajectories is sampled from the remaining set according to this probability to fine-tune the original model, resulting in a forgotten trajectory learning model. Sampling fine-tuning replaces complete retraining, reducing the cost of forgetting. Simultaneously, the dual importance mechanism ensures that the sampled trajectories can both cover the information to be forgotten for effective forgetting and retain remaining knowledge to maintain model performance, balancing forgetting effectiveness and performance preservation. Furthermore, the gridding process effectively addresses trajectory spatial overlap, influence entanglement, and GPS noise issues, making it suitable for various trajectory learning tasks and deletion scenarios, demonstrating good applicability.

[0022] In this embodiment of the invention, the data and model involved in step S1 include: the original training set denoted as... The original training set consists of a large number of trajectory samples, with each trajectory used to train the trajectory learning model. A trajectory is defined as a time-ordered sequence of points. Each trajectory point Record information in three dimensions: longitude ,latitude and timestamp This data structure is the standard representation of trajectory data and can completely depict the spatiotemporal trajectory of a moving object.

[0023] Original trajectory learning model By learning algorithm In the original training set The original trajectory learning model obtained from the above training can be any one of the trajectory similarity learning model, trajectory simplification model, trajectory map matching model, or trajectory recovery model, and is used to support downstream application tasks such as retrieval, recommendation, navigation, and analysis.

[0024] In machine forgetting tasks, the set to be forgotten is denoted as . The set to be forgotten is the set of trajectories whose influence needs to be removed from the model, and it can be determined according to the specific application scenario. For example, when it is necessary to remove the influence of trajectories within a specific area (such as a sensitive geofence), the set to be forgotten can be determined according to the area scenario; when it is necessary to delete the historical trajectories of a specific user to meet privacy protection requirements, the set to be forgotten can be determined according to the user scenario. The remaining set is denoted as . The dataset is defined as the dataset retained after removing the set to be forgotten from the original training set. ,satisfy and The remaining set represents the knowledge that the model still needs to retain after the forgetting operation is completed.

[0025] In this embodiment of the invention, the goal of machine forgetting is to design a forgetting algorithm. This makes the forgotten model parameters As close as possible to the remaining set The model parameters obtained from retraining This goal can be formally expressed as: , , , in, These are the original model parameters. These are the model parameters after forgetting. These are the theoretical reference model parameters for retraining, i.e., the model trained from scratch after completely deleting the data to be forgotten. Compared to full retraining, the approximate forgetting strategy can obtain a model that is as close as possible to the original model with lower computational cost. The purpose of obtaining the above data and model is to clarify the data source and model object of the forgetting task, so as to be able to selectively select a representative subset of trajectories from the remaining set in a targeted manner, and achieve effective forgetting of specific trajectory information through fine-tuning.

[0026] Further, in step S2, the set to be forgotten is... With the remaining set The physical space covered by all trajectories is divided into a unified set of grids. .

[0027] Specifically, such as Figure 2 As shown, based on the spatial distribution range of all trajectory points, the boundary of the physical space where the trajectory is located is determined. Then, this space is discretized into several square grids according to the preset grid side length. The grid side length can be determined based on the positioning accuracy of the trajectory data. Considering that GPS acquisition noise is usually about 10 meters, the grid side length can be... Setting the grid size to 10 meters ensures that each grid corresponds to a fine-grained spatial region. Discretizing the space through gridding allows for efficient quantification of spatial relationships between trajectories, avoiding the high computational overhead of subsequent pairwise comparisons of trajectories.

[0028] Based on this, for the set to be forgotten Each trajectory to be forgotten and the remaining set For each remaining trajectory, determine the influence grid set and cover grid set corresponding to each trajectory. For any trajectory Its covering grid set Defined as the set of all grid cells that the trajectory points actually fall into, used to accurately depict the spatial region actually traversed by the trajectory. Influence grid set Defined as a set of grids within a preset influence range around all trajectory points on the trajectory, used to characterize the spatial area that the trajectory may influence.

[0029] Specifically, covering the mesh set It can be represented as: , That is, for the trajectory Each trajectory point in Find the grid that the point actually falls into. All such grids constitute a set of covering grids.

[0030] Affecting the mesh set It can be represented as: , in, Represents trajectory points With grid Euclidean distance between the center points This refers to the preset influence range parameter. The setting can be adjusted based on GPS noise levels or spatial correlation; for example, a setting of 15 meters, approximately the grid side length, can be used. 1.5 times. By introducing the scope of influence. By taking into account the grid within a certain range around the trajectory point, it can effectively deal with GPS sampling noise, avoid missing spatial overlaps caused by positioning errors, and capture the spatial proximity relationship between trajectories.

[0031] Based on the above definition, the covering grid set accurately depicts the physical path of the trajectory, while the influencing grid set enhances robustness to GPS noise by introducing spatial tolerance, effectively capturing the spatial proximity relationship between trajectories.

[0032] Further, in step S3, based on the cover grid set and influence grid set determined in step S2, for each remaining trajectory, the importance of the remaining trajectory to the set to be forgotten, and the importance of the remaining trajectory to the remaining set are calculated.

[0033] Specifically, for the remainder set Each remaining trajectory in Define its importance to the set to be forgotten. This is used to measure the spatial overlap between the remaining trajectory and the set to be forgotten, reflecting its ability to cover the information to be forgotten. Importance of the set to be forgotten. The length of the remaining trajectory is determined by the ratio of the sum of the spatial co-occurrence lengths of the remaining trajectory and all trajectories in the set to be forgotten to the length of the remaining trajectory. The specific calculation formula is as follows: , in, Representing the trajectory With trajectory The spatial co-occurrence length, which is the portion of two trajectories that overlap in space, is usually measured by the number of trajectory points, the number of grid coverage points, or the path length. Representing the trajectory Total length. Importance of the forgotten set. The larger the value, the more likely it is to indicate the remaining trajectory. The more a trajectory overlaps with the space of the set to be forgotten, the more suitable it is as a representative trajectory for covering the influence of the set to be forgotten.

[0034] Similarly, the importance of the remaining trajectory to the remaining set is defined. The importance of the remaining trajectory is used to measure the degree of spatial overlap between the remaining trajectory and other trajectories in the remaining set, reflecting its ability to represent knowledge of the remaining set. The length of the remaining trajectory is determined by the ratio of the sum of the spatial co-occurrence lengths of the remaining trajectory and all other trajectories in the remaining set (excluding itself) to the length of the remaining trajectory. The specific calculation formula is as follows: , Importance of the remaining set The larger the value, the more likely it is to indicate the remaining trajectory. The more a model overlaps with other trajectory spaces in the remaining set, the more it represents the knowledge of the remaining set, which is beneficial for maintaining the performance of the original model on the remaining trajectories during the fine-tuning stage.

[0035] like Figure 3 As shown, for each remaining trajectory in the remaining set, its importance to the set to be forgotten is defined. This is used to measure the spatial overlap between the remaining trajectory and the set to be forgotten. The example in the figure contains three remaining trajectories. , , And two forgotten trajectories , The red diagonal shaded areas represent the spatial overlap between the trajectories. Among them, the remaining trajectories... With the trajectory to be forgotten There is a large amount of spatial overlap, and its importance The higher value indicates that the trajectory effectively covers the information to be forgotten; the remaining trajectory With the trajectory to be forgotten There is partial spatial overlap, and its importance Centered; Remaining trajectory It has no spatial overlap with any of the trajectories to be forgotten, and its importance is... This indicates that the trajectory cannot cover the information to be forgotten. Importance The larger the value, the more the remaining trajectory overlaps with the space of the set to be forgotten, and the more suitable it is as a representative trajectory to cover the influence of the set to be forgotten.

[0036] Similarly, the importance of the remaining trajectory to the remaining set This measures the degree of spatial overlap between the trajectory and other trajectories in the remaining set, reflecting its ability to represent knowledge of the remaining set. Importance The larger the value, the more the remaining trajectory overlaps with other trajectories in the remaining set, and the more it represents the knowledge of the remaining set. This is beneficial for maintaining the performance of the original model on the remaining trajectory during the fine-tuning stage.

[0037] To improve computational efficiency, this embodiment of the invention employs a grid statistical method to efficiently estimate the aforementioned importance, thereby avoiding the high computational overhead associated with precise pairwise comparisons of trajectories. Specifically, the influence count of the trajectory to be forgotten is first defined. And the remaining trajectory influence count Two statistics are used to record the number of times each grid is affected by the trajectory in the set to be forgotten and the number of times it is affected by the trajectory in the remaining set.

[0038] The impact of the forgotten trajectory on the count Its definition is: , The impact of the forgotten trajectory on the count Grid statistics were compiled The total number of times the influence grid set of all trajectories to be forgotten in the set to be forgotten is covered.

[0039] For the remaining trajectory impact count Its definition is: , Remaining trajectory influence count Grid statistics were compiled The total number of times the influence grid set of all remaining trajectories in the remaining set is covered.

[0040] After completing the above counting and statistics, for each remaining trajectory Its importance in dealing with forgotten sets The influence of the forgotten trajectory can be estimated by counting the number of grids in its covered grid set: , This estimate represents the proportion of the grids covered by the remaining trajectory that are affected by the set to be forgotten, out of the total length of the trajectory, reflecting the degree of spatial overlap between the trajectory and the set to be forgotten.

[0041] Similarly, the importance of the remaining trajectory to the remaining set It can be estimated by counting the remaining trajectory effects of each grid in its covered grid set: , This estimate represents the proportion of the total length of the remaining trajectory to the number of grids supported by other remaining trajectories within the grids covered by the remaining trajectory, reflecting the ability of the trajectory to represent knowledge of the remaining set.

[0042] The above grid statistical method avoids computation Precise pairwise comparisons effectively reduce computational overhead and offer better robustness to GPS noise. For example, for a given residual trajectory, if a significant portion of its covered grid is covered by the influence grid set of trajectories in the set to be forgotten, then its importance to the set to be forgotten is high, making it suitable as a representative trajectory covering the influence of the forgotten trajectories. Conversely, if a significant portion of its covered grid is covered by the influence grid set of other residual trajectories, then its importance to the remaining set is high, making it suitable as a trajectory representing the remaining knowledge. The calculation results of these two importance values ​​will serve as the basis for determining sampling weights in subsequent steps.

[0043] Further, in step S4, the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set calculated in step S3 are normalized respectively, and the combined sampling probability corresponding to each remaining trajectory is calculated based on the two normalized importance values.

[0044] Specifically, in step S3, each remaining trajectory is calculated. The importance of treating forgotten sets and importance of the remaining set ,because and The dimensions and ranges of values ​​may be different. Directly using the original values ​​for subsequent calculations will lead to an uneven impact of different importance indices on the sampling weights. Therefore, it is necessary to normalize the two types of importance separately to eliminate the difference in dimensions and make the different importance indices comparable.

[0045] The importance of treating forgotten sets The process employs either a minimum-maximum normalization method or a summation normalization method. In this embodiment of the invention, a summation normalization method is used, which involves calculating the sum of the importance of all remaining trajectories to the set to be forgotten, and then applying the summation normalization method to each remaining trajectory. Divide by the sum to obtain the normalized value. The specific calculation formula is as follows: , in, Represents the remainder set The sum of the importance of all remaining trajectories to the forgetting set. Normalized This reflects the proportion of the importance of the remaining trajectory to the forgotten set among all remaining trajectories.

[0046] Similarly, for the importance of the remaining set Similarly, the summation and normalization method is used, that is, the sum of the importance of all remaining trajectories to the remaining set is calculated, and then the importance of each remaining trajectory is... Divide by the sum to obtain the normalized value. The specific calculation formula is as follows: , in, Represents the remainder set The sum of the importance of all remaining trajectories to the remaining set. Normalized. This reflects the proportion of the importance of the remaining trajectory to the remaining set among all remaining trajectories.

[0047] Through the above normalization process and All are mapped to the interval [0,1] and the sum is 1, which eliminates the influence of different importance index dimensions, making the two types of importance comparable and facilitating subsequent combined calculations.

[0048] Obtaining the normalized dual importance and Then, calculate the combined sampling probability corresponding to each remaining trajectory. The combined sampling probability integrates the importance of the remaining trajectories to the set to be forgotten and their importance to the remaining set, and is used in subsequent steps to sample a representative subset of trajectories from the remaining set. This embodiment uses a weighted average to fuse the dual importance; the specific calculation formula is as follows: The combined sampling probability is calculated by taking the arithmetic mean of the normalized importance of the set to be forgotten and the normalized importance of the remaining set. This weighted averaging method achieves a balance between the forgetting and retention objectives. This reflects the ability of the remaining trajectory to cover information to be forgotten. This reflects the ability of the remaining trajectory to represent remaining knowledge; the average of the two is... This ensures that the trajectories that can cover the influence of the set to be forgotten have a high sampling probability, and that the trajectories that can represent the knowledge of the remaining set also have a high sampling probability, thus ensuring that the sampled representative subset of trajectories has the dual ability to cover the influence of the set to be forgotten and represent the knowledge of the remaining set.

[0049] Combined sampling probability The larger the value, the more important the remaining trajectory is in the fine-tuning process, and the higher the probability of it being selected into the representative trajectory subset. Through the above normalization and weighted averaging processes, the allocation of sampling probabilities takes into account both the forgetting objective and the performance preservation objective, providing a scientific basis for the subsequent steps of sampling a representative trajectory subset from the remaining set.

[0050] In practical applications, the weighting coefficients of the weighted average can be adjusted according to specific task requirements to control the relative importance of forgotten and retained targets in the sampling process.

[0051] Further, in step S5, a representative trajectory subset is sampled from the remaining set according to the combined sampling probability calculated in step S4, and the original trajectory learning model is fine-tuned using the representative trajectory subset to obtain the forgotten trajectory learning model.

[0052] Specifically, each remaining trajectory calculated in step S4 Corresponding combined sampling probability This combines the importance of the remaining trajectory to the forgotten set with its overall importance to the remaining set, reflecting the importance of the remaining trajectory in the fine-tuning process. (Combined sampling probability) The larger the value, the better the remaining trajectory can cover the spatial influence of the set to be forgotten and represent the knowledge of the remaining set, making it more suitable to be selected into the representative trajectory subset.

[0053] In each round of fine-tuning, the combined sampling probabilities are used. From the remaining set Mid-sampling and the set to be forgotten Trajectories with the same number constitute the representative subset of trajectories. The sampling process employs a probabilistic sampling method, where the probability of each remaining trajectory being sampled is its combined sampling probability. By using this probabilistic sampling method, the remaining trajectories with high sampling probabilities are more likely to be selected into the representative trajectory subset, thereby better covering the influence of the set to be forgotten and maintaining the knowledge of the remaining set during the fine-tuning process.

[0054] The design of having the same number of samples as the size of the set to be forgotten serves several purposes: firstly, it ensures fine-tuning efficiency by avoiding increased computational overhead due to an excessively large training subset; secondly, it ensures sufficient sample coverage so that the fine-tuning process can fully learn the features of representative trajectories. For example, if the set to be forgotten contains... If there are trajectories, then in each round of fine-tuning, samples are taken from the remaining set. The trajectories form a representative subset of trajectories, such that the size of the training subset is comparable to that of the set to be forgotten, neither too large nor too small.

[0055] Obtain a representative subset of trajectories Then, a representative subset of trajectories is used. Perform a round of fine-tuning on the current model. The fine-tuning process uses the gradient descent algorithm, based on a representative subset of trajectories. The loss function is used to update the model parameters.

[0056] Specifically, for trajectory learning models, the loss function is determined based on the specific task. For example, for trajectory similarity learning models, the loss function could be contrastive loss or triplet loss; for trajectory simplification models, the loss function could be the simplification error between the simplified trajectory and the original trajectory. During fine-tuning, the model parameters are updated using the optimization method of learning algorithm A, ensuring the model operates on a representative subset of trajectories. The performance on the platform is gradually improving.

[0057] Taking gradient descent as an example, the update formula for the fine-tuning process can be expressed as: , in, These are the current model parameters. For learning rate, For a representative subset of trajectories The calculated loss function value, This represents the gradient of the loss function with respect to the model parameters.

[0058] After completing one round of fine-tuning, repeat the above sampling and fine-tuning process for a preset number of rounds. The fine-tuning involves re-sampling according to the combined probability in each round of fine-tuning. From the remaining set Sampling is performed to obtain a new representative subset of trajectories. The number of rounds is then fine-tuned. The number of rounds is set based on a balance between forgetting effectiveness and computational cost: too few rounds may lead to insufficient forgetting, and the model's memory of the forgetting set may still exist; too many rounds will increase computational overhead and reduce forgetting efficiency. In practical applications, the number of rounds can be fine-tuned according to the specific task and dataset size, for example, it can be set to 5 rounds or 10 rounds.

[0059] Through multiple rounds of fine-tuning, the model parameters are gradually adjusted, enabling the model to retain knowledge of the remaining sets while forgetting information from the set to be forgotten. After fine-tuning, the forgotten model is obtained. The model significantly reduces the amount of memory retained on the set to be forgotten, achieving an effective forgetting effect; at the same time, its performance on the remaining set is maintained, approaching that of a model obtained by fully retraining on the remaining set. Performance.

[0060] Instead of performing a full retraining using the entire remaining set, a few rounds of fine-tuning are performed using only a representative subset of trajectories, significantly reducing computational overhead. Furthermore, probabilistic sampling guided by dual importance allows the model to both forget the information to be forgotten and retain the remaining knowledge during fine-tuning, achieving a balance between effective forgetting and performance preservation.

[0061] In actual deployment, hyperparameters such as the number of fine-tuning rounds, learning rate, and batch size can be adjusted according to the specific application scenario. For example, for scenarios with a large amount of data, the number of fine-tuning rounds can be appropriately increased to ensure the forgetting effect; for scenarios with high real-time requirements, the number of fine-tuning rounds can be appropriately reduced to improve efficiency. After the above steps, the forgotten trajectory learning model is finally obtained.

[0062] Example 2: Based on the same inventive concept as Embodiment 1, the present invention also provides a machine forgetting system for a trajectory learning model based on sampling and fine-tuning, used to implement the steps of the machine forgetting method for a trajectory learning model based on sampling and fine-tuning described in Embodiment 1, including the following modules: The data acquisition module is used to acquire the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set. The grid partitioning module is used to divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, the module determines the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. The importance calculation module is used to calculate the importance of each remaining trajectory to the set to be forgotten, based on the coverage grid set and the influence grid set, and to calculate the importance of the remaining trajectory to the remaining set. The sampling probability calculation module is used to normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values. The fine-tuning module is used to sample a representative trajectory subset from the remaining set according to the combined sampling probability, and to fine-tune the original trajectory learning model using the representative trajectory subset to obtain a forgotten trajectory learning model.

[0063] The data acquisition module, grid partitioning module, importance calculation module, sampling probability calculation module, and fine-tuning module of the trajectory learning model machine forgetting system based on sampling and fine-tuning proposed in this embodiment are used to implement steps S1, S2, S3, S4, and S5 in the trajectory learning model machine forgetting method based on sampling and fine-tuning in Embodiment 1, respectively. To avoid redundancy, they will not be described again here.

[0064] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0065] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0068] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A machine forgetting method based on a trajectory learning model using sampling and fine-tuning, characterized in that, Includes the following steps: S1: Obtain the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set; S2: Divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, determine the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. S3: Based on the covered grid set and the affected grid set, for each remaining trajectory, calculate the importance of the remaining trajectory to the set to be forgotten, and calculate the importance of the remaining trajectory to the remaining set; S4: Normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values; S5: Based on the combined sampling probability, a representative trajectory subset is sampled from the remaining set. The original trajectory learning model is then fine-tuned using the representative trajectory subset to obtain the forgotten trajectory learning model.

2. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: In step S2, the method for determining the influence grid set and coverage grid set corresponding to each trajectory for each trajectory in the set to be forgotten and each remaining trajectory in the remaining set is as follows: Divide the physical space where the trajectory is located into a set of grids. For any trajectory Its covering grid set With influence grid set They are defined as follows: , , in, Represents trajectory points With grid center point The Euclidean distance between them This is the preset influence range parameter.

3. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 2, characterized in that: The preset influence range parameter is determined based on the grid side length of the grid set.

4. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: In step S3, the method for calculating the importance of each remaining trajectory to the set to be forgotten is as follows: Obtain the set of covering grids for the remaining trajectories and the set of influencing grids for each trajectory to be forgotten in the set to be forgotten; The total number of times each grid in the grid set is covered by the influence grid set of all trajectories to be forgotten in the set to be forgotten is counted to obtain the influence count of the trajectories to be forgotten. The total co-occurrence count of the remaining trajectory and the set of to be forgotten is obtained by summing the influence counts of each grid in the coverage grid set of the remaining trajectory. The importance of the remaining trajectory to the set to be forgotten is calculated based on the total co-occurrence and the length of the remaining trajectory.

5. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: In step S3, the method for calculating the importance of each remaining trajectory to the remaining set is as follows: Obtain the set of covering grids for the remaining trajectory and the set of influencing grids for each other remaining trajectory in the remaining set, excluding the remaining trajectory itself; The total number of times each grid in the grid set is covered by the influence grid sets of all other remaining trajectories in the remaining set (excluding the remaining trajectory itself) is counted to obtain the remaining trajectory influence count; The total co-occurrence count of the remaining trajectory with other trajectories in the remaining set is obtained by summing the influence counts of the remaining trajectory corresponding to each grid in the covered grid set. The importance of the remaining trajectory to the remaining set is calculated based on the total co-occurrence amount and the length of the remaining trajectory.

6. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: In step S4, the importance of each remaining trajectory to the set to be forgotten and its importance to the remaining set are normalized respectively. The method for calculating the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values ​​is as follows: Obtain the importance of each remaining trajectory to the set to be forgotten and its importance to the remaining set; The importance of all remaining trajectories to the set to be forgotten is normalized to obtain the first normalized value corresponding to each remaining trajectory; The importance of all remaining trajectories to the remaining set is normalized to obtain a second normalized value for each remaining trajectory; The combined sampling probability corresponding to each remaining trajectory is obtained by taking the weighted average of the first normalized value and the second normalized value.

7. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: In step S5, a representative trajectory subset is sampled from the remaining set according to the combined sampling probability. The method for fine-tuning the original trajectory learning model using the representative trajectory subset is as follows: According to the combined sampling probability, the same number of trajectories as the set to be forgotten are sampled from the remaining set to form the representative trajectory subset; The original trajectory learning model is fine-tuned using the representative subset of trajectories. This fine-tuning is repeated multiple times, with each round of fine-tuning involving resampling according to the combined sampling probability to obtain the forgotten trajectory learning model.

8. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: The trajectory is a time-ordered sequence of points, where each point records longitude, latitude, and timestamp.

9. The machine forgetting method based on sampling and fine-tuning trajectory learning model according to claim 1, characterized in that: The set to be forgotten is determined according to the regional scenario or the user scenario.

10. A machine forgetting system based on a trajectory learning model using sampling and fine-tuning, characterized in that, include: The data acquisition module is used to acquire the original training set, the set to be forgotten, the remaining set, and the original trajectory learning model trained based on the original training set, wherein the remaining set is the dataset after removing the set to be forgotten from the original training set. The grid partitioning module is used to divide the physical space covered by all trajectories in the set to be forgotten and the remaining set into a unified grid set. For each trajectory to be forgotten in the set to be forgotten and each remaining trajectory in the remaining set, the module determines the influence grid set and the coverage grid set corresponding to each trajectory. The coverage grid set is the set of grids in which all trajectory points on the trajectory actually fall, and the influence grid set is the set of grids within a preset influence range around all trajectory points on the trajectory. The importance calculation module is used to calculate the importance of each remaining trajectory to the set to be forgotten, based on the coverage grid set and the influence grid set, and to calculate the importance of the remaining trajectory to the remaining set. The sampling probability calculation module is used to normalize the importance of each remaining trajectory to the set to be forgotten and the importance to the remaining set, respectively, and calculate the combined sampling probability corresponding to each remaining trajectory based on the two normalized importance values. The fine-tuning module is used to sample a representative trajectory subset from the remaining set according to the combined sampling probability, and to fine-tune the original trajectory learning model using the representative trajectory subset to obtain a forgotten trajectory learning model.