Traffic flow prediction method and system based on fine-grained knowledge migration

Through the fine-grained regional-level knowledge migration method, matching and migrating regional knowledge of similar characteristics between source cities and target cities, the problem of harmful knowledge migration and insufficient adaptability of characteristic differences caused by coarse-grained knowledge migration in the existing technology is solved, and the accuracy and efficiency of traffic flow prediction are improved.

CN119992363APending Publication Date: 2025-05-13SHENZHEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510114831.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Existing traffic flow prediction methods based on transfer learning usually adopt coarse-grained knowledge transfer at the city level, ignoring the diversity of regional characteristics within the city, resulting in the harmful knowledge in the source city being transferred, and the transferred knowledge cannot adapt to areas with large characteristics in the target city, limiting the accuracy of traffic flow prediction.

Method used

A fine-grained regional-level knowledge migration method is adopted to construct the correlation between the source urban area and the target urban area, match areas with similar characteristics between cities, and carry out targeted knowledge migration between these areas, filter harmful regional knowledge in the source city, and migrate valuable knowledge to the matching area of ​​the target city.

Benefits of technology

The performance of deep learning models in the traffic flow prediction of target cities is improved, the accuracy and practicality of predictions is enhanced, the problem of data scarcity is effectively alleviated, and the efficiency of knowledge transfer is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992363A_ABST
    Figure CN119992363A_ABST
Patent Text Reader

Abstract

The invention relates to a traffic flow prediction method and system based on fine-grained knowledge migration, and the method achieves the traffic flow prediction method based on fine-grained knowledge migration by extracting the versatility characteristics of each region to establish the matching relation between a source region and a target region and carrying out knowledge migration between the matching regions through comparison domain adaptation. Compared with a city-level knowledge migration method, the region-level knowledge migration with finer granularity is realized, the characteristics of each small region can be better considered, harmful knowledge in a source city is effectively filtered, and effective knowledge is migrated to a proper position in a target city. In addition, the contrast domain adaptation method designed by the invention can realize more efficient knowledge migration, and meanwhile, the accuracy of traffic flow prediction in the target city is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of traffic flow prediction, and in particular to a traffic flow prediction method and system based on fine-grained knowledge migration. Background Art

[0002] As the important role of transportation in national economic development, urban operation and social progress becomes increasingly prominent, how to achieve efficient traffic flow management has become a key challenge faced by all countries. As an important part of the intelligent transportation system, traffic flow prediction is of great significance to alleviating traffic congestion, optimizing resource allocation, improving travel efficiency and formulating scientific and reasonable transportation policies. In recent years, with the rapid development of Internet of Things technology, a large number of sensors have been widely deployed in urban road networks, collecting rich traffic data. At the same time, the progress of big data technology and deep learning technology has brought new opportunities for processing complex spatiotemporal series data, and deep learning models have shown significant potential in traffic flow prediction tasks. However, due to the significant differences in economic development levels and traffic patterns in different regions, traditional deep learning models usually rely on a large amount of local data for training, which faces severe challenges in scenarios where data is scarce or difficult to label. Especially in economically underdeveloped areas, due to the lack of high-quality large-scale traffic flow data, the advantages of deep learning technology are difficult to effectively play, thus hindering the promotion and implementation of intelligent transportation. In response to these problems, transfer learning technology provides an effective solution to alleviate the problem of data scarcity by transferring knowledge from existing fields (source fields) to target fields. Applying transfer learning to traffic flow prediction tasks can not only make full use of existing traffic data resources, but also achieve high-precision predictions when data is limited or lacks annotations, providing more reliable decision support for traffic management.

[0003] Existing traffic flow prediction methods based on transfer learning usually adopt the following process: first, pre-train the deep learning model with sufficient data from the source city, then migrate the model to the target city with scarce data and perform fine-tuning to help the target city acquire effective knowledge from the source city, thereby completing the traffic flow prediction task. For example, Wang et al. (Wang L, Geng X, Ma X, et al. Cross-city transfer learning for deep spatio-temporal prediction [C] / / Proceedings of the 28th International Joint Conference on Artificial Intelligence. 2019: 1893-1899.) used crowd check-in data to build relationships between cities, and improved the prediction accuracy by optimizing the fine-tuning process of the model on the target city. Jin et al. (Jin Y, Chen K, Yang Q. Selective cross-city transfer learning for traffic prediction via source city region re-weighting [C] / / Proceedings of the 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining. 2022: 731-741.) extracted common features of cities from data such as crowd movement and road networks, and used meta-learning technology to learn importance weights for source cities, thereby optimizing the pre-training effect of the model in the source city. However, most of these methods are based on coarse-grained knowledge transfer at the city level, ignoring the diversity of regional characteristics within the city. In real life, cities are usually composed of different regions, and different regions may show significant differences in characteristics. Existing city-level knowledge transfer methods directly transfer the knowledge of the source city as a whole to the target city, which is prone to the following problems: first, harmful knowledge of the source city may be transferred to the target city together, and second, the transferred knowledge may not be able to adapt to the regions with large feature differences in the target city. These problems significantly limit the accuracy of traffic flow prediction in the target city. Figure 1 The diversity of urban-region characteristics and the limitations of coarse-grained city-level knowledge transfer are illustrated.

[0004] In order to solve the problems existing in the above methods, it is urgent to design a more fine-grained knowledge transfer method to effectively filter out harmful knowledge in the source city, and accurately transfer useful knowledge to the appropriate location in the target city, so as to improve the accuracy and practicality of traffic flow prediction. Summary of the invention

[0005] The first purpose of the present invention is to provide a traffic flow prediction method based on fine-grained knowledge migration. Compared with the existing city-level migration method, the present invention introduces a more fine-grained regional-level knowledge migration mechanism. By building a relationship between the source city area and the target city area, matching areas with similar characteristics between cities, and performing targeted knowledge migration between these areas. This method can effectively filter harmful regional knowledge in the source city and migrate valuable knowledge to the matching area of ​​the target city, thereby improving the performance of the deep learning model in traffic flow prediction in the target city.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A traffic flow prediction method based on fine-grained knowledge transfer, comprising:

[0008] Divide the source city and the target city into several regions, and extract historical traffic flow data and feature data of the regions respectively, wherein the feature data of the regions includes features extracted from regional satellite image data and / or features extracted from regional POI data;

[0009] Perform similarity matching on the regional feature data of the source city and the target city to obtain a regional matching group;

[0010] Based on historical traffic flow data, the regional traffic spatiotemporal characteristics of the source city and the target city are extracted respectively;

[0011] Based on the regional matching group, knowledge transfer is performed between a pair of matching regions through comparative domain adaptation, and future traffic flow values ​​of the source city and the target city are predicted respectively based on the regional traffic spatiotemporal characteristics of the source city and the target city;

[0012] The modules for predicting future traffic flow values ​​in the source city and the target city, as well as the module for knowledge transfer, are jointly trained based on traffic flow prediction loss and knowledge transfer loss; the historical traffic flow values ​​of the target city to be predicted are input into the trained model to obtain the future traffic flow values ​​predicted by the model.

[0013] As a preferred implementation, the historical traffic flow data of the area is constructed based on vehicle trajectory data, including:

[0014] The vehicle trajectory data of the source city and the target city are obtained respectively, and the number of moving vehicles in each area is counted according to the position of the trajectory points. The area is divided according to time slices to obtain the traffic flow value of each area in each time step.

[0015] As a preferred implementation, a trained image feature extraction network is used to extract features from satellite images, wherein the image feature extraction network is composed of a residual network and a multi-layer perceptron;

[0016] The training method of the image feature extraction network is:

[0017] Get a regional satellite image. For any image in the regional satellite image dataset, find another image in the dataset that is closest to it geographically as a positive sample. All images in the dataset except these two images are negative samples.

[0018] The satellite images are input into the residual network for feature extraction, and the extracted results are input into the multi-layer perceptron to project the features into a unified feature space. The projected features are used to calculate the comparative learning loss function to complete the training of the image feature extraction network.

[0019] As a preferred implementation, the features extracted from the regional POI data are encoding values ​​obtained by encoding the regional POI data based on the number of regional POI types and the number of each type of POI, including:

[0020] Based on the number n of regional POI types, a value of length n is constructed, and each bit in the value is assigned a value according to the number of POIs of the corresponding type to obtain the regional POI encoding value.

[0021] As a preferred implementation, for data containing both features extracted from regional satellite image data and features extracted from regional POI data, the satellite image feature data and the POI data are standardized and then connected to obtain feature data representing the region.

[0022] As a preferred implementation, a CNN-LSTM network with shared parameters is used to extract the spatiotemporal traffic characteristics of the source city and the target city. In this network, the traffic flow data first passes through the CNN (Convolutional Neural Network) module to extract the spatial dependencies between different regions. After that, the features output by the CNN are input into the LSTM (Long Short-Term Memory) module to extract the temporal relationship between different time steps of each region. The features output by the LSTM are the spatiotemporal traffic characteristics of the source city and the target city.

[0023] As a preferred implementation, the method of performing knowledge transfer by contrast domain adaptation includes:

[0024] The traffic spatiotemporal features of the source area and the traffic spatiotemporal features of the target area in a region matching group are processed respectively through a projection network with shared parameters, and the features are projected into the same feature space; the projection network is composed of a multi-layer perceptron;

[0025] The projected features of the source region and the target region are standardized respectively;

[0026] The target region is defined as the anchor region, the source region matching the target region is used as the positive sample, and all other source regions are used as negative samples. The knowledge transfer between matching regions is carried out with the principle that the feature distance between the anchor and the positive sample is as close as possible, and the feature distance between the anchor and the negative sample is as far as possible.

[0027] As a preferred implementation, a traffic flow prediction network composed of a multi-layer sensor is used to predict traffic flow based on input traffic spatiotemporal characteristic data.

[0028] As a preferred implementation, the knowledge transfer loss is characterized based on the cross entropy loss;

[0029] The traffic flow prediction loss is characterized based on the MSE loss.

[0030] Furthermore, the cross entropy loss formula that characterizes the knowledge transfer loss is as follows:

[0031] ;

[0032] Where logits represents the classification result obtained by similarity calculation, labels represents the actual category label, cross_entropy(logits,labels) represents the cross entropy loss of the source city for the target city’s category prediction, and cross_entropy(logits.t(),labels) represents the cross entropy loss of the target city for the source city’s category prediction.

[0033] As a preferred implementation, during joint training, the feature extraction network of the satellite image is pre-trained separately, and the subsequent traffic spatiotemporal feature extraction network and the knowledge transfer network are jointly trained through traffic flow prediction loss and knowledge transfer loss.

[0034] The second object of the present invention is to provide a traffic flow prediction system based on fine-grained knowledge migration, comprising:

[0035] A data storage module, used to store regional historical traffic flow data, regional satellite image data and / or regional POI data of the source city and the target city;

[0036] Traffic spatiotemporal feature extraction module, used to extract regional traffic spatiotemporal features based on regional historical traffic flow data;

[0037] A regional representative feature extraction module is used to extract regional feature data based on regional satellite image data and / or regional POI data;

[0038] The regional matching group acquisition module is used to perform similarity matching on the regional feature data of the source city and the target city to obtain the regional matching group;

[0039] A model framework training module, based on the regional matching group, performs knowledge transfer between a pair of matching regions through comparative domain adaptation, and predicts the future traffic flow values ​​of the source city and the target city respectively based on the regional traffic spatiotemporal characteristics of the source city and the target city; and jointly trains the modules for predicting future traffic flow values ​​of the source city and the target city, as well as the knowledge transfer module, based on the traffic flow prediction loss and the knowledge transfer loss;

[0040] The traffic flow prediction module inputs the historical traffic flow values ​​of the target city to be predicted into the trained model to obtain the future traffic flow values ​​predicted by the model.

[0041] The present invention establishes a matching relationship between the source area and the target area by extracting the universal features of each area, and performs knowledge transfer between the matching areas through comparative domain adaptation, thereby realizing a traffic flow prediction method based on fine-grained knowledge transfer. Compared with the city-level knowledge transfer method, the present invention realizes a finer-grained regional-level knowledge transfer, which can better consider the characteristics of each small area, effectively filter harmful knowledge in the source city, and transfer effective knowledge to the appropriate location in the target city. In addition, the comparative domain adaptation method designed by the present invention can achieve more efficient knowledge transfer, while effectively improving the accuracy of traffic flow prediction in the target city. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 An example diagram of the diversity of urban area characteristics and the necessity of fine-grained knowledge transfer.

[0043] Figure 2 The figure is a flow chart of a method according to an embodiment of the present invention.

[0044] Figure 3 The figure is an overall framework diagram of the method according to an embodiment of the present invention.

[0045] Figure 4 This is a model framework diagram of the image feature extraction network according to an embodiment of the present invention.

[0046] Figure 5 This is a model framework diagram of the traffic spatiotemporal feature extraction network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The present invention is described in detail below in conjunction with the accompanying drawings and embodiments. The present invention designs a traffic flow prediction method based on fine-grained knowledge migration for the task of traffic flow prediction in the city. The method uses the rich historical traffic flow data in the source city to extract traffic spatiotemporal characteristics (i.e., knowledge), and migrates the knowledge to the target city where data is scarce by designing a fine-grained regional-level migration method, thereby helping the target city to achieve high-accuracy traffic flow prediction tasks.

[0048] Figure 2 The flowchart of a traffic flow prediction method based on fine-grained knowledge migration according to an embodiment of the present invention is shown. The specific steps include:

[0049] (1) Obtain historical traffic flow data, satellite image data, and POI data of the source city and target city respectively, and preprocess the data.

[0050] (2) The satellite image features and POI features of the source city and the target city are extracted respectively, and the two features are connected as the representative features of the city. The similarity of the representative features of the source city and the target city is calculated to obtain the regional matching group.

[0051] (3) Based on the historical traffic flow data, the spatiotemporal characteristics of the source city and the target city are extracted respectively. Based on the regional matching group obtained in the previous step, regional-level knowledge transfer is achieved between a pair of matching regions through comparative domain adaptation. At the same time, the future traffic flow values ​​of the source city and the target city are predicted respectively based on the spatiotemporal characteristics of the traffic.

[0052] (4) The entire framework is trained jointly based on traffic flow prediction loss and knowledge transfer loss. After training, the historical traffic flow values ​​of the target city are input into the model to obtain the future traffic flow values ​​predicted by the model.

[0053] Figure 3 The framework diagram of a traffic flow prediction method based on fine-grained knowledge migration according to an embodiment of the present invention is shown. The specific processing process is as follows:

[0054] 1.) Divide the source city and the target city into regions. According to the grid-type division method, divide each city into many rectangular grids with a range of 1km×1km, and each grid represents a region. Obtain the data sets of each region in the source city and the target city, including historical traffic flow data, satellite image data, and POI data.

[0055] 1.1) Obtain the historical traffic flow data of the source city and the target city respectively. The vehicle trajectory data in the city is composed of many GPS (Global Positioning System) location points, each of which includes the longitude, latitude and timestamp information of the location. By locating the starting and ending points of each trajectory, the area to which it belongs is determined, so as to calculate the number of vehicles moving in each area, and then obtain the historical traffic flow value of the area. After that, according to the timestamp information of the positioning, the time slice is divided into hours, and the traffic flow value of each area in the source city and the target city at each time step (that is, every hour) can be obtained. Usually, due to factors such as the level of economic development, the scale of traffic flow data in the source city is much larger than that of the target city.

[0056] 1.2) Obtain satellite image data and POI data of the source city and the target city respectively. Thanks to their wide distribution, easy access, and rich information, satellite images and POI data can be used as a supplement to the data set, thereby effectively making up for the lack of traffic flow data in the target city. In this embodiment, the satellite image of each city is downloaded from QGIS (https: / / www.qgis.org / ), and then segmented according to the range of the area to obtain a satellite image covering each area. The size of each image is 512×512 pixels, with three RGB channels.

[0057] In this embodiment, POI data of each area is downloaded from OpenStreetMap (https: / / www.openstreetmap.org / ), which includes the specific number of 14 points of interest (tourist attractions, medical health, housekeeping, residential areas, financial institutions, sports and leisure, culture and education, shopping, real estate, government agencies, enterprises, catering, transportation, and public services) in each area.

[0058] 2.) Extract satellite image features and POI features of each area in the source city and the target city respectively, and obtain regional matching groups based on these features.

[0059] 2.1) Extract satellite image features of each area in the source city and the target city respectively. The network structure used to extract satellite image features is as follows: Figure 4As shown. For any image in the satellite image dataset, it is called an anchor point, and another image with the closest geographical distance to the anchor point is found in the dataset, which is called a positive sample (because in the real world, the closer the distance, the more similar the features of places). All images in the dataset except these two images are called negative samples. In the image feature extraction network, the satellite image is first input into ResNet (Residual Network) to extract features, and the obtained features are input into the projection network composed of MLP (Multilayer Perceptron) to project the features into a unified feature space. The projected features are used to calculate the comparative learning loss function, and the calculation formula is as follows:

[0060] ;

[0061] in is the projection feature of the anchor image, is the projected feature of the positive sample image, is the projected feature of the negative sample image, is the temperature coefficient used to control the degree of contrast, is the cosine similarity, The indicator function is used to limit the denominator of the formula to only calculate the cosine similarity between the anchor point and the negative sample.

[0062] The purpose of this loss function is to make the distance between the anchor point and the positive sample as close as possible in the feature space, and the distance between the anchor point and the negative sample as far as possible in the feature space. This loss function is used to train the image feature extraction network in an unsupervised contrastive learning manner. After the training is completed, a satellite image is input into the network, and the features output by the residual network are the features of the satellite image.

[0063] 2.2) Encode the POI features of each area in the source city and the target city respectively. The POI feature of each area is represented by a feature with a length of 14, and the encoding method is frequency encoding, that is, the value of each position in the feature is the number of points of interest of the corresponding category in the area.

[0064] 2.3) The satellite image features and POI features of each region are respectively normalized to 0-1 to eliminate the difference in the numerical range between the two, and then the normalized satellite image features and POI features of each region are concatenated to obtain the representative features of each region.

[0065] 2.4) Calculate the similarity of representative features between all source city regions and all target city regions. That is, for each target city region, find the region in the source city that is most similar to its representative features, thus forming a matching pair of source and target regions. The similarity measure is cosine similarity, which is calculated as follows:

[0066] ;

[0067] in Represents the source city characteristics matrix, where each row is a representative characteristic of a source region; Represents the target city feature matrix, where each row is a representative feature of a target area; Represents the transpose of a matrix; The calculated similarity score matrix, each row is the similarity score between each target region and all source regions.

[0068] Afterwards, by obtaining The position index of the maximum value in each row of can be used to obtain the matching source area of ​​each target area, that is, the area matching group.

[0069] 3.) Based on the historical traffic flow data obtained in 1.1, the traffic spatiotemporal characteristics (i.e., knowledge) of the source city and the target city are extracted respectively, thereby completing the knowledge transfer and future traffic flow prediction tasks.

[0070] 3.1) The traffic spatiotemporal features (i.e., knowledge) of the source city and the target city are extracted through the traffic spatiotemporal features extraction network. The structure of the traffic spatiotemporal features extraction network is as follows: Figure 5 As shown, this embodiment takes "predicting the traffic value of the next time step by the traffic value of the historical 6 time steps" as an example. In actual operation, the size of the historical window and the future prediction window can be adjusted according to actual needs. The traffic spatiotemporal feature extraction network is composed of CNN (Convolutional Neural Network) and LSTM (Long Short-Term Memory). The historical traffic flow data is first processed by CNN to extract the spatial dependency of urban traffic flow, that is, the relationship between the spatial positions of each region. Afterwards, the features output by CNN are input into LSTM to extract the temporal dependency of traffic flow, that is, the temporal sequence relationship of each region at different time steps. The output of the last layer of LSTM is the traffic spatiotemporal feature that contains both spatial dependency and temporal dependency.

[0071] 3.2) Based on the region matching group obtained in 2.4 and the traffic spatiotemporal characteristics obtained in 3.1, knowledge transfer is performed between the matching source region and the target region.

[0072] This embodiment designs a comparative domain adaptation method to achieve regional-level knowledge transfer, and the specific implementation method is as follows:

[0073] 3.2.1) The traffic spatiotemporal features of the source area and the traffic spatiotemporal features of the target area in a region matching group are processed separately through a projection network with shared parameters, and the features are projected into the same feature space. The projection network is composed of MLP (Multilayer Perceptron).

[0074] 3.2.2) The projected features of the source and target regions are normalized from 0 to 1 to eliminate the difference in their numerical ranges.

[0075] 3.2.3) For a certain target region, define it as the anchor region. The source region that matches the target region is called a positive sample, and all other source regions are called negative samples. Then, based on the idea of ​​contrastive learning, in the feature space, we hope that the feature distance between the anchor and the positive sample is as close as possible, while the feature distance between the anchor and the negative sample is as far as possible, so as to achieve knowledge transfer between the matching regions (i.e., the anchor region and the positive sample region).

[0076] 3.2.4) The design method of the knowledge transfer loss function is: the anchor point and the positive sample are regarded as having the same category label, and the label is different from that of the negative sample. Then, through the idea of ​​classification task, it is hoped that the anchor point can find the area with the same label as its label in all samples, that is, the feature similarity between the anchor point and the positive sample should be the highest. The similarity is measured by cosine similarity, and the knowledge transfer loss is designed by cross entropy. The formula is as follows:

[0077] ;

[0078] in, Represents the classification result obtained by similarity calculation, represents the true category label, represents the cross entropy loss of the category prediction of the source city to the target city, Represents the cross entropy loss of the category prediction of the target city to the source city.

[0079] 3.3) Based on the traffic spatiotemporal characteristics obtained in 3.1, the future traffic flow values ​​of the source city and the target city are predicted respectively. The traffic flow prediction network is composed of MLP. The traffic spatiotemporal characteristics of the source city and the target city are input into the traffic flow prediction network, and its output is the traffic flow value of each area in the next time step predicted by the model. The traffic flow prediction network is trained and optimized by MSE loss (Mean Square Error), and the formula is as follows:

[0080] , which is the loss function for the source city;

[0081] , which is the loss function for the target city;

[0082] in represents the actual traffic flow value, Represents the traffic flow value predicted by the model.

[0083] 4.) Training and application of the overall framework of this embodiment.

[0084] 4.1) In the overall framework, the image feature extraction network described in 2.1 is trained separately and first, so as to obtain the regional matching group first for the subsequent knowledge transfer step. The contrast domain adaptation module described in 3.2 and the traffic flow prediction network described in 3.3 are trained jointly, and the loss function is: ,in This is the knowledge transfer loss function defined in 3.2.4. and This is the traffic flow prediction loss function defined in 3.3. The weights ranging from 0 to 1 are used to balance the weight relationship between different loss functions.

[0085] 4.2) After the model is trained through the above steps, the historical traffic flow data is input into the model. After being processed by the traffic spatiotemporal feature extraction network and the traffic flow prediction network, the output is the future traffic flow value predicted by the model.

[0086] In summary, the present embodiment provides a method for predicting traffic flow based on fine-grained knowledge transfer, which extracts representative features of the source city and the target city through satellite images and POI data to obtain matching groups of the source area and the target area, and makes up for the problem of scarce traffic flow data in the target city. After learning the spatiotemporal characteristics of traffic in the source city and the target city through historical traffic flow data, the present method realizes fine-grained regional-level knowledge transfer through comparative domain adaptation, transfers the rich knowledge of the source area to the target area that matches it, and helps the target area complete the traffic flow prediction task. The traffic flow prediction method based on fine-grained knowledge transfer of the present embodiment can effectively filter out harmful regional knowledge in the source city, and apply effective knowledge to the appropriate area in the target city, realizing more fine-grained regional-level knowledge transfer, thereby alleviating the problem of scarce traffic flow data faced by the target city, improving the accuracy of traffic flow prediction in the target city, and improving the execution efficiency of knowledge transfer.

Claims

1. A traffic flow prediction method based on fine-grained knowledge transfer, characterized in that: include, Divide the source city and the target city into several regions, and extract historical traffic flow data and feature data of the regions respectively, wherein the feature data of the regions includes features extracted from regional satellite image data and / or features extracted from regional POI data; Perform similarity matching on the regional feature data of the source city and the target city to obtain a regional matching group; Based on historical traffic flow data, the regional traffic spatiotemporal characteristics of the source city and the target city are extracted respectively; Based on the regional matching group, knowledge transfer is performed between a pair of matching regions through comparative domain adaptation, and future traffic flow values ​​of the source city and the target city are predicted respectively based on the regional traffic spatiotemporal characteristics of the source city and the target city; The modules for predicting future traffic flow values ​​of the source city and the target city, as well as the modules for knowledge transfer, are jointly trained based on the traffic flow prediction loss and the knowledge transfer loss. The historical traffic flow values ​​of the target city to be predicted are input into the trained model to obtain the future traffic flow values ​​predicted by the model.

2. The method according to claim 1, characterized in that The historical traffic flow data of the area is constructed based on vehicle trajectory data, including: The vehicle trajectory data of the source city and the target city are obtained respectively, and the number of moving vehicles in each area is counted according to the position of the trajectory points. The area is divided according to time slices to obtain the traffic flow value of each area in each time step.

3. The method according to claim 1, characterized in that Extracting features from satellite images using a trained image feature extraction network, wherein the image feature extraction network is composed of a residual network and a multi-layer perceptron; The training method of the image feature extraction network is: Get a regional satellite image. For any image in the regional satellite image dataset, find another image in the dataset that is closest to it geographically as a positive sample. All images in the dataset except these two images are negative samples. The satellite images are input into the residual network for feature extraction, and the extracted results are input into the multi-layer perceptron to project the features into a unified feature space. The projected features are used to calculate the comparative learning loss function to complete the training of the image feature extraction network.

4. The method according to claim 1, characterized in that: The features extracted from the regional POI data are encoding values ​​obtained by encoding the regional POI data based on the number of regional POI types and the number of each type of POI, including: Based on the number of regional POI types n , the construction length is n The value of the area POI is assigned to each digit of the value according to the number of POIs of the corresponding type to obtain the area POI code value.

5. The method according to claim 1, characterized in that For data containing both features extracted from regional satellite image data and features extracted from regional POI data, the satellite image feature data and the POI data are standardized and then connected to obtain feature data representing the region.

6. The method according to claim 1, characterized in that The CNN-LSTM network with shared parameters is used to extract the spatiotemporal traffic characteristics of the source city and the target city.

7. The method according to claim 1, characterized in that The method of performing knowledge transfer by contrast domain adaptation includes: The traffic spatiotemporal features of the source area and the traffic spatiotemporal features of the target area in a region matching group are processed respectively through a projection network with shared parameters, and the features are projected into the same feature space; the projection network is composed of a multi-layer perceptron; The projected features of the source region and the target region are standardized respectively; The target region is defined as the anchor region, the source region matching the target region is used as the positive sample, and all other source regions are used as negative samples. The knowledge transfer between matching regions is carried out with the principle that the feature distance between the anchor and the positive sample is as close as possible, and the feature distance between the anchor and the negative sample is as far as possible.

8. The method according to claim 1, characterized in that Traffic flow prediction network composed of multi-layer perception is used to predict traffic flow based on input traffic spatiotemporal characteristic data.

9. The method according to claim 1, characterized in that: The knowledge transfer loss is characterized based on the cross entropy loss; The traffic flow prediction loss is characterized based on the MSE loss.

10. A traffic flow prediction system based on fine-grained knowledge transfer, characterized in that: include, A data storage module, used to store regional historical traffic flow data, regional satellite image data and / or regional POI data of the source city and the target city; Traffic spatiotemporal feature extraction module, used to extract regional traffic spatiotemporal features based on regional historical traffic flow data; A regional representative feature extraction module is used to extract regional feature data based on regional satellite image data and / or regional POI data; The regional matching group acquisition module is used to perform similarity matching on the regional feature data of the source city and the target city to obtain the regional matching group; A model framework training module, based on the regional matching group, performs knowledge transfer between a pair of matching regions through comparative domain adaptation, and predicts future traffic flow values ​​of the source city and the target city respectively based on the regional traffic spatiotemporal characteristics of the source city and the target city; The modules for predicting future traffic flow values ​​of the source city and the target city, as well as the modules for knowledge transfer, are jointly trained based on the traffic flow prediction loss and the knowledge transfer loss. The traffic flow prediction module inputs the historical traffic flow values ​​of the target city to be predicted into the trained model to obtain the future traffic flow values ​​predicted by the model.