User position completion method and device, terminal equipment and storage medium

Through a deep learning model based on graph neural network and bidirectional encoder, the problem of missing user position trajectory data is solved, a comprehensive understanding and prediction of user behavior patterns is achieved, and the accuracy and completeness of position trajectory completion is improved.

CN119277322AActive Publication Date: 2025-01-07CHINA NETWORK SHUAN (BEIJING) TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

The existing position trajectory analysis methods fail to fully utilize the multi-dimensional characteristics and spatiotemporal relationships of user behavior data, resulting in the lack of user position trajectory data, limiting the comprehensive understanding and prediction of user behavior patterns.

Method used

Deep learning model based on graph neural network and bidirectional encoder is adopted to obtain missing parts of user position trajectory data through pre-trained position supplement model, and to build users through technologies such as Node2Vec, BERT model and multi-layer graph convolution network. Position completion model, data preprocessing and prediction and filling of missing positions.

Benefits of technology

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

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277322A_ABST
    Figure CN119277322A_ABST
Patent Text Reader

Abstract

The invention discloses a user position completion method and device, terminal equipment and a storage medium. The method comprises the steps of obtaining user position track data; according to a pre-trained position supplement model, determining position trajectory data needing to be complemented in the user position trajectory data; wherein the pre-trained position supplement model is obtained by training the deep learning model by adopting 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 for predicting and filling missing parts in the trajectory data; according to the position trajectory data needing to be complemented, the missing part in the user position trajectory data is complemented, accurate complementation of the user position trajectory data is achieved, the accuracy and integrity of user behavior prediction are improved, the complex behavior mode of the user in the space-time dimension can be better understood and mined, and the user experience is improved. And the capability of capturing the behavior characteristics of the user is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device, terminal equipment and storage medium for completing a user location. Background Art

[0002] With the development of mobile Internet and location-based service technologies, user location data has shown an exponential growth. These data contain rich spatiotemporal behavior information and are of great value for user behavior analysis, personalized service recommendations, potential risk warnings, etc. However, due to factors such as device failures and network instability, user location trajectory data is often missing, which greatly limits the comprehensive understanding and effective use 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 multidimensional characteristics of user behavior data and the complex relationship between users and location points and time factors. How to provide a method that can comprehensively process spatiotemporal information and effectively fill in the missing user location trajectory data in order to more accurately simulate and predict user behavior is a problem that needs to be solved urgently. Summary of the invention

[0004] The present application intends to provide a method, apparatus, terminal device and storage medium for completing a user location to solve the deficiencies in the prior art. The technical problem to be solved by the present application is achieved through the following technical solutions.

[0005] In a first aspect, an embodiment of the present application provides a method for completing a user location, the method comprising:

[0006] Get 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 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;

[0008] The missing part of the user location trajectory data is supplemented according to the location trajectory data that needs to be supplemented.

[0009] Optionally, the pre-trained position supplement model is obtained by:

[0010] Acquiring the original position trajectory data;

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

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

[0013] 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;

[0014] According to the association relationship, the missing position information in the sample position trajectory data is determined.

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

[0016] Determine the graph structure based on the nodes of the user's location information;

[0017] 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;

[0018] Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node;

[0019] 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;

[0020] Using a preset time series embedding method, the access time points are mapped into time embedding vectors;

[0021] 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.

[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 masking the input access sequence data and setting a preset simulated missing scenario, wherein 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] The deep learning model is trained using the MLM task of the BERT model;

[0025] 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;

[0026] 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;

[0027] The deep learning model is trained according to the probability distribution information and the preset distribution information to obtain the position supplement model.

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

[0029] Obtaining an output result of the position supplementation model;

[0030] 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.

[0031] In a second aspect, an embodiment of the present application provides a device for completing a user location, the device comprising:

[0032] An acquisition module is used to obtain user location trajectory data;

[0033] 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;

[0034] The completion module is used to supplement the missing part in the user location trajectory data according to the location trajectory data that needs to be completed.

[0035] Optionally, the device further comprises a training module, wherein the training module is used to:

[0036] Acquiring the original position trajectory data;

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

[0038] Training the deep learning model according to the sample position trajectory data to obtain the position supplement model;

[0039] 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;

[0040] According to the association relationship, the missing position information in the sample position trajectory data is determined.

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

[0042] Determine the graph structure based on the nodes of the user's location information;

[0043] 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;

[0044] Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node;

[0045] 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;

[0046] Using a preset time series embedding method, the access time points are mapped into time embedding vectors;

[0047] 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.

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

[0049] Randomly masking the input access sequence data and setting a preset simulated missing scenario, wherein 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] The deep learning model is trained using the MLM task of the BERT model;

[0051] 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;

[0052] 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;

[0053] The deep learning model is trained 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] Obtaining an output result of the position supplementation model;

[0056] 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.

[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 user location completion method 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. When the computer program is executed, the method for completing the user location provided in the first aspect is implemented.

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

[0061] The user location completion method, apparatus, terminal device and storage medium provided in the embodiments of the present application obtain 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 completion model; wherein the pre-trained location completion model is obtained by training a deep learning model using 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 that needs to be completed, the missing parts in the user location trajectory data are completed, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the spatiotemporal dimensions, and enhances the ability to capture user behavior characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present application or the existing technical solutions, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0063] Figure 1 This is a flow chart of a method for completing a user location in one embodiment of the present application;

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

[0065] Figure 3 A schematic diagram of a process for constructing a user location trajectory completion model based on the combination of GNN-BERT in one embodiment of the present application;

[0066] Figure 4 This is an example diagram of the location data graph structure in one embodiment of the present application;

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

[0068] Figure 6 It is a structural diagram of a terminal device of the present application. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0070] An embodiment of the present application provides a method for completing user location information, 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] Reference Figure 1 , shows a flowchart of a method for completing a user location in the present application, which may specifically include the following steps:

[0072] S101, obtaining 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 networking platform at a preset location or other related sources.

[0074] S102, determining 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;

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

[0076] After acquiring the user location trajectory data, the terminal device processes the user location trajectory data to obtain a feature vector of the user location trajectory data, and inputs the feature vector of the user location trajectory data into a pre-trained location supplement model to obtain the location trajectory data that needs to be supplemented in the user location trajectory data.

[0077] S103: Supplement the missing part of the user's location trajectory data according to the location trajectory data that needs to be supplemented.

[0078] The terminal device supplements the missing parts in the user's location trajectory data based on the location trajectory data that needs to be completed.

[0079] The user location completion method provided in 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 in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

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

[0081] Figure 2 A flowchart of a method for completing a user location trajectory based on GNN-BERT provided in an embodiment of the present invention specifically includes:

[0082] S11. Data collection and preprocessing: Obtain user location trajectory data from location-based social networking platforms or other relevant sources, clean the data, remove noise, standardize the format, and divide it into training and test sets. The goal is to prepare a data set 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 embedded 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. Its goal is to design and implement a deep learning model that can effectively learn and fuse user location information.

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

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

[0086] S15. Model performance evaluation: Evaluate the performance of the model on the position trajectory completion task, and use a variety of evaluation indicators to verify the completion accuracy of the model. Its goal is to evaluate the performance of the model on the position trajectory completion task through a variety of evaluation indicators.

[0087] Optionally, the pre-trained position supplement model is obtained by:

[0088] Get the original position trajectory data;

[0089] Preprocessing the original position trajectory data to obtain sample position trajectory data and test position trajectory data;

[0090] The deep learning model is trained according to the sample location trajectory data to obtain a location supplement model;

[0091] 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;

[0092] According to the association relationship, the missing position information in the sample position trajectory data is determined.

[0093] Specifically, the embodiment of the present application collects user location trajectory data, preprocesses it, constructs a user location trajectory data set and divides it into a training set and a test set; constructs a deep learning model that combines a graph neural network (GNN) and a bidirectional Transformer encoder (BERT) to learn and fuse the embedded representations of user location points, user objects and access times; learns the topological relationship between location point nodes through GNN, captures time features through Time2Vec, and converts user information into vector representations through the embedding layer. These embedded vectors are fused in the MLP layer and 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 positions, and verifies the completion accuracy of the model through a variety of evaluation indicators. By combining the advantages of the graph neural network GNN and the bidirectional representation encoder BERT, the embodiment of the present invention successfully achieves accurate completion of user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the spatiotemporal dimension, and enhances the ability to capture user behavior characteristics.

[0094] Optionally, the deep learning model is obtained by:

[0095] Determine the graph structure based on the nodes of the user's location information;

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

[0097] Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node;

[0098] Mapping the user identity into preset coding information, and converting the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0099] Using a preset time series embedding method, the access time points are mapped into time embedding vectors;

[0100] The high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node are input into the bidirectional encoder to obtain the output vector, and the output vector is concatenated 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.

[0101] Specifically, in the process of constructing the location point graph neural network (GNN) in the embodiment of the present application, the location point information is first organized into a graph structure, the Node2Vec algorithm is used to calculate the similarity between the location points, and the edges between the nodes are constructed accordingly, and the edges are given weights that reflect the transfer probability between the location points;

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

[0103] Build a user embedding module. For each user, map their user ID to a OneHot code and convert it into a low-dimensional user embedding vector through a trainable multi-layer perceptron (MLP) embedding layer. The vector reflects the user's personalized behavior characteristics.

[0104] Build a time embedding module and use Time2Vec or other time series embedding methods to map access time points into time feature vectors, taking into account the periodicity and trend of the time series;

[0105] Perform feature fusion to complete model construction, embed the location point, user and time vectors, introduce the bidirectional Transformer encoder BERT to concatenate its output vector with the location point, user and time embedding vectors, and obtain a richer and more semantic feature representation to build a completion model.

[0106] Specifically, Figure 3 A schematic diagram of a process for constructing a user location trajectory completion model based on GNN-BERT combined with an embodiment of the present invention specifically includes:

[0107] S21. Build a location point graph neural network (GNN) module: embed the location point information into the graph structure and complete the initialization of nodes and edges, such 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. The relationship between location points is learned and inferred through the graph convolutional network (GCN), the location point information is embedded into the graph structure and the nodes and edges are initialized. For the initialization of the edges between nodes, it is assumed that there is a user access record sequence C in the training set data. u , where there are two adjacent access records <u,v i ,t k >, <u,v j ,t k+1 >, then the position point v a and v b There is a one-way path between Figure 4 As shown, let f(va ,v b ) represents the frequency of occurrence of this path in all paths, and this frequency is normalized as the weight of the edge between the location nodes, that is,

[0109]

[0110] The denominator ∑ n f(v i ,v n ) is used to normalize the weights. For the initialization of graph nodes, the current weighted graph structure and Node2Vec algorithm are used for probability walks to generate the initialization vector representation of each location point graph node. After initialization, the nodes are further aggregated through a multi-layer graph convolutional network (GCN). Specifically, suppose there are k nodes in the initialized graph, the dimension of the feature vector 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 , 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, that is, A in the adjacency matrix i,j The value of .

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

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

[0117] Where σ(·) is a nonlinear activation function, W l is the learnable parameter of this layer. After the aggregation of multiple layers of GCN, a better embedding representation of the position point can be provided for subsequent tasks. The embedding vector of the position point node p is expressed by e p express;

[0118] S22. Build a user embedding module: Convert user information into a low-dimensional embedding vector to capture the user's personalized behavior characteristics

[0119] The user embedding module is used to convert user information into a low-dimensional embedding vector to capture the user's personalized behavior characteristics. 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: The sparse representation of the user is converted into a low-dimensional user embedding vector through a trainable multi-layer perceptron (MLP) embedding layer. Let U represent the user embedding matrix, u i represents 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. Build a time embedding module: map time information into continuous time feature vectors to capture the periodicity and trend of time series

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

[0125] Time point mapping: Map the access time points into time feature vectors. Commonly used methods include time series embedding methods such as Time2Vec.

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

[0127] S24. Perform feature fusion to complete model construction: embed the location point, user and time vectors, introduce the bidirectional Transformer encoder BERT, and concatenate its output vector with the location point, user and time embedding vectors to obtain a richer and more semantic feature representation, thereby building a completion model

[0128] Feature fusion is used to deeply fuse the embedding vectors of location points, users, and time. Here, the bidirectional Transformer encoder BERT is introduced to concatenate its output vector with the embedding vectors of location points, users, and time to obtain a richer and more semantic feature representation, thereby building a completion model.

[0129] 1. Concatenation of BERT and Embedding Vectors

[0130] First, the BERT output vector BERT(p) is combined with the embedding vectors h of the position point, user, and time. pos ,h user ,h time This splicing operation can be regarded as integrating information from different sources to obtain comprehensive spatiotemporal trajectory features. Let d BERT is the dimension of BERT output vector, d pos ,d user ,d time are the dimensions of the embedding vectors of location points, users, and time respectively, then the concatenated feature vector h concat The dimension is h pos +h user +h time +d BERT ,The splicing 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 location points, users, and time, providing a richer and more comprehensive feature representation for subsequent tasks.

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

[0134] In addition to the simple concatenation method, we further explored the method of using the attention mechanism to weightedly fuse the output vector of BERT with the embedding vectors of location points, users, and time. This fusion method allows the model to dynamically adjust the importance of information from different sources, thereby more effectively capturing the key features in spatiotemporal trajectory data.

[0135] Specifically, using the attention weight α i Embedding vector h for location point, user and time i The fused feature vector h is weighted, and another attention weight β is used to weight the output vector of BERT. fused It can be expressed as:

[0136]

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

[0138] 3. Integrate BERT’s semantic information

[0139] As a pre-trained language representation model, BERT can capture rich semantic information, so introducing it into the spatiotemporal trajectory model can bring higher semantic understanding capabilities to the model. Through splicing and attention fusion, the output of BERT is integrated with other information in the spatiotemporal trajectory data, enabling the model to better understand the user's behavior patterns, the relationship between geographic locations, and the changing laws of time series.

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

[0141] Optionally, a deep learning model is trained 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, 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;

[0143] The deep learning model is trained using the MLM task of the BERT model;

[0144] Through multi-layer encoders, the contextual dependencies of the node’s high-order abstract embedding vector, low-dimensional user embedding vector, and time embedding vector are obtained, and the masked position is predicted based on the contextual dependencies.

[0145] 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;

[0146] According to the probability distribution information and the preset distribution information, the deep learning model is trained to obtain a position supplement model.

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

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

[0149] Through the MLP decoder, the output of the last layer of the BERT model is mapped to the probability distribution of the location point ID, so as to predict 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 back propagation algorithm, and continue iterative training until the model converges or reaches the preset number of training rounds.

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

[0152] Obtain the output results of the position supplementation model;

[0153] 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.

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

[0155] For each missing location point, the model uses the learned user behavior patterns, the relationship between location points, and the time effect to predict the missing location point ID;

[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] A variety of evaluation indicators, such as accuracy, F1 score, precision and recall, are used to comprehensively evaluate the performance of the model on the location trajectory completion task.

[0158] Including steps to optimize model performance:

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

[0160] In the embodiment of the present application, the location trajectory data that needs to be completed usually includes the user's location information 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; the original location trajectory data is received from the data acquisition module, and the missing parts are predicted and filled in using the trained model to generate complete location trajectory information; the completed location trajectory data is evaluated and improved using pre-defined evaluation indicators, and the completion effect is objectively evaluated to ensure the accuracy and reliability of the completion results. It combines the advantages of the graph neural network GNN and the bidirectional Transformer encoder BERT, which can not only capture the spatiotemporal correlation between user behavior patterns and location points, but also learn the intrinsic connection between users and location points and timestamps, thereby improving the accuracy of trajectory completion.

[0161] The user location completion method provided in 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 in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

[0162] Another embodiment of the present application provides a user location completion device, which is used to execute the user location completion method provided in the above embodiment.

[0163] Reference Figure 5 , shows a structural block diagram of an embodiment of a user location completion device of the present application, the device may specifically include the following modules: an acquisition module 501, a determination module 502 and a completion module 503, wherein:

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

[0165] The determination module 502 is used to determine the location trajectory data that needs to be completed in the user location trajectory data according to the pre-trained location supplement model; wherein the pre-trained location supplement model is obtained by training the 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;

[0166] The completion module 503 is used to supplement the missing parts in the user location trajectory data according to the location trajectory data that needs to be completed.

[0167] The user location completion device provided in 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 in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

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

[0169] Optionally, the device further comprises a training module, the training module being used for:

[0170] Get the original position trajectory data;

[0171] Preprocessing the original position trajectory data to obtain sample position trajectory data and test position trajectory data;

[0172] The deep learning model is trained according to the sample location trajectory data to obtain a location supplement model;

[0173] 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;

[0174] According to the association relationship, the missing position information in the sample position trajectory data is determined.

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

[0176] Determine the graph structure based on the nodes of the user's location information;

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

[0178] Through a multi-layer graph convolutional network, node information is aggregated to obtain a high-order abstract embedding vector for each node;

[0179] Mapping the user identity into preset coding information, and converting the preset coding information into a low-dimensional user embedding vector through a multi-layer perceptron;

[0180] Using a preset time series embedding method, the access time points are mapped into time embedding vectors;

[0181] The high-order abstract embedding vector, low-dimensional user embedding vector and time embedding vector of the node are input into the bidirectional encoder to obtain the output vector, and the output vector is concatenated 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 to:

[0183] Randomly mask the input access sequence data and set 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;

[0184] The deep learning model is trained using the MLM task of the BERT model;

[0185] Through multi-layer encoders, the contextual dependencies of the node’s high-order abstract embedding vector, low-dimensional user embedding vector, and time embedding vector are obtained, and the masked position is predicted based on the contextual dependencies.

[0186] 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;

[0187] According to the probability distribution information and the preset distribution information, the deep learning model is trained to obtain a position supplement model.

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

[0189] Obtain the output results of the position supplementation model;

[0190] 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.

[0191] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0192] The user location completion device provided in 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 in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

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

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

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

[0196] The terminal device provided in 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 supplement model; wherein the pre-trained location supplement 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 supplement model is used to predict and fill in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby realizing accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the complex behavior patterns of users in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

[0197] Yet another embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed, the method for completing the user location provided in any of the above embodiments is implemented.

[0198] According to the computer-readable storage medium of this embodiment, by acquiring 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 supplement model; wherein the pre-trained location supplement 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 supplement model is used to predict and fill in the missing parts in the trajectory data; according to the location trajectory data that needs to be completed, the missing parts in the user location trajectory data are supplemented, thereby achieving accurate completion of the user location trajectory data, which not only improves the accuracy and completeness of user behavior prediction, but also can better understand and mine the user's complex behavior patterns in the time and space dimensions, and enhance the ability to capture user behavior characteristics.

[0199] It should be noted that the above detailed descriptions are exemplary and are 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 art 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 "comprise" and / or "include" are used in this specification, it indicates 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 specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable where appropriate, 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 "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or inherent to these processes, methods, products, or apparatuses.

[0203] For ease of description, spatially relative terms, such as "above", "above", "on the upper surface of", "above", etc., may be used herein to describe the spatial positional relationship between a device or feature and other devices or features as shown in the figure. It should be understood that spatially relative terms are intended to include different orientations of the device in use or operation in addition to the orientation described in the figure. For example, if the device in the accompanying drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" may include both "above" and "below". The device may also be positioned in other different ways, such as rotated 90 degrees or in other orientations, and the spatially relative descriptions used herein are interpreted accordingly.

[0204] In the above detailed description, reference is made to the accompanying drawings, which form a part of this document. In the accompanying drawings, similar symbols typically identify similar components unless the context indicates otherwise. The illustrated embodiments described in the detailed description, drawings, and 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 above description is only the 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 modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in 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; The missing part of the user location trajectory data is supplemented according to the location trajectory data that needs to be supplemented.

2. The method for completing the user location according to claim 1, characterized in that: 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; Training the deep learning model according to the sample position trajectory data 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.

3. The method for completing the user location according to claim 2, 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.

4. The method for completing the user location according to claim 2, characterized in that: The step of training the deep learning model according to the sample position trajectory data to obtain the position supplement model includes: Randomly masking the input access sequence data and setting a preset simulated missing scenario, wherein 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; 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; The deep learning model is trained according to the probability distribution information and the preset distribution information to obtain the position supplement model.

5. 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.

6. 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; The completion module is used to supplement the missing part in the user location trajectory data according to the location trajectory data that needs to be completed.

7. The user location completion device according to claim 6, characterized in that: 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; Training the deep learning model according to the sample position trajectory data 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.

8. The user location completion device according to claim 7, 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.

9. 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 5.

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

Citation Information

Patent Citations

  • Sample data generation method and device

    CN108280489A

  • Social network user trajectory analysis method based on self-supervised learning

    CN113378074A

  • Behavior trajectory prediction method and device, electronic equipment and storage medium

    CN115345390A

  • Trajectory prediction method and device, equipment, storage medium and program product

    CN115860179A

  • User track reconstruction method based on graph neural network and space-time attention mechanism

    CN117573787A

Cited By

  • User portrait generation method and system based on big data

    CN121092969A

  • A user portrait generation method and system based on big data

    CN121092969B