User movement behavior prediction method and device based on large language model

Through the combination of large language models and lightweight error correction models, candidate sets are generated and iteratively optimized, which solves the problems of complexity and high resource consumption of user mobile behavior prediction in the prior art, and achieves efficient and accurate prediction of urban population mobile behavior.

CN120448838APending Publication Date: 2025-08-08ZHEJIANG UNIV CITY COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510474983.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The prior art has problems such as model complexity, high resource consumption, insufficient space-time dependence and insufficient prediction capabilities of low-frequency POI in user mobile behavior prediction, and it is difficult to efficiently complete accurate predictions under limited resources.

Method used

The user movement behavior prediction method based on large language models is adopted. By obtaining the user movement data set, the rotation mechanism is used to generate candidate sets, and iteratively optimized with the lightweight error correction model to generate the final prediction results, including data preprocessing, long chain inference and the training and application of lightweight error correction models.

Benefits of technology

Efficient and accurate prediction of urban population movement behavior is achieved, resource consumption is reduced, model generalization ability and prediction accuracy are improved, and overfitting problems are avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005361041210000022
    Figure BDA0005361041210000022
  • Figure BDA0005361041210000023
    Figure BDA0005361041210000023
  • Figure BDA0005361041210000031
    Figure BDA0005361041210000031
Patent Text Reader

Abstract

The invention discloses a user movement behavior prediction method and device based on a large language model. According to the method, the strong context understanding capability of the LLM is utilized, the behavior pattern of urban residents is deeply analyzed by integrating multi-source heterogeneous data (such as spatio-temporal information, user preference and the like), and then more accurate movement track prediction is achieved. In addition, the method further introduces a lightweight error correction model to identify and correct potential errors, so that the prediction accuracy is further improved. The method not only overcomes the limitation of a traditional model in the aspects of feature description and intention recognition, but also does not need to perform fine adjustment for a specific data set, thereby greatly improving the resource utilization rate and the generalization ability of the model. Experimental results show that the performance of the method provided by the invention is remarkably improved on a plurality of public data sets, and powerful technical support is provided for urban governance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer artificial intelligence, and in particular to a method and device for predicting user mobility behavior based on a large language model. Background Art

[0002] With the acceleration of urbanization, urban planning and management face unprecedented challenges. Accurately predicting urban mobility patterns is crucial for improving public safety, optimizing traffic flow, and enhancing the efficiency of public services. In recent years, the successful application of large language models (LLMs) in natural language processing has provided new insights into this issue. LLMs possess powerful contextual understanding and reasoning capabilities, enabling them to effectively process complex, multi-source, heterogeneous data, enabling more accurate behavior prediction.

[0003] However, current pedestrian trajectory prediction methods still face the following challenges:

[0004] First, end-to-end deep neural network models are highly expressive and effective at encoding behavior for single-source data (such as contextual spatiotemporal information or user preferences). However, when considering heterogeneous data such as spatiotemporal features (e.g., temporal changes in POI categories), user characteristics (e.g., historical behavioral preferences), and regional characteristics (e.g., regional popularity), these methods typically require complex encoding and fusion, resulting in lengthy training times and complex model structures that are difficult to understand.

[0005] Secondly, although fine-tuning large language models can partially adapt to trajectory prediction tasks, it is difficult to fully capture the spatiotemporal dependencies and user behavior patterns in trajectory data, and the model's prediction ability for low-frequency or long-tail POIs is insufficient.

[0006] Third, large language models typically contain billions to trillions of parameters, and fine-tuning requires extensive computing resources and training data. However, trajectory data is often sparse and high-dimensional (e.g., user-POI interaction matrices). Fine-tuning can lead to overfitting and is difficult to perform efficiently with limited resources. Summary of the Invention

[0007] The purpose of the present invention is to address the deficiencies of the existing technology and provide a method and device for predicting user mobility behavior based on a large language model.

[0008] The object of the present invention is achieved through the following technical solution: a method for predicting user mobility behavior based on a large language model, comprising:

[0009] Obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and use a rotation-based temporal attention network to generate a candidate set of predicted next POIs.

[0010] Input the user movement dataset and candidate set into a large language model to generate preliminary behavior prediction results;

[0011] The preliminary behavior prediction result is judged based on the lightweight error correction model; if the judgment is correct, the preliminary behavior prediction result is used as the final behavior prediction result; if the judgment is wrong, the reason for the prediction error is output and a feedback prompt is generated;

[0012] Based on the feedback prompts, the large language model is driven to iteratively optimize the decision answer to generate a final behavior prediction result.

[0013] Furthermore, the user movement dataset and candidate set are input into a large language model to generate preliminary behavior prediction results, including:

[0014] Preprocessing the user movement dataset and the candidate set based on factors affecting user trajectories described in sports ecology theory to extract features; the features include the probability of each POI being visited in a certain time period and the pattern of users' historical visits to POIs;

[0015] Converting the user movement dataset, the candidate set, and the features into a natural language description format to form input data suitable for processing by a large language model;

[0016] Through a long-chain inference mechanism, the large language model generates preliminary behavior prediction results based on the input data.

[0017] Furthermore, the lightweight error correction model is trained as follows:

[0018] Large language model self-correction analyzes the causes of prediction errors and uses clustering methods to classify the causes of the prediction errors into M types, which are used to construct labels for lightweight error correction model training;

[0019] A lightweight error correction model is trained based on the input of a large language model and the preliminary behavior prediction results and their corresponding labels.

[0020] Furthermore, the clustering method is used to classify the causes of the prediction errors into M types, including:

[0021] The TF-IDF weighted bag-of-words model and deep semantic embedding are used for joint representation: Let the reason for the prediction error be D = {d1, d2, ..., d N}, for document d i , whose eigenvector v i Expressed as:

[0022] v i =α·TF-IDF(d i )+(1-α)·BERT CLE (d i )

[0023] Where α∈[0,1] is the adaptive weight parameter, BERT CLE (d i ) represents document d i The BERT semantic representation is obtained by extracting the [CLS] tag hidden state vector output by the BERT model, capturing the deep semantic information of the document;

[0024] Constructing a semantic similarity matrix The matrix information S of row i and column j is ij Expressed as:

[0025]

[0026] Among them, σ represents the bandwidth parameter of the Gaussian kernel function, which controls the speed of similarity decay; cos(θ BERT (d i ,d j )) represents the cosine similarity of semantic representations between documents, which is used to enhance semantic consistency; and non-negative matrix factorization with graph regularization is introduced for potential semantic mining:

[0027]

[0028] Where X represents the input matrix, each column represents the vector representation of a document, W is the basis vector in the latent semantic space, and H represents the low-dimensional representation of the document in the latent semantic space; represents the Frobenius norm of the reconstruction error, which measures the difference between the decomposed matrix and the original matrix; λ represents the weight parameter of the graph regularization term, which controls the degree of preservation of the manifold structure; Tr(H T LH) represents the graph regularization term, the superscript T represents the transpose operation, L = DS is the graph Laplacian matrix, and D is the degree matrix; μ represents the weight parameter of the sparse regularization term, which controls the sparsity of the coefficient matrix;

[0029] Select the first k eigenvectors to form the orthogonal space for final division:

[0030]

[0031] Among them C * represents the optimal clustering division, x represents the representation of the text in the low-dimensional space, C i represents the i-th cluster, μ irepresents the center of the i-th cluster.

[0032] Furthermore, the step of driving the large language model to iteratively optimize the decision answer based on the feedback prompt includes:

[0033] Adjust the input parameters of the large language model based on feedback prompts generated by the lightweight error correction model.

[0034] Furthermore, the lightweight error correction model is a BERT model.

[0035] The present invention also provides a user movement behavior prediction device based on a large language model, comprising:

[0036] The first prediction module is used to obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and generate a candidate set of predicted next POIs using a temporal attention network based on a rotation mechanism;

[0037] The second prediction module is used to input the user movement dataset and candidate set into the large language model to generate preliminary behavior prediction results;

[0038] A judgment module, configured to judge the preliminary behavior prediction result based on a lightweight error correction model; if the judgment is correct, the preliminary behavior prediction result is used as the final behavior prediction result; if the judgment is incorrect, the reason for the prediction error is output and a feedback prompt is generated;

[0039] The third prediction module is used to drive the large language model to iteratively optimize the decision answer based on the feedback prompt to generate a final behavior prediction result.

[0040] The present invention also provides an electronic device, comprising a memory and a processor, wherein the memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the above-mentioned user mobility behavior prediction method based on a large language model.

[0041] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned method for predicting user mobility behavior based on a large language model.

[0042] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned method for predicting user mobility behavior based on a large language model.

[0043] The present invention combines a large language model (LLM) with a lightweight error correction model to provide an efficient, accurate, and flexible method for predicting urban population mobility behavior. A candidate set is generated and preliminary predictions are made using the LLM. Iterative optimization is then performed using the lightweight error correction model to ensure high accuracy in the final prediction results. Unlike traditional deep learning models, this method does not require complex fine-tuning training for specific datasets, reducing implementation costs and improving the model's generalization capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0045] Figure 1 This is a flowchart of a method for predicting user mobility behavior based on a large language model.

[0046] Figure 2 This is a framework diagram of the urban population mobility behavior prediction method based on a large language model.

[0047] Figure 3 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The present invention will be described in detail below with reference to the accompanying drawings. Unless there is any conflict, the features of the following embodiments and implementations may be combined with each other.

[0049] A user mobility behavior prediction method based on a large language model of the present invention comprises:

[0050] Obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and use a rotation-based temporal attention network to generate a candidate set of predicted next POIs.

[0051] Input the user movement dataset and candidate set into a large language model to generate preliminary behavior prediction results;

[0052] The preliminary behavior prediction result is judged based on the lightweight error correction model; if the judgment is correct, the preliminary behavior prediction result is used as the final behavior prediction result; if the judgment is wrong, the reason for the prediction error is output and a feedback prompt is generated;

[0053] Based on the feedback prompts, the large language model is driven to iteratively optimize the decision answer to generate a final behavior prediction result.

[0054] Example 1: In the embodiment of the present invention, the user is an urban population as an example, that is, the urban population mobility behavior prediction method based on a large language model includes the following steps:

[0055] Step 1: Obtain a city crowd mobility dataset, which includes user IDs, point of interest (POI) visit records, and timestamps, and use a temporal attention network based on a rotation mechanism to generate a candidate set of the next predicted POI.

[0056] Specifically, this example uses three real public datasets for comparative experiments: Foursquare-NYC, Foursquare-TKY, and Gowalla-CA. Using a temporal attention network based on a rotation mechanism, we can capture the time-specific patterns in user behavior and generate candidate sets, thereby improving prediction accuracy. Rotation is modeled by unit complex numbers. Given an embedding vector The mathematical definition of the time information rotation (TR) operation is as follows: in, represents the d-dimensional complex vector space, r t The rotation vector associated with time slot t is also a d-dimensional complex vector, where t is the subscript of the time slot, representing a different time point. This method avoids the concatenation of temporal and spatial features in traditional methods, significantly improving feature fusion efficiency and maximizing the benefits of large-scale language model decision-making.

[0057] Step 2: Convert the urban population mobility dataset and candidate set from Step 1 into natural language descriptions and input them into a large language model (LLM). Leveraging the LLM's powerful contextual understanding capabilities, preliminary behavior predictions are generated. This example uses three different large language models as experimental foundations: Qwen-turbo, GPT-4, and DeepSeek-R1. The direct prediction results from the large language models and the corrected results are recorded and compared to demonstrate the effectiveness of the error correction module.

[0058] This step includes:

[0059] 1) Data Preprocessing: The acquired data (urban crowd movement dataset and candidate set) is preprocessed based on the factors influencing pedestrian trajectories described in motion ecology theory. Statistics are then generated from this data to calculate the probability of each POI being visited during each time period and the patterns of users' historical POI visits.

[0060] 2) Convert the features obtained from the urban population mobility dataset, candidate set, and data preprocessing in step 1 into a natural language description format to form input data suitable for LLM processing.

[0061] 3) Through the Chain-of-Thought (CoT) mechanism, LLM generates preliminary behavior prediction results based on the input data. The LLM prompt words and input data structure are shown in Table 1.

[0062] Table 1: Large language model prompt words and input data structure

[0063]

[0064] Among them, {utc_time} represents the event, {user_id} represents the user ID, {poi_id} represents the point of interest ID, {poi_category} represents the meaning of the point of interest, and {max_prob_time_slot} represents the time period when the point of interest is most likely to be visited.

[0065] Step 3: Use a lightweight error correction model to analyze and correct the preliminary behavior prediction results generated by the LLM, identify potential errors, and generate feedback prompts;

[0066] This step includes the following sub-steps:

[0067] 1) Let the LLM self-correct and analyze the causes of prediction errors, and use clustering methods to classify the causes of prediction errors into M types, and construct a dataset label for lightweight error correction model training. The present invention designs a text clustering method to achieve the mapping of high-dimensional sparse text space to low-dimensional compact semantic space through three-stage optimization. First, the improved TF-IDF weighted bag-of-words model and deep semantic embedding are used for joint representation: let the text set (i.e., the cause of prediction error) be D = {d1, d2, ..., d N}, for document d i , whose eigenvector v i Expressed as:

[0068] v i =α·TF-IDF(d i )+(1-α)·BERT CLE (d i ).

[0069] Where α∈[0,1] is an adaptive weight parameter, which dynamically adjusts the contribution of statistical features and deep semantics through the entropy maximization criterion. CLE (d i ) represents document d i The BERT semantic representation is obtained by extracting the hidden state vector of the [CLS] tag output by the BERT model, capturing the deep semantic information of the document. Then, a semantic similarity matrix is constructed. The matrix information S of row i and column j is ij It can be expressed as:

[0070]

[0071] Where σ represents the bandwidth parameter of the Gaussian kernel function, which controls the speed of similarity decay. BERT (d i ,d j )) represents the cosine similarity of semantic representations between documents, which is used to enhance semantic consistency. Furthermore, non-negative matrix factorization (GNMF) with graph regularization is introduced for latent semantic mining:

[0072]

[0073] Where X represents the input matrix, each column represents the vector representation of a document, W is the basis vector in the latent semantic space, and H represents the low-dimensional representation of the document in the latent semantic space. represents the Frobenius norm of the reconstruction error, which measures the difference between the decomposed matrix and the original matrix. λ represents the weight parameter of the graph regularization term, which controls the degree of preservation of the manifold structure. Tr(H T LH) represents the graph regularization term, the superscript T represents the transposition operation, L=DS is the graph Laplacian matrix, D is the degree matrix, S is the semantic similarity matrix, μ represents the weight parameter of the sparse regularization term, and controls the sparsity of the coefficient matrix. Finally, the first k eigenvectors are selected to form the orthogonal space Make the final division:

[0074]

[0075] Among them C * represents the optimal clustering division, x represents the representation of the text in the low-dimensional space, C i Represents the i-th cluster, x∈C i Represents the text vector x, μ belonging to the i-th cluster i Represents the center of the i-th cluster, and DWT represents the use of dynamic time warping distance measurement to solve the problem of inconsistent text sequence lengths.

[0076] In one embodiment, the causes of prediction errors are classified into the following types:

[0077] (a) Large language models do not take into account unique patterns or preferences in user behavior.

[0078] (b) Insufficient consideration of contextual factors, such as the user’s current status or travel purpose.

[0079] (c) Large language models may not account for behavioral differences based on time of day.

[0080] (d) Large language models may ignore the influence of peers or social interactions on user decisions.

[0081] (e) The characteristics or relevance of different points of interest (POIs) to the user's context are not fully explored.

[0082] 2) Training lightweight error correction model

[0083] The input is encoded into an input vector through BERT's tokenizer. The input format is: Input = Tokenize (Question, Top5, Predict). Question represents the Question input of the large language model, Top5 is the candidate POI list, and Predict is the prediction result of the large language model. The encoded input vector is then input into the BERT model to extract text features: h = BERT (Input). Where h represents the pooled features output by BERT. The output is the correctness of the prediction result of the large language model and the reason for the error in the large language model's prediction. The label of the reason comes from the above-mentioned clustering method. Based on the BERT output, classification is performed through a fully connected layer (Linear Layer) and a Dropout layer:

[0084] y=Softmax(W·Dropout(h)+b).

[0085] Among them, W and b are learnable parameters, and y is the classification probability distribution. The loss function uses the cross entropy loss function for training:

[0086]

[0087] Among them, y i is the true label, is the model prediction probability distribution. The accuracy of the model training is shown in Table 2.

[0088] Table 2: Lightweight model training accuracy

[0089] Qwen Gpt-4o Gpt-4 Deepseek-R1 TKY 0.8363 0.9571 0.9014 0.9235 NYC 0.8886 0.9047 0.8719 0.8585 CA 0.8658 0.9501 0.9474 0.9188

[0090] 3) Use of lightweight error correction model

[0091] If the lightweight error correction model determines that the large language model's prediction is correct, the output of the large language model is used as the final result. Otherwise, the large language model is asked to make a new prediction based on the output label of the lightweight error correction model to achieve the error correction effect.

[0092] Step 4: Drive the LLM to iteratively optimize the decision answer based on the feedback prompts to generate the final mobile behavior prediction result.

[0093] This step includes:

[0094] 1) Establish evaluation indicators

[0095] This paper adopts a ranking-based indicator, Accuracy@1 (Acc@1). Acc@1 is a commonly used evaluation indicator in pedestrian trajectory prediction tasks, which is used to measure whether the POI results predicted by the model are consistent with the POIs actually visited by the user. Suppose there are N samples in the test set, each sample contains the user's historical trajectory and the POI actually visited is l true For each sample, the POI predicted by the model is l pred The calculation formula of Acc@1 is:

[0096]

[0097] 2) Based on the feedback generated by the lightweight error correction model, adjust the LLM's input parameters, instruct the LLM to re-predict, and record the final optimization results. Comparative experimental results with other methods are shown in the table, where the best performance is highlighted in bold text and the second-best results are underlined. Acc@5 represents the probability that the true future position will appear in the five most likely predictions given by the model. The experimental results of the present invention are compared with those of the other nine methods:

[0098] FPMC: It combines matrix factorization and first-order Markov chain to capture users’ overall preferences and their sequential behaviors.

[0099] DeepMove: This approach combines a gated recurrent unit and attention mechanism to effectively identify periodic and sequential patterns in user check-in behavior.

[0100] LSTPM: A state-of-the-art model that combines long-term and short-term sequential methods for recommendation.

[0101] STAN: This two-layer attention architecture exploits the spatiotemporal information of check-ins to capture the interdependencies between POIs.

[0102] Flashback: This RNN-based approach exploits the spatiotemporal context for retrospective position prediction, thereby leveraging rich spatiotemporal information.

[0103] Graph-Flashback: This model integrates the acquired POI transition graph into an RNN-based framework to enhance the understanding of sequence transition patterns.

[0104] GETNext: This framework is based on the Transformer architecture and utilizes the user trajectory graph and POI transition probability graph to improve the next POI prediction.

[0105] STHGCN: Uses a hypergraph to capture intra-user and inter-user trajectories and combines hypergraph structure encoding with spatiotemporal information.

[0106] ROTAN: Maps POI embeddings into a time-sensitive vector space through rotation operations and combines it with a temporal attention mechanism to dynamically capture time-specific patterns in user behavior, thereby improving the accuracy of next POI recommendation.

[0107] LLM4POI: By converting user history, temporal information, and POI semantics into natural language descriptions, it leverages the semantic understanding capabilities of a large language model (LLM) to directly predict the next POI, thus avoiding the complex feature engineering and spatiotemporal dependency modeling required in traditional methods.

[0108] Table 3: Comparative test results on three real datasets

[0109]

[0110] The present invention also provides a user movement behavior prediction device based on a large language model, comprising:

[0111] The first prediction module is used to obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and generate a candidate set of predicted next POIs using a temporal attention network based on a rotation mechanism;

[0112] The second prediction module is used to input the user movement dataset and candidate set into the large language model to generate preliminary behavior prediction results;

[0113] A judgment module, configured to judge the preliminary behavior prediction result based on a lightweight error correction model; if the judgment is correct, the preliminary behavior prediction result is used as the final behavior prediction result; if the judgment is incorrect, the reason for the prediction error is output and a feedback prompt is generated;

[0114] The third prediction module is used to drive the large language model to iteratively optimize the decision answer based on the feedback prompt to generate a final behavior prediction result.

[0115] It should be noted that the device embodiment shown in this embodiment matches the content of the above method embodiment. You can refer to the content of the above method embodiment and will not repeat it here.

[0116] Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 3The electronic device provided in this embodiment includes: a memory and a processor, wherein the memory is used to store information including program instructions, and the processor is used to control the execution of the program instructions. When the program instructions are loaded and executed by the processor, a user mobile behavior prediction method based on a large language model of the present invention is implemented.

[0117] It should be noted that, in addition to Figure 3 In addition to the memory and processor shown, the electronic device may also include other hardware according to its actual functions, which will not be described in detail.

[0118] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for predicting user mobility behavior based on a large language model is implemented.

[0119] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the above-mentioned method for predicting user mobility behavior based on a large language model.

[0120] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0121] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0122] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0123] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0124] The above embodiments are intended only to illustrate the design concepts and features of the present invention. Their purpose is to enable those skilled in the art to understand the contents of the present invention and implement them accordingly. The scope of protection of the present invention is not limited to the above embodiments. Therefore, any equivalent changes or modifications made based on the principles and design concepts disclosed in the present invention are within the scope of protection of the present invention.

Claims

1. A method for predicting user mobility behavior based on a large language model, characterized in that: include: Obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and use a rotation-based temporal attention network to generate a candidate set of predicted next POIs. Input the user movement dataset and candidate set into a large language model to generate preliminary behavior prediction results; The preliminary behavior prediction result is judged based on the lightweight error correction model; if the judgment is correct, the preliminary behavior prediction result is the final behavior prediction result; If the judgment is wrong, the reason for the prediction error is output and feedback prompts are generated; Based on the feedback prompts, the large language model is driven to iteratively optimize the decision answer to generate a final behavior prediction result.

2. The method for predicting user mobility behavior based on a large language model according to claim 1, characterized in that: The user movement dataset and candidate set are input into a large language model to generate preliminary behavior prediction results, including: Preprocessing the user movement dataset and the candidate set based on factors affecting user trajectories described in sports ecology theory to extract features; the features include the probability of each POI being visited in a certain time period and the pattern of users' historical visits to POIs; Converting the user movement dataset, the candidate set, and the features into a natural language description format to form input data suitable for processing by a large language model; Through a long-chain inference mechanism, the large language model generates preliminary behavior prediction results based on the input data.

3. The method for predicting user mobility behavior based on a large language model according to claim 1, characterized in that: The lightweight error correction model is trained as follows: Large language model self-correction analyzes the causes of prediction errors and uses clustering methods to classify the causes of the prediction errors into M types, which are used to construct labels for lightweight error correction model training; A lightweight error correction model is trained based on the input of a large language model and the preliminary behavior prediction results and their corresponding labels.

4. The method for predicting user mobility behavior based on a large language model according to claim 3, characterized in that: The clustering method is used to classify the causes of the prediction errors into M types, including: The TF-IDF weighted bag-of-words model and deep semantic embedding are used for joint representation: Let the reason for the prediction error be D = {d1, d2, ..., d N }, for document d i , whose eigenvector v i Expressed as: v i =α·TF-IDF(d i )+(1-a)·BERT CLE (d i ) Where α∈[0,1] is the adaptive weight parameter, BERT CLE (d i ) represents document d i The BERT semantic representation is obtained by extracting the [CLS] tag hidden state vector output by the BERT model, capturing the deep semantic information of the document; Constructing a semantic similarity matrix The matrix information S of row i and column j is ij Expressed as: Among them, σ represents the bandwidth parameter of the Gaussian kernel function, which controls the speed of similarity decay; cos(θ BERT (d i ,d j )) represents the cosine similarity of semantic representations between documents, which is used to enhance semantic consistency; and non-negative matrix factorization with graph regularization is introduced for potential semantic mining: Where X represents the input matrix, each column represents the vector representation of a document, W is the basis vector in the latent semantic space, and H represents the low-dimensional representation of the document in the latent semantic space; represents the Frobenius norm of the reconstruction error, which measures the difference between the decomposed matrix and the original matrix; λ represents the weight parameter of the graph regularization term, which controls the degree of preservation of the manifold structure; Tr(H T LH) represents the graph regularization term, the superscript T represents the transpose operation, L = DS is the graph Laplacian matrix, and D is the degree matrix; μ represents the weight parameter of the sparse regularization term, which controls the sparsity of the coefficient matrix; Select the first k eigenvectors to form the orthogonal space for final division: Among them C * represents the optimal clustering division, x represents the representation of the text in the low-dimensional space, C i represents the i-th cluster, μ i represents the center of the i-th cluster.

5. The method for predicting user mobility behavior based on a large language model according to claim 1, characterized in that: Driving the large language model to iteratively optimize the decision answer based on the feedback prompt includes: Adjust the input parameters of the large language model based on feedback prompts generated by the lightweight error correction model.

6. The method for predicting user mobility behavior based on a large language model according to claim 1, characterized in that: The lightweight error correction model is the BERT model.

7. A user mobility behavior prediction device based on a large language model, characterized in that: include: The first prediction module is used to obtain a user mobility dataset, which includes user ID, POI visit records, and timestamps, and generate a candidate set of predicted next POIs using a temporal attention network based on a rotation mechanism; The second prediction module is used to input the user movement dataset and candidate set into the large language model to generate preliminary behavior prediction results; A judgment module, configured to judge the preliminary behavior prediction result based on a lightweight error correction model; If the judgment is correct, the preliminary behavior prediction result is the final behavior prediction result; If the judgment is wrong, the reason for the prediction error is output and feedback prompts are generated; The third prediction module is used to drive the large language model to iteratively optimize the decision answer based on the feedback prompt to generate a final behavior prediction result.

8. An electronic device comprising a memory and a processor, characterized in that: The memory is coupled to the processor; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the user mobility behavior prediction method based on a large language model as described in any one of claims 1-6 above.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for predicting user mobility behavior based on a large language model as described in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the method for predicting user mobility behavior based on a large language model as described in any one of claims 1 to 6.