Prediction Method, Apparatus, Terminal Device, and Storage Medium for User Location

By combining the location prediction model of graph neural networks and bidirectional long and short-term memory neural networks, and using the sparrow search algorithm optimization, the problem of failure to comprehensively consider environmental factors in the existing technology is solved, and more accurate user location prediction is achieved, which is of great significance for commercial and public safety.

CN119255199BActive Publication Date: 2025-08-05BEIJING ZHONGWANG ZHICE TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411379481.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-08-05
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

The prior art fails to effectively consider complex interactions that comprehensively consider environmental factors in user location prediction, resulting in inefficient prediction.

Method used

A position prediction model based on the combination of graph neural network and bidirectional long and short-term memory neural network is adopted, and optimized by the sparrow search algorithm, using user historical position data for training to improve prediction accuracy.

Benefits of technology

It improves the accuracy of user location prediction, can comprehensively consider environmental factors and user historical access information, and is suitable for commercial personalized recommendations and large-scale infectious disease prevention and control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119255199B_ABST
    Figure CN119255199B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, terminal device and storage medium for predicting user location, including: obtaining the user's current moment location data, and determining the user's next moment location data based on a pre-trained location prediction model; the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm, the initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model, and a location prediction model is established based on the sparrow search algorithm, the graph neural network model and the bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence, so that environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, apparatus, terminal device, and storage medium for predicting a user location. Background Art

[0002] With the rapid development of the mobile internet, the acquisition and utilization of user location data has become a key research topic in data mining and deep learning. User location data contains a wealth of information, such as user behavior patterns and preferences. This information is not only widely used in the commercial sector but also holds significant significance in areas such as public safety and social governance. From the perspective of business recommendations, analyzing user location can reveal information such as user behavior habits, interests, and preferences, which is crucial for providing personalized service or product recommendations. User location analysis can also help timely identify and prevent potential safety risks, such as the spread of infectious diseases. Therefore, developing accurate prediction methods for user location has positive social implications for improving business conversion rates, as well as social stability and public safety.

[0003] In the field of user location prediction, the Markov chain method is used to predict user location. By extracting key locations in the historical location sequence and obtaining their access probabilities, a location transfer matrix is constructed to predict the user's next most likely location to visit. However, this method ignores the complex interactions of environmental factors. How to comprehensively consider the complex interactions of environmental factors and improve the prediction efficiency of user location is an urgent problem that needs to be solved. Summary of the Invention

[0004] The present application aims to provide a method, apparatus, terminal device and storage medium for predicting user location to address 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 predicting a user location, the method comprising:

[0006] Obtaining the user's current location data, wherein the current location data includes at least user information, user location point information, and historical access record information;

[0007] According to a pre-trained location prediction model, the location data of the user at the next moment is determined; wherein, the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model.

[0008] Optionally, the location prediction model is obtained by:

[0009] Acquire user historical location sample data, wherein the user historical location sample data includes at least sample user information, sample user location point information, and sample user visit history records;

[0010] Preprocessing the user's historical location sample data to obtain processed sample data;

[0011] Inputting the processed sample data into the graph neural network model to obtain representation vectors corresponding to each layer of the graph neural network model;

[0012] Input the representation vector into the MLP layer for feature fusion to obtain an access vector;

[0013] Inputting the access vector into the bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes user location data at the next moment;

[0014] Determining a loss function based on the user location data at the next moment and the preset location data;

[0015] The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

[0016] Optionally, the method further includes:

[0017] The user's historical location sample data is used to evaluate the prediction results of the location prediction model based on accuracy, precision, recall rate and F1 value.

[0018] Optionally, inputting the representation vector into an MLP layer for feature fusion to obtain an access vector includes:

[0019] Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained;

[0020] Convert the sample user information into user information in vector form and input it into a learnable MLP embedding layer to obtain an embedding vector of the sample user information;

[0021] Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information;

[0022] The embedding vector of the sample user information, the embedding vector of the time information and the embedding vector of the sample user location information are spliced, and the splicing result is subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector.

[0023] Optionally, the bidirectional long short-term memory neural network model is used to perform forward layer processing and reverse layer processing to obtain forward layer processing results and reverse layer processing results, and the forward layer processing results and the reverse layer processing results are merged to obtain context information.

[0024] Optionally, determining the loss function according to the user location data at the next moment and the preset location data includes:

[0025] Calculating the loss value between the user location data at the next moment and the preset location data through a cross entropy function;

[0026] The AdamW optimizer is used to iteratively back-propagate the loss value to the position prediction model and update the position prediction model.

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

[0028] An acquisition module, configured to acquire the user's current location data, wherein the current location data includes at least user information, user location point information, and historical access record information;

[0029] A prediction module is used to determine the location data of the user at the next moment based on a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data, and optimizing the training result using a sparrow search algorithm, and the initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model.

[0030] Optionally, the device further includes a model training module, wherein the model training module is configured to:

[0031] Acquire user historical location sample data, wherein the user historical location sample data includes at least sample user information, sample user location point information, and sample user visit history records;

[0032] Preprocessing the user's historical location sample data to obtain processed sample data;

[0033] Inputting the processed sample data into the graph neural network model to obtain representation vectors corresponding to each layer of the graph neural network model;

[0034] Input the representation vector into the MLP layer for feature fusion to obtain an access vector;

[0035] Inputting the access vector into the bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes user location data at the next moment;

[0036] Determining a loss function based on the user location data at the next moment and the preset location data;

[0037] The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

[0038] Optionally, the model training module is used to:

[0039] The user's historical location sample data is used to evaluate the prediction results of the location prediction model based on accuracy, precision, recall rate and F1 value.

[0040] Optionally, the model training module is used to:

[0041] Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained;

[0042] Convert the sample user information into user information in vector form and input it into a learnable MLP embedding layer to obtain an embedding vector of the sample user information;

[0043] Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information;

[0044] The embedding vector of the sample user information, the embedding vector of the time information and the embedding vector of the sample user location information are spliced, and the splicing result is subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector.

[0045] Optionally, the bidirectional long short-term memory neural network model is used to perform forward layer processing and reverse layer processing to obtain forward layer processing results and reverse layer processing results, and the forward layer processing results and the reverse layer processing results are merged to obtain context information.

[0046] Optionally, the model training module is used to:

[0047] Calculating the loss value between the user location data at the next moment and the preset location data through a cross entropy function;

[0048] The AdamW optimizer is used to iteratively back-propagate the loss value to the position prediction model and update the position prediction model.

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

[0050] The memory stores a computer program; and the at least one processor executes the computer program stored in the memory to implement the method for predicting the user location provided in the first aspect.

[0051] 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 predicting the user location provided in the first aspect is implemented.

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

[0053] The user location prediction method, apparatus, terminal device and storage medium provided in the embodiments of the present application obtain the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; and determine the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm, and the initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiments of the present application establish a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 A flowchart of a method for predicting a user location provided in one embodiment of the present application;

[0056] Figure 2 This is a diagram illustrating a summary of the SSA-optimized GNN-BiLSTM location data prediction method provided in one embodiment of the present application;

[0057] Figure 3 A flowchart of data preprocessing provided in one embodiment of the present application;

[0058] Figure 4 Flowchart for constructing the SSA-optimized GNN-BiLSTM model provided in one embodiment of the present application;

[0059] Figure 5 An example of a location data graph structure provided in one embodiment of the present application;

[0060] Figure 6 LSTM unit diagram provided for an embodiment of the present application;

[0061] Figure 7 A BiLSTM unit diagram provided in one embodiment of the present application;

[0062] Figure 8 A flow chart of a sparrow search algorithm provided in one embodiment of the present application;

[0063] Figure 9 A flowchart of the model training provided in one embodiment of the present application;

[0064] Figure 10 This is a structural block diagram of an embodiment of a user location prediction device of the present application;

[0065] Figure 11 This is a schematic diagram of the structure of a terminal device of the present application. DETAILED DESCRIPTION

[0066] To make the objectives, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0067] An embodiment of the present application provides a method for predicting a user's location, for predicting a user's future location. The embodiment is performed by a user location prediction device, which is provided on a terminal device, such as a computer terminal.

[0068] Reference Figure 1 , shows a flowchart of an embodiment of a method for predicting a user location of the present application, which may specifically include the following steps:

[0069] S101. Obtaining the user's current location data, wherein the current location data includes at least user information, user location information, and historical access record information;

[0070] Specifically, the terminal device obtains the user's current location data, which may be the location data input by the user or obtained from the network.

[0071] S102. Determine the user's location data at the next moment based on a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model.

[0072] The location prediction model is pre-trained on the terminal device, and the user's historical location sample data is used to train the initial training model to obtain the training results. The initial training model is established based on the graph neural network model and the bidirectional long short-term memory neural network model. The sparrow search algorithm is then used to continuously optimize the training results to obtain the location prediction model. In this way, after the terminal device obtains the user's current location data, it inputs it into the location prediction model to obtain the user's next location data.

[0073] Specifically, the terminal device obtains the user's historical location data, wherein the user location data set includes user information, user location point information, and user access records;

[0074] The user location sequence is uniformly represented by G(U, V, E, C), where U represents the set of all users, V represents the set of all location points, E represents the set of all user-location point visits, and C represents the set of all user historical visit records.

[0075] For a specific user u, its historical location sequence can be expressed as C u ={<u,v1,t1> ,..., <u,v i ,t i >,..., <u,v n ,t n >}, where<u,v1,t1> , the triplet represents the user u at time t i Visited location v i , which means an access record is generated. Finally, the data of users whose access records are above the set threshold is retained, and the access events belonging to the same user are sorted in chronological order and stored separately;

[0076] According to all historical location representation vectors, the user historical location sequence representation vector is constructed, including the embedding vectors of nodes and edges, user embedding vectors, and time embedding vectors, and finally converted into the access vector e cEach user’s access vector sequence is processed by two independent LSTM layers: a forward layer processes the sequence from the beginning to the current time step, and a backward layer processes the sequence from the end to the current time step. The outputs of these two layers are merged at each time step to provide complete contextual information.

[0077] The final output of the BiLSTM model passes through a learnable MLP embedding layer to provide a possible probability distribution of the next location point, which can be used to determine the user's next visit location based on the output result.

[0078] The embodiment of the present application proposes a location data prediction model GNN-BiLSTM based on a combination of a graph neural network (GNN) and a bidirectional long short-term memory neural network (BiLSTM). This model has the advantages of a graph neural network and a single long short-term memory neural network. At the same time, it uses the sparrow search algorithm (SSA) to make up for the shortcomings of the random initialization parameters of the traditional neural network model, and obtains the spatial features of the user location node to further improve the accuracy of location data prediction.

[0079] The user location prediction method provided in the embodiment of the present application obtains the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; determines the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

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

[0081] Figure 2 This is a summary diagram of the SSA optimized GNN-BiLSTM position data prediction method shown in the present invention:

[0082] S11. Data preprocessing: Collect user location data, assign a unified ID to each location point in the location, standardize the user location data format, construct a user location dataset, and divide the dataset into 80% training set data, 10% validation set data, and 10% test set data according to the location sequence segment.

[0083] S12. Build a model: Build a GNN-BiLSTM model based on a combination of a graph neural network (GNN) and a bidirectional long short-term memory neural network (BiLSTM), and initialize the model; the model includes a GNN embedding module for representing location point information, a user embedding module for representing user information, a time embedding module for representing time information, a fusion module for fusing location point and user information, a BiLSTM module for realizing location data prediction, and a parameter optimization module for optimizing the model.

[0084] S13. Model training: The training set data is input into the GNN-BiLSTM model. The location point ID, user ID, and time point are transformed into their own representation vectors through the GNN and basic embedding layers. The features are then fused through the MLP layer to form an access vector. The fused feature vector sequence is sent to the BiLSTM model. The output is the final location prediction result of the model, that is, the location data of the user at the next time point. The loss function is calculated between the predicted location data and the actual location data, and the loss value is back-propagated to complete the iterative training of the model. After each iterative training is completed, the validation set data and SSA are used to tune the hyperparameters, and the optimal model is obtained through repeated iterations.

[0085] S14. User location prediction: Input the test set data into the trained SSA-optimized GNN-BiLSTM model to obtain the model-predicted location data, and use multiple evaluation indicators to measure the model's location prediction ability.

[0086] Optionally, the location prediction model is obtained by:

[0087] Obtain user historical location sample data, which includes at least sample user information, sample user location information, and sample user visit history records;

[0088] Preprocessing the user's historical location sample data to obtain processed sample data;

[0089] Specifically, data preprocessing: collect user location data, assign a unified ID to the location points in the location, standardize the user location data format, construct a user location dataset, and divide the dataset according to the location sequence segments to form 80% training set data, 10% validation set data and 10% test set data.

[0090] like Figure 3As shown in the figure, user location data is collected, a unified ID is assigned to each location point in the location, and the user location data format is standardized. A user location dataset is constructed and the dataset is divided into 80% training set data, 10% validation set data, and 10% test set data according to the location sequence segment. The data mainly includes:

[0091] S21. Loading user location data set: The user location data set includes user information (including user ID, etc.), user location point information (including location point ID, etc.), and user access records (including user ID, user access location point ID, access time, etc.);

[0092] S22. Data preprocessing: The data set is uniformly represented by G(U,V,E,C), where U represents the set of all users, V represents the set of all locations, E represents the set of all user-location visits, and C represents the set of all user historical visit records. For a specific user u, its historical location sequence can be represented as C u ={<u,v1,t1> ,..., <u,v i ,t i >,..., <u,v n ,t n >}, where<u,v1,t1> , the triplet represents the user u at time t i Visited location v i , which means an access record is generated. Finally, the data of users whose access records are above the set threshold is retained, and the access events belonging to the same user are sorted in chronological order and stored separately;

[0093] S23. Dataset division: The location sequence of each user is divided into a training set, a validation set, and a test set in a ratio of 8:1:1. The training set, validation set, and test set all contain the continuous access information of each user, but they do not overlap with each other.

[0094] Input the processed sample data into the graph neural network model to obtain the representation vectors corresponding to each layer of the graph neural network model;

[0095] Specifically, a GNN-BiLSTM model based on the combination of a graph neural network (GNN) and a bidirectional long short-term memory neural network (BiLSTM) is constructed and initialized; the model includes a GNN embedding module for representing location point information, a user embedding module for representing user information, a time embedding module for representing time information, a fusion module for fusing location point and user information, a BiLSTM module for realizing location data prediction, and a parameter optimization module for optimizing the model.

[0096] Input the representation vector into the MLP layer for feature fusion to obtain the access vector;

[0097] Inputting the access vector into a bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes the user location data at the next moment;

[0098] Determine the loss function based on the user's location data at the next moment and the preset location data;

[0099] The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

[0100] Specifically, the training set data is input into the GNN-BiLSTM model. The location point ID, user ID, and time point are passed through the GNN and basic embedding layer to form their own representation vectors, and then the features are fused through the MLP layer to form an access vector. The fused feature vector sequence is sent to the BiLSTM model, and its output is the final location prediction result of the model, that is, the location data of the user at the next time point. The loss function is calculated between the predicted location data and the actual location data, and the loss value is back-propagated to complete the iterative training of the model. After each iterative training is completed, the validation set data and SSA are used to tune the hyperparameters, and the optimal model is obtained by repeated iterations.

[0101] First, user location data is collected and preprocessed to construct a dataset divided into training, validation, and test sets. Next, GNN and other embedding methods are used to learn embedded representations of location points, users, and user visit times. These representations are fused and fed into a BiLSTM prediction model for training. Finally, after each iteration of model training, hyperparameter optimization is performed using SSA to ultimately obtain the optimal parameter combination, enabling the model to accurately predict a user's future location based on historical location sequences. This has important implications for areas such as personalized business recommendations and large-scale infectious disease prevention and control.

[0102] The basic idea of the sparrow search algorithm is to simulate the social behavior of sparrows when foraging, including foraging, vigilance, and random exploration. Each individual in the algorithm has a current location (a vector of parameters to be optimized) and a food quantity (the performance of the current parameter settings). They move in the search space to find a better solution, thereby better implementing deep learning model hyperparameter tuning to achieve better user location prediction performance.

[0103] Optionally, the method further includes:

[0104] The user's historical location sample data is used to evaluate the prediction results of the location prediction model based on accuracy, precision, recall and F1 value.

[0105] The test set data is fed into the trained SSA-optimized GNN-BiLSTM model to obtain the model's predicted location data. The model's location prediction capabilities are measured using various evaluation metrics. The user location prediction model, trained on the training set and based on the validation set data and SSA-optimized GNN-BiLSTM, is applied to the test set data. The model's prediction results are evaluated based on accuracy, precision, recall, and F1-score.

[0106] Optionally, the representation vector is input into the MLP layer for feature fusion to obtain an access vector, including:

[0107] Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained;

[0108] Convert the sample user information into vector form and input it into the learnable MLP embedding layer to obtain the embedding vector of the sample user information;

[0109] Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information;

[0110] The embedding vector of the sample user information, the embedding vector of the time information and the embedding vector of the sample user location information are spliced, and the splicing result is subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector.

[0111] Optionally, a bidirectional long short-term memory neural network model is used to perform forward layer processing and reverse layer processing to obtain forward layer processing results and reverse layer processing results, and the forward layer processing results and reverse layer processing results are merged to obtain context information.

[0112] Optionally, determining a loss function based on the user location data at the next moment and the preset location data includes:

[0113] Calculate the loss value between the user's location data at the next moment and the preset location data through the cross entropy function;

[0114] The AdamW optimizer is used to iteratively backpropagate the loss value to the position prediction model and update the position prediction model.

[0115] like Figure 4The figure shows a flowchart of the SSA-optimized GNN-BiLSTM model construction shown in the present invention: a GNN-BiLSTM model based on a combination of a graph neural network (GNN) and a bidirectional long short-term memory neural network (BiLSTM) is constructed and initialized; the model includes a GNN embedding module for characterizing location point information, a user embedding module for characterizing user information, a time embedding module for characterizing time information, a fusion module for fusing location point and user information, a BiLSTM module for realizing location data prediction, and an SSA parameter optimization module for optimizing the model. The main steps are:

[0116] S31. Construct a graph neural network for embedding location point features: embed the location point information into the 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 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 it is considered that the position point v a and v b There is a one-way path between Figure 5 As shown, let f(v a ,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,

[0117]

[0118] The denominator ∑ n f(v i ,v n ) is used to normalize the weights. For the initialization of the graph nodes, the current weighted graph structure and the Node2Vec algorithm are used for probabilistic 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 Laplace matrix:

[0119]

[0120] For each specific value in the matrix:

[0121]

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

[0123] Assume that 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:

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

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

[0126] S32. Construct user embedding vector: Represent users as OneHot vectors according to their IDs, and pass them through a learnable MLP embedding layer so that each user is mapped to a vector space with lower dimension, using e u =f embed (u) indicates;

[0127] S33. Constructing a time embedding vector: The access time is embedded using the Time2Vec method, and the 24 hours of a day are divided into 48 windows. The time of each window is embedded using a learnable MLP layer and a sine function to represent the time periodicity, that is,

[0128]

[0129] Where k is the embedding dimension, t is the temporal feature to be embedded, and w and b are a set of learnable network parameters;

[0130] S34, feature fusion: Since each access event is based on a triple<u,v,t> Therefore, the embedding vectors of location points, users, and time points obtained in the first to third steps are concatenated, and then the features are reduced and fused through an MLP layer with an activation function, that is,

[0131] e c =σ(w m [et :e u :e p ]+b m )∈R d (Formula 6)

[0132] Among them [e t :e u :e p ] represents the concatenation of time, user, and location embedding vectors, w m and b m is a set of learnable network parameters, σ(·) represents the activation function, e c The unified vector representation of the user access event is obtained, whose dimension is d and is referred to as the access vector in the following text;

[0133] S35. Build a bidirectional long short-term memory network (BiLSTM): BiLSTM is a special recurrent neural network (RNN) that processes sequence data through two LSTM layers in opposite directions, thereby being able to simultaneously obtain past and future contextual information.

[0134] The internal structure of the LSTM unit is as follows Figure 6 As shown in the figure, there are three types of "gates" in LSTM neural units: input gate, output gate, and forget gate. A "gate" functions like a switch, enabling information selection and filtering. If a sigmoid function and a point-by-point multiplication operation are used to implement this function, the sigmoid function will output a number between 0 and 1, representing the proportion of information retained. At the two extremes, 0 prohibits all information from passing, while 1 allows it to pass without restriction.

[0135] The three gating formulas of LSTM are as follows:

[0136] Input Gate:

[0137] i t =σ(W xi ·x t +W hi ·h t-1 +b i ) (Formula 7)

[0138] Forget Gate:

[0139] f t =σ(W xf ·x t +W hf ·h t-1+b f ) (Formula 8)

[0140] Output Gate:

[0141] o t =σ(W xo ·x t +W ho ·h t-1 +b o ) (Formula 9)

[0142] The overall structure of BiLSTM, i.e. bidirectional LSTM, is as follows Figure 7 As shown, in BiLSTM, the access vector of each user It is processed by two independent LSTM layers: a forward layer processes the sequence from the beginning to the current time step, and a backward layer processes the sequence from the end to the current time step. The outputs of these two layers are combined at each time step to provide complete context information.

[0143] For the input layer of the model, the embedding vector formed by location node, user, and time is used as a single access vector e for a single user. c , the access vectors of individual users are combined to form a position sequence This sequence will serve as the input vector of the BiLSTM model.

[0144] For the hidden layer of the model, since the BiLSTM model processes the input through two independent and opposite-direction LSTM layers, the intermediate operation process is as follows:

[0145]

[0146] Here, LSTM (forward) and LSTM (backward) Represent the internal calculation process of forward and backward LSTM at time step t respectively.

[0147] For the output layer of the model, since BiLSTM is an LSTM unit that includes forward and reverse, the output of the BiLSTM layer is the concatenation of the forward and reverse hidden states, that is, The resulting output vector h t Contains forward and backward information for each time step in the sequence.

[0148] The final output h of the BiLSTM model t After a learnable MLP embedding layer, the next location point is predicted.

[0149] S36, Sparrow Search Algorithm (SSA) optimization model: the algorithm process is as follows Figure 8 As shown:

[0150] Initialization: Generate a group of sparrows, and the position of each sparrow represents a potential solution (parameter vector to be optimized).

[0151] Foraging behavior: A sparrow updates its location based on the amount of food at its current location (the performance of the current parameter combination) and information about neighboring sparrows. If the new location has more food, the sparrow will move to that location.

[0152] Vigilance behavior: To avoid local optimality, sparrows will conduct random exploration according to certain rules (such as probability or environmental factors), even if this means a temporary reduction in food availability.

[0153] Fitness evaluation: Evaluate the new location and amount of food for each sparrow to determine its fitness. Iterative update: Repeat the foraging and vigilance behaviors described above until the termination condition is met.

[0154] Sparrow position update formula:

[0155]

[0156] in, Indicates the position of the i-th sparrow at the t-th iteration, that is, the vector of parameters to be optimized, including GNN node dimension, number of GNN network layers, number of BiLSTM hidden layers, and number of BiLSTM hidden layer units. is the position of the optimal solution of the group in the current iteration, that is, the optimal combination of parameters to be optimized, α is the learning factor, which is used to adjust the step size of the sparrow approaching the optimal solution, β is the exploration factor, which is used to introduce randomness to avoid premature convergence, and ∈ is a random perturbation that simulates the random exploration behavior of sparrows during foraging.

[0157] In the sparrow search algorithm, the amount of food F for each sparrow is i (t) Represents its fitness level at the tth iteration, and the amount of food for the optimal solution of the group Indicates the highest amount of food among all sparrows in the current iteration, i.e., the best fitness. Fitness in this model refers to the final classification loss value of the model. The optimal fitness is obtained by the optimal sparrow position. The sparrow search algorithm calculates the optimal fitness, i.e., the optimal parameter combination, through a series of parameter vectors to be optimized to obtain the optimal model. The formula for updating the food amount is as follows:

[0158]

[0159] Here, γ is the food quantity update factor, which controls the rate at which each sparrow's food quantity approaches the optimal food quantity of the group. In this way, the algorithm not only encourages sparrows to move to better solutions, but also maintains the diversity of the search space to explore a wider range of solutions and avoid falling into local optima.

[0160] Figure 9 The model overall training flow chart of the method shown in the present invention includes:

[0161] S41. Forward propagation and loss calculation: The position data output by the model is the position data at the next time point. The loss between the prediction and the actual result is calculated using the cross entropy function. The formula is:

[0162]

[0163] Where N is the number of samples, M is the number of possible states of the position, and y ij is the actual observed position data, indicating whether the position of sample i falls within interval j (if yes, then y ij =1, otherwise y ij =0), p ij is the probability that the model predicts that the location of sample i falls in interval j.

[0164] The cross entropy loss function trains the model to more accurately predict future location data by minimizing the difference between the predicted probability distribution and the actual observed distribution.

[0165] S42. Backpropagation and Parameter Update: The AdamW optimizer is used to iteratively backpropagate the loss throughout the model to update the model parameters. In addition to the learnable parameters within the model, manually set hyperparameters include the node vector dimension of the graph convolutional network, the dimensions of the location, user, and time embedding vectors, the access vector dimension, the maximum access vector sequence length, the dropout rate, and the optimizer's batch size, number of iterations, learning rate, regularization parameter, and learning rate adjustment strategy.

[0166] S43. Model evaluation and hyperparameter optimization: To verify the effectiveness of the GNN-BiLSTM user location prediction method based on SSA optimization, the performance of the trained and tuned model was evaluated on the validation set based on accuracy, precision, recall, and F1-Score.

[0167] Accuracy = (TP + TN) / P + N (Formula 15)

[0168] Precision = TP / (TP + FP) (Formula 16)

[0169] Recall = TP / (TP+FN) (Formula 17)

[0170] F1-Score=2 / (1 / Precision+1 / Recall) (Formula 18)

[0171] TP represents the number of samples predicted as positive when they are actually positive, which is called true positive; FP represents the number of samples predicted as positive when they are actually negative, which is called false positive; FN represents the number of samples predicted as negative when they are actually positive, which is called false negative; and TN represents the number of samples predicted as negative when they are actually negative, which is called true negative. Furthermore, TP+FP represents the total number of samples predicted as positive, and FN+TN represents the total number of samples predicted as negative. TP+FN represents the total number of samples that are actually positive, and FP+TN represents the total number of samples that are actually negative.

[0172] The evaluation results are used as the amount of food in this round of sparrow sowing algorithm iteration, the sparrow population parameter combination is updated, and the model is retrained.

[0173] The user location prediction method provided in the embodiment of the present application obtains the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; determines the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

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

[0175] Reference Figure 10 , shows a structural block diagram of an embodiment of a user location prediction device of the present application. The device may specifically include the following modules: an acquisition module 1001 and a prediction module 1002, wherein:

[0176] The acquisition module 1001 is used to obtain the user's current location data, wherein the current location data at least includes user information, user location point information and historical access record information;

[0177] The prediction module 1002 is used to determine the user's location data at the next moment based on a pre-trained location prediction model; wherein, the pre-trained location prediction model is obtained by training the initial training model based on the user's historical location sample data, and optimizing the training result using the sparrow search algorithm. The initial training model is established based on the graph neural network model and the bidirectional long short-term memory neural network model.

[0178] The user location prediction device provided in the embodiment of the present application obtains the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; determines the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

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

[0180] Optionally, the device further includes a model training module, which is used to:

[0181] Obtain user historical location sample data, which includes at least sample user information, sample user location information, and sample user visit history records;

[0182] Preprocessing the user's historical location sample data to obtain processed sample data;

[0183] Input the processed sample data into the graph neural network model to obtain the representation vectors corresponding to each layer of the graph neural network model;

[0184] Input the representation vector into the MLP layer for feature fusion to obtain the access vector;

[0185] Inputting the access vector into a bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes the user location data at the next moment;

[0186] Determine the loss function based on the user's location data at the next moment and the preset location data;

[0187] The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

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

[0189] The user's historical location sample data is used to evaluate the prediction results of the location prediction model based on accuracy, precision, recall and F1 value.

[0190] Optionally, the model training module is used to:

[0191] Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained;

[0192] Convert the sample user information into vector form and input it into the learnable MLP embedding layer to obtain the embedding vector of the sample user information;

[0193] Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information;

[0194] The embedding vector of the sample user information, the embedding vector of the time information and the embedding vector of the sample user location information are spliced, and the splicing result is subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector.

[0195] Optionally, a bidirectional long short-term memory neural network model is used to perform forward layer processing and reverse layer processing to obtain forward layer processing results and reverse layer processing results, and the forward layer processing results and reverse layer processing results are merged to obtain context information.

[0196] Optionally, the model training module is used to:

[0197] Calculate the loss value between the user's location data at the next moment and the preset location data through the cross entropy function;

[0198] The AdamW optimizer is used to iteratively backpropagate the loss value to the position prediction model and update the position prediction model.

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

[0200] The user location prediction device provided in the embodiment of the present application obtains the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; determines the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

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

[0202] Figure 11 This is a schematic diagram of the structure of a terminal device of the present application, such as Figure 11 As shown, the terminal device includes: at least one processor 1101 and a memory 1102;

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

[0204] The terminal device provided in this embodiment obtains the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; determines the user's next moment location data according to a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training an initial training model based on the user's historical location sample data to obtain a training result, and optimizing the training result using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

[0205] Yet another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method for predicting the user location provided in any of the above embodiments is implemented.

[0206] According to the computer-readable storage medium of this embodiment, by obtaining the user's current moment location data, wherein the current moment location data includes at least user information, user location point information and historical access record information; according to a pre-trained location prediction model, the user's next moment location data is determined; wherein, the pre-trained location prediction model is obtained by training the initial training model based on the user's historical location sample data to obtain a training result, and the training result is optimized by using a sparrow search algorithm. The initial training model is established based on a graph neural network model and a bidirectional long short-term memory neural network model. The embodiment of the present application establishes a location prediction model based on a sparrow search algorithm, a graph neural network model and a bidirectional long short-term memory neural network model. The location prediction model has the ability to accurately predict the user's future location based on the historical location sequence. In this way, environmental factors and the user's historical access information can be comprehensively considered to improve the accuracy of location prediction, which is of great significance to fields such as commercial personalized recommendations and large-scale infectious disease prevention and control.

[0207] 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 art to which this application belongs.

[0208] It should be noted that the terms used herein are intended only to describe 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 intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or combinations thereof.

[0209] It should be noted that the terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0210] In addition, the terms "comprises" and "comprising" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.

[0211] 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 of a device or feature to other devices or features as shown in the figures. 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 figures. For example, if the device in the drawings is inverted, the device described as "above other devices or structures" or "above other devices or structures" will be subsequently positioned as "below other devices or structures" or "below other devices or structures". Thus, the exemplary term "above" can include both "above" and "below". The device can 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.

[0212] In the above detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, similar symbols typically identify similar components, unless the context dictates 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.

[0213] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for predicting a user location, characterized in that: The method comprises: Obtaining the user's current location data, wherein the current location data includes at least user information, user location point information, and historical access record information; According to the pre-trained location prediction model, the location data of the user at the next moment is determined; wherein, the pre-trained location prediction model is obtained by training the initial training model based on the user's historical location sample data to obtain a training result, and the training result is optimized by using the sparrow search algorithm. The initial training model is established based on the graph neural network model and the bidirectional long short-term memory neural network model. According to all historical location representation vectors, the user's historical location sequence representation vector is constructed, including the node and edge embedding vectors, the user embedding vector, and the time embedding vector, and finally converted into the access vector e c Each user's access vector sequence is processed by two independent LSTM layers: a forward layer processes the sequence from the beginning to the current time step, and the other backward layer processes the sequence from the end to the current time step. The outputs of these two layers are merged at each time step to provide complete context information. The final output of the BiLSTM model passes through a learnable MLP embedding layer to give the possible probability distribution of the next location point, which is used to determine the user's next access location based on the output result; The access vector is obtained in the following manner: Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained; Convert the sample user information into user information in vector form and input it into a learnable MLP embedding layer to obtain an embedding vector of the sample user information; Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information; The embedding vectors of the sample user information, the time information, and the location information are concatenated, and the concatenated results are subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector. Sparrow position update formula: in, Indicates the position of the i-th sparrow at the t-th iteration, that is, the vector of parameters to be optimized, including GNN node dimension, number of GNN network layers, number of BiLSTM hidden layers, and number of BiLSTM hidden layer units. is the position of the optimal solution of the group in the current iteration, that is, the optimal combination of parameters to be optimized, α is the learning factor, which is used to adjust the step size of the sparrow approaching the optimal solution, β is the exploration factor, which is used to introduce randomness to avoid premature convergence, and ∈ is a random perturbation that simulates the random exploration behavior of sparrows during foraging.

2. The method for predicting user location according to claim 1, wherein: The position prediction model is obtained by: Acquire user historical location sample data, wherein the user historical location sample data includes at least sample user information, sample user location point information, and sample user visit history records; Preprocessing the user's historical location sample data to obtain processed sample data; Inputting the processed sample data into the graph neural network model to obtain representation vectors corresponding to each layer of the graph neural network model; Input the representation vector into the MLP layer for feature fusion to obtain an access vector; Inputting the access vector into the bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes user location data at the next moment; Determining a loss function based on the user location data at the next moment and the preset location data; The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

3. The method for predicting user location according to claim 2, wherein: The method further comprises: The user's historical location sample data is used to evaluate the prediction results of the location prediction model based on accuracy, precision, recall rate and F1 value.

4. The method for predicting user location according to claim 1, wherein: The bidirectional long short-term memory neural network model is used to perform forward layer processing and reverse layer processing to obtain forward layer processing results and reverse layer processing results, and the forward layer processing results and the reverse layer processing results are merged to obtain context information.

5. The method for predicting user location according to claim 1, wherein: The determining of the loss function according to the user location data at the next moment and the preset location data includes: Calculating the loss value between the user location data at the next moment and the preset location data through a cross entropy function; The AdamW optimizer is used to iteratively back-propagate the loss value to the position prediction model and update the position prediction model.

6. A user location prediction device, characterized in that: The device comprises: An acquisition module, configured to acquire the user's current location data, wherein the current location data includes at least user information, user location point information, and historical access record information; The prediction module is used to determine the location data of the user at the next moment based on a pre-trained location prediction model; wherein the pre-trained location prediction model is obtained by training the initial training model based on the user's historical location sample data, and optimizing the training result using the sparrow search algorithm. The initial training model is established based on the graph neural network model and the bidirectional long short-term memory neural network model. According to all historical location representation vectors, the user's historical location sequence representation vector is constructed, including the node and edge embedding vectors, the user embedding vector, the time embedding vector, and finally converted into the access vector e c Each user's access vector sequence is processed by two independent LSTM layers: a forward layer processes the sequence from the beginning to the current time step, and the other backward layer processes the sequence from the end to the current time step. The outputs of these two layers are merged at each time step to provide complete context information. The final output of the BiLSTM model passes through a learnable MLP embedding layer to give the possible probability distribution of the next location point, which is used to determine the user's next access location based on the output result; The access vector is obtained in the following manner: Based on the sample user location information embedded in the graph structure, and the nodes and edges are initialized, a graph neural network model is obtained; Convert the sample user information into user information in vector form and input it into a learnable MLP embedding layer to obtain an embedding vector of the sample user information; Input the access time into the learnable MLP embedding layer to obtain the embedding vector of time information; The embedding vectors of the sample user information, the time information, and the location information are concatenated, and the concatenated results are subjected to feature dimensionality reduction and fusion processing to obtain the user's access vector. Sparrow position update formula: in, Indicates the position of the i-th sparrow at the t-th iteration, that is, the vector of parameters to be optimized, including GNN node dimension, number of GNN network layers, number of BiLSTM hidden layers, and number of BiLSTM hidden layer units. is the position of the optimal solution of the group in the current iteration, that is, the optimal combination of parameters to be optimized, α is the learning factor, which is used to adjust the step size of the sparrow approaching the optimal solution, β is the exploration factor, which is used to introduce randomness to avoid premature convergence, and ∈ is a random perturbation that simulates the random exploration behavior of sparrows during foraging.

7. The data access control device according to claim 6, characterized in that: The device further includes a model training module, which is configured to: Acquire user historical location sample data, wherein the user historical location sample data includes at least sample user information, sample user location point information, and sample user visit history records; Preprocessing the user's historical location sample data to obtain processed sample data; Inputting the processed sample data into the graph neural network model to obtain representation vectors corresponding to each layer of the graph neural network model; Input the representation vector into the MLP layer for feature fusion to obtain an access vector; Inputting the access vector into the bidirectional long short-term memory neural network model to obtain a model output result, wherein the model output result at least includes user location data at the next moment; Determining a loss function based on the user location data at the next moment and the preset location data; The iterative data of the loss function is optimized according to the sparrow search algorithm to obtain the position prediction model.

8. 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 predicting a user location according to any one of claims 1 to 5.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed, implements the method for predicting a user location according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cooperative positioning method for simultaneous positioning and tracking

    CN114501310A

  • Neural network forecasting method for navigation satellite clock error data

    CN116976393A

  • CSI indoor positioning method and device based on graph neural network

    CN117939402A