Method, apparatus, terminal device and storage medium for completing user location

By completing the user position trajectory data using a deep learning model based on graph neural network and bidirectional encoder, the problem of missing in the user position trajectory data is solved, and more accurate and complete user behavior prediction and spatiotemporal behavior pattern analysis is achieved.

CN119277322BActive Publication Date: 2025-06-24CHINA NETWORK SHUAN (BEIJING) TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411379438.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-06-24
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the problem of missing user location trajectory data, resulting in the inability to fully understand and utilize user behavior patterns.

Method used

Deep learning model based on graph neural network and bidirectional encoder is used to predict and fill the missing parts in user position trajectory data through pre-trained position supplementary models.

Benefits of technology

It realizes accurate completion of user position trajectory data, improves the accuracy and completeness of user behavior prediction, and can better understand and mine users' complex behavior patterns in the space-time dimension.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277322B_ABST
    Figure CN119277322B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, terminal device, and storage medium for completing user locations, including obtaining user location trajectory data; determining the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location completion model; wherein, the pre-trained location completion model is obtained by training a deep learning model with original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location completion model is used to predict and fill in the missing parts in the trajectory data; supplementing the missing parts in the user location trajectory data according to the location trajectory data that needs to be completed, achieving accurate completion of the user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of data processing, and particularly relates to a method, apparatus, terminal device, and storage medium for completing user locations. Background Art

[0002] With the development of mobile Internet and location service technologies, user location data has shown exponential growth. These data contain rich spatio-temporal behavior information and are of great value for aspects such as user behavior analysis, personalized service recommendation, and potential risk warning. However, due to factors such as device failures and network instability, user location trajectory data often has missing phenomena, which greatly limits the comprehensive understanding and effective utilization of user behavior patterns.

[0003] Most existing location trajectory analysis methods are limited to single-dimensional time series analysis or spatial proximity mining, and fail to fully utilize the multi-dimensional characteristics of user behavior data and the complex relationships between users, location points, and time factors. How to provide a method that can comprehensively process spatio-temporal information and effectively fill in the missing user location trajectory data in order to more accurately simulate and predict user behavior is an urgent problem to be solved currently. Summary of the Invention

[0004] This application aims to provide a method, apparatus, terminal device, and storage medium for completing user locations to solve the deficiencies in the prior art. The technical problems to be solved by this application are achieved through the following technical solutions.

[0005] In a first aspect, an embodiment of this application provides a method for completing user locations, and the method includes:

[0006] Obtain user location trajectory data;

[0007] Determine the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location completion model; wherein, the pre-trained location completion model is obtained by training a deep learning model with original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location completion model is used to predict and fill in the missing part of the trajectory data;

[0008] Supplement the missing part of the user location trajectory data according to the location trajectory data that needs to be completed.

[0009] Optionally, the pre-trained location completion model is obtained through the following method:

[0010] Obtain the original location trajectory data;

[0011] Preprocess the original position trajectory data to obtain sample position trajectory data and test position trajectory data;

[0012] Train the deep learning model according to the sample position trajectory data to obtain the position supplement model;

[0013] Determine the association relationship among user identification, user position point information, and time according to the test position trajectory data and the trained position supplement model;

[0014] Determine the missing position information in the sample position trajectory data according to the association relationship;

[0015] Optionally, the deep learning model is obtained in the following manner:

[0016] Determine the graph structure according to the nodes of the user position point information;

[0017] Determine the similarity information between the nodes, the edges between the nodes, and the weights of the transition probabilities according to the Node2Vec algorithm and the graph structure;

[0018] Aggregate information of the nodes through a multi-layer graph convolutional network to obtain high-order abstract embedding vectors of each node;

[0019] Map the user identification into preset coding information, and convert the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0020] Map the access time point into a time embedding vector by using a preset time series embedding method;

[0021] Input the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector into a bidirectional encoder to obtain an output vector, and splice the output vector with the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector to construct the deep learning model.

[0022] Optionally, the training of the deep learning model according to the sample position trajectory data to obtain the position supplement model includes:

[0023] Randomly mask the input access sequence data and set a preset simulated missing scenario, where the access sequence data at least includes the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector;

[0024] Train the deep learning model by using the MLM task of the BERT model;

[0025] Through a multi-layer encoder, obtain the context dependencies of the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector, and predict the masked position according to the context dependencies;

[0026] Through an MLP decoder, map the output vector of the last layer of the BERT model to the probability distribution information of the user position point information;

[0027] Train the deep learning model according to the probability distribution information and the preset distribution information to obtain the position filling model.

[0028] Optionally, the determining the missing position information in the sample position trajectory data according to the association relationship includes:

[0029] Obtain the output result of the position filling model;

[0030] Determine the position information with a probability value greater than the preset value in the model output result as the missing position information in the sample position trajectory data.

[0031] In a second aspect, an embodiment of the present application provides a device for filling in user positions, and the device includes:

[0032] An acquisition module, configured to acquire user position trajectory data;

[0033] A determination module, configured to determine the position trajectory data that needs to be filled in the user position trajectory data according to a pre-trained position filling model; wherein, the pre-trained position filling model is obtained by training a deep learning model with original position trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the position filling model is used to predict and fill in the missing part of the trajectory data;

[0034] A filling module, configured to supplement the missing part of the user position trajectory data according to the position trajectory data that needs to be filled.

[0035] Optionally, the device further includes a training module, and the training module is configured to:

[0036] Obtain the original position trajectory data;

[0037] Preprocess the original position trajectory data to obtain sample position trajectory data and test position trajectory data;

[0038] Train the deep learning model according to the sample position trajectory data to obtain the position filling model;

[0039] Determine the association relationship among the user identifier, the user location point information, and the time based on the test location trajectory data and the trained location supplementation model;

[0040] Determine the missing location information in the sample location trajectory data according to the association relationship.

[0041] Optionally, the training module is used for:

[0042] Determine the graph structure according to the nodes of the user location point information;

[0043] Determine the similarity information between the nodes, the edges between the nodes, and the weights of the transition probabilities according to the Node2Vec algorithm and the graph structure;

[0044] Aggregate information of the nodes through a multi-layer graph convolutional network to obtain high-order abstract embedding vectors of each node;

[0045] Map the user identifier into preset encoding information, and convert the preset encoding information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0046] Map the access time point into a time embedding vector by using a preset time series embedding method;

[0047] Input the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector into a bidirectional encoder to obtain an output vector, and splice the output vector with the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector to construct the deep learning model.

[0048] Optionally, the training module is used for:

[0049] Randomly mask the input access sequence data and set a preset simulated missing scenario, where the access sequence data at least includes the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector;

[0050] Train the deep learning model using the MLM task of the BERT model;

[0051] Obtain the context dependencies of the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector through a multi-layer encoder, and predict the masked position according to the context dependencies;

[0052] Map the output vector of the last layer of the BERT model into the probability distribution information of the user location point information through an MLP decoder;

[0053] Train the deep learning model according to the probability distribution information and the preset distribution information to obtain the position supplement model.

[0054] Optionally, the training module is used to:

[0055] Obtain the output result of the position supplement model;

[0056] Determine the position information with a probability value greater than the preset value in the model output result as the missing position information in the sample position trajectory data.

[0057] In a third aspect, an embodiment of the present application provides a terminal device, including: at least one processor and a memory;

[0058] The memory stores a computer program; the at least one processor executes the computer program stored in the memory to implement the method for completing the user position provided in the first aspect.

[0059] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, it implements the method for completing the user position provided in the first aspect.

[0060] The embodiments of the present application include the following advantages:

[0061] The method, device, terminal device and storage medium for completing the user position provided by the embodiments of the present application obtain user position trajectory data; determine the position trajectory data that needs to be completed in the user position trajectory data according to a pre-trained position supplement model; wherein, the pre-trained position supplement model is obtained by training a deep learning model with the original position trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the position supplement model is used to predict and fill in the missing part of the trajectory data; supplement the missing part of the user position trajectory data according to the position trajectory data that needs to be completed, realizing the accurate completion of the user position trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics. Description of the Drawings

[0062] In order to more clearly illustrate the embodiments of the present application or the existing technical solutions, the following will briefly introduce the drawings required for use in the description of the embodiments or the existing technical solutions. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0063] Figure 1 The flowchart of a method for completing user location in an embodiment of the present application;

[0064] Figure 2 The flowchart of another method for completing user location in an embodiment of the present application

[0065] Figure 3 The schematic flowchart of constructing a user location trajectory completion model based on the combination of GNN - BERT in an embodiment of the present application;

[0066] Figure 4 The example diagram of the position data graph structure in an embodiment of the present application;

[0067] Figure 5 The structural block diagram of an embodiment of the user location completion device of the present application;

[0068] Figure 6 The schematic structural diagram of a terminal device of the present application. Specific embodiments

[0069] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0070] An embodiment of the present application provides a method for completing user location, which is used to complete user location information. The execution subject of this embodiment is a user location completion device, which is set on a terminal device. For example, the terminal device at least includes a computer terminal, etc.

[0071] Referring to Figure 1 , the step flowchart of an embodiment of the method for completing user location of the present application is shown. The method may specifically include the following steps:

[0072] S101. Obtain user location trajectory data;

[0073] Specifically, the terminal device obtains user location trajectory data, and the user location trajectory data can be obtained from a social network platform at a preset location or other relevant sources.

[0074] S102. Determine the position trajectory data to be completed in the user position trajectory data according to the pre-trained position completion model. The pre-trained position completion model is obtained by training a deep learning model with the original position trajectory data. The deep learning model is established based on a graph neural network and a bidirectional encoder, and the position completion model is used to predict and fill in the missing parts of the trajectory data.

[0075] Specifically, the terminal device uses the original position trajectory data to train the deep learning model to obtain the position completion model. The deep learning model is established based on a graph neural network (GNN) and a bidirectional Transformer encoder (BERT), and the position completion model is used to predict and fill in the missing parts of the trajectory data.

[0076] After the terminal device obtains the user position trajectory data, it processes the user position trajectory data to obtain the feature vector of the user position trajectory data, and inputs the feature vector of the user position trajectory data into the pre-trained position completion model to obtain the position trajectory data to be completed in the user position trajectory data.

[0077] S103. Supplement the missing parts in the user position trajectory data according to the position trajectory data to be completed.

[0078] The terminal device supplements the missing parts in the user position trajectory data according to the position trajectory data to be completed.

[0079] The method for completing the user position provided in the embodiment of the present application obtains the user position trajectory data; determines the position trajectory data to be completed in the user position trajectory data according to the pre-trained position completion model. The pre-trained position completion model is obtained by training a deep learning model with the original position trajectory data. The deep learning model is established based on a graph neural network and a bidirectional encoder, and the position completion model is used to predict and fill in the missing parts of the trajectory data; supplements the missing parts in the user position trajectory data according to the position trajectory data to be completed, realizing the accurate completion of the user position trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0080] Another embodiment of the present application further supplements and explains the method for completing the user position provided in the above embodiment.

[0081] Figure 2 FIG. is a schematic flow chart of a method for completing a user position trajectory based on the combination of GNN-BERT provided in an embodiment of the present invention, specifically including:

[0082] S11. Data collection and preprocessing: Obtain user location trajectory data from a location-based social network platform or other relevant sources, clean the data, remove noise, and standardize the format, and divide it into a training set and a test set. The goal is to prepare a dataset for model training and testing.

[0083] S12. Model construction: Construct a deep learning model that combines a graph neural network (GNN) and a bidirectional Transformer encoder (BERT) to learn and fuse the embedding representations of user location points, user objects, and access times, including the design and implementation of a location point graph neural network (GNN) module, a user embedding module, a time embedding module, and a fusion module. The goal is to design and implement a deep learning model that can effectively learn and fuse user location information.

[0084] S13. Model training: Use the training data to train the constructed model, including inputting the feature vector sequence into the BERT model for training, optimizing the model through the masked language model (MLM) task, and how to update the model parameters to improve performance. The goal is to optimize and adjust the parameters of the constructed model through the training data.

[0085] S14. Location trajectory completion: Use the trained model to complete the missing location trajectories, including the process of inputting the test set data into the trained model, using the learned relationship information for location completion, and post-processing the prediction results. The goal is to use the trained model to infer the missing location information based on the known location information and the learned spatio-temporal relationships, so as to complete the user's trajectory.

[0086] S15. Model performance evaluation: Evaluate the performance of the model in the location trajectory completion task, and use multiple evaluation metrics to verify the completion accuracy of the model. The goal is to evaluate the performance of the model in the location trajectory completion task through multiple evaluation metrics.

[0087] Optionally, a pre-trained location completion model is obtained as follows:

[0088] Obtain the original location trajectory data;

[0089] Preprocess the original location trajectory data to obtain sample location trajectory data and test location trajectory data;

[0090] Train the deep learning model according to the sample location trajectory data to obtain a location completion model;

[0091] Determine the association relationships among user identifiers, user location point information, and time according to the test location trajectory data and the trained location completion model;

[0092] Determine the missing location information in the sample location trajectory data according to the association relationship.

[0093] Specifically, in the embodiments of the present application, user location trajectory data is collected, preprocessed, a user location trajectory data set is constructed and divided into a training set and a test set; a deep learning model combining a graph neural network (GNN) and a bidirectional Transformer encoder (BERT) is constructed to learn and fuse the embedding representations of user location points, user objects, and access times; the topological relationship between location point nodes is learned through GNN, Time2Vec captures time features, user information is converted into a vector representation through an embedding layer, and these embedding vectors are fused in the MLP layer and then input into the BERT model. The model is trained through the MLM task to complete the missing location information in the user trajectory sequence; the test set data is input into the trained GNN-BERT model, and the model uses the learned relationship information to complete the missing locations and verifies the completion accuracy of the model through various evaluation metrics. By combining the advantages of the graph neural network GNN and the bidirectional representation encoder BERT, the embodiments of the present invention have successfully achieved accurate completion of user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0094] Optionally, the deep learning model is obtained in the following manner:

[0095] Determine the graph structure according to the nodes of the user location point information;

[0096] Determine the similarity information between nodes, the edges between nodes, and the weights of the transition probabilities according to the Node2Vec algorithm and the graph structure;

[0097] Aggregate information of nodes through a multi-layer graph convolutional network to obtain high-order abstract embedding vectors of each node;

[0098] Map the user identifier into preset encoded information, and convert the preset encoded information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0099] Map the access time point into a time embedding vector by using a preset time series embedding method;

[0100] Input the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector into a bidirectional encoder to obtain an output vector, and splice the output vector with the high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector to construct a deep learning model.

[0101] Specifically, in the process of constructing the location point graph neural network (GNN) in the embodiments of the present application, first, the location point information is organized into a graph structure, the similarity between location points is calculated using the Node2Vec algorithm, and edges between nodes are constructed accordingly, and weights reflecting the transition probability between location points are assigned to the edges;

[0102] Then, information aggregation is performed on the location point nodes through a multi-layer graph convolutional network (GCN) to learn high-order abstract embedding vectors for each location point node;

[0103] Construct a user embedding module. For each user, map their user ID to a OneHot encoding and convert it into a low-dimensional user embedding vector through a trainable multi-layer perceptron (MLP) embedding layer, which reflects the personalized behavior characteristics of the user;

[0104] Construct a time embedding module. Using Time2Vec or other time series embedding methods, map the access time point to a time feature vector, considering the periodicity and trend of the time series;

[0105] Perform feature fusion to complete model construction. Concatenate the embedding vectors of location points, users, and time, and introduce the bidirectional Transformer encoder BERT to splice its output vector with the embedding vectors of location points, users, and time to obtain a richer and more semantic feature representation, and thus construct a completion model

[0106] Specifically, Figure 3 FIG. is a schematic flow chart for constructing a user location trajectory completion model based on the combination of GNN-BERT provided by the embodiments of the present invention, specifically including:

[0107] S21. Construct a location point graph neural network (GNN) module: Embed the location point information into a graph structure and complete the initialization of nodes and edges, as Figure 4 shown.

[0108] The location point graph neural network module is responsible for modeling the spatial relationship between location points and representing it as a graph structure. Learn and infer the relationship between location points through a graph convolutional network (GCN), embed the location point information into a graph structure and complete the initialization of nodes and edges. For the initialization of edges between nodes, assume that there is a user access record sequence C u , where there are two adjacent access records <u,v i ,t k >,<u,v j ,t k+1 >. Then it is considered that there is a one-way path between location points v a and v b . As shown in Figure 4 shown, let f(va , v b ) represents the occurrence frequency of this path among all paths, and after normalizing this frequency, it is used as the weight of the edge connecting position point nodes, that is

[0109]

[0110] where the denominator ∑ n f(v i , v n ) is used for the normalization of the weight. For the initialization of graph nodes, probability walks are performed using the current weighted graph structure and the Node2Vec algorithm to generate the initial vector representation of each position point graph node. After initialization, the nodes pass through a multi-layer graph convolutional network (GCN) to complete the further aggregation of information between nodes. Specifically, assume that there are k nodes in the initialized graph, the feature vector dimension of each node is d, and the initial state of the graph is X ∈ R k×d , the degree matrix and adjacency matrix of the graph are D ∈ R d×d and A ∈ R d×d respectively, and calculate its Symmetric Normalized Laplacian matrix:

[0111]

[0112] For each specific value in the matrix:

[0113]

[0114] where deg(v i ) and deg(v j ) represent the degrees of nodes i and j respectively, that is, the values of A i,j in the adjacency matrix.

[0115] Assume that the input of the l-th layer in the multi-layer GCN is H l , H 0 = X, then the output of the l-th layer / the input of the l + 1-th layer is:

[0116] H l+1 = σ(L sym H l W l ) (Formula 4)

[0117] where σ(·) is the non-linear activation function, and W l is the learnable parameter of this layer. Through the aggregation of the multi-layer GCN, a better embedding representation of the position point can be provided for subsequent tasks, and the embedding vector of the position point node p is represented by e p ;

[0118] S22. Construct a user embedding module: Convert user information into a low-dimensional embedding vector to capture the personalized behavior characteristics of users.

[0119] The user embedding module is used to convert user information into a low-dimensional embedding vector to capture the personalized behavior characteristics of users. The functions of this module include:

[0120] User ID encoding: Map the user ID to a OneHot encoding to obtain a sparse representation of the user.

[0121] Embedding layer conversion: Convert the sparse representation of the user into a low-dimensional user embedding vector through a trainable multi-layer perceptron (MLP) embedding layer. Let U represent the user embedding matrix, and u i represent the embedding vector of the i-th user. Then the output of the user embedding layer can be expressed as:

[0122] u i = MLP(OneHot(i)) (Formula 5)

[0123] S23. Construct a time embedding module: Map time information to a continuous time feature vector to capture the periodicity and trend of the time series.

[0124] The time embedding module is used to map time information to a continuous time feature vector to capture the periodicity and trend of the time series. The functions of this module include:

[0125] Time point mapping: Map the access time point to a time feature vector. Common methods include time series embedding methods such as Time2Vec.

[0126] Periodicity and trend modeling: Considering the periodicity and trend of the time series, design the time feature vector as a low-dimensional vector containing this information.

[0127] S24. Perform feature fusion to complete model construction: Perform deep fusion on the embedding vectors of the location point, user, and time. Introduce the bidirectional Transformer encoder BERT to splice its output vector with the embedding vectors of the location point, user, and time to obtain a richer and more semantic feature representation, and thus construct a completion model.

[0128] Feature fusion is used to perform deep fusion on the embedding vectors of the location point, user, and time. Here, introduce the bidirectional Transformer encoder BERT to splice its output vector with the embedding vectors of the location point, user, and time to obtain a richer and more semantic feature representation, and thus construct a completion model.

[0129] 1. Splicing of BERT and the embedding vector

[0130] First, concatenate the output vector BERT(p) of BERT with the embedding vectors h pos ,h user ,h time of the location point, user, and time. This concatenation operation can be regarded as integrating information from different sources to obtain comprehensive spatio-temporal trajectory features. Let d BERT be the dimension of the BERT output vector, and d pos ,d user ,d time be the dimensions of the embedding vectors of the location point, user, and time respectively. Then the dimension of the concatenated feature vector h concat is h pos +h user +h time +d BERT . The concatenation operation can be expressed as:

[0131] h concat =[h pos ,h user ,h time ,BERT(p)] (Formula 6)

[0132] In this way, the semantic information of BERT is integrated with the embedding information of the location point, user, and time, providing a richer and more comprehensive feature representation for subsequent tasks.

[0133] 2. Attention Fusion of BERT and Embedding Vectors

[0134] In addition to the simple concatenation method, a method of weighted fusion of the output vector of BERT with the embedding vectors of the location point, user, and time using the attention mechanism is further explored. This fusion method allows the model to dynamically adjust the importance of information from different sources, thereby more effectively capturing the key features in spatio-temporal trajectory data.

[0135] Specifically, use the attention weight α i to weight the embedding vectors h i of the location point, user, and time, and use another attention weight β to weight the output vector of BERT. The fused feature vector h fused can be expressed as:

[0136]

[0137] where α i and β are both learned weights and can be determined through model training. This fusion method using the attention mechanism can dynamically adjust the importance of different embedding vectors, thereby more effectively capturing the information in spatio-temporal trajectory data and improving the performance and generalization ability of the model.

[0138] 3. Integrate the semantic information of BERT

[0139] As a pre-trained language representation model, BERT can capture rich semantic information. Therefore, introducing it into the spatio-temporal trajectory model can endow the model with higher semantic understanding ability. Through splicing and attention fusion, the output of BERT is integrated with other information in the spatio-temporal trajectory data, enabling the model to better understand the relationship between users' behavior patterns, geographical locations, and the changing rules of time series.

[0140] Integrating the semantic information of BERT not only enriches the model's representation of spatio-temporal trajectory data but also improves the model's generalization ability and robustness to data. This fusion strategy is not only applicable to the spatio-temporal trajectory completion task but can also be extended to other spatio-temporal data mining fields, providing a new method for the analysis and modeling of complex spatio-temporal data.

[0141] Optionally, train the deep learning model according to the sample location trajectory data to obtain a location supplement model, including:

[0142] Randomly mask the input access sequence data and set a preset simulated missing scenario, where the access sequence data includes at least the high-order abstract embedding vector, low-dimensional user embedding vector, and time embedding vector of the node;

[0143] Use the MLM task of the BERT model to train the deep learning model;

[0144] Through a multi-layer encoder, obtain the context dependencies of the high-order abstract embedding vector, low-dimensional user embedding vector, and time embedding vector of the node, and predict the masked position according to the context dependencies;

[0145] Through the MLP decoder, map the output vector of the last layer of the BERT model to the probability distribution information of the user location point information;

[0146] Train the deep learning model according to the probability distribution information and the preset distribution information to obtain a location supplement model.

[0147] Specifically, during the training process, randomly mask the input access sequence data to simulate a location missing scenario and use the MLM task of the BERT model for training;

[0148] Through the multi-layer Transformer encoder, the BERT model captures the context dependencies of each location access event in the access sequence and predicts the masked position;

[0149] Through the MLP decoder, map the output of the last layer of the BERT model to the probability distribution of the location point ID to achieve the prediction of the location point ID of the masked position;

[0150] Calculate the cross-entropy loss between the predicted results and the actual labels, update all learnable parameters in the GNN-BERT model through the backpropagation algorithm, and continuously iterate the training until the model converges or reaches the preset number of training epochs.

[0151] Optionally, determine the missing location information in the sample location trajectory data according to the association relationship, including:

[0152] Obtain the output result of the location filling model;

[0153] Determine the location information with a probability value greater than the preset value in the model output result as the missing location information in the sample location trajectory data.

[0154] Specifically, after completing the model training, input the test set data to be completed into the trained GNN-BERT model;

[0155] For each missing location point, the model predicts the missing location point ID by using the learned user behavior patterns, associations between location points, and time effects;

[0156] Post-process the model prediction results, select the location point with the highest probability as the completion result, or adopt a more complex decision-making strategy;

[0157] Adopt multiple evaluation metrics, such as accuracy, F1 score, precision, and recall, etc., to comprehensively evaluate the performance of the model in the location trajectory completion task.

[0158] Include steps for optimizing the model performance:

[0159] Adjust the model parameters according to the evaluation results, including but not limited to the number of layers of the GNN, the node embedding dimension, the dimension of the time embedding vector, the number of layers and the hidden layer size of the BERT model, as well as the selection of the optimizer and the dynamic adjustment strategy of the learning rate, etc., to improve the overall performance of the model in the location trajectory completion task.

[0160] In the embodiments of this application, the position trajectory data that needs to be completed. These data usually include the position information of the user at different time points, such as longitude and latitude, timestamp, etc., and necessary preprocessing is performed to ensure the quality and consistency of the data for subsequent trajectory completion tasks; receive the original position trajectory data from the data acquisition module, and use the trained model to predict and fill the missing parts therein to generate complete position trajectory information; use predefined evaluation metrics to evaluate and improve the completed position trajectory data, objectively evaluate the completion effect, and ensure the accuracy and reliability of the completion result. It combines the advantages of the graph neural network GNN and the bidirectional Transformer encoder BERT, and can not only capture the spatio-temporal correlations between user behavior patterns and position points, but also learn the internal connections between users, position points, and timestamps, thereby improving the accuracy of trajectory completion.

[0161] The method for completing the user position provided by the embodiments of this application includes obtaining the user position trajectory data; determining the position trajectory data that needs to be completed in the user position trajectory data according to the pre-trained position supplement model; wherein, the pre-trained position supplement model is obtained by training a deep learning model with the original position trajectory data; the deep learning model is established based on the graph neural network and the bidirectional encoder, and the position supplement model is used to predict and fill the missing parts in the trajectory data; supplement the missing parts in the user position trajectory data according to the position trajectory data that needs to be completed, realizing the accurate completion of the user position trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0162] Another embodiment of this application provides a device for completing the user position, which is used to execute the method for completing the user position provided by the above embodiments.

[0163] Refer to Figure 5 , which shows the structural block diagram of an embodiment of the device for completing the user position of this application. The device may specifically include the following modules: an acquisition module 501, a determination module 502, and a completion module 503, where:

[0164] The acquisition module 501 is used to acquire the user position trajectory data;

[0165] The determination module 502 is used to determine the position trajectory data that needs to be completed in the user position trajectory data according to the pre-trained position supplement model; wherein, the pre-trained position supplement model is obtained by training a deep learning model with the original position trajectory data; the deep learning model is established based on the graph neural network and the bidirectional encoder, and the position supplement model is used to predict and fill the missing parts in the trajectory data;

[0166] The complementing module 503 is used to complement the missing parts in the user location trajectory data according to the location trajectory data to be complemented as needed.

[0167] The user location complementing device provided by the embodiments of the present application obtains user location trajectory data; determines the location trajectory data to be complemented in the user location trajectory data according to a pre-trained location complementing model, where the pre-trained location complementing model is obtained by training a deep learning model with the original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location complementing model is used to predict and fill the missing parts in the trajectory data; the missing parts in the user location trajectory data are complemented according to the location trajectory data to be complemented, realizing the accurate complement of the user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0168] Another embodiment of the present application further supplements the user location complementing device provided in the above embodiment.

[0169] Optionally, the device further includes a training module, and the training module is used for:

[0170] Obtain the original location trajectory data;

[0171] Preprocess the original location trajectory data to obtain sample location trajectory data and test location trajectory data;

[0172] Train the deep learning model according to the sample location trajectory data to obtain a location complementing model;

[0173] Determine the association relationship among user identification, user location point information, and time according to the test location trajectory data and the trained location complementing model;

[0174] Determine the missing location information in the sample location trajectory data according to the association relationship.

[0175] Optionally, the training module is used for:

[0176] Determine the graph structure according to the nodes of the user location point information;

[0177] Determine the similarity information between nodes, the edges between nodes, and the weights of transition probabilities according to the Node2Vec algorithm and the graph structure;

[0178] Aggregate information of the nodes through a multi-layer graph convolutional network to obtain high-order abstract embedding vectors of each node;

[0179] Map the user identification into preset coding information, and convert the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0180] Use a preset time series embedding method to map the access time point into a time embedding vector;

[0181] Input the high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node into a bidirectional encoder to obtain an output vector, and splice the output vector with the high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node to construct a deep learning model.

[0182] Optionally, the training module is used for:

[0183] Randomly mask the input access sequence data and set a preset simulated missing scenario, where the access sequence data at least includes the high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node;

[0184] Use the MLM task of the BERT model to train the deep learning model;

[0185] Through a multi-layer encoder, obtain the context dependencies of the high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node, and predict the masked positions according to the context dependencies;

[0186] Through an MLP decoder, map the output vector of the last layer of the BERT model into the probability distribution information of the user position point information;

[0187] Train the deep learning model according to the probability distribution information and the preset distribution information to obtain a position filling model.

[0188] Optionally, the training module is used for:

[0189] Obtain the output result of the position filling model;

[0190] Determine the position information missing in the sample position trajectory data as the position information with a probability value greater than the preset value in the model output result.

[0191] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple. For related parts, please refer to the partial description of the method embodiment.

[0192] The user location completion device provided by the embodiment of the present application obtains user location trajectory data; determines the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location completion model; wherein, the pre-trained location completion model is obtained by training a deep learning model with original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location completion model is used to predict and fill the missing part in the trajectory data; according to the location trajectory data that needs to be completed, the missing part in the user location trajectory data is supplemented, realizing the accurate completion of the user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0193] Another embodiment of the present application provides a terminal device for executing the user location completion method provided by the above embodiment.

[0194] Figure 6 It is a schematic structural diagram of a terminal device of the present application, as Figure 6 shown, the terminal device includes: at least one processor 601 and a memory 602;

[0195] The memory stores a computer program; at least one processor executes the computer program stored in the memory to implement the user location completion method provided by the above embodiment.

[0196] The terminal device provided by this embodiment obtains user location trajectory data; determines the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location completion model; wherein, the pre-trained location completion model is obtained by training a deep learning model with original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location completion model is used to predict and fill the missing part in the trajectory data; according to the location trajectory data that needs to be completed, the missing part in the user location trajectory data is supplemented, realizing the accurate completion of the user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0197] Another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed, it implements the user location completion method provided by any of the above embodiments.

[0198] A computer-readable storage medium according to this embodiment obtains user location trajectory data; determines the location trajectory data to be completed in the user location trajectory data according to a pre-trained location completion model, where the pre-trained location completion model is obtained by training a deep learning model with original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location completion model is used to predict and fill in the missing parts in the trajectory data; according to the location trajectory data to be completed, the missing parts in the user location trajectory data are supplemented, realizing accurate completion of the user location trajectory data, not only improving the accuracy and integrity of user behavior prediction, but also better understanding and mining the complex behavior patterns of users in the spatio-temporal dimension, and enhancing the ability to capture user behavior characteristics.

[0199] It should be noted that the above detailed description is exemplary and is intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs.

[0200] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should also be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0201] It should be noted that the terms "first", "second", etc. in the description, claims and drawings of the present application are used to distinguish similar objects and do not necessarily describe a specific order or sequence. It should be understood that such terms can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein.

[0202] In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.

[0203] For ease of description, spatial relative terms, such as "above", "over", "on the upper surface", "upper", etc., may be used herein to describe the spatial positional relationship of one device or feature to other devices or features as shown in the figures. It should be understood that the spatial relative terms are intended to encompass different orientations in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "over" other devices or structures will then be positioned "below" or "beneath" the other devices or structures. Thus, the exemplary term "above" can include both the orientation of "above" and "below". The device may also be positioned in other different ways, such as rotated 90 degrees or in other orientations, and the corresponding explanations for the spatial relative descriptions used herein will be made.

[0204] In the foregoing detailed description, reference has been made to the accompanying drawings, which form a part hereof. In the drawings, like symbols typically identify like components, unless the context indicates otherwise. The illustrated embodiments described in the detailed description, the drawings, and the claims are not meant to be limiting. Other embodiments may be used and other changes may be made without departing from the spirit or scope of the subject matter presented herein.

[0205] The foregoing is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.

Claims

1. A method for completing a user location, characterized in that: The method comprises: Get user location trajectory data; Determine the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location supplement model; wherein the pre-trained location supplement model is obtained by training a deep learning model using the original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location supplement model is used to predict and fill in the missing parts in the trajectory data; According to the location trajectory data to be supplemented, the missing part in the user location trajectory data is supplemented, wherein: The pre-trained position supplement model is obtained in the following way: Acquiring the original position trajectory data; Preprocessing the original position trajectory data to obtain sample position trajectory data and test position trajectory data; The deep learning model is trained according to the sample position trajectory data to obtain the position supplement model, including: Randomly masking the input access sequence data and setting a preset simulated missing scenario, wherein the access sequence data at least includes a high-order abstract embedding vector of a node, a low-dimensional user embedding vector, and a time embedding vector; The deep learning model is trained using the MLM task of the BERT model; Obtaining, through a multi-layer encoder, a context dependency relationship among a high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector, and predicting the masked position according to the context dependency relationship; Through the MLP decoder, the output vector of the last layer of the BERT model is mapped to the probability distribution information of the user's location point information; Training the deep learning model according to the probability distribution information and the preset distribution information to obtain the position supplement model; Determine the association between user ID, user location point information and time based on the test location trajectory data and the trained location supplement model; According to the association relationship, the missing position information in the sample position trajectory data is determined.

2. The method for completing the user location according to claim 1, characterized in that: The deep learning model is obtained in the following way: Determine the graph structure based on the nodes of the user's location information; Determine the similarity information between the nodes, the weights of the edges and transition probabilities between the nodes according to the Node2Vec algorithm and the graph structure; Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node; Mapping the user identification into preset coding information, and converting the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron; Using a preset time series embedding method, the access time points are mapped into time embedding vectors; The high-order abstract embedding vector of the node, the low-dimensional user embedding vector and the time embedding vector are input into a bidirectional encoder to obtain an output vector, and the output vector is concatenated with the high-order abstract embedding vector of the node, the low-dimensional user embedding vector and the time embedding vector to construct the deep learning model.

3. The method for completing the user location according to claim 2, characterized in that: The determining, according to the association relationship, the missing position information in the sample position trajectory data includes: Obtaining an output result of the position supplementation model; The position information whose probability value in the model output result is greater than the preset value is determined as the missing position information in the sample position trajectory data.

4. A device for completing a user's location, characterized in that: The device comprises: An acquisition module is used to obtain user location trajectory data; A determination module, used to determine the location trajectory data that needs to be completed in the user location trajectory data according to a pre-trained location supplement model; wherein the pre-trained location supplement model is obtained by training a deep learning model using the original location trajectory data; the deep learning model is established based on a graph neural network and a bidirectional encoder, and the location supplement model is used to predict and fill in the missing parts in the trajectory data; A completion module, used to supplement the missing part of the user location trajectory data according to the location trajectory data that needs to be completed; The device also includes a training module, which is used to: Acquiring the original position trajectory data; Preprocessing the original position trajectory data to obtain sample position trajectory data and test position trajectory data; The deep learning model is trained according to the sample position trajectory data to obtain the position supplement model, including: Randomly masking the input access sequence data and setting a preset simulated missing scenario, wherein the access sequence data at least includes a high-order abstract embedding vector of a node, a low-dimensional user embedding vector, and a time embedding vector; The deep learning model is trained using the MLM task of the BERT model; Obtaining, through a multi-layer encoder, a context dependency relationship among a high-order abstract embedding vector of the node, the low-dimensional user embedding vector, and the time embedding vector, and predicting the masked position according to the context dependency relationship; Through the MLP decoder, the output vector of the last layer of the BERT model is mapped to the probability distribution information of the user's location point information; Training the deep learning model according to the probability distribution information and the preset distribution information to obtain the position supplement model; Determine the association between user ID, user location point information and time based on the test location trajectory data and the trained location supplement model; According to the association relationship, the missing position information in the sample position trajectory data is determined.

5. The user location completion device according to claim 4, characterized in that: The training module is used to: Determine the graph structure based on the nodes of the user's location information; Determine the similarity information between the nodes, the weights of the edges and transition probabilities between the nodes according to the Node2Vec algorithm and the graph structure; Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node; Mapping the user identification into preset coding information, and converting the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron; Using a preset time series embedding method, the access time points are mapped into time embedding vectors; The high-order abstract embedding vector of the node, the low-dimensional user embedding vector and the time embedding vector are input into a bidirectional encoder to obtain an output vector, and the output vector is concatenated with the high-order abstract embedding vector of the node, the low-dimensional user embedding vector and the time embedding vector to construct the deep learning model.

6. A terminal device, characterized in that: include: at least one processor and memory; The memory stores a computer program; The at least one processor executes the computer program stored in the memory to implement the method for completing the user location according to any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for completing the user location according to any one of claims 1 to 3 can be implemented.

Citation Information

Patent Citations

  • Deep learning-based key person trajectory destination multi-step prediction method

    CN118430010A