Position processing model training method, position processing method, device, electronic equipment, storage medium and product

By using clustering to form cluster centroids, the problem of noise interference in location trajectory sequences is solved, improving the accuracy and speed of model training and enhancing the precision and efficiency of abnormal location handling.

CN120849976BActive Publication Date: 2026-02-24CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511358464.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-23
Publication Date
2026-02-24
Estimated Expiration
2045-09-23

AI Technical Summary

Technical Problem

In the field of operator base station location services, existing technologies suffer from noise interference in location trajectory sequences caused by factors such as signal fluctuations, occasional base station switching, and equipment acquisition errors. This leads to problems such as model overfitting and slow training speed.

Method used

By acquiring user location trajectory sequences, identifying target nodes, clustering them to form cluster centroids, constructing samples for model training, and generating an abnormal location processing model.

Benefits of technology

It effectively reduces noise interference, improves the accuracy and speed of model training, and enhances the accuracy and efficiency of abnormal location handling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120849976B_ABST
    Figure CN120849976B_ABST
Patent Text Reader

Abstract

The application discloses a position processing model training method, a position processing method, a device, electronic equipment, a storage medium and a product. Position trajectory sequences generated by a plurality of users interacting with a position interaction node within a set period are acquired. A target position interaction node is determined based on all sequences. For each target position interaction node, all position trajectory sequences containing the node position are respectively clustered to obtain a plurality of clusters. Then, a sample containing labeled information is constructed by using the centroid of each cluster. Model training is performed based on the sample to generate an abnormal position processing model. This method reduces the amount of training data and reduces noise in the original data, thereby effectively improving the training accuracy and speed of the abnormal position processing model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a location processing model training method, location processing method, apparatus, electronic device, storage medium, and product. Background Technology

[0002] In the field of operator base station location services, model training is usually based on the location trajectory sequence generated by the user's interaction with location interaction nodes (such as base stations) within a set time period. The resulting model is then used for subsequent abnormal location processing tasks.

[0003] However, the original location trajectory sequence is often mixed with random noise due to factors such as signal fluctuations, occasional base station switching, and equipment acquisition errors. If it is directly used for model training, it is easy for the model to overlearn the noise features, leading to overfitting and ultimately reducing the accuracy of abnormal location processing. Furthermore, as the user scale expands and the data acquisition cycle extends, the total amount of original data is huge, and directly using it for training will significantly reduce the model building speed. Summary of the Invention

[0004] Based on this, the present invention provides a location processing model training method, location processing method, device, electronic device, storage medium and product, to solve the defects in the prior art where training samples are prone to overfitting due to noise and large data volume slows down the training speed.

[0005] To achieve the above objectives, embodiments of the present invention provide a method for training a position processing model, comprising:

[0006] Obtain the location trajectory sequence generated by several users interacting with location interaction nodes within a set time period;

[0007] Based on all the aforementioned location trajectory sequences, the target location interaction nodes involved are determined;

[0008] For each target location interaction node, cluster all location trajectory sequences containing the location of the target location interaction node to obtain several clusters;

[0009] Using the centroid of each cluster as the target trajectory sequence, samples with labeled information are constructed;

[0010] Based on the samples, a model is trained to generate an anomaly location handling model.

[0011] To achieve the above objectives, embodiments of the present invention provide a position processing method, including:

[0012] Obtain the location trajectory sequence of the user to be processed;

[0013] The user location trajectory sequence to be processed is input into the abnormal location processing model, and the location processing result is output; wherein, the abnormal location processing model is trained by the location processing model training method described in the above embodiment.

[0014] To achieve the above objectives, embodiments of the present invention also provide a position processing model training apparatus, comprising:

[0015] The data acquisition module is used to acquire the location trajectory sequence generated by several users interacting with location interaction nodes within a set time period;

[0016] A location interaction node determination module is used to determine the target location interaction nodes involved based on all the location trajectory sequences;

[0017] The trajectory clustering module is used to cluster all location trajectory sequences containing the locations of the target location interaction nodes for each target location interaction node, thereby obtaining several clusters.

[0018] The sample construction module is used to construct samples with annotation information using the centroid of each of the aforementioned clusters as the target trajectory sequence.

[0019] The model training module is used to train the model based on the samples and generate an anomaly location processing model.

[0020] To achieve the above objectives, embodiments of the present invention also provide a position processing device, comprising:

[0021] The trajectory acquisition module is used to acquire the location trajectory sequence of the user to be processed;

[0022] The location processing module is used to input the user location trajectory sequence to be processed into the abnormal location processing model and output the location processing result; wherein, the abnormal location processing model is trained by the location processing model training method as described in any of the above embodiments.

[0023] To achieve the above objectives, embodiments of the present invention also provide an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the position processing model training method or the position processing method as described in any of the above embodiments.

[0024] To achieve the above objectives, embodiments of the present invention also provide a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the location processing model training method or location processing method as described in any of the above embodiments.

[0025] To achieve the above objectives, embodiments of the present invention also provide a computer program product, including a computer program / instruction, which, when executed by a processor, implements the position processing model training method or position processing method as described in any of the above embodiments.

[0026] Compared with existing technologies, the location processing model training method, location processing method, device, electronic device, storage medium, and product disclosed in this invention first acquire a number of location trajectory sequences generated by users interacting with location interaction nodes within a set time period; second, based on all location trajectory sequences, determine the target location interaction nodes involved; next, for each target location interaction node, cluster all location trajectory sequences containing the location of that target location interaction node to obtain several clusters; then, use the centroid of each cluster as the target trajectory sequence to construct samples containing labeled information; finally, train the model based on the samples to generate an abnormal location processing model. Therefore, this invention, after acquiring the original location trajectory sequences, first determines the target location interaction nodes through the location trajectory sequences, then clusters the sequences containing the same target location interaction node, and constructs samples using the cluster centroids to achieve model training. This reduces the amount of training data and eliminates noise in the original data, thereby effectively improving the training accuracy and speed of the abnormal location processing model. Attached Figure Description

[0027] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0028] Figure 1 This is a flowchart illustrating a position processing model training method according to an embodiment of the present invention;

[0029] Figure 2 This is a schematic diagram of the structure of a position processing model training device provided in an embodiment of the present invention;

[0030] Figure 3 This is a schematic diagram of the structure of a position processing device provided in an embodiment of the present invention;

[0031] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0032] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0033] See Figure 1 , Figure 1 This is a flowchart illustrating a location processing model training method provided in an embodiment of the present invention. The location processing model training method includes steps S11 to S15:

[0034] S11. Obtain a sequence of location trajectories generated by several users interacting with location interaction nodes within a set time period;

[0035] S12. Determine the target location interaction nodes involved based on all the aforementioned location trajectory sequences;

[0036] S13. For each target location interaction node, cluster all location trajectory sequences containing the location of the target location interaction node to obtain several clusters;

[0037] S14. Using the centroid of each cluster as the target trajectory sequence, construct samples with annotation information;

[0038] S15. Based on the samples, perform model training to generate an anomaly location processing model.

[0039] It is worth noting that location interaction nodes refer to hardware or facilities that can interact with terminals (such as mobile phones, IoT sensing devices, etc.) and provide terminal location association information; typical forms include operator base stations, wireless LAN access points, Bluetooth Low Energy beacons, IoT positioning gateways, and public facility positioning nodes. Anomaly location processing models are used to identify and / or correct anomaly locations in the user location trajectory sequences to be processed.

[0040] For example, assume the location interaction node is a base station. The training process for the location processing model is as follows:

[0041] 1. Using base stations as the object, construct the base station spatiotemporal vector.

[0042] The location trajectory sequence includes multiple base station locations arranged in chronological order. To more intuitively express the spatial relationship of base stations over time, a group of location zippers (i.e., location trajectory sequences) is used to represent the spatiotemporal relationship of a specific base station, and the group of location zippers is defined as the spatiotemporal vector of the base stations, as shown below:

[0043] 1. Taking the base station as the target, the first Individual users in The set of locations within a defined time period at a given moment is represented as a base station zipper:

[0044] ;

[0045] in, Indicates the first The base station zipper for each user; This is a time index, with a value greater than or equal to 1 and less than or equal to 1. , indicating the first time within the set time period Each moment corresponds to a unique base station record; Representing the The user in the first The physical location of a time-linked base station object can be quantified using a set of latitude and longitude coordinates; if the first... No base station signaling is generated at any time, in order to... base station object at time Alternative Ensure that the number of elements in the base station zipper is completely consistent with the number of times within the set time period.

[0046] To include The time period is set as the time dimension, with each moment as the time dimension. A group of users is the object dimension, and the base station zipper of this group within a set time period can be represented as follows:

[0047] ;

[0048] in, for OK The matrix consists of columns, where each row represents a user's base station location and each column represents the base station location records of all users at the same time.

[0049] 2. Spatiotemporal clipping and noise reduction.

[0050] The above-constructed This is a spatiotemporal representation based on the original observation data (i.e., the original location trajectory sequence). However, due to the drift and ping-pong handover characteristics of base station coverage, the original observation data suffers from high repetition and noise. To prevent overfitting and low training efficiency in subsequent model training, while ensuring the spatiotemporal information content of the matrix, a pruning and denoising scheme based on physical spatial distance is designed to shield or weaken the non-major positional fluctuation differences between different base stations. The denoised spatiotemporal vector is represented as:

[0051] ;

[0052] Represented as a clipped spatiotemporal vector, it is a OK A matrix of columns This represents the number of position trajectory sequences retained after cropping.

[0053] matrix Considered as being by indivual The pruning process, which involves pruning a set of vectors, is essentially a vector aggregation process centered around the target base station (i.e., the interaction node at the target location). The specific pruning steps are as follows:

[0054] Will The vectors are merged, and the frequency of each base station in the merged set is counted. The base station with the highest frequency is selected as the target base station. A merge operation is performed separately for each target base station (the merge rule is: if a target base station is contained in a certain original location trajectory sequence, it is merged into the vector set corresponding to that target base station). The merged vector sets of each target base station are clustered to generate multiple clusters. The centroid of each cluster is used as the representative trajectory vector (i.e., the target trajectory sequence).

[0055] 3. Construct samples using the centroid of each cluster for model training to generate an anomaly location handling model.

[0056] Compared with existing technologies, the embodiments of the present invention, after obtaining the original location trajectory sequence, first determine the target location interaction nodes through the location trajectory sequence, and then cluster the sequences containing the same target location interaction nodes, constructing samples with the cluster centroids to achieve model training. Its advantages are as follows:

[0057] On the one hand, it can effectively improve the accuracy of model training. In the original location trajectory sequence, meaningless noise caused by signal fluctuations, accidental switching, positioning drift, ping-pong switching, etc. (such as isolated abnormal points, duplicate redundant records, and irregular random fluctuations) will be diluted by the majority of normal trajectories within the cluster during the clustering process; while the cluster centroid, as a representative trajectory, can accurately reflect the real spatiotemporal patterns of the relevant trajectories of the target location interaction nodes, and can retain core information while removing noise, thus achieving data purification. Training the model with such high-quality samples can avoid the model overlearning noise features, reduce the risk of overfitting, and improve the positioning accuracy of specific location interaction nodes, which is significantly better than the effect of training directly using the original data.

[0058] On the other hand, it can significantly improve the model training speed. The original data volume is huge, and redundant samples will occupy a lot of computing resources and prolong the model iteration cycle. This implementation method condenses a large number of similar original position trajectory sequences into a small number of centroid samples through clustering, thereby simplifying the number of training samples. This not only reduces the computational overhead of feature extraction, parameter update and other links in the model training process, but also shortens the iteration time of each round, effectively improving the model construction speed.

[0059] In the second preferred embodiment, based on steps S11-S15, determining the target location interaction nodes involved based on all the location trajectory sequences includes:

[0060] Count the frequency of occurrence of each location interaction node involved in all the aforementioned location trajectory sequences;

[0061] Select the most frequently occurring location interaction nodes as target location interaction nodes.

[0062] Specifically, all location interaction nodes appearing in the location trajectory sequence are identified, and the frequency of each location interaction node is counted. These nodes are then sorted in descending order of frequency, and the top-ranked location interaction nodes are selected as target location interaction nodes. Optionally, location interaction nodes with a frequency greater than a set frequency threshold can also be selected as target location interaction nodes.

[0063] In a third preferred embodiment, based on steps S11-S15, the step of training the model based on the samples to generate an anomaly location processing model includes:

[0064] Construct an initial sequence spatiotemporal graph based on the target trajectory sequence;

[0065] By combining the time information in the target trajectory sequence, the initial sequence spatiotemporal map is subjected to time enhancement processing to obtain a spatiotemporal map with time features;

[0066] By combining the spatial information in the target trajectory sequence, the initial sequence spatiotemporal map is spatially enhanced to obtain a spatiotemporal map with spatial features;

[0067] The target fusion feature is obtained by fusing the initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features.

[0068] The target fusion features are processed based on a pre-trained large language model to generate a high-level semantic feature vector.

[0069] Based on the high-level semantic feature vector and its corresponding annotation information, the neural network parameters are optimized through supervised learning to generate an anomaly location processing model.

[0070] Specifically, the target trajectory sequence is transformed into a feature form that the model can learn efficiently, resulting in target fusion features. The details are as follows: First, an initial sequence spatiotemporal graph is constructed based on the target trajectory sequence. Next, temporal feature enhancement is performed by incorporating the temporal information from the target trajectory sequence, generating a spatiotemporal graph with temporal features. Temporal features can be represented by the observation time interval between two location interaction nodes, or by time period labels (such as daytime, nighttime, weekday, weekend, etc.) to enhance the positional patterns within different time periods. Simultaneously, spatial feature enhancement is performed by incorporating the spatial information from the target trajectory sequence, generating a spatiotemporal graph with spatial features: the physical distance between location interaction nodes is calculated from their positional information, and this spatial feature is injected as enhancement information into the initial sequence spatiotemporal graph, generating a spatiotemporal graph with spatial features. Finally, the initial sequence spatiotemporal graph, the spatiotemporal graph with temporal features, and the spatiotemporal graph with spatial features are integrated to obtain the target fusion features.

[0071] In a fourth preferred embodiment, based on any of the above embodiments, the step of training the model based on the samples to generate an anomaly location processing model includes: extracting features from the target trajectory sequence to obtain target fusion features; processing the target fusion features based on a pre-trained large language model to generate a high-level semantic feature vector; and optimizing the neural network parameters through supervised learning based on the high-level semantic feature vector and its corresponding annotation information to generate an anomaly location processing model; wherein, the large language model refers to a large language model that introduces a low-rank adaptation layer in the Transformer attention layer.

[0072] For example, a pre-trained large language model (such as GPT-2) is used as the base model, fully leveraging its capabilities in temporal prediction and detection to construct an anomaly detection and ground truth prediction model architecture. This architecture includes two core designs: first, a spatiotemporal feature extraction structure based on spatiotemporal confusion convolution; and second, a multi-task learning structure based on anomaly recognition and ground truth prediction. In terms of model training optimization, a large language model fine-tuning strategy is adopted: fixing the original parameters of the pre-trained model, introducing a low-rank adaptation layer (LORA) into the Transformer network structure, and reducing the model training parameters by using matrix factorization techniques and simulating the effect of two low-rank matrices. This design achieves efficient fine-tuning, significantly improving model training speed while preserving the capabilities of the base model. Finally, the neural network parameters are optimized through supervised learning to generate an anomaly location handling model. GPT-2's Chinese name is Generative Pre-trained Transformer 2, and its full English name is Generative Pre-trained Transformer 2.

[0073] In the fifth preferred embodiment, based on the third embodiment described above, the fusion of the initial sequence spatiotemporal graph, the spatiotemporal graph with temporal features, and the spatiotemporal graph with spatial features to obtain the target fusion feature includes:

[0074] The initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features are concatenated to obtain a concatenation vector;

[0075] The concatenated vectors are then subjected to standardization and convolution operations in sequence to extract spatiotemporal fusion features;

[0076] The spatiotemporal fusion features are pooled and dimensionality reduced to obtain the target fusion features.

[0077] Specifically, the initial sequence spatiotemporal graph, the spatiotemporal graph with temporal features, and the spatiotemporal graph with spatial features are concatenated to form a concatenated vector, which is used as input. After normalization (i.e., standardization), a 3*3 convolutional kernel is used to extract features from this three-dimensional feature space. After convolution, pooling, and other operations, information with spatiotemporal fusion characteristics is formed. This information is then expanded and concatenated to meet the input tag format requirements of the large language model.

[0078] In the sixth preferred embodiment, based on the third embodiment described above, the annotation information includes known abnormal locations and their corresponding real locations;

[0079] The step of optimizing neural network parameters and generating an anomaly location processing model based on the high-level semantic feature vector and its corresponding annotation information through supervised learning includes:

[0080] Using the neural network parameters of the anomaly recognition task to be optimized, the predicted anomaly location is generated based on the high-level semantic feature vector;

[0081] Using the neural network parameters of the ground truth prediction task to be optimized, a predicted correction position is generated for the predicted anomaly position based on the high-level semantic feature vector.

[0082] The total loss value is calculated based on the classification errors of the predicted anomaly location and the known anomaly location, as well as the distance between the predicted corrected location and the true location.

[0083] The neural network parameters for the anomaly identification task and the ground truth prediction task are optimized based on the total loss value to generate the anomaly location processing model.

[0084] Specifically, the core function of the anomaly location processing model is to identify anomaly locations and generate corrected ground truth locations. Therefore, the model architecture comprises two core modules: anomaly identification and ground truth prediction. These two modules are trained collaboratively based on high-level semantic feature vectors. The specific process is as follows: Using the neural network parameters of the anomaly identification task to be optimized, and taking the high-level semantic feature vector as input, a predicted anomaly location is generated. Simultaneously, using the neural network parameters of the ground truth prediction task to be optimized, also based on the same high-level semantic feature vector, a corresponding corrected predicted location is generated for the predicted anomaly location. Next, the training loss is calculated by combining the labeled information: on the one hand, the classification error between the predicted anomaly location and the known anomaly location is calculated; on the other hand, the distance error between the corrected predicted location and the ground truth location is calculated. These two types of errors are integrated to obtain the total loss value. Finally, with minimizing the total loss value as the optimization objective, the neural network parameters of the anomaly identification and ground truth prediction tasks are adjusted in reverse. Through iterative training, the parameters are continuously converged, ultimately generating an anomaly location processing model with the ability to identify and correct anomaly locations.

[0085] Furthermore, the step of generating a predicted anomaly location based on the high-level semantic feature vector using the neural network parameters of the anomaly recognition task to be optimized includes:

[0086] Based on the neural network parameters of the anomaly recognition task to be optimized, the high-level semantic feature vector is input into a fully connected layer for feature transformation, and then normalized to generate a prediction probability distribution of each position in the target trajectory sequence as the predicted anomaly position.

[0087] Further, the calculation of the total loss value based on the classification errors of the predicted anomaly location and the known anomaly location, and the distance between the predicted corrected location and the true location, includes:

[0088] For the known abnormal location, extract its corresponding predicted probability in the predicted probability distribution, calculate the natural logarithm of the predicted probability and take the negative value to obtain the abnormal identification loss value.

[0089] For each predicted abnormal location, calculate the distance between the predicted corrected location and the corresponding true location, square it, sum all the squared distances, and divide by the total number of predicted abnormal locations to obtain the true prediction loss value.

[0090] The total loss value is obtained by adding the anomaly identification loss value and the ground truth prediction loss value.

[0091] Specifically, regarding the anomaly detection task: Based on the high-level semantic feature vector output by the large language model, a fully connected layer is used for feature transformation. Then, a softmax function is introduced to calculate the probability value of each position in the target trajectory sequence being identified as an anomaly position, and the probability distribution is output. For example, anomaly position detection is designed as a classification problem of index positions. If the length of the target trajectory sequence is... (i.e., the target trajectory sequence contains) These are the locations, then... The indexes of the location points are used as classification categories (the number of categories is...). This transforms anomaly detection into a classification task of "determining which index position corresponds to an anomaly point," with the model outputting the classification result as the index of the anomaly location. During model training, the cross-entropy loss function is used to calculate the classification error, optimizing the parameters of the anomaly detection task. The specific loss function is as follows:

[0092] ;

[0093] in, The cross-entropy loss value (i.e., the anomaly detection loss value) represents the anomaly detection task and is used to quantify the model's prediction error for anomaly locations. The smaller the loss value, the higher the confidence level of the model in predicting known anomaly locations. This represents the sum of the unnormalized raw scores for all locations in the output of the fully connected layer. This represents the unnormalized raw score output by the fully connected layer corresponding to the known outlier location.

[0094] Regarding the ground truth prediction task: To achieve efficient reuse of model resources and improve generalization performance, a multi-task training model was designed, which performs the ground truth prediction task simultaneously with the anomaly detection task. Specifically, the ground truth prediction task is treated as a regression problem, and its loss function is designed based on mean squared error, with the specific formula as follows:

[0095] ;

[0096] in, This represents the loss value for the truth prediction task. Indicates the predicted correction position. This indicates the corresponding actual location. This represents a two-dimensional spatial distance function used to calculate the spatial distance between the actual and predicted values.

[0097] Based on the design of the anomaly detection and truth prediction loss functions above, the overall model learning loss function should be the sum of the two, and the final loss function is expressed as:

[0098] ;

[0099] In a preferred embodiment, based on any of the above embodiments, the centroid of the cluster is determined in the following manner:

[0100] For all position trajectory sequences in the same cluster, slice them according to a set time granularity, and calculate the mean of the position center of all position trajectory sequences in each time slice;

[0101] The centroid of the cluster is formed by arranging the mean values ​​of the center points of all the time slices in chronological order.

[0102] Specifically, the target trajectory sequence is determined as follows:

[0103] (1) For a position trajectory sequence containing the positions of interactive nodes with the same target location, first determine the number of clipped nodes. Random selection One vector is used as the initialization vector, as... The centroids of each category; where a sequence of position trajectories corresponds to a vector.

[0104] (2) Calculate the similarity between other vectors based on cosine distance and centroid, group the vectors with the smallest distance together to form a cluster, and update the centroid of this cluster. The updated centroid can be regarded as a virtual position trajectory sequence, and the "target position interaction node," which serves as the common core of all original position trajectory sequences, must remain unchanged in this virtual position trajectory sequence. The similarity calculation formula is as follows:

[0105] ;

[0106] in, Represents two position trajectory sequences and The cosine distance between the two position trajectory sequences passes through the same target position interaction node.

[0107] Centroid updates employ a method based on the mean value of the physical distance between location interaction nodes and their latitude and longitude. The specific process is as follows: To improve computational efficiency and simplify operations, the latitude and longitude coordinates in two-dimensional space are first converted into a one-dimensional index using the Google S2 indexing algorithm. Based on this, the mean value of the centroid update is calculated using the one-dimensional index. The final mean value will be used as the coordinate point of the virtual base station. The specific calculation formula is as follows.

[0108] ;

[0109] in, Indicates the first time slice at a certain time. A one-dimensional representation of the location points of each user. This represents the coordinates of two points in a one-dimensional representation after central mean calculation. This means that by performing a loop operation, the centroids of all user locations in the same time slice are calculated pairwise (until all locations in the time slice are covered). After performing the above calculation for all times, the results of each time slice form the updated centroid.

[0110] (3) Repeat (1)~(2) and continuously monitor the changes in the centroids of the newly generated clusters after each iteration: when the difference between the new centroid and the centroid of the previous iteration is less than the preset threshold, it indicates that the cluster structure has become stable and the model has reached the convergence condition, and the iteration can be stopped; if the convergence condition is not reached, the iteration continues, and the number of iterations does not exceed 3~5 times (in order to control the computational cost and avoid excessive iteration). After the above spatiotemporal trimming, the initial user trajectory information can be preserved to the maximum extent and the random fluctuations in the trajectory can be eliminated.

[0111] Furthermore, after clustering, samples with labeled information are constructed using the centroids of the clusters as the target trajectory sequences. The specific form of the samples is as follows:

[0112] The training dataset for subsequent models is constructed based on the aforementioned cropped and denoised spatiotemporal vectors. In line with the goal of this proposal, which is to detect anomalies in trajectory zippers and predict and repair their locations, the training set is represented in the following form:

[0113] ;

[0114] in, This is the observation sequence (i.e., the target trajectory sequence). The labeled results contain two types of information. This is represented as the location of an anomaly (i.e., a known anomaly). Represents the true coordinates (i.e., the actual location) of outliers.

[0115] Compared with existing technologies, the method disclosed in this invention firstly filters frequently occurring target location interaction nodes and clusters position trajectory sequences containing the same target location interaction node, constructing samples with the centroid of the cluster. This step eliminates sample noise such as position interaction node drift and ping-pong switching from the data source, while reducing the number of samples. This not only avoids the risk of overfitting in subsequent model training but also lays the foundation for rapid training. Secondly, after extracting the initial sequence spatiotemporal graph based on the samples, it first enhances and obfuscates the features in the temporal and spatial dimensions. Then, it combines a large language model and low-rank adaptation layer fine-tuning technology to design a multi-task training paradigm for anomaly identification and ground truth prediction. Relying on the inductive summarization and learning capabilities of the large language model, it performs pattern mining and automatic decision-making, significantly improving the model's generalization ability, increasing the model's accuracy in identifying and correcting abnormal positions, and improving multi-task efficiency.

[0116] An embodiment of the present invention also provides a position processing method, comprising:

[0117] Obtain the location trajectory sequence of the user to be processed;

[0118] The user location trajectory sequence to be processed is input into the abnormal location processing model, and the location processing result is output; wherein, the abnormal location processing model is trained by the location processing model training method described in any of the above embodiments.

[0119] It is understandable that using a trained abnormal location processing model to identify and correct abnormal locations in the user location trajectory sequence to be processed can achieve the following objectives: quickly repair anomalies caused by missing base station parameters or incorrect latitude and longitude markings nationwide, and generate high-quality parameter data for all base stations nationwide; resolve location anomalies caused by signaling update delays and out-of-order issues; and perform high-precision fitting for cases with coarse location accuracy granularity, effectively improving the location accuracy of the user location trajectory sequence to be processed.

[0120] See Figure 2 This invention also provides a location processing model training device, comprising:

[0121] Data acquisition module 21 is used to acquire the location trajectory sequence generated by several users interacting with location interaction nodes within a set time period;

[0122] The location interaction node determination module 22 is used to determine the target location interaction nodes involved based on all the location trajectory sequences;

[0123] The trajectory clustering module 23 is used to cluster all position trajectory sequences containing the positions of the target position interaction nodes for each target position interaction node, and obtain several clusters.

[0124] The sample construction module 24 is used to construct samples containing annotation information using the centroid of each cluster as the target trajectory sequence;

[0125] The model training module 25 is used to train the model based on the sample and generate an anomaly location processing model.

[0126] In one embodiment, the location interaction node determination module 22 is specifically used for:

[0127] Count the frequency of occurrence of each location interaction node involved in all the aforementioned location trajectory sequences;

[0128] Select the most frequently occurring location interaction nodes as target location interaction nodes.

[0129] In one implementation, the model training module 25 is specifically used for:

[0130] Construct an initial sequence spatiotemporal graph based on the target trajectory sequence;

[0131] By combining the time information in the target trajectory sequence, the initial sequence spatiotemporal map is subjected to time enhancement processing to obtain a spatiotemporal map with time features;

[0132] By combining the spatial information in the target trajectory sequence, the initial sequence spatiotemporal map is spatially enhanced to obtain a spatiotemporal map with spatial features;

[0133] The target fusion feature is obtained by fusing the initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features.

[0134] The target fusion features are processed based on a pre-trained large language model to generate a high-level semantic feature vector.

[0135] Based on the high-level semantic feature vector and its corresponding annotation information, the neural network parameters are optimized through supervised learning to generate an anomaly location processing model.

[0136] In one implementation, the large language model refers to a large language model that incorporates a low-rank adaptation layer in the Transformer attention layer.

[0137] In one implementation, fusing the initial sequence spatiotemporal graph, the spatiotemporal graph with temporal features, and the spatiotemporal graph with spatial features to obtain the target fusion feature includes:

[0138] The initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features are concatenated to obtain a concatenation vector;

[0139] The concatenated vectors are then subjected to standardization and convolution operations in sequence to extract spatiotemporal fusion features;

[0140] The spatiotemporal fusion features are pooled and dimensionality reduced to obtain the target fusion features.

[0141] In one implementation, the annotation information includes known abnormal locations and their corresponding actual locations;

[0142] The step of optimizing neural network parameters and generating an anomaly location processing model based on the high-level semantic feature vector and its corresponding annotation information through supervised learning includes:

[0143] Using the neural network parameters of the anomaly recognition task to be optimized, the predicted anomaly location is generated based on the high-level semantic feature vector;

[0144] Using the neural network parameters of the ground truth prediction task to be optimized, a predicted correction position is generated for the predicted anomaly position based on the high-level semantic feature vector.

[0145] The total loss value is calculated based on the classification errors of the predicted anomaly location and the known anomaly location, as well as the distance between the predicted corrected location and the true location.

[0146] The neural network parameters for the anomaly identification task and the ground truth prediction task are optimized based on the total loss value to generate the anomaly location processing model.

[0147] In one implementation, generating a predicted anomaly location based on the high-level semantic feature vector using the neural network parameters of the anomaly recognition task to be optimized includes:

[0148] Based on the neural network parameters of the anomaly recognition task to be optimized, the high-level semantic feature vector is input into a fully connected layer for feature transformation, and then normalized to generate a prediction probability distribution of each position in the target trajectory sequence as the predicted anomaly position.

[0149] In one implementation, calculating the total loss value based on the classification errors of the predicted anomaly location and the known anomaly location, and the distance between the predicted corrected location and the true location, includes:

[0150] For the known abnormal location, extract its corresponding predicted probability in the predicted probability distribution, calculate the natural logarithm of the predicted probability and take the negative value to obtain the abnormal identification loss value.

[0151] For each predicted abnormal location, calculate the distance between the predicted corrected location and the corresponding true location, square it, sum all the squared distances, and divide by the total number of predicted abnormal locations to obtain the true prediction loss value.

[0152] The total loss value is obtained by adding the anomaly identification loss value and the ground truth prediction loss value.

[0153] In one implementation, the centroid of the cluster is determined in the following way:

[0154] For all position trajectory sequences in the same cluster, slice them according to a set time granularity, and calculate the mean of the position center of all position trajectory sequences in each time slice;

[0155] The centroid of the cluster is formed by arranging the mean values ​​of the center points of all the time slices in chronological order.

[0156] In one implementation, the location interaction node is a base station.

[0157] It is worth noting that the working principle of the position processing model training device provided in the above embodiments can be found in the workflow of the position processing model training method provided in any of the above embodiments, and will not be repeated here.

[0158] See Figure 3 The present invention also provides a position processing device, comprising:

[0159] Trajectory acquisition module 31 is used to acquire the location trajectory sequence of the user to be processed;

[0160] The location processing module 32 is used to input the user location trajectory sequence to be processed into the abnormal location processing model and output the location processing result; wherein, the abnormal location processing model is trained by the location processing model training method described in any of the above embodiments.

[0161] It is worth noting that the working principle of the position processing device provided in the above embodiments can be found in the workflow of the position processing method provided in the above embodiments, and will not be repeated here.

[0162] See Figure 4 This invention also provides an electronic device, including a processor 41, a memory 42, and a computer program stored in the memory 42 and configured to be executed by the processor 41. When the processor 41 executes the computer program, it implements the steps described in the above-described location processing model training method embodiment or the steps in the location processing method embodiment, for example... Figure 1 S11~S15 in the above; or, when the processor 41 executes the computer program, it implements the functions of each module in the above-described device embodiments.

[0163] For example, the computer program can be divided into one or more modules, which are stored in the memory 42 and executed by the processor 41 to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in the electronic device. For example, the computer program can be divided into multiple modules, and the specific working process of each module can be referred to the working process of the position processing model training device or position processing device described in the above embodiments, and will not be repeated here.

[0164] The electronic device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The electronic device may include, but is not limited to, a processor 41 and a memory 42. Those skilled in the art will understand that the electronic device may also include input / output devices, network access devices, buses, etc.

[0165] The processor 41 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor 41 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and lines.

[0166] The memory 42 can be used to store the computer programs and / or modules. The processor 41 implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory 42 and calling the data stored in the memory 42. The memory 42 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as image playback function), etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory 42 may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0167] If the modules integrated into the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by the processor 41, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0168] This invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the position processing model training method or position processing method as described in any of the above embodiments.

[0169] Compared with existing technologies, the location processing model training method, location processing method, device, electronic device, storage medium, and product disclosed in this invention first acquire a number of location trajectory sequences generated by users interacting with location interaction nodes within a set time period; second, based on all location trajectory sequences, determine the target location interaction nodes involved; next, for each target location interaction node, cluster all location trajectory sequences containing the location of that target location interaction node to obtain several clusters; then, use the centroid of each cluster as the target trajectory sequence to construct samples containing labeled information; finally, train the model based on the samples to generate an abnormal location processing model. Therefore, this invention, after acquiring the original location trajectory sequences, first determines the target location interaction nodes through the location trajectory sequences, then clusters the sequences containing the same target location interaction node, and constructs samples using the cluster centroids to achieve model training. This reduces the amount of training data and eliminates noise in the original data, thereby effectively improving the training accuracy and speed of the abnormal location processing model.

[0170] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A method for training a position processing model, characterized in that, include: Obtain the location trajectory sequence generated by several users interacting with location interaction nodes within a set time period; Based on all the aforementioned location trajectory sequences, the target location interaction nodes involved are determined; For each target location interaction node, cluster all location trajectory sequences containing the location of the target location interaction node to obtain several clusters; Using the centroid of each cluster as the target trajectory sequence, a sample with annotation information is constructed; the annotation information includes known abnormal locations, or the annotation information includes known abnormal locations and their corresponding real locations; Based on the samples, a model is trained to generate an anomaly location handling model; For each of the target location interaction nodes, clustering is performed on all location trajectory sequences containing the location of the target location interaction node to obtain several clusters, including: For each target location interaction node, all the location trajectory sequences containing that target location interaction node are respectively assigned to the set of that target location interaction node; Clustering is performed on all the location trajectory sequences in the same set to obtain several clusters.

2. The position processing model training method as described in claim 1, characterized in that, The step of determining the target location interaction nodes involved based on all the location trajectory sequences includes: Count the frequency of occurrence of each location interaction node involved in all the aforementioned location trajectory sequences; Select the most frequently occurring location interaction nodes as target location interaction nodes.

3. The position processing model training method as described in claim 1, characterized in that, The step of training the model based on the samples to generate an anomaly location processing model includes: Construct an initial sequence spatiotemporal graph based on the target trajectory sequence; By combining the time information in the target trajectory sequence, the initial sequence spatiotemporal map is subjected to time enhancement processing to obtain a spatiotemporal map with time features; By combining the spatial information in the target trajectory sequence, the initial sequence spatiotemporal map is spatially enhanced to obtain a spatiotemporal map with spatial features; The target fusion feature is obtained by fusing the initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features. The target fusion features are processed based on a pre-trained large language model to generate a high-level semantic feature vector. Based on the high-level semantic feature vector and its corresponding annotation information, the neural network parameters are optimized through supervised learning to generate an anomaly location processing model.

4. The position processing model training method as described in claim 3, characterized in that, The large language model refers to a large language model that incorporates a low-rank adaptation layer into the Transformer attention layer.

5. The position processing model training method as described in claim 3, characterized in that, The process of fusing the initial sequence spatiotemporal graph, the spatiotemporal graph with temporal features, and the spatiotemporal graph with spatial features to obtain the target fusion feature includes: The initial sequence spatiotemporal graph, the spatiotemporal graph with time features, and the spatiotemporal graph with spatial features are concatenated to obtain a concatenation vector; The concatenated vectors are then subjected to standardization and convolution operations in sequence to extract spatiotemporal fusion features; The spatiotemporal fusion features are pooled and dimensionality reduced to obtain the target fusion features.

6. The position processing model training method as described in claim 3, characterized in that, The annotation information includes known anomaly locations and their corresponding actual locations; The step of optimizing neural network parameters and generating an anomaly location processing model based on the high-level semantic feature vector and its corresponding annotation information through supervised learning includes: Using the neural network parameters of the anomaly recognition task to be optimized, the predicted anomaly location is generated based on the high-level semantic feature vector; Using the neural network parameters of the ground truth prediction task to be optimized, a predicted correction position is generated for the predicted anomaly position based on the high-level semantic feature vector. The total loss value is calculated based on the classification errors of the predicted anomaly location and the known anomaly location, as well as the distance between the predicted corrected location and the true location. The neural network parameters for the anomaly identification task and the ground truth prediction task are optimized based on the total loss value to generate the anomaly location processing model.

7. The position processing model training method as described in claim 6, characterized in that, The step of generating a predicted anomaly location based on the high-level semantic feature vector using the neural network parameters of the anomaly recognition task to be optimized includes: Based on the neural network parameters of the anomaly recognition task to be optimized, the high-level semantic feature vector is input into a fully connected layer for feature transformation, and then normalized to generate a prediction probability distribution of each position in the target trajectory sequence as the predicted anomaly position.

8. The position processing model training method as described in claim 7, characterized in that, The calculation of the total loss value based on the classification errors of the predicted and known anomaly locations, and the distance between the predicted corrected location and the true location, includes: For the known abnormal location, extract its corresponding predicted probability in the predicted probability distribution, calculate the natural logarithm of the predicted probability and take the negative value to obtain the abnormal identification loss value. For each predicted abnormal location, calculate the distance between the predicted corrected location and the corresponding true location, square it, sum all the squared distances, and divide by the total number of predicted abnormal locations to obtain the true prediction loss value. The total loss value is obtained by adding the anomaly identification loss value and the ground truth prediction loss value.

9. The position processing model training method as described in claim 1, characterized in that, The centroid of the cluster is determined in the following way: For all position trajectory sequences in the same cluster, slice them according to a set time granularity, and calculate the mean of the position center of all position trajectory sequences in each time slice; The centroid of the cluster is formed by arranging the mean values ​​of the center points of all the time slices in chronological order.

10. The position processing model training method as described in any one of claims 1 to 9, characterized in that, The location interaction node is a base station.

11. A position processing method, characterized in that, include: Obtain the location trajectory sequence of the user to be processed; The user location trajectory sequence to be processed is input into the abnormal location processing model, and the location processing result is output; wherein, the abnormal location processing model is trained by the location processing model training method described in any one of claims 1 to 10.

12. A position processing model training device, characterized in that, include: The data acquisition module is used to acquire the location trajectory sequence generated by several users interacting with location interaction nodes within a set time period; A location interaction node determination module is used to determine the target location interaction nodes involved based on all the location trajectory sequences; The trajectory clustering module is used to cluster all location trajectory sequences containing the locations of the target location interaction nodes for each target location interaction node, thereby obtaining several clusters. The sample construction module is used to construct samples with annotation information using the centroid of each cluster as the target trajectory sequence; the annotation information includes known abnormal locations, or the annotation information includes known abnormal locations and their corresponding real locations; The model training module is used to train the model based on the samples and generate an anomaly location processing model. The trajectory clustering module is specifically used for: For each target location interaction node, all location trajectory sequences containing that target location interaction node are grouped into the set of that target location interaction node; all location trajectory sequences in the same set are clustered to obtain several clusters.

13. A position processing device, characterized in that, include: The trajectory acquisition module is used to acquire the location trajectory sequence of the user to be processed; The location processing module is used to input the user location trajectory sequence to be processed into the abnormal location processing model and output the location processing result; wherein, the abnormal location processing model is trained by the location processing model training method described in any one of claims 1 to 10.

14. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor, when executing the computer program, implements the location processing model training method as described in any one of claims 1 to 10 or the location processing method as described in claim 11.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the location processing model training method as described in any one of claims 1 to 10 or the location processing method as described in claim 11.

16. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instruction is executed by the processor, it implements the position processing model training method as described in any one of claims 1 to 10 or the position processing method as described in claim 11.

Citation Information

Patent Citations

  • Space-time trajectory construction method, system and device, and medium

    CN112307143A