Pedestrian moving track recovery method, apparatus and device, and storage medium

Through deep learning model and feature fusion technology, the difficulties of the existing technology in modeling complex pedestrian movement patterns are solved, and the effect of restoring the original moving trajectory from the historical trajectory is achieved, which improves the trajectory data quality and downstream application performance.

CN119600059APending Publication Date: 2025-03-11CHONGQING RURAL COMMERCIAL BANK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411549917.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The prior art faces difficulties in modeling complex and changeable pedestrian movement patterns, resulting in limited performance in trajectory recovery.

Method used

By inputting the user's historical trajectory information into the preset deep learning model, extracting the position vector and performing convolution operations, the target movement behavior characteristics are obtained. Then, features are processed through attention model and feedforward neural network, combining spatiotemporal weights and long-term movement preference values, feature fusion is performed to predict missing locations.

Benefits of technology

Effectively model the user's movement mode, restore the user's original movement trajectory from long and sparse trajectory data, improving the quality of trajectory data and the performance and accuracy of downstream applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119600059A_ABST
    Figure CN119600059A_ABST
Patent Text Reader

Abstract

The invention discloses a pedestrian movement track recovery method and device, equipment and a storage medium, and relates to the field of movement track recovery, and the method comprises the steps: inputting a historical movement track of a target object into a preset deep learning model, and carrying out the convolution operation of a plurality of obtained position vectors, so as to obtain a target movement behavior feature; processing the target movement behavior features through a preset attention model and a preset feedforward neural network in sequence to obtain target trajectory features; determining a target long-term movement preference value of the target object through a preset space-time weight and a plurality of position vectors, and calculating the target long-term movement preference value and a position trend prediction value between the historical movement tracks; and carrying out feature fusion on the position trend prediction value, the target long-term movement preference value and the target track feature, and restoring the historical movement track according to the obtained fused feature value. Therefore, useful information can be extracted from the historical track information for modeling, so that track recovery can be performed on the missing historical track data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mobile trajectory recovery, and in particular to a method, device, equipment and storage medium for recovering the mobile trajectory of a pedestrian. Background Art

[0002] With the rapid development of geographic information technology, a large amount of pedestrian mobility data has emerged. These data have been widely used in spatiotemporal recommendation systems, including but not limited to personalized point of interest recommendations, route planning, and accurate push notifications of location-aware events. The success of these downstream tasks depends largely on the quality of their input trajectory data. However, trajectory data collected in the real world often have multiple quality issues, which directly affect the performance and accuracy of downstream tasks.

[0003] Therefore, in order to overcome these problems and improve the performance of downstream tasks, the trajectory recovery task is particularly important. Its core goal is to recover missing position records from the original sampled data, correct erroneous position information, and generate detailed and accurate trajectories. By providing high-quality trajectory data for downstream applications, the trajectory recovery task can not only enhance the performance of these applications, but also improve their accuracy, bringing a better experience to users.

[0004] Existing technologies usually use statistical methods, time series generation, next point of interest recommendation and other means to deal with trajectory recovery problems. However, these methods face great difficulties in modeling complex and changeable pedestrian movement patterns, resulting in limited performance. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and storage medium for recovering pedestrian movement trajectory, which can extract useful information from the user's historical trajectory information to model the user's movement pattern, so as to recover the user's original movement trajectory from long and sparse trajectory data. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a pedestrian movement trajectory recovery method, which is applied to a trajectory recovery system, comprising:

[0007] Inputting the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and performing a convolution operation on the number of position vectors to obtain target movement behavior features corresponding to the target object;

[0008] Processing the target movement behavior feature through a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and processing the trajectory feature through a preset feedforward neural network to obtain a target trajectory feature;

[0009] Determine the spatiotemporal weight corresponding to the historical movement trajectory, determine the target long-term movement preference value of the target object through the spatiotemporal weight and the plurality of position vectors, and calculate the similarity between the target long-term movement preference value and the historical movement trajectory to obtain a position trend prediction value;

[0010] The position trend prediction value, the target long-term movement preference value and the target trajectory feature are feature fused, and the missing position in the historical movement trajectory is predicted according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

[0011] Optionally, the historical movement trajectory of the target object is input into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and a convolution operation is performed on the number of position vectors to obtain target movement behavior features corresponding to the target object, including:

[0012] Inputting the historical movement trajectory of the target object into a preset deep learning model to convert the historical movement trajectory into a number of position vectors corresponding to a number of time nodes;

[0013] Performing weighted summation on the plurality of position vectors based on a preset convolution kernel to obtain movement behavior characteristics of the target object within a time range corresponding to the historical movement trajectory;

[0014] An activation value of a preset forget gate is determined according to the first preset training parameter and the movement behavior feature, and the movement behavior feature is screened according to the activation value to obtain a target movement behavior feature.

[0015] Optionally, the processing of the target movement behavior feature by a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature includes:

[0016] Inputting the target movement behavior feature into a preset attention model to calculate the discrete trajectory feature of the target object through a second preset training parameter and the target movement behavior feature;

[0017] The discrete trajectory features are concatenated to obtain the trajectory features of the target object.

[0018] Optionally, the processing the trajectory features by a preset feedforward neural network to obtain target trajectory features includes:

[0019] Inputting the trajectory feature into a preset feedforward neural network to process the trajectory feature through a third preset training parameter to obtain a processed trajectory feature;

[0020] The mean and variance of the processed trajectory features are calculated, and the processed trajectory features are normalized by the mean, variance, preset scaling parameters, and preset offset parameters to obtain target trajectory features.

[0021] Optionally, the determining the spatiotemporal weight corresponding to the historical movement trajectory includes:

[0022] Determine the temporal distance of the historical movement trajectory at different time nodes, and determine the spatial distance of the historical movement trajectory at different spatial locations;

[0023] Calculating the time weight corresponding to the historical movement trajectory based on the time distance by using a preset time weight function, and calculating the space weight corresponding to the historical movement trajectory based on the space distance by using a preset space weight function;

[0024] The product of the time weight and the space weight is calculated, and the obtained product is used as the spatiotemporal weight corresponding to the historical movement trajectory.

[0025] Optionally, determining the target long-term movement preference value of the target object by using the spatiotemporal weight and the plurality of position vectors, and calculating the similarity between the target long-term movement preference value and the historical movement trajectory to obtain a position trend prediction value includes:

[0026] Accumulating the spatiotemporal weight and the product of each position vector in the plurality of position vectors to obtain a target long-term movement preference value of the target moving object;

[0027] Calculating the similarity between the target long-term movement preference value and the historical movement trajectory through a fourth preset training parameter and the target trajectory feature;

[0028] The similarity is used as the weight of the target trajectory feature and weighted accumulation is performed to obtain a position trend prediction value.

[0029] Optionally, the performing feature fusion on the position trend prediction value, the target long-term movement preference value, and the target trajectory feature, and performing position prediction on the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position, includes:

[0030] Performing a connection operation on the position trend prediction value, the target long-term movement preference value, and the target trajectory feature, and rounding the obtained connection value to obtain a target connection value;

[0031] Calculating the product of the target connection value and the fourth preset training parameter to obtain a fused feature value;

[0032] Calculating the prediction probability between the fused feature value and the embedding vector corresponding to each position in the historical movement trajectory to obtain a number of prediction probabilities;

[0033] Extracting the target prediction probability with the largest probability value from the plurality of prediction probabilities, and taking the position corresponding to the target prediction probability as the target prediction position;

[0034] The target predicted position is inserted into the missing position in the historical movement trajectory to restore the historical movement trajectory.

[0035] In a second aspect, the present application discloses a pedestrian movement trajectory recovery device, which is applied to a trajectory recovery system, comprising:

[0036] A behavior feature determination module, used for inputting the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and performing a convolution operation on the number of position vectors to obtain a target movement behavior feature corresponding to the target object;

[0037] A trajectory feature determination module, used to process the target movement behavior feature through a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and process the trajectory feature through a preset feedforward neural network to obtain a target trajectory feature;

[0038] a similarity calculation module, used to determine the spatiotemporal weight corresponding to the historical movement trajectory, to determine the target long-term movement preference value of the target object through the spatiotemporal weight and the plurality of position vectors, and to calculate the similarity between the target long-term movement preference value and the historical movement trajectory, so as to obtain a position trend prediction value;

[0039] The trajectory restoration module is used to perform feature fusion on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and perform position prediction on the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

[0040] In a third aspect, the present application discloses an electronic device, comprising:

[0041] Memory, used to store computer programs;

[0042] The processor is used to execute the computer program to implement the pedestrian movement trajectory recovery method as described above.

[0043] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the pedestrian movement trajectory recovery method as described above.

[0044] In the present application, the historical movement trajectory of the target object is first input into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and a convolution operation is performed on the number of position vectors to obtain a target movement behavior feature corresponding to the target object; the target movement behavior feature is processed by a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and the trajectory feature is processed by a preset feedforward neural network to obtain a target trajectory feature; the spatiotemporal weight corresponding to the historical movement trajectory is determined to determine the target long-term movement preference value of the target object through the spatiotemporal weight and the number of position vectors, and the similarity between the target long-term movement preference value and the historical movement trajectory is calculated to obtain a position trend prediction value; the position trend prediction value, the target long-term movement preference value and the target trajectory feature are feature fused, and the missing position in the historical movement trajectory is predicted according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position. It can be seen that through the method of the present application, the historical movement trajectory of the target object can be input into the preset deep learning model, and the obtained several position vectors can be convolved to obtain the target movement behavior characteristics; the target movement behavior characteristics are processed in turn through the preset attention model and the preset feedforward neural network to obtain the target trajectory characteristics; the target long-term movement preference value of the target object is determined by the preset spatiotemporal weights and several position vectors, and the position trend prediction value between the target long-term movement preference value and the historical movement trajectory is calculated; the position trend prediction value, the target long-term movement preference value and the target trajectory characteristics are feature fused, and the historical movement trajectory is restored according to the obtained fused feature value. In this way, useful information can be extracted from the user's historical trajectory information to model the user's movement pattern, and the user's original movement trajectory can be restored from the long and sparse trajectory data. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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 or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0046] Figure 1 A flow chart of a method for restoring pedestrian movement trajectories disclosed in this application;

[0047] Figure 2 A processing timing diagram of a multi-granularity trajectory mode encoder disclosed in the present application;

[0048] Figure 3 A flowchart of a specific method for restoring pedestrian movement trajectories disclosed in this application;

[0049] Figure 4 A trajectory recovery model processing timing diagram disclosed in this application;

[0050] Figure 5 A flowchart of another specific method for restoring pedestrian movement trajectories disclosed in this application;

[0051] Figure 6 This is a schematic diagram of the structure of a pedestrian movement trajectory recovery device disclosed in this application;

[0052] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] In the existing technology, statistical methods, time series generation, next point of interest recommendation and other means are usually used to deal with the trajectory recovery problem. However, these methods face great difficulties in modeling complex and changeable pedestrian movement patterns, resulting in limited performance.

[0055] In order to overcome the above technical problems, the present application discloses a pedestrian movement trajectory recovery method, device, equipment and storage medium, which can extract useful information from the user's historical trajectory information to model the user's movement pattern, so as to recover the user's original movement trajectory from long and sparse trajectory data.

[0056] See also Figure 1 As shown, an embodiment of the present invention discloses a pedestrian movement trajectory recovery method, which is applied to a trajectory recovery system, comprising:

[0057] Step S11: input the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and perform a convolution operation on the number of position vectors to obtain target movement behavior features corresponding to the target object.

[0058] In this embodiment, it is necessary to process the historical movement trajectory of the target object through a preset deep learning model to obtain the target movement behavior characteristics corresponding to the target object, wherein the preset deep learning model is a multi-granularity trajectory pattern encoder MGTPE customized in this application, including a Bi-LSTM layer, a local convolution layer and a global attention layer. Figure 2 As shown in the figure, it is the structure diagram of the preset deep learning model, where the dotted rectangular box represents the sliding window, whose size is K s , and its convolution kernel is , Specifically, the historical movement trajectory of the target object needs to be input into a preset deep learning model to convert the historical movement trajectory into a number of position vectors corresponding to a number of time nodes, where the historical movement trajectory is the movement path of the target object from the starting point to the end point, which includes a number of specific positions, such as , where each It represents the location visited by the target object at a certain point in time. First, the historical movement trajectory needs to be processed by the Bi-LSTM layer to convert the historical movement trajectory into several position vectors corresponding to several time nodes. The specific representation is as follows:

[0059] ;

[0060] in, Refers to the vector form of the location point visited by the target object u in the t-th time period of the n-th day, refer to The corresponding position vector also represents the hidden state of the Bi-LSTM layer.

[0061] Furthermore, a weighted summation of several position vectors can be performed by a preset convolution kernel to obtain the movement behavior characteristics of the target object within the time range corresponding to the historical movement trajectory. Specifically, in the local convolution layer, the length K set in this application can be s The sliding window slides on the trajectory, and the positions in the window are considered to be in the same time range. In this way, each time range contains K s The convolution operation is then applied to the set of position records within the time range , which contains the time from time t to t+K s Location records, i.e. , the size of the convolution kernel is , sliding along the time dimension, performing weighted summation on the location records, thereby generating an embedded representation within the time range, that is, the mobile behavior characteristics within the time range corresponding to the historical mobile trajectory , where the convolution operation can be expressed as follows:

[0062] ;

[0063] in, represents the kth element of the convolution kernel, Represents the representation of the kth location record within the time range. Through the convolution operation Conv, the time range information of the location record can be integrated into the embedded representation middle.

[0064] In the next step, it is necessary to determine the activation value of the preset forget gate according to the first preset training parameters and the mobile behavior characteristics, and screen the mobile behavior characteristics according to the activation value to obtain the target mobile behavior characteristics. Specifically, a forget gate mechanism can be introduced. This mechanism will adaptively decide how much original input information to retain based on the characteristics of the current position and the learned time range pattern information. At the same time, it will also determine how much time range pattern information learned through the convolutional layer should be incorporated. First, the activation value z of the forget gate is calculated by the following formula H :

[0065] ;

[0066] in, as well as is the first preset training parameter, which is a trainable parameter. is the sigmoid function. And the sigmoid function converts z H The value of is limited to between 0 and 1, so z H can be interpreted as preserving the original position fusion during the update process proportion.

[0067] Then you can use z H The mobile behavior features are screened to obtain the target mobile behavior features, and the calculation formula is as follows:

[0068] ;

[0069] Therefore, if z H If z is close to 1, the model will retain more information embedded in the original position; H If it is close to 0, the model will rely more on the time range pattern information obtained through learning. By introducing the forget gate mechanism, the time range representation generated by the convolutional layer can be more effectively utilized, and the screening of mobile behavior features can be adaptively adjusted.

[0070] Step S12: Processing the target movement behavior characteristics through a preset attention model to obtain trajectory characteristics corresponding to the target movement behavior characteristics, and processing the trajectory characteristics through a preset feedforward neural network to obtain target trajectory characteristics.

[0071] In this embodiment, the target movement behavior characteristics need to be input into the preset attention model to calculate the discrete trajectory characteristics of the target object through the second preset training parameters and the target movement behavior characteristics. Specifically, in the global attention layer, multiple independent attention models can be run in parallel according to the multi-head attention mechanism of the Transformer Encoder. Each model focuses on different aspects, thereby providing richer information. For the i-th attention model, the attention mechanism is applied to the location record set in the trajectory. , and the set contains the location records of the trajectory over the entire time period, that is, , and the calculation of the discrete trajectory features of the target object is shown as follows:

[0072] ;

[0073] in, is the second preset training parameter, which is a trainable parameter. represents the embedding of the trajectory of the target object u on day n after the local attention layer.

[0074] Then the discrete trajectory features need to be concatenated to obtain the trajectory features of the target object, where the representation of the trajectory features obtained after concatenation is as follows:

[0075] ;

[0076] Among them, || is the connection operator.

[0077] In the next step, the obtained trajectory features need to be processed by a preset feedforward neural network to obtain the target trajectory features. Specifically, the trajectory features can be input into the preset feedforward neural network to process the trajectory features by a third preset training parameter to obtain the processed trajectory features. The processing formula is as follows:

[0078] ;

[0079] in, is the third preset training parameter, which is a trainable parameter. The output of this part is the processed trajectory feature.

[0080] Then the processed features need to be standardized, and each trajectory feature can be calculated. The corresponding mean μ and variance σ are then normalized to the processed trajectory features. The specific formula is as follows:

[0081] ;

[0082] Among them, γ is the preset scaling parameter, β is the preset offset parameter, and ε is a very small constant to prevent the denominator from being zero. All vectors in are processed in this way to obtain the target trajectory characteristics.

[0083] Step S13, determine the spatiotemporal weight corresponding to the historical movement trajectory, determine the target long-term movement preference value of the target object through the spatiotemporal weight and the multiple position vectors, and calculate the similarity between the target long-term movement preference value and the historical movement trajectory to obtain a position trend prediction value.

[0084] In this embodiment, it is necessary to determine the spatiotemporal weight corresponding to the historical movement trajectory, and then determine the target long-term movement preference value of the target object through the obtained spatiotemporal weight and several position vectors, and calculate the similarity between the target long-term movement preference value and the historical movement trajectory to obtain the position trend prediction value. Specifically, it is necessary to determine the time distance of the historical movement trajectory at different time nodes, and then determine the spatial distance of the historical movement trajectory at different spatial positions, and calculate the time weight corresponding to the historical movement trajectory based on the time distance through a preset time weight function, and then calculate the spatial weight corresponding to the historical movement trajectory based on the spatial distance through a preset spatial weight function, and finally calculate the product of the time weight and the spatial weight, and use the obtained product as the spatiotemporal weight corresponding to the historical movement trajectory. It should be noted that the spatiotemporal weight comprehensively considers the influence of spatial distance and time distance on position correlation, and can more accurately reflect the movement mode of users between different locations.

[0085] Furthermore, the target object's long-term preference can be calculated to understand its movement behavior pattern. The historical movement trajectory and the similarity between the long-term movement preference can also be calculated to select historical records that are highly correlated with the long-term preference from the historical trajectory in each time period, thereby avoiding interference caused by some location records that do not match the user's movement pattern. Specifically, the spatiotemporal weight and the product of each position vector in a number of position vectors can be accumulated to obtain the target long-term movement preference value of the target moving object, and then the similarity between the target long-term movement preference value and the historical movement trajectory can be calculated, and then the obtained similarity can be used as the weight of the target trajectory feature and weighted accumulation can be performed to obtain the location trend prediction value.

[0086] Step S14: performing feature fusion on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and performing position prediction on the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

[0087] In this embodiment, it is also necessary to perform feature fusion on the calculated position trend prediction value, target long-term movement preference value and target trajectory feature, so as to perform position prediction on the missing values ​​in the historical movement trajectory caused by noise or user deviation from the long-term movement preference according to the obtained fused feature value. Specifically, it is necessary to perform a connection operation on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and round the obtained connection value to obtain the target connection value, and then calculate the prediction probability between the fused feature value and the corresponding embedding vector of each position in the historical movement trajectory to obtain several prediction probabilities, and then extract the prediction probability with the largest probability value from the obtained several prediction probabilities as the target prediction probability, and use the position corresponding to the target prediction probability as the target prediction position, and then insert the target prediction position into the missing position in the historical movement trajectory to restore the historical movement trajectory.

[0088] It can be seen that through the method of the present application, the historical movement trajectory of the target object can be input into the preset deep learning model, and the obtained several position vectors can be convolved to obtain the target movement behavior characteristics; the target movement behavior characteristics are processed in turn through the preset attention model and the preset feedforward neural network to obtain the target trajectory characteristics; the target long-term movement preference value of the target object is determined by the preset spatiotemporal weights and several position vectors, and the position trend prediction value between the target long-term movement preference value and the historical movement trajectory is calculated; the position trend prediction value, the target long-term movement preference value and the target trajectory characteristics are feature fused, and the historical movement trajectory is restored according to the obtained fused feature value. In this way, useful information can be extracted from the user's historical trajectory information to model the user's movement pattern, and the user's original movement trajectory can be restored from the long and sparse trajectory data.

[0089] Based on the above embodiments, it can be seen that the method of this application needs to calculate the spatiotemporal weights corresponding to the historical movement trajectory, and determine the target long-term movement preference of the target object through the spatiotemporal weights and the several position vectors, and then determine the similarity between the target long-term movement preference value and the historical movement trajectory. For this purpose, this embodiment describes the above process in detail. Figure 3 As shown, an embodiment of the present invention discloses a pedestrian movement trajectory recovery device, which is applied to a trajectory recovery system, including:

[0090] Step S21: determining the temporal distance of the historical movement trajectory at different time nodes, and determining the spatial distance of the historical movement trajectory at different spatial positions.

[0091] In this embodiment, in order to calculate the long-term movement preference value of the target object, it can be as follows: Figure 4 As shown, a trajectory recovery model is set based on the preset deep learning model in the aforementioned embodiment, which can make full use of the historical trajectory data of the target object, capture the movement rules therein, and reasonably infer and supplement the missing trajectory position based on this. First, the trajectory needs to be converted into a corresponding vector through a trajectory embedding module, and then the time distance of the target object corresponding to the historical movement trajectory at different time nodes and the spatial distance of the historical movement trajectory at different spatial positions are determined through the long-term preference module. Specifically, it is necessary to calculate the difference between the historical movement trajectory at different time nodes and spatial positions to obtain the corresponding time distance and spatial distance .

[0092] Step S22: Calculate the time weight corresponding to the historical movement trajectory based on the time distance using a preset time weight function, and calculate the space weight corresponding to the historical movement trajectory based on the space distance using a preset space weight function.

[0093] In this embodiment, a preset time weight function is required to calculate the time weight corresponding to the historical movement trajectory based on the obtained time distance, and a preset space weight function is used to calculate the space weight corresponding to the historical movement trajectory based on the space distance, wherein the calculation formula is as follows:

[0094] ;

[0095] ;

[0096] in, as well as They represent the spatial weight function and the temporal weight function respectively. Both functions are in the form of exponential functions, which means that the weight will gradually decrease as the spatial distance or temporal distance increases. The two parameters α and β are the decay rates of the spatial weight and the temporal weight, respectively, and can be adjusted according to the specific application scenario and data characteristics.

[0097] Step S23: Calculate the product of the time weight and the space weight, and use the obtained product as the spatiotemporal weight corresponding to the historical movement trajectory.

[0098] In this embodiment, the product of the time weight and the space weight needs to be used as the spatiotemporal weight corresponding to the historical movement trajectory. Specifically, the spatiotemporal weight can be expressed as , which is expressed as follows:

[0099] ;

[0100] The spatiotemporal weight comprehensively considers the impact of spatial distance and temporal distance on position correlation, and can more accurately reflect the movement pattern of the target object between different locations.

[0101] Step S24: Accumulate the product of the spatiotemporal weight and each position vector in a plurality of position vectors to obtain the target long-term movement preference value of the target moving object.

[0102] In this embodiment, the daily movement pattern of the target object can be defined , and its expression formula is as follows:

[0103] ;

[0104] in, represents the hidden state of the Bi-LSTM layer, is the space-time weight.

[0105] Since the daily movement pattern of the target object is a discrete state, an aggregator using the maximum function can be designed:

[0106] ;

[0107] Among them, p u It is the long-term preference of the target object u, representing its own movement mode contained in its historical trajectory record. The maximum value can be used as the target long-term movement preference value of the target moving object.

[0108] Step S25, calculating the similarity between the target long-term movement preference value and the historical movement trajectory through the fourth preset training parameter and the target trajectory feature.

[0109] In this embodiment, the long-term behavior preference of each target object can be extracted through the long-term preference module through the steps in the above example. After accommodating, it is necessary to solve how to select historical records that are highly related to the long-term preference from the historical trajectory in each time period through the cross-time aggregation module, so as to avoid the interference caused by some location records that do not match the user's movement mode. To this end, the similarity between the target long-term movement preference value and the historical movement trajectory can be calculated through the fourth preset training parameter and the target trajectory feature. The calculation formula is as follows:

[0110] ;

[0111] in, It is the fourth preset training parameter, which is a trainable parameter, and σ is the sigmoid function.

[0112] Step S26: taking the similarity as the weight of the target trajectory feature and performing weighted accumulation to obtain a position trend prediction value.

[0113] In this embodiment, the similarity obtained can be used as the weight of the target trajectory feature by the cross-time aggregation module and weighted accumulation can be performed to obtain the position trend prediction value, and the calculation formula is as follows:

[0114] ;

[0115] in, is the location trend prediction value, which means that within the time period t in the historical trajectory of the target object u, according to the user's long-term behavior pattern p u , calculate the historical records and p in each corresponding time period u The similarity between the user's location and the daily movement pattern of the user is determined by weighted sum to obtain the feature representation of the most likely location of the user based on the historical trajectory.

[0116] It can be seen that through the method in this embodiment, the spatiotemporal weight corresponding to the historical movement trajectory can be calculated based on the time distance of the historical movement trajectory at different time nodes and the spatial distance at different spatial positions through a preset time weight function, and then the target long-term movement preference value of the target object is calculated according to the obtained spatiotemporal weight, and the similarity between the target long-term movement preference value and the historical movement trajectory is determined, so as to infer the most likely location of the user according to the final location trend prediction value. In this way, the problem of how to select historical records that are highly correlated with long-term preferences from the historical trajectory in each time period can be solved, thereby avoiding the interference caused by some location records that do not match the user's movement pattern, and improving the trajectory recovery accuracy of the pedestrian movement trajectory recovery method of this application.

[0117] Based on the above embodiments, it can be seen that the method of this application needs to predict the missing values ​​in the historical movement trajectory and restore the historical movement trajectory through the prediction results. To this end, this embodiment describes in detail how to perform position prediction and trajectory restoration. Figure 5 As shown, an embodiment of the present invention discloses a pedestrian movement trajectory recovery method, which is applied to a trajectory recovery system, comprising:

[0118] Step S31, performing a connection operation on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and rounding the obtained connection value to obtain a target connection value.

[0119] Step S32: Calculate the product of the target connection value and the fourth preset training parameter to obtain a fused feature value.

[0120] In this embodiment, it is necessary to Figure 4 The trajectory recovery module shown in the figure first needs to predict the position trend value 、Target long-term movement preference value p u And the target trajectory characteristics Perform a connection operation to fuse the features from three different sources into a high-dimensional vector to obtain the target connection value. The calculation formula is as follows:

[0121] ;

[0122] Among them, W 4 is a trainable parameter in the fourth preset training parameter, || is a connection operator, and [] is a rounding operation.

[0123] Step S33: Calculate the prediction probability between the fused feature value and the embedding vector corresponding to each position in the historical movement trajectory to obtain a number of prediction probabilities.

[0124] In this embodiment, the inner product between the fused feature value and the embedding vector of each position can be calculated to obtain the predicted probability of the target object u visiting the position l at time t. It should be noted that the predicted probability measures the similarity between the state vector of the target object and the feature vectors of each location. The higher the similarity, the greater the possibility that the user will visit the location. In order to ensure that the predicted probability is a valid probability distribution, that is, the sum of the probabilities of all locations is 1, the model normalizes the probabilities of all locations, and the calculation formula for the predicted probability is as follows:

[0125] ;

[0126] in, is the inner product function, is the normalized probability of all locations visited in time period t, h l represents the embedding vector corresponding to position l, Represents a collection of locations.

[0127] Step S34: extracting a target prediction probability with a maximum probability value from the plurality of prediction probabilities, and taking a position corresponding to the target prediction probability as a target prediction position.

[0128] In this embodiment, it is necessary to extract the target prediction probability with the largest probability value from the obtained several prediction probabilities, and use the position corresponding to the target prediction probability as the target prediction position. For example, if there is l in the position set, 1 Ton , n positions, each of which corresponds to a predicted probability, but l 1 The corresponding probability value is the largest, then position l 1 as the target predicted position.

[0129] Step S35: insert the target predicted position into the missing position in the historical movement trajectory to restore the historical movement trajectory.

[0130] It can be seen that the method in this embodiment can predict the location preference of the target object in a specific time window, and also generate a probability distribution over the entire location set. In practical applications, the model can select the location with the highest probability as the location of the target object in the time period based on this probability distribution, thereby realizing the recovery of the missing location in the trajectory.

[0131] See also Figure 6 As shown, an embodiment of the present invention discloses a pedestrian movement trajectory recovery device, which is applied to a trajectory recovery system, including:

[0132] A behavior feature determination module 11 is used to input the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and perform a convolution operation on the number of position vectors to obtain a target movement behavior feature corresponding to the target object;

[0133] A trajectory feature determination module 12, configured to process the target movement behavior feature through a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and process the trajectory feature through a preset feedforward neural network to obtain a target trajectory feature;

[0134] A similarity calculation module 13 is used to determine the spatiotemporal weight corresponding to the historical movement trajectory, to determine the target long-term movement preference value of the target object through the spatiotemporal weight and the plurality of position vectors, and to calculate the similarity between the target long-term movement preference value and the historical movement trajectory, so as to obtain a position trend prediction value;

[0135] The trajectory restoration module 14 is used to perform feature fusion on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and perform position prediction on the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

[0136] In some embodiments, the behavior feature determination module 11 may specifically include:

[0137] A trajectory conversion unit, used to input the historical movement trajectory of the target object into a preset deep learning model to convert the historical movement trajectory into a number of position vectors corresponding to a number of time nodes;

[0138] A feature calculation unit, configured to perform weighted summation on the plurality of position vectors based on a preset convolution kernel to obtain a movement behavior feature of the target object within a time range corresponding to the historical movement trajectory;

[0139] The feature screening unit is used to determine the activation value of the preset forget gate according to the first preset training parameter and the movement behavior feature, and screen the movement behavior feature according to the activation value to obtain the target movement behavior feature.

[0140] In some embodiments, the trajectory feature determination module 12 may specifically include:

[0141] A discrete feature calculation unit, used for inputting the target movement behavior feature into a preset attention model to calculate the discrete trajectory feature of the target object through a second preset training parameter and the target movement behavior feature;

[0142] The feature series connection unit is used to connect the discrete trajectory features in series to obtain the trajectory features of the target object.

[0143] In some embodiments, the trajectory feature determination module 12 may specifically include:

[0144] a first feature processing unit, configured to input the trajectory feature into a preset feedforward neural network to process the trajectory feature through a third preset training parameter to obtain a processed trajectory feature;

[0145] The second feature processing unit is used to calculate the mean and variance of the processed trajectory features, so as to normalize the processed trajectory features through the mean, variance, preset scaling parameters and preset offset parameters to obtain target trajectory features.

[0146] In some embodiments, the similarity calculation module 13 may specifically include:

[0147] A spatial position determination unit, used to determine the time distance of the historical movement trajectory at different time nodes, and determine the spatial distance of the historical movement trajectory at different spatial positions;

[0148] a spatial weight calculation unit, configured to calculate a time weight corresponding to the historical movement trajectory based on the time distance by using a preset time weight function, and to calculate a spatial weight corresponding to the historical movement trajectory based on the spatial distance by using a preset spatial weight function;

[0149] The spatiotemporal weight calculation unit is used to calculate the product of the time weight and the space weight, and use the obtained product as the spatiotemporal weight corresponding to the historical movement trajectory.

[0150] In some embodiments, the similarity calculation module 13 may specifically include:

[0151] a movement preference determination unit, configured to accumulate the spatiotemporal weight and the product of each of the plurality of position vectors to obtain a target long-term movement preference value of the target moving object;

[0152] A first similarity calculation unit, configured to calculate the similarity between the target long-term movement preference value and the historical movement trajectory by using a fourth preset training parameter and the target trajectory feature;

[0153] The second similarity calculation unit is used to use the similarity as the weight of the target trajectory feature and perform weighted accumulation to obtain a position trend prediction value.

[0154] In some embodiments, the trajectory restoration module 14 may specifically include:

[0155] a connection value determination unit, configured to perform a connection operation on the position trend prediction value, the target long-term movement preference value, and the target trajectory feature, and round the obtained connection value to obtain a target connection value;

[0156] A feature fusion unit, used to calculate the product between the target connection value and the fourth preset training parameter to obtain a fused feature value;

[0157] A prediction probability determination unit, used to calculate the prediction probability between the fused feature value and the embedding vector corresponding to each position in the historical movement trajectory to obtain a plurality of prediction probabilities;

[0158] A prediction position determination unit, configured to extract a target prediction probability having a maximum probability value from the plurality of prediction probabilities, and use a position corresponding to the target prediction probability as the target prediction position;

[0159] The trajectory restoration unit is used to insert the target predicted position into the missing position in the historical movement trajectory to restore the historical movement trajectory.

[0160] Furthermore, the present application also discloses an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0161] Figure 7A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the pedestrian movement trajectory recovery method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0162] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0163] In addition, the memory 22 as a carrier for resource storage may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage method may be temporary storage or permanent storage.

[0164] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the pedestrian movement trajectory recovery method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0165] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the pedestrian movement trajectory recovery method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.

[0166] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0167] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0168] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0169] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0170] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for restoring pedestrian movement trajectories, characterized in that: Applications in trajectory recovery systems include: Inputting the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and performing a convolution operation on the number of position vectors to obtain target movement behavior features corresponding to the target object; Processing the target movement behavior feature through a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and processing the trajectory feature through a preset feedforward neural network to obtain a target trajectory feature; Determine the spatiotemporal weight corresponding to the historical movement trajectory, determine the target long-term movement preference value of the target object through the spatiotemporal weight and the plurality of position vectors, and calculate the similarity between the target long-term movement preference value and the historical movement trajectory to obtain a position trend prediction value; The position trend prediction value, the target long-term movement preference value and the target trajectory feature are feature fused, and the missing position in the historical movement trajectory is predicted according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

2. The method for restoring pedestrian movement trajectories according to claim 1, characterized in that: The historical movement trajectory of the target object is input into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and a convolution operation is performed on the number of position vectors to obtain target movement behavior features corresponding to the target object, including: Inputting the historical movement trajectory of the target object into a preset deep learning model to convert the historical movement trajectory into a number of position vectors corresponding to a number of time nodes; Performing weighted summation on the plurality of position vectors based on a preset convolution kernel to obtain movement behavior characteristics of the target object within a time range corresponding to the historical movement trajectory; An activation value of a preset forget gate is determined according to the first preset training parameter and the movement behavior feature, and the movement behavior feature is screened according to the activation value to obtain a target movement behavior feature.

3. The method for restoring pedestrian movement trajectories according to claim 1, characterized in that: The processing of the target movement behavior feature by a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature includes: Inputting the target movement behavior feature into a preset attention model to calculate the discrete trajectory feature of the target object through a second preset training parameter and the target movement behavior feature; The discrete trajectory features are concatenated to obtain the trajectory features of the target object.

4. The pedestrian trajectory recovery method according to claim 1, characterized in that: The processing of the trajectory features by a preset feedforward neural network to obtain target trajectory features includes: Inputting the trajectory feature into a preset feedforward neural network to process the trajectory feature through a third preset training parameter to obtain a processed trajectory feature; The mean and variance of the processed trajectory features are calculated, and the processed trajectory features are normalized by the mean, variance, preset scaling parameters, and preset offset parameters to obtain target trajectory features.

5. The pedestrian movement trajectory recovery method according to claim 1, characterized in that: The determining of the spatiotemporal weight corresponding to the historical movement trajectory includes: Determine the temporal distance of the historical movement trajectory at different time nodes, and determine the spatial distance of the historical movement trajectory at different spatial locations; Calculating the time weight corresponding to the historical movement trajectory based on the time distance by using a preset time weight function, and calculating the space weight corresponding to the historical movement trajectory based on the space distance by using a preset space weight function; The product of the time weight and the space weight is calculated, and the obtained product is used as the spatiotemporal weight corresponding to the historical movement trajectory.

6. The method for restoring pedestrian movement trajectories according to any one of claims 1 to 5, characterized in that: The step of determining the target long-term movement preference value of the target object by using the spatiotemporal weight and the plurality of position vectors, and calculating the similarity between the target long-term movement preference value and the historical movement trajectory to obtain a position trend prediction value includes: Accumulating the spatiotemporal weight and the product of each position vector in the plurality of position vectors to obtain a target long-term movement preference value of the target moving object; Calculating the similarity between the target long-term movement preference value and the historical movement trajectory through a fourth preset training parameter and the target trajectory feature; The similarity is used as the weight of the target trajectory feature and weighted accumulation is performed to obtain a position trend prediction value.

7. The method for restoring pedestrian movement trajectories according to claim 6, characterized in that: The feature fusion of the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and the position prediction of the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position, includes: Performing a connection operation on the position trend prediction value, the target long-term movement preference value, and the target trajectory feature, and rounding the obtained connection value to obtain a target connection value; Calculating the product of the target connection value and the fourth preset training parameter to obtain a fused feature value; Calculating the prediction probability between the fused feature value and the embedding vector corresponding to each position in the historical movement trajectory to obtain a number of prediction probabilities; Extracting the target prediction probability with the largest probability value from the plurality of prediction probabilities, and taking the position corresponding to the target prediction probability as the target prediction position; The target predicted position is inserted into the missing position in the historical movement trajectory to restore the historical movement trajectory.

8. A pedestrian movement trajectory recovery device, characterized in that: Applications in trajectory recovery systems include: A behavior feature determination module, used for inputting the historical movement trajectory of the target object into a preset deep learning model to obtain a number of position vectors corresponding to the historical movement trajectory, and performing a convolution operation on the number of position vectors to obtain a target movement behavior feature corresponding to the target object; A trajectory feature determination module, used to process the target movement behavior feature through a preset attention model to obtain a trajectory feature corresponding to the target movement behavior feature, and process the trajectory feature through a preset feedforward neural network to obtain a target trajectory feature; a similarity calculation module, used to determine the spatiotemporal weight corresponding to the historical movement trajectory, to determine the target long-term movement preference value of the target object through the spatiotemporal weight and the plurality of position vectors, and to calculate the similarity between the target long-term movement preference value and the historical movement trajectory, so as to obtain a position trend prediction value; The trajectory restoration module is used to perform feature fusion on the position trend prediction value, the target long-term movement preference value and the target trajectory feature, and perform position prediction on the missing position in the historical movement trajectory according to the obtained fused feature value, so as to restore the historical movement trajectory according to the obtained target predicted position.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the pedestrian movement trajectory recovery method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the pedestrian movement trajectory recovery method according to any one of claims 1 to 7 is implemented.