Crowd travel rhythm prediction method and device based on transfer learning

By combining travel data of crowd-rich areas and scarce areas in the transfer learning model, the training data set is expanded, and the problem of low prediction performance of crowd-scarce areas in the prior art is solved, and the accuracy and applicability of prediction results are improved.

CN119647660APending Publication Date: 2025-03-18SHENZHEN UNIV
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411673500.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing method of prediction of crowd travel rhythms ignores travel time series data in scarce areas during training, resulting in a decrease in prediction performance in scarce areas of crowds and the output prediction results are not accurate enough.

Method used

By using the transfer learning model, each training sample is set to include travel data for crowd-rich areas and scarce areas, thereby amplifying the data set and training the travel rhythm prediction model so that it can be applied to predictions for scarce areas of crowd-scarce areas.

Benefits of technology

The applicability of the crowd travel rhythm prediction method in scarce areas and the accuracy of prediction results is improved, ensuring that high-level prediction performance can be maintained in a data scarce environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647660A_ABST
    Figure CN119647660A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers. The invention discloses a crowd trip rhythm prediction method and device based on transfer learning, which can improve the applicability of the crowd trip rhythm prediction method and improve the accuracy of a prediction result. The crowd travel rhythm prediction method based on transfer learning comprises the steps of obtaining a travel data set of a to-be-predicted region; the travel data set is input into a travel rhythm prediction model for prediction processing, a prediction result is obtained, the travel rhythm prediction model is trained by an expanded data set obtained through processing of a transfer learning model, and the travel rhythm prediction result is obtained. Each training sample for training the transfer learning model contains travel data of the crowd enrichment area and travel data of the crowd scarcity area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology. More specifically, the present application relates to a method and device for predicting crowd travel rhythm based on transfer learning. Background Art

[0002] At present, the crowd travel rhythm prediction method usually outputs the prediction results by convolutional neural network. However, during the training process, the convolutional neural network used in this method does not focus on the diversity of training data, but only focuses on high-quality data. The so-called high-quality data refers to the travel time series data in the crowd-rich area, ignoring the travel time series data in the crowd-scarce area. Therefore, when the input data of this method belongs to the crowd-scarce area, the prediction performance of the convolutional neural network will be reduced, resulting in inaccurate output prediction results. Therefore, this method is not suitable for the crowd-scarce area. Summary of the invention

[0003] The purpose of the embodiment of the present application is to provide a method and device for predicting the travel rhythm of a crowd based on transfer learning, which can improve the applicability of the method for predicting the travel rhythm of a crowd and improve the accuracy of the prediction results. The embodiment of the present application is mainly achieved through the following technical solutions:

[0004] In a first aspect of an embodiment of the present application, a method for predicting a crowd travel rhythm based on transfer learning is provided, comprising:

[0005] Acquire a travel data set for the area to be predicted; input the travel data set into a travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained with an expanded data set obtained by processing a transfer learning model, and each training sample for training the transfer learning model contains travel data for population-rich areas and travel data for population-sparse areas.

[0006] According to one embodiment of the present application, the training step of the travel rhythm prediction model includes:

[0007] Obtain a first training data set and a first real label set, wherein the first training data set includes a plurality of the expanded data sets, and each of the expanded data sets has a one-to-one correspondence with one of the real values ​​in the first real label set;

[0008] Inputting the target expanded data set into the initial convolutional neural network for prediction processing to obtain a first training result, wherein the target expanded data set is any element in the first training data set;

[0009] Calculate a first loss function based on the first training result and a true value corresponding to the target expanded data set;

[0010] The first model parameter of the initial convolutional neural network is adjusted based on the first loss function to form the travel rhythm prediction model.

[0011] According to one embodiment of the present application, the step of inputting the target expanded data set into the initial convolutional neural network for prediction processing to obtain a first training result includes:

[0012] The convolution layer of the initial convolutional neural network performs a feature extraction operation on the target expanded data set to obtain a first feature map;

[0013] The pooling layer of the initial convolutional neural network performs dimensionality reduction processing on the first feature map to obtain a second feature map;

[0014] The Dropout layer of the initial convolutional neural network performs random inactivation processing on the second feature map to obtain a third feature map;

[0015] The fully connected layer of the initial convolutional neural network performs a convolution operation on the third feature map to obtain the first training result.

[0016] According to one embodiment of the present application, the step of acquiring a first training data set includes:

[0017] Acquire a plurality of travel time series data, each of the travel time series data includes first travel time series data of a crowd-rich area and second travel time series data of a crowd-sparse area;

[0018] Preprocessing the target first travel time series data and the target second travel time series data to obtain an image to be processed, wherein the target first travel time series data is any first travel time series data among the multiple travel time series data, and the target second travel time series data and the target first travel time series data belong to the same travel time series data;

[0019] Inputting the image to be processed into a transfer learning model, wherein the transfer learning model performs data migration processing on the image to be processed and outputs a synthesized image;

[0020] Using the synthetic image to expand the target second trip time series data to obtain the expanded data set;

[0021] All the expanded data sets are merged to form the first training data set.

[0022] According to an embodiment of the present application, the step of preprocessing the target first trip time series data and the target second trip time series data to obtain the image to be processed includes:

[0023] Cleaning the target first travel time series data and the target second travel time series data to obtain data to be processed;

[0024] Dividing the data to be processed to obtain a data set to be scaled;

[0025] Performing scaling processing on the data set to be scaled to obtain the data set to be imaged;

[0026] The Gram angular field method is used to perform imaging processing on the imaged data set to obtain the image to be processed.

[0027] According to an embodiment of the present application, the step of dividing the data to be processed to obtain the data set to be scaled includes:

[0028] Performing time division processing on the data to be processed according to preset time to obtain a time series data set;

[0029] The time series data set is subjected to dimensionality reduction processing by adopting a piecewise aggregation approximation method to obtain the data set to be scaled.

[0030] According to one embodiment of the present application, the training step of the transfer learning model includes:

[0031] Obtaining a second training data set and a second real label set, wherein the second training data set includes a plurality of training images, and each training image has a one-to-one correspondence with one of the real images in the second real label set;

[0032] Inputting the target training image into the generative adversarial network for data migration processing, and outputting a second training result, wherein the target training image is any training image in the second training data set;

[0033] Calculating a second loss function based on the second training result and a real image corresponding to the target training image;

[0034] The second model parameters of the generative adversarial network are adjusted based on the second loss function to form the transfer learning model.

[0035] A second aspect of the embodiment of the present application provides a crowd travel rhythm prediction device based on transfer learning, comprising:

[0036] A travel data set acquisition module is used to acquire a travel data set of an area to be predicted; a prediction module is used to input the travel data set into a travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained with an expanded data set obtained by processing a transfer learning model, and each training sample for training the transfer learning model contains travel data of a population-rich area and travel data of a population-sparse area.

[0037] According to the third aspect of an embodiment of the present application, a terminal device is provided, including: a processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory, and executing the steps of the method for predicting travel rhythm of a crowd based on transfer learning provided in the first aspect of the embodiment of the present application.

[0038] According to the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute the steps of the method for predicting travel rhythm of a crowd based on transfer learning provided in the first aspect of the embodiments of the present application.

[0039] The beneficial effects of the embodiments of the present application include:

[0040] The embodiment of the present application sets each training sample of the transfer learning model to a sample containing travel data of a crowd-rich area and travel data of a crowd-sparse area, thereby enabling the transfer learning model to achieve the purpose of migrating travel data from a crowd-rich area to a crowd-sparse area. Based on the setting of the transfer learning model, the travel rhythm prediction model trained with the expanded data set obtained by processing the transfer learning model can be applied to a prediction environment with a crowd-sparse area. Therefore, when the embodiment of the present application inputs the travel data set of the area to be predicted into the travel rhythm prediction model for prediction processing, accurate prediction results can be obtained. Therefore, compared with the prior art that is not applicable to crowd-sparse areas, the embodiment of the present application can improve the applicability of the crowd travel rhythm prediction method and improve the accuracy of the prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0042] Figure 1 A flowchart of a method for predicting crowd travel rhythm based on transfer learning in some embodiments of the present application;

[0043] Figure 2 A flowchart of a method for predicting a crowd travel rhythm based on transfer learning in some embodiments of the present application;

[0044] Figure 3 This is a principle block diagram of a crowd travel rhythm prediction device based on transfer learning in some embodiments of the present application;

[0045] Figure 4 This is a functional block diagram of the terminal device of the present application in some embodiments. DETAILED DESCRIPTION

[0046] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.

[0047] It should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0048] The terms "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0049] The terms "comprises," "includes," or any other variations thereof are intended to cover a non-exclusive inclusion, for example, a process, method, system, product, or apparatus that comprises a series of steps or elements is not necessarily limited to those steps or elements explicitly listed but may include other steps or elements not explicitly listed or inherent to such process, method, product, or apparatus.

[0050] Unless otherwise defined, all technical and scientific terms used in the specification of this application have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in the specification of this application includes any and all combinations of one or more related listed items.

[0051] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.

[0052] <Crowd travel rhythm prediction method based on transfer learning>

[0053] like Figure 1 As shown, it is a flow chart of a method for predicting crowd travel rhythm based on transfer learning provided in the first aspect of the embodiment of the present application. Figure 1 In the method, the crowd travel rhythm prediction method based on transfer learning includes:

[0054] S1. Obtain the travel data set of the area to be predicted.

[0055] The travel data set is information such as travel time, travel purpose and travel distance collected in time series. More specifically, it can be the travel time, travel purpose and travel distance of passengers in the area to be predicted by taking buses, subways and taxis collected in time series; the travel trajectories of all terminal users in the area to be predicted (obtained through mobile phone signaling data); the travel trajectories of all vehicle users in the area to be predicted; and the travel information of all social media users in the area to be predicted. Of course, in other implementations, the travel data set can also include other content, which can be specifically set by those skilled in the art according to actual needs.

[0056] The travel dataset is a kind of time series data.

[0057] S2. Input the travel data set into the travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained with the expanded data set obtained by processing the transfer learning model, and each training sample for training the transfer learning model contains travel data of population-rich areas and travel data of population-sparse areas.

[0058] In the above technical scheme, the embodiment of the present application sets each training sample of the transfer learning model to a sample containing travel data of a crowd-rich area and travel data of a crowd-scarce area, so that the transfer learning model can achieve the purpose of migrating travel data from a crowd-rich area to a crowd-scarce area. Based on the setting of the transfer learning model, the travel rhythm prediction model trained with the expanded data set obtained by processing the transfer learning model can be applied to a prediction environment with a crowd-scarce environment. Therefore, when the embodiment of the present application inputs the travel data set of the area to be predicted into the travel rhythm prediction model for prediction processing, accurate prediction results can be obtained. Therefore, compared with the prior art that is not applicable to areas with a crowd-scarce environment, the embodiment of the present application can improve the applicability of the crowd travel rhythm prediction method and improve the accuracy of the prediction results.

[0059] In some embodiments, the step of training the travel rhythm prediction model includes:

[0060] S41. Obtain a first training data set and a first real label set, wherein the first training data set includes a plurality of the expanded data sets, and each of the expanded data sets has a one-to-one correspondence with one of the real values ​​in the first real label set.

[0061] Furthermore, the step of obtaining a first training data set includes:

[0062] S411, obtaining a plurality of travel time series data, each of which includes first travel time series data of a crowd-rich area and second travel time series data of a crowd-sparse area. S4121 can be understood as Figure 2 The Data Preparation step in .

[0063] Exemplarily, the first travel time series data may be travel data of a city center area; the second travel time series data may be travel data of a suburban area. The data types and data formats of the first travel time series data and the second travel time series data are the same as the data types and data formats of the travel data set.

[0064] S412. Preprocess the target first travel time series data and the target second travel time series data to obtain an image to be processed, wherein the target first travel time series data is any first travel time series data among the multiple travel time series data, and the target second travel time series data and the target first travel time series data belong to the same travel time series data.

[0065] Furthermore, the step of preprocessing the target first travel time series data and the target second travel time series data to obtain the image to be processed includes:

[0066] S4121. Clean the target first travel time series data and the target second travel time series data to obtain data to be processed.

[0067] The cleaning process refers to removing abnormal values ​​and missing values ​​from the target first travel time series data and the target second travel time series data.

[0068] The cleaning method includes but is not limited to an interpolation method, a timestamp adjustment method, a standardization method or a normalization method.

[0069] The setting of step S4121 can ensure the quality and availability of data to improve the accuracy of the travel rhythm prediction model.

[0070] S4122: Divide the data to be processed to obtain a data set to be scaled.

[0071] Furthermore, the step S4122 includes:

[0072] S41221. Perform time division processing on the data to be processed according to preset time to obtain a time series data set.

[0073] The preset time is one hour. In other embodiments, the preset time can be set by those skilled in the art according to actual needs.

[0074] The step S41221 may be understood as dividing the data to be processed at the hourly level to obtain the time series data set.

[0075] The setting of the S41221 step can improve the training effect and prediction ability of the machine learning model.

[0076] S41222: Use a segmented aggregation approximation method to perform dimensionality reduction processing on the time series data set to obtain the data set to be scaled. The step S41222 can be understood as: Figure 2 The "PAA Conversion" step in the

[0077] Furthermore, the piecewise aggregate approximation method is a PAA (Piecewise Aggregate Approximation) method.

[0078] It should be understood that since the size of the image converted by the Gram angular field method is very large, if the size of the original time series is n, then after mapping using the Gram angular field method, the size of the obtained data set (i.e., the data set to be scaled) will become n×n.

[0079] Due to various reasons, the number of data points collected within a fixed interval may be inconsistent. The PAA method can divide the data into regions of equal size and calculate the average value, reducing the dimension from n to N.

[0080] The data processed by the PAA method can be uniformly input into the travel rhythm prediction model, and the computational efficiency of the model can be reduced by reducing the dimension. Therefore, the PAA method is first used to transform the speed time series (i.e., the time series data set) V = {v1, v2, …, v n}Convert to a simplified representation (that is, the data set to be scaled) The length of is N (1≤N≤n).

[0081] Furthermore, the calculation formula of the segmented aggregation approximation method is as follows:

[0082]

[0083] in, is the i-th element of the data set to be scaled; N is the length of the data set to be scaled; n is the length of the time series data set; v j is the jth element in the time series dataset.

[0084] S4123: Perform scaling processing on the data set to be scaled to obtain the data set to be imaged.

[0085] In this embodiment of the present application, the data set to be scaled Rescale to the imaged dataset All values ​​in the imaged data set are within the interval [0, 1].

[0086] The transformation formula (scaling formula) of step S4123 is as follows:

[0087]

[0088] in, is the i-th element of the imaged data set, is the data set to be scaled, is the dataset to be imaged.

[0089] S4124, using the Gram angular field method to perform imaging processing on the imaged data set to obtain the image to be processed. The step S4124 can be understood as Figure 2 Gram Angle Field Transformation step.

[0090] The Gram angle field method is a technique for converting data with time series changes into a two-dimensional image. GADF represents data by calculating the Gram angle difference field of the time series, thereby converting one-dimensional data with time series changes into a two-dimensional image, so that a convolutional neural network (CNN) can extract and process the two-dimensional image.

[0091] The embodiment of the present application adopts the Gram angular field method for image processing, which can convert the dynamic characteristics of the time series into an image format, and effectively retain the time dependency and trend information in the sequence.

[0092] Furthermore, the calculation formula of step S4124 is:

[0093]

[0094] Wherein, GADF is the image to be processed, I is the unit row vector [1,1,…,1], is the dataset to be imaged, for The transpose of .

[0095] S413: input the image to be processed into a transfer learning model, and the transfer learning model performs data migration processing on the image to be processed and outputs a synthesized image.

[0096] Furthermore, the training steps of the transfer learning model include:

[0097] S4131. Obtain a second training data set and a second real label set, wherein the second training data set includes multiple training images, and each training image has a one-to-one correspondence with one of the real images in the second real label set.

[0098] S4132. Input the target training image into the generative adversarial network for data migration processing, and output a second training result, wherein the target training image is any training image in the second training data set.

[0099] The generative adversarial network is StarGAN v2. In other implementations, the generative adversarial network can be configured by a person skilled in the art according to actual needs.

[0100] The generative adversarial network can migrate data from densely populated areas to sparsely populated areas, and can effectively realize the knowledge transfer of processed data, thereby significantly improving the prediction performance of the travel rhythm prediction model.

[0101] The StarGAN v2 is able to generate different images in each domain using a single discriminator and generator using domain-specific style vectors from a style encoder or mapping network.

[0102] Furthermore, the step S4132 includes:

[0103] S41321: The style encoder in the generative adversarial network extracts features from the crowd-rich area in the target training image to obtain a style vector. The step S41321 can be understood as Figure 2 The "Travel "style" encoding" step in .

[0104] The crowd-rich area can be understood as the city center area in the target training image.

[0105] The feature extraction operation in step S41321 extracts the features of the travel patterns in the travel data of the city center area in the target training image, so that the style vector can represent the travel habits and rhythm of the city center residents.

[0106] S41322: The generator in the generative adversarial network applies the style vector to the travel data corresponding to the sparsely populated area in the target training image, and outputs the second training result. The step S41322 can be understood as: Figure 2 The "Data Migration" step in

[0107] The sparsely populated area may be understood as a suburb.

[0108] The generator uses the style vector to generate travel pattern data similar to the population-rich area (ie, the city center area), but the travel pattern data still retains some unique features of travel in the population-sparse area (ie, the suburbs).

[0109] S4133. Calculate a second loss function based on the second training result and a real image corresponding to the target training image.

[0110] Furthermore, the calculation formula of the second loss function is:

[0111]

[0112] Among them, L adv is the second loss function; E x,y [logD y (x)] is the real image corresponding to the target training image in the target domain label The probability of , that is, D(x); To generate an image (i.e., the second training result) in the target domain label The probability of x is the input image, that is, the target training image; D y (x) is the judgment result of the discriminator D on the input image x on the source domain label y, that is, the probability that x belongs to the source domain label y; is the target domain label; z is a random latent vector; is the discriminator D in the target domain label Generate image on The prediction results; For the generator based on the input image x and the target style code Generated target domain image; is the target style code, E x,y To average all possible values ​​of all real images and source domain labels y in the dataset; For the input image x, the target domain label and average all possible values ​​of the random latent vector z.

[0113] S4134. Adjust the second model parameters of the generative adversarial network based on the second loss function to form the transfer learning model.

[0114] Further, after the step S4134, the training step of the transfer learning model further includes:

[0115] S4135: construct an optimization target based on the second loss function. Further, the formula of the optimization target is as follows:

[0116]

[0117] Among them, L adv is the second loss function; L sty is the third loss function; L ds is the fourth loss function; L cyc is the fifth loss function; sty is a hyperparameter of the third loss function, used to control the weight of the third loss function; ds is a hyperparameter of the fourth loss function, used to control the weight of the fourth loss function; cyc is a hyperparameter of the fifth loss function, used to control the weight of the fifth loss function; G is a generator; F is a mapping network; E is an encoder; and D is a discriminator.

[0118] Furthermore, the calculation formula of the third loss function is:

[0119]

[0120] in, is the generated image (i.e. the second training result) The style code is obtained by mapping back to the style space through the encoder E; x is the input image, that is, the target training image; y is the source domain label; z is a random potential vector; is the target style code; For the input image x, the target domain label and average all possible values ​​of the random latent vector z; For the target domain label The above is mapped back to the style space through encoder E to obtain the style code.

[0121] Furthermore, the calculation formula of the fourth loss function is:

[0122]

[0123] in, and is the style code generated from two different random latent codes z1 and z2 by the mapping network F; x is the input image, that is, the target training image; is the target domain label; For the generator based on the input image x and style code Generated target domain image; For the generator based on the input image x and style code Generated target domain image; For the input image x, the target domain label All possible values ​​of the random latent vectors z1 and z2 are averaged.

[0124] Furthermore, the calculation formula of the fifth loss function is:

[0125]

[0126] in, is the second training result; is the style code of the input image x on the source domain label y, x is the input image, that is, the target training image; is the target domain label; z is a random latent vector; is the target style code; For the input image x, source domain label y, target domain label and average all possible values ​​of the random latent vector z; The target domain image generated by the generator and style code Generated source domain images.

[0127] It should be understood that the embodiments of the present application can effectively learn diversified image synthesis between multiple domains by combining objectives such as the adversarial objective (that is, the first loss function), the style reconstruction loss (that is, the second loss function), the style diversity loss (that is, the third loss function) and the cycle consistency loss (that is, the fourth loss function).

[0128] S4136. Adjust a third model parameter of the transfer learning model based on the optimization objective.

[0129] S414: Use the synthetic image to expand the target second travel time series data to obtain the expanded data set. The step S414 can be understood as Figure 2 The "Data Synthesis" step in .

[0130] Since the target second travel time series data is expanded, the travel rhythm prediction model will have higher accuracy and robustness when predicting the travel rhythm of residents in suburban areas (ie, areas with sparse population).

[0131] S415: Merge all the expanded data sets to form the first training data set.

[0132] S42: Input the target expanded data set into the initial convolutional neural network for prediction processing to obtain a first training result, wherein the target expanded data set is any element in the first training data set.

[0133] Further, the S42 step includes:

[0134] S421, the convolution layer of the initial convolutional neural network performs a feature extraction operation on the target expanded data set to obtain a first feature map. The step S421 can be understood as Figure 2 The “Feature Extraction” step in .

[0135] The convolution layer uses a filter to slide on the entire target expanded data set, uses a dot product and obtains a first feature map. In the embodiment of the present application, if there is only one filter, the convolution operation formula of the convolution layer can be expressed as follows:

[0136]

[0137] Among them, y represents the output, that is, the first feature map; F represents the activation function; m, n and o represent the three dimensions of the filter; (w) represents the coefficient of the filter at positions e, f and g, d represents the data value of the input matrix (that is, the target expanded data set) at positions e, f and g, and b represents the deviation.

[0138] Furthermore, the size of the first feature map can be calculated as follows:

[0139]

[0140] Wherein, n represents the size of the first feature map, i.e., the output size; m represents the size of the target augmented data set, i.e., the input size); k represents the size of the filter, i.e., the kernel size; s represents the number of pixels that the filter moves each time when sliding on the target augmented data set (i.e., the input matrix), i.e., the sliding step size. The sliding step size determines the size of the first feature map.

[0141] The step S421 can be understood as a step of obtaining travel characteristics of a crowd.

[0142] S422: The pooling layer of the initial convolutional neural network performs dimensionality reduction processing on the first feature map to obtain a second feature map. The step S422 can be understood as Figure 2 The "Pooling Operation" step in .

[0143] The pooling layer reduces the number of parameters of subsequent layers (such as the Dropout layer and the fully connected layer) by reducing the spatial dimension of the first feature map (that is, the height and width of the first feature map). The pooling operation helps to reduce the computational burden of the initial convolutional neural network, making the network more efficient. At the same time, since the pooling layer reduces the dimension of the feature space, it helps to prevent overfitting, that is, the initial convolutional neural network learns too well on the training data and performs poorly on unseen data. In addition, the pooling operation can also extract the most important information in the first feature map.

[0144] In the embodiment of the present application, the formula for the maximum pooling operation in the pooling layer is:

[0145]

[0146] Among them, e∈[1,2,…,p], f∈[1,2,…,q], p and q are the sizes of the two-dimensional pooling windows, d ef is the value of the first feature map at positions e and f, is the second feature map.

[0147] The step S422 may be understood as a step of reducing the dimension of the first feature map while retaining its most significant features.

[0148] S423: The Dropout layer of the initial convolutional neural network performs random inactivation processing on the second feature map to obtain a third feature map. The step S423 can be understood as Figure 2The “Dropout layer” step in .

[0149] The S423 is used to prevent overfitting. Overfitting means that the initial convolutional neural network learns too well on the training data, so that the initial convolutional neural network captures the noise and specificity in the training data instead of the general pattern, which causes the initial convolutional neural network to perform poorly on new, unseen data. The Dropout layer reduces the network's dependence on specific training samples by randomly "discarding" (i.e., setting to zero) a part of the neurons in the network during the training process, thereby improving the generalization ability of the model.

[0150] S424: The fully connected layer of the initial convolutional neural network performs a convolution operation on the third feature map to obtain the first training result. The step S424 can be understood as: Figure 2 The "fully connected layer" step in .

[0151] The setting of step S424 helps the network understand the content of the entire third feature map. At the same time, the fully connected layer has a large number of trainable parameters, which enables the network to learn more complex functions. In the embodiment of the present application. The fully connected layer only represents a convolution operation, and the only difference between the fully connected layer and the convolutional layer is that the number of filters is equal to the number of input channels. Therefore, the formula of the fully connected layer is the same as the formula of the convolutional layer. That is, the formula of the fully connected layer is:

[0152]

[0153] Among them, y represents the output, that is, the first training result; F represents the activation function; m, n and o represent the three dimensions of the filter; (w) represents the coefficient of the filter at positions e, f and g, d represents the data value of the input matrix (that is, the third feature map) at positions e, f and g, and b represents the deviation.

[0154] S43. Calculate a first loss function based on the first training result and a true value corresponding to the target expanded data set.

[0155] Furthermore, the calculation formula of the first loss function is:

[0156]

[0157] Wherein, MSE is the first loss function; n is the number of samples, that is, the length of the first training data set; x i is the true value corresponding to the target expanded data set, that is, the true value corresponding to the i-th target expanded data set; y i is the first training result, that is, the first training result corresponding to the i-th target expanded data set.

[0158] The first loss function is the mean square error loss. In other implementations, other loss functions may also be used, which may be determined by those skilled in the art according to actual needs.

[0159] S44. Adjust the first model parameters of the initial convolutional neural network based on the first loss function to form the travel rhythm prediction model.

[0160] The prediction results output by the travel rhythm prediction model can be referred to Figure 2 The "Output prediction results" step in the

[0161] It should be understood that the embodiments of the present application significantly reduce the complexity and cost of model updates, and the model can be accurately updated using only a small amount of data. This breakthrough not only improves the real-time performance of the model, but also enhances its economy, ensuring that in an environment where data is scarce, the model can still maintain a high level of predictive performance, thereby improving overall operational efficiency and economic benefits.

[0162] In addition, the technology proposed in the embodiments of the present application can provide methodological assistance for the analysis of human mobility behavior and the study of group behavior patterns in sociological research, help reveal the complex interaction between the urban environment and human activities, and further optimize location-based services such as route planning and personalized recommendations, thereby enhancing the spatial intelligence of smart cities.

[0163] <Crowd travel rhythm prediction device based on transfer learning>

[0164] like Figure 3 , which is a principle block diagram of a crowd travel rhythm prediction device based on transfer learning provided in the second aspect of the embodiment of the present application. Figure 3 In the embodiment, the crowd travel rhythm prediction device 100 based on transfer learning includes:

[0165] A travel data set acquisition module 101 is used to acquire a travel data set of a region to be predicted;

[0166] The prediction module 102 is used to input the travel data set into the travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained with the expanded data set obtained by processing the transfer learning model, and each training sample for training the transfer learning model contains travel data of crowd-rich areas and travel data of crowd-sparse areas.

[0167] <Terminal Equipment>

[0168] A third aspect of the embodiments of the present application provides a terminal device. The principle block diagram of the terminal device can be as follows: Figure 4As shown. The terminal device includes a processor, a memory, a network interface, a display screen and a temperature sensor connected via a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a method for predicting the travel rhythm of a crowd based on transfer learning is implemented. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the temperature sensor is pre-set inside the terminal device to detect the operating temperature of the internal device.

[0169] Those skilled in the art will understand that Figure 4 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal device to which the scheme of the present invention is applied. The specific terminal device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0170] In some embodiments, an embodiment of the present application provides a terminal device, which includes a processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the steps of the method for predicting travel rhythm of a crowd based on transfer learning provided in the first aspect of the above-mentioned embodiment of the present application.

[0171] <Computer Readable Storage Medium>

[0172] According to the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program enables a computer to execute the steps of the method for predicting travel rhythm of a crowd based on transfer learning provided in the first aspect of the embodiments of the present application.

[0173] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0174] The technical features of the above embodiments can be combined without changing the basic principles of the present application. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0175] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the scope of patent protection of the present application shall be subject to the attached claims.

Claims

1. A method for predicting crowd travel rhythm based on transfer learning, characterized in that: include: Obtain the travel data set of the area to be predicted; The travel data set is input into the travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained by the expanded data set obtained by the transfer learning model processing, and each training sample for training the transfer learning model contains travel data of crowd-rich areas and travel data of crowd-sparse areas.

2. The method for predicting crowd travel rhythm based on transfer learning according to claim 1 is characterized in that: The training steps of the travel rhythm prediction model include: Obtain a first training data set and a first real label set, wherein the first training data set includes a plurality of the expanded data sets, and each of the expanded data sets has a one-to-one correspondence with one of the real values ​​in the first real label set; Inputting the target expanded data set into the initial convolutional neural network for prediction processing to obtain a first training result, wherein the target expanded data set is any element in the first training data set; Calculate a first loss function based on the first training result and a true value corresponding to the target expanded data set; The first model parameter of the initial convolutional neural network is adjusted based on the first loss function to form the travel rhythm prediction model.

3. The method for predicting crowd travel rhythm based on transfer learning according to claim 2 is characterized in that: The step of inputting the target expanded data set into the initial convolutional neural network for prediction processing to obtain the first training result comprises: The convolution layer of the initial convolutional neural network performs a feature extraction operation on the target expanded data set to obtain a first feature map; The pooling layer of the initial convolutional neural network performs dimensionality reduction processing on the first feature map to obtain a second feature map; The Dropout layer of the initial convolutional neural network performs random inactivation processing on the second feature map to obtain a third feature map; The fully connected layer of the initial convolutional neural network performs a convolution operation on the third feature map to obtain the first training result.

4. The method for predicting crowd travel rhythm based on transfer learning according to claim 2 is characterized in that: The step of obtaining a first training data set comprises: Acquire a plurality of travel time series data, each of the travel time series data includes first travel time series data of a crowd-rich area and second travel time series data of a crowd-sparse area; Preprocessing the target first travel time series data and the target second travel time series data to obtain an image to be processed, wherein the target first travel time series data is any first travel time series data among the multiple travel time series data, and the target second travel time series data and the target first travel time series data belong to the same travel time series data; Inputting the image to be processed into a transfer learning model, wherein the transfer learning model performs data migration processing on the image to be processed and outputs a synthesized image; Using the synthetic image to expand the target second trip time series data to obtain the expanded data set; All the expanded data sets are merged to form the first training data set.

5. The method for predicting crowd travel rhythm based on transfer learning according to claim 4 is characterized in that: The step of preprocessing the target first trip time series data and the target second trip time series data to obtain the image to be processed comprises: Cleaning the target first travel time series data and the target second travel time series data to obtain data to be processed; Dividing the data to be processed to obtain a data set to be scaled; Performing scaling processing on the data set to be scaled to obtain the data set to be imaged; The Gram angular field method is used to perform imaging processing on the imaged data set to obtain the image to be processed.

6. The method for predicting crowd travel rhythm based on transfer learning according to claim 5 is characterized in that: The step of dividing the data to be processed to obtain the data set to be scaled comprises: Performing time division processing on the data to be processed according to preset time to obtain a time series data set; The time series data set is subjected to dimensionality reduction processing by adopting a piecewise aggregation approximation method to obtain the data set to be scaled.

7. The method for predicting crowd travel rhythm based on transfer learning according to claim 4 is characterized in that: The training steps of the transfer learning model include: Obtaining a second training data set and a second real label set, wherein the second training data set includes a plurality of training images, and each training image has a one-to-one correspondence with one of the real images in the second real label set; Inputting the target training image into the generative adversarial network for data migration processing, and outputting a second training result, wherein the target training image is any training image in the second training data set; Calculating a second loss function based on the second training result and a real image corresponding to the target training image; The second model parameters of the generative adversarial network are adjusted based on the second loss function to form the transfer learning model.

8. A crowd travel rhythm prediction device based on transfer learning, characterized in that: include: A travel data set acquisition module is used to acquire the travel data set of the area to be predicted; The prediction module inputs the travel data set into the travel rhythm prediction model for prediction processing to obtain a prediction result, wherein the travel rhythm prediction model is trained with the expanded data set obtained by processing the transfer learning model, and each training sample for training the transfer learning model contains travel data of population-rich areas and travel data of population-sparse areas.

9. A terminal device, characterized in that: include: A processor and a memory, the memory being used to store a computer program, the processor being used to call and run the computer program stored in the memory to execute the steps of the method for predicting crowd travel rhythm based on transfer learning 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 the computer program enables a computer to execute the steps of the method for predicting the travel rhythm of a crowd based on transfer learning as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cross-modal data prediction method based on transfer learning

    CN112863182A

  • Method and device for predicting population flow in data sparse region

    CN115759350A

  • Depth map convolution short-time passenger flow prediction method and system, medium, equipment and terminal

    CN115759441A

  • Urban traffic flow prediction method and device based on migration comparative learning

    CN115985102A

  • Traffic flow prediction method based on generative spatio-temporal evolution modeling

    CN116246465A