A method for inferring individual travel trajectories using general artificial intelligence technology
Through general artificial intelligence technology and geospatial information optimization methods, high-quality individual travel trajectory data are generated, which solves the problems of complexity and uncertainty of individual behavior in the existing technology, and improves the accuracy and decision-making science of urban transportation and planning. sex.
Patent Information
- Application Number
- CN202410506874.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-04-25
AI Technical Summary
Existing individual trajectory data prediction and generation techniques are difficult to fully capture the complexity and uncertainty of individual behavior, as well as the highly complex interaction between individuals and the environment, especially at the meso-microscopic scale, accuracy and versatility are limited.
Using general artificial intelligence technology, by constructing and training basic large language models, combining geospatial information for optimization, using geospatial scene information encoder to process data, generate natural language instructions to output individual travel trajectories, and use Frecher distance and Kullback-Leibler divergence evaluate the authenticity and accuracy of trajectory generation.
Provide high-quality individual travel simulation data, improve the accuracy of urban traffic simulation and planning, can better predict user needs and distribution, enhance the scientific nature of decision-making, and predict crowd trends in emergency management to avoid emergency accidents. .
Smart Images

Figure CN118377978B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of geospatial artificial intelligence and urban governance technology, and in particular to a method for inferring individual travel trajectories using general artificial intelligence technology. Background Art
[0002] Individual trajectory data prediction and generation technology is of great significance to urban planning and management, traffic management and other fields, mainly in the following aspects. First, traffic flow optimization: by predicting individual mobility patterns in a specific area, it can help traffic planners optimize traffic flow, reduce traffic congestion, and improve road use efficiency; second, urban planning and infrastructure layout: trajectory data can reveal the activity hotspots and mobility trends of the crowd, and provide data support for urban planning and public facilities layout, such as where to build new parks, shopping malls, hospitals or public transportation facilities; third, emergency management: in the event of natural disasters or public health events, trajectory prediction and generation technology can efficiently evacuate people, allocate resources and track them. Fourth, personalized services: in the commercial field, by analyzing the customer's movement trajectory, companies can provide more personalized services and promotions to improve customer satisfaction and loyalty.
[0003] Recent research in the field of generating and predicting individual trajectory data has made significant progress, leveraging a wide range of methodologies from traditional human mobility models to cutting-edge deep learning methods such as graph neural networks (GNNs).
[0004] (1) Traditional human mobility model
[0005] Traditional models for predicting and generating human mobility patterns often rely on statistical and mathematical models to capture the regularity of human mobility, including:
[0006] Gravitational models: Inspired by Newton’s law of universal gravitation, these models predict the flow of people from one location to another based on the “quality” of the locations (population size, economic activity) and the distances between them;
[0007] Markov chains: used to model the probability of moving from one location to another based on the current state or position. These models are simple but effective in capturing short-term dependencies.
[0008] Hawkes Process: Used to model self-excited temporal events, Hawkes processes have been used to predict the occurrence of an individual's next location by considering the sequence of the individual's past locations.
[0009] (2) Machine Learning Model
[0010] With the advent of machine learning, especially deep learning, the ability to model complex trajectory data has greatly improved:
[0011] Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks: These networks are particularly well suited for sequential data and have been widely used to predict future positions by learning sequences of historical trajectories;
[0012] Convolutional Neural Networks (CNNs): Although traditionally used for image processing, CNNs have been adapted to process spatiotemporal trajectory data, capturing spatial dependencies between locations.
[0013] (3) Graph Neural Networks (GNNs)
[0014] GNNs have become a powerful tool for trajectory prediction due to their ability to model the complex non-Euclidean structure of spatial data:
[0015] Spatio-Temporal Graph Convolutional Networks (ST-GCNs): These models exploit graph convolution operations to capture spatial dependencies between locations and temporal dependencies over time, providing excellent performance in predicting future trajectories;
[0016] Dynamic Graph Neural Networks: To model changing relationships between positions, dynamic GNNs adjust the structure of the graph over time to reflect changes in the underlying spatial network.
[0017] (4) Generative Model
[0018] Generative models, especially generative adversarial networks (GANs), have been used to generate realistic individual trajectory data:
[0019] Trajectory GANs: By learning the distribution of real trajectory data, these models can generate new trajectories that mimic the statistical properties of the observed data for use in data augmentation and simulation;
[0020] Variational Autoencoders (VAEs): VAEs have also been applied to generate new trajectories by learning a latent representation of trajectory data, from which new data points can then be sampled.
[0021] Existing research still finds it difficult to fully grasp the complexity and uncertainty of individual behavior, as well as the highly complex interactions between individuals and the environment. Various models are too general and abstract. Although they can reflect the movement patterns of large-scale groups at the macro level, their accuracy and versatility are greatly restricted at the meso and micro scales.
[0022] Currently, no effective solution has been proposed for the problems in the related technologies. Summary of the invention
[0023] In response to the problems in the related technology, the present invention proposes a method for inferring individual travel trajectories using general artificial intelligence technology to overcome the above-mentioned technical problems existing in the existing related technology.
[0024] To this end, the specific technical solution adopted by the present invention is as follows:
[0025] A method for inferring individual travel trajectories using general artificial intelligence technology, the method comprising the following steps:
[0026] S1. Build and train a basic large language model;
[0027] S2. Based on the acquired geographic spatial information, the trained basic large language model is optimized to obtain an optimized basic large language model;
[0028] S3. Use the optimized basic large language model to output individual travel trajectories corresponding to natural language instructions.
[0029] Further, based on the acquired geospatial information, the trained basic large language model is optimized to obtain the optimized basic large language model, including the following steps:
[0030] S21. Based on the acquired geospatial information, construct and use a geospatial scene information encoder for data processing;
[0031] S22, based on the data processing results and combined with the actual individual travel trajectory data, obtaining instruction data;
[0032] S23. Input the instruction data into the trained basic large language model to obtain an optimized basic large language model.
[0033] Further, based on the acquired geospatial information, constructing and utilizing a geospatial scene information encoder for data processing includes the following steps:
[0034] S211. Based on the distance filtering method, the acquired geographic spatial information is cleaned to remove redundant points and outliers;
[0035] S212, dividing the cleaned geographic spatial information into global spatial geographic information data, local spatial geographic information data and individual spatial geographic information data;
[0036] S213, using a geospatial scene information encoder to process the global spatial geographic information data, the local spatial geographic information data and the individual spatial geographic information data respectively.
[0037] Furthermore, the calculation formula based on the distance filtering method is:
[0038] ;
[0039] In the formula, Expressed as calculating two consecutive points The great circle distance between
[0040] Expressed as the radius of the Earth;
[0041] Represented as two consecutive points The latitude difference between
[0042] Expressed as Latitude;
[0043] Expressed as Latitude;
[0044] Represented as two consecutive points The difference in longitude between .
[0045] Furthermore, using the geospatial scene information encoder to process the global spatial geographic information data, the local spatial geographic information data and the individual spatial geographic information data respectively includes the following steps:
[0046] S2131, dividing the geospatial scene information encoder into a global scene information encoder, a local scene information encoder and an individual attribute information encoder;
[0047] S2132, converting the global spatial geographic information data into raster data according to the global scene information encoder;
[0048] S2133, converting the local spatial geographic information data into natural language text according to the local scene information encoder;
[0049] S2134. Convert individual spatial geographic information data into natural language text according to the individual attribute information encoder.
[0050] Furthermore, inputting the instruction data into the trained basic large language model to obtain an optimized basic large language model includes the following steps:
[0051] S231, normalizing the acquired instruction data;
[0052] S232, integrate the PEFT method into the trained basic large language model;
[0053] S233, setting parameters, and optimizing the parameters using the normalized instruction data to obtain an optimized basic large language model;
[0054] S234. Evaluate the optimized basic large language model.
[0055] Furthermore, evaluating the optimized basic large language model includes the following steps:
[0056] S2341, dividing the acquired geospatial information into a training set and a test set;
[0057] S2342, using a geospatial scene information encoder, converting the test set into a test natural language text;
[0058] S2343, inputting the test natural language text into the optimized basic large language model, and obtaining the authenticity test result indicator of the complete trajectory generation and the accuracy test result indicator of the next prediction;
[0059] S2344. Analyze the authenticity test result indicators of the complete trajectory generation and the accuracy test result indicators of the next step prediction to obtain the evaluation results of the optimized basic large language model.
[0060] Furthermore, the test natural language text is input into the optimized basic large language model to obtain the authenticity test result indicator of the complete trajectory generation, including the following steps:
[0061] Extract individual information from the test natural language text, and input the individual information into the optimized basic large language model to obtain virtual individual travel trajectory data;
[0062] The Fréchet distance and Kullback-Leibler divergence are used to compare the similarity between the virtual individual travel trajectory data and the actual individual travel trajectory data, and the authenticity test result indicators of the complete trajectory generation are obtained.
[0063] Furthermore, the calculation formula of Fréchet distance is:
[0064] ;
[0065] In the formula, It is expressed as the Fréchet distance between trajectories A and B;
[0066] Indicates a search for all mappings and , get the mapping pair that minimizes the maximum distance;
[0067] Represented as a trajectory;
[0068] Represented as a trajectory;
[0069] Represented as a trajectory from the unit interval [0,1] to The mapping of
[0070] Represented as a trajectory from the unit interval [0,1] to The mapping of
[0071] Represented as parameterized time;
[0072] It is mapping and Next, corresponding point and corresponding points The Euclidean distance between
[0073] The calculation formula of Kullback-Leibler divergence is:
[0074] ;
[0075] In the formula, Represented as a trajectory Relative to the trajectory KL divergence of
[0076] Represented as a trajectory;
[0077] Represented as a trajectory;
[0078] Expressed as the total number of feature classes;
[0079] Represented as one of the feature classes;
[0080] Represented as a trajectory Assigned to feature class The proportion of trajectory points;
[0081] Represented as a trajectory Assigned to feature class The ratio of trajectory points.
[0082] Furthermore, inputting the test natural language text into the optimized basic large language model to obtain the accuracy test result index of the next prediction includes the following steps:
[0083] Randomly select trajectory points from the test natural language text and record the true information vector of the trajectory points;
[0084] All the track points before the track point are converted into individual natural language texts using the geospatial scene information encoder;
[0085] Input the individual natural language text into the optimized basic large language model to obtain the prediction information vector of the trajectory point;
[0086] Calculate the cosine similarity between the true information vector and the predicted information vector to obtain the accuracy test result indicator for the next prediction.
[0087] The beneficial effects of the present invention are:
[0088] 1. The present invention provides a high-resolution data source through a technical approach to generate high-quality individual travel simulation data on a large scale, which is useful for fields such as urban traffic simulation, new district construction, and old city renewal that require accurate simulation of user needs and distribution, and helps to better predict the implementation effect of the plan, evaluate the advantages and disadvantages of the plan, and improve the scientific nature of the decision.
[0089] 2. The present invention can be used to predict the possible future distribution and action characteristics of a large number of users through a technical method for predicting future trajectory points. In the field of urban transportation, it can be used to estimate the distribution of future urban traffic loads. In the field of personalized recommendations, it can be used to predict user actions in advance and provide timely information recommendations based on geographic locations. In the field of emergency management, it can be used to predict the future movements of a large number of people and avoid the occurrence of emergencies.
[0090] 3. The present invention, through a technical method for interpolating missing trajectory data, helps to improve the quality of trajectory data and increase the scientificity and reliability of its application. At the same time, it is of great significance for the analysis, prediction and application of trajectory data, and can provide more accurate results and more reliable decision-making basis. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. 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 paying creative work.
[0092] Figure 1 It is a flowchart of a method for inferring individual travel trajectories using general artificial intelligence technology according to an embodiment of the present invention. DETAILED DESCRIPTION
[0093] To further illustrate each embodiment, the present invention provides drawings, which are part of the disclosure of the present invention and are mainly used to illustrate the embodiments. They can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementation methods and advantages of the present invention.
[0094] According to an embodiment of the present invention, a method for inferring individual travel trajectories using general artificial intelligence technology is provided.
[0095] The present invention will now be further described with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, according to an embodiment of the present invention, a method for inferring individual travel trajectories using general artificial intelligence technology includes the following steps:
[0096] S1. Build and train a basic large language model.
[0097] It should be noted that a pre-trained open source large language base model (such as Llama2, ChatGLM3) is deployed on a single machine or distributed computer system, and the basic large language model is the Llama2 model.
[0098] In addition, the basic large language model is evaluated on its grasp of geographical knowledge of the city where the trajectory is located; the ability to interpret geospatial data is evaluated, mainly the ability to understand the geospatial information and features of different trajectory residence points, and the accuracy of the description of trajectory data; spatial reasoning ability, such as the ability to calculate the relative geospatial relationship (such as distance) between different coordinate points;
[0099] Structured queries and prompts: Design a series of questions and prompts covering a wide range of geospatial concepts and scenarios, both qualitatively and quantitatively, to test the model's comprehensive understanding; Geospatial datasets: Use a variety of geospatial datasets related to this task, including trajectory data, as well as background data such as rasterized land use data, road traffic data, and POI data, and ask the model about its understanding of the inherent structure of these data; for example, input a string of trajectory points of the form {(x1,y1); (x2y2); ...; (xnyn)}, and the basic large language model calculates the geographic distance between any two points.
[0100] S2. Based on the acquired geographic spatial information, the trained basic large language model is optimized to obtain an optimized basic large language model.
[0101] Specifically, based on the acquired geographic spatial information, the trained basic large language model is optimized to obtain the optimized basic large language model, including the following steps:
[0102] S21. Based on the acquired geospatial information, construct and utilize a geospatial scene information encoder for data processing.
[0103] Specifically, based on the acquired geospatial information, constructing and using the geospatial scene information encoder for data processing includes the following steps:
[0104] S211. Based on the distance filtering method, the acquired geographic spatial information is cleaned to remove redundant points and outliers.
[0105] Specifically, the calculation formula based on the distance filtering method is:
[0106] ;
[0107] In the formula, Expressed as calculating two consecutive points The great circle distance between
[0108] Expressed as the radius of the Earth (mean radius = 6,371 km);
[0109] Represented as two consecutive points The latitude difference between
[0110] Expressed as Latitude;
[0111] Expressed as Latitude;
[0112] Represented as two consecutive points The difference in longitude between .
[0113] It should be noted that the relative geographic location information is calculated for each track coordinate point, which includes two pieces of information: the great circle distance D between track point i and the previous track point j ij , the great circle distance D from the residence r ir .
[0114] S212, dividing the cleaned geographic spatial information into global spatial geographic information data, local spatial geographic information data and individual spatial geographic information data.
[0115] S213, using a geospatial scene information encoder to process the global spatial geographic information data, the local spatial geographic information data and the individual spatial geographic information data respectively.
[0116] Specifically, using the geospatial scene information encoder to process the global spatial geographic information data, the local spatial geographic information data and the individual spatial geographic information data respectively includes the following steps:
[0117] S2131. Divide the geospatial scene information encoder into a global scene information encoder, a local scene information encoder and an individual attribute information encoder.
[0118] S2132. Convert the global spatial geographic information data into raster data according to the global scene information encoder.
[0119] It should be noted that global spatial geographic information data mainly includes two categories: land use data and road traffic data;
[0120] For land use data, convert land use types such as park green land, administrative office land, commercial and financial land, etc. into corresponding discrete digital codes LU i , thereby converting vector land use data into raster grayscale images;
[0121] Therefore, all points in the entire city can be represented as (x i ,y i ,LU i ), and then convert it into a GeoTiff format image that can be recognized by the basic large language model. Each grid point on this image corresponds to a location with coordinates x, y, and its grayscale value is LU i .
[0122] For road traffic data, the spatial distribution of road network density is calculated. The weight of main roads (including expressways), secondary roads, and branch roads is 5:3:1 to calculate the enhanced road network kernel density map in the entire range. For a location i, a circle is drawn with r as the estimated radius (r is 1500 meters). The kernel density calculation formula is as follows:
[0123] ;
[0124] In the formula, Represented as location i The kernel density of
[0125] Represented as a road;
[0126] Represented as a road inside a circle k ;
[0127] Represented as a road k The weight corresponding to the level;
[0128] Represented as location i The area of the circle.
[0129] Therefore, all points in the entire city can be represented as (x i ,y i ,KDE i), and then convert it into a GeoTiff format image that can be recognized by the basic large language model. Each grid point in this image corresponds to a location with coordinates x, y, and its grayscale value is KDE i .
[0130] S2133. Convert the local spatial geographic information data into natural language text according to the local scene information encoder.
[0131] It should be noted that the local spatial geographic information data includes the geographic coordinate data, housing price data, POI data, and road network data of the place. The economic and social attributes of the surrounding areas of the trajectory point i are generated by using the geographic coordinate data, housing price data, POI data, and road network data of the place, including the location LOC of the place. i (great circle distance from the city center, continuous value), land price HP i (Divided into 5 levels: high, relatively high, medium, relatively low, and low, with discrete values), the density of public facilities and commercial facilities FAC i (Divided into 5 levels: high, relatively high, medium, relatively low, and low, discrete values), road network density RD i (Divided into 5 levels: high, relatively high, medium, relatively low, and low, with discrete values), among which the classification of land price, facility density, and road network density uses the natural breakpoint method, and its calculation formula is:
[0132] For a set of features , which is divided into 5 levels;
[0133] ;
[0134] In the formula, It is expressed as the intra-class variance;
[0135] It is expressed as the number of features;
[0136] Represented as a certain feature category;
[0137] Expressed as i The value of a data point in the class data point;
[0138] Expressed as i The collection of data points in the class;
[0139] Expressed as i The mean of the data points in the class.
[0140] A dynamic programming algorithm is used to iteratively adjust the classification boundaries until a classification method that minimizes the within-class variance is found.
[0141] S2134. Convert individual spatial geographic information data into natural language text according to the individual attribute information encoder.
[0142] It should be noted that individual spatial geographic information data includes the geographic information of the place of residence, the place of work and the surrounding areas. For the identification of the place of residence, the location where the user stays in the evening and the length of stay are counted, and the location where the user stays the longest in the evening is selected as the place of residence, which is recorded as (x h ,y h ); Similarly, by counting the location where the longest stay is during the daytime, it is taken as the work location, recorded as (x w ,y w ); Use the local scene information encoder to obtain the geographical background information of the residence and work place, which are recorded as (LOC h ,HP h ,FAC h ,RD h ) and (LOC w ,HP w ,FAC w ,RD w ).
[0143] In addition, for the form {(t1,p1),(t2,p2),...,(t n ,p n )}’s trajectory data:
[0144] (1) Identify the place of residence p from the trajectory h and work place w ;
[0145] (2) Parsing the information of residence and work place based on the individual attribute information encoder;
[0146] (3) Use a fixed template to fill in the parsed information, where the fixed template is, for example, "Individual basic information: The individual lives in a city Kilometers away, surrounding housing prices , the density of surrounding public facilities , commercial facility density , road network density ; Individuals work in areas far from the city center Kilometers away, surrounding housing prices , the density of surrounding public facilities , commercial facility density , road network density ”;
[0147] (4) Calculate the great circle distance between every two connected trajectory points, and the great circle distance between each trajectory point and the residence, except for the residence and the workplace;
[0148] (5) Use a fixed template to fill in the parsed information, where the fixed template is, for example: Time, arrival distance to the previous location Kilometers, distance from home km location”;
[0149] (6) Combine the text information of (3) and (5) above, such as: "Individual basic information: The individual lives in an area 20 kilometers away from the city center, with high housing prices, low density of surrounding public facilities, high density of commercial facilities, and medium road network density; the individual works in an area 3 kilometers away from the city center, with high housing prices, high density of surrounding public facilities, high density of commercial facilities, and high road network density; individual trajectory information: left home at 8:30 in the morning; arrived at the company at 10:00 in the morning; arrived at a location 3 kilometers away from the previous location and 15 kilometers away from home at 12:00 noon; returned to the company at 14:00 in the afternoon; arrived at a location 9 kilometers away from the previous location and 5 kilometers away from home at 18:00 in the afternoon; returned home at 21:00 in the evening".
[0150] S22. Based on the data processing results and in combination with the actual individual travel trajectory data, obtain instruction data.
[0151] S23. Input the instruction data into the trained basic large language model to obtain an optimized basic large language model.
[0152] Specifically, inputting the instruction data into the trained basic large language model to obtain the optimized basic large language model includes the following steps:
[0153] S231, normalize the acquired instruction data.
[0154] S232. Integrate the PEFT method into the trained basic large language model.
[0155] It should be noted that the PEFT method is integrated with the trained basic large language model; specifically, first, an adapter is inserted, that is, an adapter layer is added to the trained basic large language model, which can be a simple feedforward network with a bottleneck structure; second, the original parameters are frozen, that is, the parameters of the trained basic large language model are kept frozen to prevent them from being updated during training.
[0156] S233, setting parameters, and optimizing the parameters using the normalized instruction data to obtain an optimized basic large language model.
[0157] It should be noted that setting parameters, including learning rate, batch size, and number of iterations, only focuses on the trainable parameters introduced by the PEFT method; running the training process adjusts the adapter to suit the task while keeping the original model unchanged; monitoring convergence and making adjustments as needed.
[0158] S234. Evaluate the optimized basic large language model.
[0159] Specifically, evaluating the optimized basic large language model includes the following steps:
[0160] S2341. Divide the acquired geographic spatial information into a training set and a test set.
[0161] S2342. Use the geospatial scene information encoder to convert the test set into test natural language text.
[0162] S2343. Input the test natural language text into the optimized basic large language model to obtain the authenticity test result indicator of the complete trajectory generation and the accuracy test result indicator of the next prediction.
[0163] S2344. Analyze the authenticity test result indicators of the complete trajectory generation and the accuracy test result indicators of the next step prediction to obtain the evaluation results of the optimized basic large language model.
[0164] Specifically, inputting the test natural language text into the optimized basic large language model to obtain the authenticity test result indicator of the complete trajectory generation includes the following steps:
[0165] Extract individual information from the test natural language text, and input the individual information into the optimized basic large language model to obtain virtual individual travel trajectory data;
[0166] The Fréchet distance and Kullback-Leibler divergence are used to compare the similarity between the virtual individual travel trajectory data and the actual individual travel trajectory data, and the authenticity test result indicators of the complete trajectory generation are obtained.
[0167] Specifically, the calculation formula of Fréchet distance is:
[0168] ;
[0169] In the formula, It is expressed as the Fréchet distance between trajectories A and B;
[0170] Indicates a search for all mappings and , get the mapping pair that minimizes the maximum distance;
[0171] Represented as a trajectory;
[0172] Represented as a trajectory;
[0173] Represented as a trajectory from the unit interval [0,1] to The mapping of
[0174] Represented as a trajectory from the unit interval [0,1] to The mapping of
[0175] Represented as a parameterized time, allowing mapping and "Walking" at different speeds on the track;
[0176] It is mapping and Next, corresponding point and corresponding points The Euclidean distance between
[0177] It is necessary to add that and is a continuous and surjective (i.e., covering the entire trajectory) mapping from the unit interval to trajectories A and B; t is a parameter ranging from 0 to 1, representing the location of the mapping;
[0178] The calculation formula of Kullback-Leibler divergence is:
[0179] ;
[0180] In the formula, Represented as a trajectory Relative to the trajectory KL divergence of
[0181] Represented as a trajectory;
[0182] Represented as a trajectory;
[0183] Expressed as the total number of feature classes;
[0184] Represented as one of the feature classes;
[0185] Represented as a trajectory Assigned to feature class The proportion of trajectory points;
[0186] Represented as a trajectory Assigned to feature class The ratio of trajectory points.
[0187] It should be noted that, and For all ,if , then the corresponding terms are considered to be 0, because for any number x, we have:
[0188] ;
[0189] After obtaining the Fréchet distance and Kullback-Leibler divergence, each metric is normalized to the range [0,1] and the comprehensive similarity is calculated:
[0190] S=w1*(1-standardized Fréchet distance)+w2*(1-standardized KL divergence)
[0191] in, is the weight that represents the importance of each component.
[0192] Specifically, inputting the test natural language text into the optimized basic large language model to obtain the accuracy test result indicator for the next prediction includes the following steps:
[0193] Randomly select trajectory points from the test natural language text and record the true information vector of the trajectory points;
[0194] All the track points before the track point are converted into individual natural language texts using the geospatial scene information encoder;
[0195] Input the individual natural language text into the optimized basic large language model to obtain the prediction information vector of the trajectory point;
[0196] Calculate the cosine similarity between the true information vector and the predicted information vector to obtain the accuracy test result indicator for the next prediction.
[0197] It should be noted that the calculation formula of cosine similarity is:
[0198] ;
[0199] In the formula, Represents a random selection of j The true information vector of each point;
[0200] Represents a random selection of j The prediction information vector of each point;
[0201] Among them, the real information vector is the real time information and position information expressed as a vector, that is, ; The prediction information vector is the predicted time information and position information expressed as a vector, that is, .
[0202] S3. Use the optimized basic large language model to output individual travel trajectories corresponding to natural language instructions.
[0203] It should be noted that the deployment of the basic large language model includes:
[0204] Choose a deployment platform; you can use cloud services such as AWS SageMaker, Google AI Platform, Azure Machine Learning, etc., or deploy locally using Docker to build a self-hosted solution;
[0205] Set up the inference API; first, API development. Use Python's Flask or FastAPI framework to create an API that receives input data, processes it through the model, and returns the model's prediction results. Then, containerize the API. Use Docker to containerize the API to ensure consistency and easy deployment in different environments.
[0206] Scaling and load balancing: For horizontal scaling, use a load balancer to distribute incoming API requests to multiple model API instances to handle high traffic; for automatic scaling, use the automatic scaling function provided by the cloud service to automatically adjust the number of instances according to the load;
[0207] Monitoring and maintenance; Logging: Implement logging of requests, responses, and errors to monitor the health and usage of the API; Performance monitoring: Use tools to monitor latency and throughput of the API and adjust resources as needed; Update strategy: Plan to update models or APIs with minimal downtime, using strategies such as blue-green deployment or rolling updates;
[0208] Security considerations; Authentication and authorization: Implement security measures to control access to the API, such as API keys, OAuth tokens, or other authentication mechanisms; Input validation: Ensure that the API validates input data to prevent malicious use or errors that could cause the model to crash;
[0209] Documentation and client libraries: Provide developers with clear API documentation that details how to send requests to the API and the expected responses.
[0210] In addition, it should be noted that the use of the optimized basic large language model to output the individual travel trajectory corresponding to the natural language instruction includes the following steps:
[0211] Input instructions and generate a complete individual travel trajectory through inference; input the pre-set individual attribute information into the optimized basic large language model, and generate a complete individual travel chain within a day through inference through the instructions;
[0212] Command example: Individual travel trajectory generation <![CDATA[There is currently a resident with the following individual basic information: living in an area with longitude and latitude of (x1, y1), where the surrounding housing prices are high, the density of surrounding public facilities is low, the density of commercial facilities is relatively high, and the road network density is medium; the individual works in an area with longitude and latitude of (x2, y2), where the surrounding housing prices are high, the density of surrounding public facilities is high, the density of commercial facilities is high, and the road network density is high; Please generate a complete travel trajectory of this individual within a day based on the above information, including the timestamps, longitude and latitude of each stop point.]]>
[0213] Input instructions to infer the next destination of the individual; based on the pre-set individual attribute information, input it together with the trajectory information that the individual has already generated into the optimized basic large language model, and generate the most likely next destination of the individual through model inference through instructions.
[0214] Example command: Infer the next destination of an individual <![CDATA[There is currently a resident with the following individual basic information: living in an area with longitude and latitude coordinates (x1, y1), where the surrounding housing prices are high, the density of surrounding public facilities is low, the density of commercial facilities is relatively high, and the road network density is medium; the individual works in an area with longitude and latitude coordinates (x2, y2), where the surrounding housing prices are high, the density of surrounding public facilities is high, the density of commercial facilities is high, and the road network density is high; the individual's movement trajectory up to now today is as follows: leaving home at 8:30 in the morning; arriving at the company at 10:00 in the morning; arriving at a location 3 kilometers away from the previous location and 15 kilometers away from home at 12:00 noon; returning to the company at 14:00 in the afternoon; Based on the above information, infer the most likely next destination of the individual, and give the timestamp, longitude, and latitude of the stop point.]]>
[0215] Input instructions to interpolate a missing dwelling point between two dwelling points of the individual trajectory; according to the pre-set individual attribute information, input it together with the trajectory information with missing trajectory points that the individual has already generated into the optimized basic large language model, and the model supplements the missing dwelling point information through instructions.
[0216] Example: Interpolate a missing dwell point between two dwell points of an individual trajectory <![CDATA[There is currently a resident with the following individual basic information: living in an area with longitude and latitude coordinates (x1, y1), where the surrounding housing prices are high, the density of surrounding public facilities is low, the density of commercial facilities is relatively high, and the road network density is medium; the individual works in an area with longitude and latitude coordinates (x2, y2), where the surrounding housing prices are high, the density of surrounding public facilities is high, the density of commercial facilities is high, and the road network density is high; the individual's movement trajectory up to now today is as follows: leaving home at 8:30 in the morning; arriving at the company at 10:00 in the morning; arriving at a location 3 kilometers away from the previous location and 15 kilometers away from home at 12:00 noon; returning to the company at 14:00 in the afternoon; there are data missing problems in the above movement trajectory, and the individual visited another location between 10:00 in the morning and 12:00 noon; please infer this location and give the visit timestamp, longitude and latitude of this location.]]>
[0217] In summary, with the help of the above technical solution of the present invention, through a technical approach to generate high-quality individual travel simulation data on a large scale, a high-resolution data source is provided for fields such as urban traffic simulation, new district construction, and old city renewal that require accurate simulation of user needs and distribution, which helps to better predict the implementation effect of the plan, evaluate the advantages and disadvantages of the plan, and improve the scientific nature of decision-making. Through a technical method for predicting future trajectory points, it can be used to predict the possible future distribution and action characteristics of a large number of users, in the field of urban transportation, it can be used to estimate the distribution of future urban traffic loads, in the field of personalized recommendations, it can be used to predict user actions in advance and give timely information recommendations based on geographical locations, and in the field of emergency management, it can be used to predict the future trends of a large number of people and avoid the occurrence of emergencies. Through a technical method for interpolating missing trajectory data, it helps to improve the quality of trajectory data, increase the scientific nature and reliability of its application, and at the same time, it is of great significance for the analysis, prediction and application of trajectory data, and can provide more accurate results and more reliable decision-making basis.
[0218] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for inferring individual travel trajectories using general artificial intelligence technology, It is characterized in that The method comprises the following steps: S1. Build and train a basic large language model; S2. Based on the acquired geographic spatial information, the trained basic large language model is optimized to obtain an optimized basic large language model; S3, using the optimized basic large language model to output individual travel trajectories corresponding to natural language instructions; The step of optimizing the trained basic large language model based on the acquired geographic spatial information to obtain the optimized basic large language model comprises the following steps: S21. Based on the acquired geospatial information, construct and use a geospatial scene information encoder for data processing; S22, based on the data processing results and combined with the actual individual travel trajectory data, obtaining instruction data; S23, inputting the instruction data into the trained basic large language model to obtain an optimized basic large language model; The step of constructing and using a geospatial scene information encoder to process data based on the acquired geospatial information includes the following steps: S211. Based on the distance filtering method, the acquired geographic spatial information is cleaned to remove redundant points and outliers; S212, dividing the cleaned geographic spatial information into global spatial geographic information data, local spatial geographic information data and individual spatial geographic information data; S213, using a geospatial scene information encoder to perform data processing on the global spatial geographic information data, the local spatial geographic information data, and the individual spatial geographic information data; The method of using the geospatial scene information encoder to process the global spatial geographic information data, the local spatial geographic information data and the individual spatial geographic information data comprises the following steps: S2131, dividing the geospatial scene information encoder into a global scene information encoder, a local scene information encoder and an individual attribute information encoder; S2132, converting the global spatial geographic information data into raster data according to the global scene information encoder; S2133, converting the local spatial geographic information data into natural language text according to the local scene information encoder; S2134, converting the individual spatial geographic information data into natural language text according to the individual attribute information encoder; The step of inputting the instruction data into the trained basic large language model to obtain the optimized basic large language model comprises the following steps: S231, normalizing the acquired instruction data; S232, integrate the PEFT method into the trained basic large language model; S233, setting parameters, and optimizing the parameters using the normalized instruction data to obtain an optimized basic large language model; S234. Evaluate the optimized basic large language model.
2. According to claim 1, a method for inferring individual travel trajectories using general artificial intelligence technology, It is characterized in that The calculation formula based on the distance filtering method is: ; In the formula, Expressed as calculating two consecutive points The great circle distance between Expressed as the radius of the Earth; Represented as two consecutive points The latitude difference between Expressed as Latitude; Expressed as Latitude; Represented as two consecutive points The difference in longitude between .
3. According to claim 1, a method for inferring individual travel trajectories using general artificial intelligence technology, It is characterized in that The evaluation of the optimized basic large language model comprises the following steps: S2341, dividing the acquired geospatial information into a training set and a test set; S2342, using a geospatial scene information encoder, converting the test set into a test natural language text; S2343, inputting the test natural language text into the optimized basic large language model, and obtaining the authenticity test result indicator of the complete trajectory generation and the accuracy test result indicator of the next prediction; S2344. Analyze the authenticity test result indicators of the complete trajectory generation and the accuracy test result indicators of the next step prediction to obtain the evaluation results of the optimized basic large language model.
4. A method for inferring individual travel trajectories using general artificial intelligence technology according to claim 3, It is characterized in that The step of inputting the test natural language text into the optimized basic large language model to obtain the authenticity test result indicator of the complete trajectory generation includes the following steps: Extract individual information from the test natural language text, and input the individual information into the optimized basic large language model to obtain virtual individual travel trajectory data; The Fréchet distance and Kullback-Leibler divergence are used to compare the similarity between the virtual individual travel trajectory data and the actual individual travel trajectory data, and the authenticity test result indicators of the complete trajectory generation are obtained.
5. A method for inferring individual travel trajectories using general artificial intelligence technology according to claim 4, It is characterized in that The calculation formula of the Fréchet distance is: ; In the formula, It is expressed as the Fréchet distance between trajectories A and B; Indicates a search for all mappings and , get the mapping pair that minimizes the maximum distance; Represented as a trajectory; Represented as a trajectory; Represented as a trajectory from the unit interval [0,1] to The mapping of Represented as a trajectory from the unit interval [0,1] to The mapping of Represented as parameterized time; It is mapping and Next, corresponding point and corresponding points The Euclidean distance between The calculation formula of the Kullback-Leibler divergence is: ; In the formula, Represented as a trajectory Relative to the trajectory KL divergence of Represented as a trajectory; Represented as a trajectory; Expressed as the total number of feature classes; Represented as one of the feature classes; Represented as a trajectory Assigned to feature class The proportion of trajectory points; Represented as a trajectory Assigned to feature class The ratio of trajectory points.
6. A method for inferring individual travel trajectories using general artificial intelligence technology according to claim 3, It is characterized in that The step of inputting the test natural language text into the optimized basic large language model to obtain the accuracy test result indicator of the next prediction includes the following steps: Randomly select trajectory points from the test natural language text and record the true information vector of the trajectory points; All the track points before the track point are converted into individual natural language texts using the geospatial scene information encoder; Input the individual natural language text into the optimized basic large language model to obtain the prediction information vector of the trajectory point; Calculate the cosine similarity between the true information vector and the predicted information vector to obtain the accuracy test result indicator for the next prediction.
Citation Information
Patent Citations
Travel future trajectory prediction method and device, storage medium and electronic equipment
CN110414732A
Intelligent agent trajectory prediction method, system and device and storage medium
CN114022847A
Customized pedestrian trajectory prediction method based on online updating strategy
CN114611663A
Ad-HOC navigation instructions
WO2024019710A1
