A traffic sequence prediction method and device, electronic equipment and storage medium

By constructing a virtual city and training a deep learning model, the problem of knowledge transfer in traffic sequence prediction is solved, enabling more accurate traffic data transfer and prediction, optimizing traffic management, reducing congestion and delays, and improving system efficiency.

CN116884211BActive Publication Date: 2026-05-05MINZU UNIVERSITY OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MINZU UNIVERSITY OF CHINA
Filing Date
2023-07-05
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing traffic sequence prediction methods suffer from knowledge overlay and negative transfer issues during knowledge transfer, resulting in low prediction accuracy and an inability to effectively address the complexities of traffic management and planning, as well as problems such as traffic congestion and emissions pollution.

Method used

By constructing a virtual city, the target area is determined by calculating the similarity between the source city and the target city, traffic data of the virtual city is generated, and network weights are obtained by comparing the geographical data of the virtual city and the target city. A deep learning model is then trained to predict traffic sequences.

Benefits of technology

It enables more accurate traffic data migration, alleviates negative migration, improves the accuracy and efficiency of traffic sequence prediction, optimizes travel plans, reduces traffic congestion and delays, and improves the overall operational efficiency of the transportation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116884211B_ABST
    Figure CN116884211B_ABST
Patent Text Reader

Abstract

This invention discloses a traffic sequence prediction method, apparatus, electronic device, and storage medium. The method includes: determining a target area from the source city based on traffic data from a source city and a target city, and then constructing a virtual city; comparing the geographical data of the virtual city and the target city to obtain network weights; training a prediction model based on the network weights, the virtual city, and the time-series data of the target city; and finally predicting the traffic sequence of the target city. The above technical solution constructs a virtual city based on the target area to retain more traffic data from the source city that is beneficial for predicting the target city, making traffic data migration more stable and reasonable; by training the prediction model based on the network weights, the virtual city, and the time-series data of the target city, the phenomenon of negative migration is mitigated, improving the accuracy and efficiency of traffic sequence prediction; finally, accurate and efficient traffic sequence prediction is achieved through the prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of intelligent transportation technology, and in particular to a traffic sequence prediction method, device, electronic device and storage medium. Background Technology

[0002] With the acceleration of global urbanization, urban populations are growing rapidly, leading to a significant increase in transportation demand and posing enormous challenges to urban transportation systems. Limited road space and transportation infrastructure, along with limited resources, make traffic management and planning more complex and difficult. Traffic congestion and emissions pollution negatively impact the environment, residents' health, and their travel experience, thus necessitating effective traffic sequence prediction methods to mitigate these problems. Currently, most existing traffic sequence prediction methods are based on deep learning models, but they cannot address the issues of knowledge overlay and negative transfer during knowledge transfer, resulting in low prediction accuracy. Summary of the Invention

[0003] This invention provides a traffic sequence prediction method, apparatus, electronic device, and storage medium to achieve traffic sequence prediction.

[0004] In a first aspect, embodiments of the present invention provide a traffic sequence prediction method, including:

[0005] Based on traffic data from the source city and the target city, target areas that meet the similarity requirements with the target city are identified from the source city. The traffic data includes time-series data and geographic data.

[0006] Build a virtual city for the target area and generate traffic data for the virtual city;

[0007] Network weights are obtained by comparing the geographic data of the virtual city with the geographic data of the target city.

[0008] A prediction model is trained based on network weights, time-series data of virtual cities, and time-series data of the target city.

[0009] Predict traffic sequences for the target city using a predictive model.

[0010] Secondly, embodiments of the present invention provide a traffic sequence prediction device, comprising:

[0011] The determination module is used to determine the target area in the source city that meets the similarity requirements with the target city based on the traffic data of the source city and the traffic data of the target city. The traffic data includes time series data and geographic data.

[0012] The building module is used to construct a virtual city for a target area and generate traffic data for the virtual city;

[0013] The comparison module is used to compare the geographic data of the virtual city with the geographic data of the target city to obtain the network weight;

[0014] The training module is used to train a prediction model based on network weights, time-series data of virtual cities, and time-series data of the target city.

[0015] The prediction module is used to predict traffic sequences in the target city using a prediction model.

[0016] Thirdly, embodiments of the present invention provide an electronic device, including:

[0017] At least one processor; and

[0018] A memory that is communicatively connected to at least one processor; wherein,

[0019] The memory stores a computer program that can be executed by at least one processor, such that the at least one processor is able to implement the traffic sequence prediction method as described in the first aspect.

[0020] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the traffic sequence prediction method as described in the first aspect.

[0021] This invention provides a traffic sequence prediction method, apparatus, electronic device, and storage medium. First, based on traffic data from a source city and traffic data from a target city, a target area with a similarity requirement to the target city is determined from the source city. The traffic data includes time-series data and geographic data. Then, a virtual city is constructed for the target area, and traffic data of the virtual city is generated. Next, the geographic data of the virtual city is compared with the geographic data of the target city to obtain network weights. Then, a prediction model is trained based on the network weights, the time-series data of the virtual city, and the time-series data of the target city. Finally, the traffic sequence of the target city is predicted using the prediction model. The above technical solution calculates the similarity between the source city and the target city based on the time-series and geographic data of the source city. Then, it determines the target region based on the similarity and constructs a virtual city and generates traffic data for that virtual city. This virtual city retains more traffic data from the source city that is beneficial for predicting the target city while excluding traffic data that is detrimental to the target city's prediction, resulting in more stable and reasonable traffic data migration and achieving more accurate traffic data migration, which helps to obtain a more accurate prediction model. By comparing the geographic data of the virtual city and the target city, network weights are obtained. The prediction model is trained based on these network weights, the time-series data of the virtual city, and the time-series data of the target city, mitigating the phenomenon of negative migration and obtaining a more accurate prediction model, thus improving the accuracy and efficiency of traffic sequence prediction. Finally, the prediction model achieves accurate and efficient traffic sequence prediction, which helps to optimize travel plans, reduce traffic congestion and delays, improve the overall operational efficiency of the transportation system, and save time and energy consumption.

[0022] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0023] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0024] Figure 1 This is a flowchart of a traffic sequence prediction method provided in Embodiment 1 of the present invention;

[0025] Figure 2 This is a flowchart of a traffic sequence prediction method provided in Embodiment 2 of the present invention;

[0026] Figure 3 This is a schematic diagram illustrating the similarity calculation between a source city and a target city according to Embodiment 2 of the present invention.

[0027] Figure 4 This is a flowchart of a traffic sequence prediction method provided in Embodiment 3 of the present invention;

[0028] Figure 5 This is a schematic diagram of a target area provided in Embodiment 3 of the present invention;

[0029] Figure 6 This is a schematic diagram illustrating the implementation of a traffic sequence prediction method provided in Embodiment 3 of the present invention;

[0030] Figure 7 This is a schematic diagram of the structure of a traffic sequence prediction device provided in Embodiment 4 of the present invention;

[0031] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 5 of the present invention. Detailed Implementation

[0032] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, the embodiments and features described herein can be combined with each other unless otherwise specified. It should also be noted that, for ease of description, only the parts relevant to the present invention are shown in the drawings, not the entire structure.

[0033] Before discussing the exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. The process can be terminated when its operation is complete, but may also have additional steps not included in the figures. The process can correspond to a method, function, procedure, subroutine, subroutine, etc.

[0034] It should be noted that the concepts of "first" and "second" mentioned in the embodiments of the present invention are only used to distinguish different devices, modules, units or other objects, and are not used to limit the order of functions performed by these devices, modules, units or other objects or their interdependencies.

[0035] Example 1

[0036] Figure 1This is a flowchart illustrating a traffic sequence prediction method according to Embodiment 1 of the present invention. This embodiment is applicable to predicting traffic sequences. Specifically, the traffic sequence prediction method can be executed by a traffic sequence prediction device, which can be implemented through software and / or hardware and integrated into an electronic device. Further, the electronic device includes, but is not limited to, desktop computers, laptops, smartphones, and servers.

[0037] like Figure 1 As shown, the method specifically includes the following steps:

[0038] S110. Based on the traffic data of the source city and the traffic data of the target city, determine the target area from the source city that meets the similarity requirements with the target city. The traffic data includes time series data and geographic data.

[0039] In this embodiment, there can be one or more source cities. The target city can be understood as the city whose traffic sequence needs to be predicted. Traffic data can include time-series data and geographic data. Time-series data can be understood as all traffic data related to time, or traffic data that changes over time, such as vehicle flow, pedestrian flow, etc. Geographic data can be understood as traffic data composed of geographic factors, such as traffic data related to road networks, points of interest, and population mobility. It should be noted that the time-series data of the source city and the target city are not required to be of equal length; that is, the time-series data based on all dimensions are not required to be the same. For example, the quantity, type, or duration of the time-series data of the source city and the target city are not required to be the same. The target region can be understood as a region extracted from the source city that meets the similarity requirement with the target city, and there can be one or more such regions. Meeting the similarity requirement can be understood as meeting a preset similarity rule. For example, the similarity of completely identical regions can be set to 1, and a similarity greater than or equal to 0.8 can be set as meeting the requirement.

[0040] Specifically, based on the time-series and geographic data of the source cities, the similarity between the source cities and the target cities is calculated. Regions from the source cities that meet a preset similarity threshold are then extracted as the target regions. It should be noted that multiple cities can be used as source cities, meaning that target regions can be extracted from multiple source cities.

[0041] S120. Construct a virtual city for the target area and generate traffic data for the virtual city.

[0042] In this embodiment, a virtual city can be understood as a city constructed from a target area. The traffic data of the virtual city can include time-series data and geographic data, and the traffic data of the virtual city originates from the traffic data of the target area.

[0043] Specifically, the target area can be obtained from multiple source cities. In other words, the traffic data of virtual cities can be obtained by fusing areas from multiple source cities that are favorable for predicting the target city. This avoids the knowledge coverage problem caused by training one after another and the problem of not being able to exclude harmful information caused by the direct stacking method.

[0044] S130. Compare the geographic data of the virtual city with the geographic data of the target city to obtain the network weight.

[0045] In this embodiment, network weights mainly refer to the network weights of the deep learning model used for traffic sequence prediction, which are important parameters in deep learning networks. A multilayer perceptron can be used to compare and learn the feature vectors of the geographic data of the virtual city and the target city, repeatedly adjusting the weights of each layer to ultimately obtain the network weight values ​​for each layer, enabling the resulting prediction model to correctly classify all known samples.

[0046] S140. The prediction model is trained based on network weights, time series data of virtual cities, and time series data of the target city.

[0047] In this embodiment, the prediction model can be understood as a deep learning model used to predict traffic sequences, such as a Long Short-Term Memory (LSTM) network model, a Convolutional Neural Network (CNN) model, a Graph Attention Network (GAT) model, a Multi-Layer Perceptron (MLP) model, etc. It should be noted that the prediction model can be one or more of the above models, and this embodiment does not limit it.

[0048] Specifically, based on the network weights obtained by comparing the geographic data of the virtual city with that of the target city, the prediction model can learn from the time-series data of the virtual city, making the network weights adapt to the time-series characteristics. Then, by learning from the time-series data of the target city, the prediction model can not only learn the traffic data shared by the virtual city and the target city, such as low traffic at night and high traffic during the day, but also learn the traffic data unique to the target city.

[0049] S150. Predict traffic sequences in the target city using a predictive model.

[0050] The traffic sequence prediction method provided in Embodiment 1 of the present invention firstly determines a target area from the source city that meets the similarity requirements of the target city based on traffic data from the source city and traffic data from the target city. The traffic data includes time series data and geographic data. Then, a virtual city is constructed for the target area and traffic data of the virtual city is generated. Next, the geographic data of the virtual city is compared with the geographic data of the target city to obtain network weights. Then, a prediction model is trained based on the network weights, the time series data of the virtual city, and the time series data of the target city. Finally, the traffic sequence of the target city is predicted through the prediction model. The above technical solution calculates the similarity between the source city and the target city based on the time-series and geographic data of the source city. Then, it determines the target region based on the similarity and constructs a virtual city and generates traffic data for that virtual city. This virtual city retains more traffic data from the source city that is beneficial for predicting the target city while excluding traffic data that is detrimental to the target city's prediction, resulting in more stable and reasonable traffic data migration and achieving more accurate traffic data migration, which helps to obtain a more accurate prediction model. By comparing the geographic data of the virtual city and the target city, network weights are obtained. The prediction model is trained based on these network weights, the time-series data of the virtual city, and the time-series data of the target city, mitigating the phenomenon of negative migration and obtaining a more accurate prediction model, thus improving the accuracy and efficiency of traffic sequence prediction. Finally, the prediction model achieves accurate and efficient traffic sequence prediction, which helps to optimize travel plans, reduce traffic congestion and delays, improve the overall operational efficiency of the transportation system, and save time and energy consumption.

[0051] Example 2

[0052] Figure 2 This is a flowchart of a traffic sequence prediction method provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiments, and specifically describes the process of determining target areas from source cities that meet the similarity requirements with the target city. It should be noted that technical details not described in detail in this embodiment can be found in any of the above embodiments.

[0053] Specifically, such as Figure 2 As shown, the method specifically includes the following steps:

[0054] S210. For each undetermined area in the source city, calculate the similarity between the undetermined area and the target city based on the traffic data of the undetermined area and the traffic data of the target city.

[0055] In this embodiment, the region to be determined can be understood as each region in the source city whose similarity needs to be calculated.

[0056] Specifically, the source city can be divided into multiple regions as undetermined regions, and then the similarity between the undetermined regions and the target city can be calculated based on the traffic data of the undetermined regions and the traffic data of the target city.

[0057] Optionally, based on traffic data of the area to be determined and traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including:

[0058] Based on the traffic data of the area to be determined and the traffic data of each area in the target city, calculate the similarity between the area to be determined and each area in the target city.

[0059] The average similarity between the region to be determined and each region in the target city is taken as the similarity between the region to be determined and the target city.

[0060] Specifically, the target city can be divided into multiple regions. For each undetermined region in the source city, the similarity between the undetermined region and each region in the target city can be calculated based on the traffic data of the undetermined region and the traffic data of each region in the target city. The same number of similarities as the target city region can be obtained. Then, the average of the multiple similarities is calculated, and the average value is the similarity between the undetermined region and the target city.

[0061] Optionally, based on traffic data of the area to be determined and traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including:

[0062] Calculate the temporal similarity between the region to be determined and the target city based on the time series data of the region to be determined and the target city.

[0063] Calculate the geographical similarity between the region to be determined and the target city based on the geographical data of the region to be determined and the target city.

[0064] Adding the temporal similarity to the geographical similarity yields the similarity between the region to be determined and the target city.

[0065] Specifically, for each undetermined area in the source city, the temporal similarity and geographical similarity between the undetermined area and the target city are calculated separately, and then the temporal similarity and geographical similarity are added together to obtain the similarity between the undetermined area and the target city.

[0066] In one embodiment, correlation operations can be performed on temporal similarity and geographical similarity to determine the final similarity, and the form of the correlation operation is not limited. For example, the average of the temporal similarity and geographical similarity between a region to be determined and a target city can be used as the similarity between the region to be determined and the target city.

[0067] Optionally, based on traffic data of the area to be determined and traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including:

[0068] Based on traffic data of the region to be determined and traffic data of the target city, at least one of the following algorithms is used to calculate the similarity between the region to be determined and the target city: Dynamic Time Warping (DTW), Kullback-Leibler (KL) divergence-based algorithm, maximum mean error-based algorithm, and Jensen-Shannon (JS) divergence-based algorithm.

[0069] For example, based on the time series data of the region to be determined and the time series data of the target city, the DTW algorithm is used to calculate the time similarity between the region to be determined and the target city, denoted as S. T Based on the geographic data of the region to be determined and the geographic data of the target city, the KL divergence algorithm is used to calculate the geographic similarity between the region to be determined and the target city, denoted as S. G Finally, S T and S G The similarity between the region to be determined and the target city is obtained by summing the results, denoted as S.

[0070] Example of a surname, Figure 3 This is a schematic diagram illustrating the similarity calculation between a source city and a target city according to Embodiment 2 of the present invention, as shown below. Figure 3 As shown, source city S1 represents the first source city, and source city S... nLet S1 be the nth source city. There are n source cities in total. The first large rectangle on the left side of the diagram represents dividing source city S1 into 9×8 undetermined regions (small rectangles). The second large rectangle on the left side of the diagram represents dividing source city S2 into 9×8 undetermined regions (small rectangles), and so on. This can divide the n source cities into n 9×8 undetermined regions, i.e., an n-layer 9×8 source city matrix. The large rectangle in the middle of the diagram represents dividing target city T into 7×6 regions (small rectangles), i.e., a 7×6 target city matrix. The traffic data in a small rectangle in source city S1 (the solid-filled small rectangle in the diagram) is compared with the traffic data in each small rectangle in target city T. The DTW algorithm and KL divergence algorithm can be used to calculate the corresponding temporal similarity and geographical similarity, respectively. Then, the average of each temporal similarity and geographical similarity is taken to obtain the similarity of the small rectangles in the source city S1 with respect to the target city T. Then, the traffic data in another small rectangle in the source city S1 is compared with the traffic data in all small rectangles in the target city T. The DTW algorithm and KL divergence algorithm are used to obtain the corresponding temporal similarity and geographical similarity, and the average is taken to obtain the similarity of another small rectangle in the source city S1 with respect to the target city T. This process is repeated to obtain an n-layer 9×8 similarity matrix of the source city S1 with respect to the target city T.

[0071] S220. Determine the target area based on the similarity between each undetermined area and the target city.

[0072] For example, based on the similarity between each undetermined region in the source city and the target city, the undetermined regions with high similarity to the target city and with many common features with the target city can be selected to determine the target region.

[0073] Optionally, the target area can be determined based on the similarity between each undetermined area and the target city, including:

[0074] A depth-first search-based region extraction algorithm is used to extract undetermined regions from the source city that have a similarity higher than a set threshold and whose connectivity meets the requirements, and these regions are then used as the target regions.

[0075] Specifically, the depth-first search (DFS) region extraction algorithm can be understood as an algorithm that uses depth-first search to extract the desired region. The basic idea of ​​the DFS algorithm is to start traversing from the root node, delving into the deepest level of the tree or graph, then backtracking and searching other branches. When a node is visited, it is marked as visited, and its neighboring nodes are traversed. This process continues until the target node is found or all nodes have been traversed. The threshold can be preset according to the actual situation. The connectivity requirement can also be set according to the actual situation.

[0076] For example, the similarity of completely identical regions is set to 1, the similarity of regions with a similarity greater than or equal to 0.8 is set to be higher than the set threshold, and the regions to be determined that are relatively close to each other (such as the actual relative distance is within 5 meters or the number of rectangular boxes between them is no more than three) are set as regions to be determined that meet the connectivity requirements. A region extraction algorithm based on depth-first search is used to extract regions from the source city that have a similarity greater than 0.8 to the target city and are within 5 meters away, and these regions are used as the target regions.

[0077] S230. Construct a virtual city for the target area and generate traffic data for the virtual city.

[0078] Traffic data for virtual cities can be obtained by fusing traffic data from the target area.

[0079] Optionally, a virtual city can be constructed for the target area, and traffic data for the virtual city can be generated, including:

[0080] The target area is merged with the surrounding undefined area to obtain a rectangular area;

[0081] A two-dimensional strip packaging algorithm is used to construct a virtual city based on a rectangular region and generate traffic data for the virtual city.

[0082] In one embodiment, the set range can be set according to the actual situation, such as within a 10-meter radius around the target area, or the polygonal range defined by the boundary points of the target area. The two-dimensional strip packaging algorithm can be understood as an algorithm that, in a two-dimensional case, packages multiple rectangles one by one into a strip with an open end, with the aim of maximizing the usable area, and on this basis, constructs a virtual city and generates traffic data for the virtual city.

[0083] For example, the highest point, lowest point, left boundary point, and right boundary point of the target area can be found. Then, the target area is merged with the undetermined area within a set range (such as the rectangular area defined by the boundary points mentioned above) to obtain a rectangular area. A two-dimensional strip packaging algorithm is then used to fuse the rectangular area, and the traffic data corresponding to this rectangular area is fused to obtain the traffic data of the virtual city. The two-dimensional strip packaging algorithm is a novel priority-based heuristic non-clipping rectangular packaging problem solution. This algorithm first selects an available shape for a given location through a priority strategy, then divides the remaining space into two rectangles and recursively packages them. This algorithm can determine how areas of different sizes and shapes from the source city are merged into the virtual city. After the location of the source city in the virtual city is determined, the corresponding time-series data, geographical data, etc., will also be determined.

[0084] S240. Compare the geographic data of the virtual city with the geographic data of the target city to obtain the network weight.

[0085] S250, a prediction model is trained based on network weights, time series data of virtual cities, and time series data of the target city.

[0086] S260. Predict traffic sequences in the target city using a predictive model.

[0087] Specifically, by using the undetermined areas of multiple source cities to determine the target area, and then constructing a virtual city based on the target area, more traffic data that is beneficial to the prediction of the target city can be transferred, thereby enabling a more accurate prediction model.

[0088] This invention provides a traffic sequence prediction method based on the above embodiments. First, for each undetermined area in the source city, based on the traffic data of the undetermined area and the target city, the similarity between the undetermined area and the target city is calculated using multiple algorithms (such as the DTW algorithm, the KL divergence-based algorithm, the maximum mean error algorithm, and the JS divergence-based algorithm) and / or multiple dimensions (such as calculating the mean of each similarity, calculating the sum of temporal similarity and geographical similarity). This makes the similarity calculation more flexible, convenient, and accurate, facilitating subsequent use. Then, based on the similarity between each undetermined area and the target city, a depth-first search-based region extraction algorithm is used to determine the target area. Finally, a virtual city is constructed based on the target area, and traffic data for the virtual city is generated. The virtual city model retains more traffic data from the source city that is beneficial for predicting the target city while excluding traffic data that is detrimental to the target city's prediction. This makes the traffic data migration more stable and reasonable, achieving more accurate and reliable traffic data migration and contributing to a more accurate prediction model. By comparing the geographical data of the virtual city and the target city, network weights are obtained. The prediction model is trained based on these network weights, the time-series data of the virtual city, and the time-series data of the target city, mitigating the negative migration phenomenon and resulting in a more accurate prediction model. This improves the accuracy and efficiency of traffic sequence prediction. Finally, the prediction model achieves accurate and efficient traffic sequence prediction, which helps optimize travel plans, reduce traffic congestion and delays, improve the overall operational efficiency of the transportation system, and save time and energy consumption.

[0089] Example 3

[0090] Figure 4 This is a flowchart of a traffic sequence prediction method provided in Embodiment 3 of the present invention. This embodiment is a refinement based on the above embodiments, and specifically describes the process of determining network weights and training the prediction model. It should be noted that technical details not described in detail in this embodiment can be found in any of the above embodiments.

[0091] Specifically, such as Figure 4 As shown, the method specifically includes the following steps:

[0092] S310. Based on the traffic data of the source city and the traffic data of the target city, determine the target area from the source city that meets the similarity requirements with the target city. The traffic data includes time series data and geographic data.

[0093] S320: Construct a virtual city for the target area and generate traffic data for the virtual city.

[0094] S330. The geographic data of the virtual city and the geographic data of the target city are combined into an adjacency matrix and input into a graph attention network to extract the feature vectors of the virtual city and the target city through the graph attention network.

[0095] In this embodiment, the adjacency matrix can be understood as a matrix representing the adjacency relationships between nodes (such as geographic data), and is an important data structure in graph theory. Graph attention networks can automatically learn and optimize the connection relationships between nodes using attention mechanisms, and can be applied to inductive learning tasks. The network's computation is quite efficient.

[0096] Specifically, the geographic data of the virtual city and the geographic data of the target city are combined into an adjacency matrix and input into a graph attention network. Then, the graph attention network is used to extract the feature vectors of the virtual city and the target city.

[0097] S340. Input the feature vectors of the virtual city and the target city into a weight network composed of a multilayer perceptron to obtain the network weights.

[0098] In this embodiment, the multilayer perceptron can be understood as a feedforward artificial neural network model that can map multiple input datasets (such as feature vectors of virtual cities and feature vectors of target cities) onto a single output dataset (network weights).

[0099] Specifically, the feature vectors of the virtual city and the target city are input into a weight network composed of multilayer sensing mechanisms to obtain network weights. In other words, the initial network weights obtained based on the geographic data of the virtual city and the geographic data of the target city do not have temporal characteristics.

[0100] For example, we can first extract the feature vectors of the virtual city and the target city using a graph neural network (such as a graph attention network), denoted as . Where r S' r T These represent regions in the virtual city and the target city, respectively. This process can be called the feature extraction process by the feature network; then it passes through a weight network composed of multiple layers of perceptrons. The weights are then calculated, and the inner product is used to obtain the initial network weights. This process can be called the process of calculating network weights. It should be noted that the acquisition of network weights is dynamic. Before each training using virtual city traffic data, the weights are recalculated, and the multilayer perceptron is updated using a meta-learning mechanism.

[0101] S350, based on network weights, time series data of virtual cities, and time series data of target cities, trains a prediction model.

[0102] S360: Predict traffic sequences for the target city using a predictive model.

[0103] For example, traffic sequence prediction methods can be applied to cross-time period traffic sequence prediction. For instance, a prediction model learned in one time period (e.g., morning rush hour) can be transferred to another time period (e.g., evening rush hour) for traffic sequence prediction. Knowledge transfer (traffic data) can be utilized using traffic data from different time periods to improve the accuracy and robustness of traffic sequence prediction. Traffic sequence prediction methods can also be applied to prediction in data-scarce situations. For example, when traffic data in the target city is relatively scarce, relevant knowledge can be acquired from the source city's traffic data through transfer learning to supplement the missing traffic data in the target city. This can improve the accuracy and reliability of traffic sequence prediction in the target city. Furthermore, this method can be applied when there is new urban construction or urban planning. By leveraging knowledge and experience learned from existing cities through transfer learning to predict traffic sequences in new cities, the planning and management of new urban transportation systems can be accelerated. Traffic sequence prediction methods can also be applied to cross-modal traffic prediction. For example, a prediction model learned in one traffic modality (such as buses) can be transferred to another (such as subways) for traffic sequence prediction. Transfer learning can utilize traffic data and features from one modality to improve the prediction accuracy of the other. Furthermore, transfer learning can be used with existing traffic event data (such as accidents and construction) to predict potential traffic events in the target city, helping traffic management departments make timely responses and decisions to improve traffic safety and efficiency. The transfer learning methods described above can help predict traffic sequences under new environmental or data conditions, providing more accurate and reliable results, thereby supporting urban traffic planning, management, and travel decisions.

[0104] Optionally, a prediction model can be trained based on network weights, time-series data of the virtual city, and time-series data of the target city, including:

[0105] Extract time series data of a first number of virtual cities, and then selectively learn the extracted time series data of virtual cities based on network weights through a prediction model;

[0106] Extract time-series data from a second number of target cities to learn from the extracted time-series data of the target cities through a predictive model.

[0107] Specifically, firstly, time-series data from a first set of virtual cities are extracted. The prediction model then selectively learns from this extracted virtual city time-series data based on network weights. In other words, a period of time-series data from the virtual cities is used as input to the prediction model to predict traffic sequences for a subsequent period. Furthermore, a network weight mechanism (such as meta-learning) is used to focus on learning from the time-series data of virtual cities in areas with high network weights. This adapts the network weights to the temporal characteristics of the traffic data, adjusting the prediction model to better suit the target city, mitigating negative transfer and improving the accuracy of traffic sequence predictions for the target city. Secondly, a second set of time-series data from the target city is extracted. The prediction model then learns from this extracted target city time-series data. This fine-tunes the selectively learned prediction model using the target city's time-series data. A period of time-series data from the target city is used as input to the prediction model, allowing it to learn from the extracted target city time-series data. This ensures that the network weights adapt not only to the traffic data characteristics shared by both virtual and target cities but also to the unique traffic data characteristics of the target city, further adjusting the prediction model to better suit the target city and improving the accuracy of traffic sequence predictions for the target city.

[0108] Optionally, a prediction model can be trained based on network weights, time-series data of the virtual city, and time-series data of the target city, including:

[0109] Extract time-series data from the third number of target cities;

[0110] The loss of the prediction model is determined based on the extracted time-series data of the target city.

[0111] If the loss is greater than the set value, the gradient is calculated based on the loss and the network weights are updated according to the gradient.

[0112] Specifically, loss can be understood as the deviation between the prediction model's prediction and the true value. A smaller deviation indicates higher training accuracy, leading to higher subsequent prediction accuracy. Loss can be calculated using a loss function, such as the mean squared error loss function, logarithmic loss function, or cross-entropy loss function. The gradient can be understood as the rate of change of loss at a given moment, facilitating rapid updates to network weights. A third set of time-series data from target cities is extracted as input to the prediction model. The loss of the prediction model is determined based on this extracted data. If the loss exceeds a set value, the gradient is calculated based on the loss, and the network weights are updated accordingly. This process is repeated until the loss is less than or equal to the set value, indicating that the prediction model's accuracy has met the requirements. Training is then complete, resulting in a high-precision prediction model.

[0113] For example, a prediction model can be trained using time-series data of a virtual city over a past period (e.g., 10 days). The prediction model selectively learns from the extracted time-series data of the virtual city. This process uses a network weight mechanism to focus on learning the time-series data of the virtual city in areas with high network weights, which means that the loss value of that area has a larger weight. This process adapts the network weights to the time-series characteristics, making the prediction model more suitable for the target city. Then, the traffic data of the target city over a past period can be divided into two parts, such as dividing the traffic data of the past 30 days into a first part (traffic data corresponding to the first 20 days) and a second part (traffic data corresponding to the last 10 days). Based on this, the prediction model learns from the extracted first part of the target city's time-series data, so that the network weights not only adapt to the traffic data characteristics shared by the virtual city and the target city, but also adapt to the traffic data characteristics unique to the target city, making the prediction model more suitable for the target city. Furthermore, the loss of the prediction model can be determined based on the time series data of the extracted second part of the target city. If the loss is greater than the set value, the gradient is calculated based on the loss and the network weights are updated according to the gradient. The prediction model is continuously trained using the new network weights until the loss is less than or equal to the set value, indicating that the accuracy of the prediction model has reached the requirements, the training is completed, and a high-precision and high-accuracy prediction model is obtained.

[0114] For example, Figure 5 This is a schematic diagram of a target area provided in Embodiment 3 of the present invention, as shown below. Figure 5 As shown, the shaded area represents the target region, which can be obtained using a depth-first search region extraction algorithm.

[0115] For example, Figure 6 This is a schematic diagram illustrating the implementation of a traffic sequence prediction method provided in Embodiment 3 of the present invention, as shown below. Figure 6 As shown, the geographic data of the virtual city and the target city are combined to form an adjacency matrix and input into a graph attention network. The graph attention network then extracts feature vectors for both the virtual and target cities. These feature vectors are then input into a weight network composed of a multilayer perceptron to obtain network weights. Finally, a prediction network (e.g., a prediction model) is trained. The meta-learning mechanism allows for dynamic adjustment of network weights, thereby continuously refining the prediction model to better suit the target city and improve the accuracy of traffic sequence prediction.

[0116] The traffic sequence prediction method provided in Embodiment 3 of this invention is a refinement based on the above embodiments. It utilizes graph attention networks and multilayer perceptrons to efficiently and accurately obtain network weights. By extracting time-series data from a first number of virtual cities, the prediction model selectively learns from the extracted virtual city time-series data based on the network weights, adjusting the prediction model to better suit the target city and improving the accuracy of traffic sequence prediction. Similarly, by extracting time-series data from a second number of target cities, the prediction model learns from the extracted target city time-series data, further adjusting the prediction model to better suit the target city and improving the accuracy of traffic sequence prediction. Finally, by extracting time-series data from a third number of target cities and determining the loss of the prediction model based on this data, if the loss exceeds a set value, the gradient is calculated based on the loss, and the network weights are updated accordingly. Continuously training the prediction model with new network weights helps obtain a high-precision and high-accuracy prediction model. Finally, the prediction model achieves accurate and efficient traffic sequence prediction, helping to optimize travel plans, reduce traffic congestion and delays, improve the overall operating efficiency of the transportation system, and save time and energy consumption.

[0117] Example 4

[0118] Figure 7 This is a schematic diagram of a traffic sequence prediction device according to Embodiment 4 of the present invention. This device can execute the traffic sequence prediction method provided in this embodiment of the present invention. The traffic sequence prediction device provided in this embodiment includes:

[0119] The determination module 410 is used to determine a target area from the source city that meets the similarity requirement with the target city based on the traffic data of the source city and the traffic data of the target city, wherein the traffic data includes time series data and geographic data;

[0120] Construction module 420 is used to construct a virtual city for the target area and generate traffic data for the virtual city;

[0121] Comparison module 430 is used to compare the geographic data of the virtual city with the geographic data of the target city to obtain network weights;

[0122] Training module 440 is used to train a prediction model based on the network weights, the time series data of the virtual city, and the time series data of the target city;

[0123] The prediction module 450 is used to predict the traffic sequence of the target city through the prediction model.

[0124] The traffic sequence prediction device provided in Embodiment 4 of the present invention first determines a target area from the source city that meets the similarity requirements of the target city based on the traffic data of the source city and the traffic data of the target city. The traffic data includes time series data and geographic data. Then, a virtual city is constructed for the target area and traffic data of the virtual city is generated. Next, the geographic data of the virtual city is compared with the geographic data of the target city to obtain network weights. Then, a prediction model is trained based on the network weights, the time series data of the virtual city and the time series data of the target city. Finally, the traffic sequence of the target city is predicted through the prediction model. The above technical solution calculates the similarity between the source city and the target city based on the time-series and geographic data of the source city. Then, it determines the target region based on the similarity and constructs a virtual city and generates traffic data for that virtual city. This virtual city retains more traffic data from the source city that is beneficial for predicting the target city while excluding traffic data that is detrimental to the target city's prediction, resulting in more stable and reasonable traffic data migration and achieving more accurate traffic data migration, which helps to obtain a more accurate prediction model. By comparing the geographic data of the virtual city and the target city, network weights are obtained. The prediction model is trained based on these network weights, the time-series data of the virtual city, and the time-series data of the target city, mitigating the phenomenon of negative migration and obtaining a more accurate prediction model, thus improving the accuracy and efficiency of traffic sequence prediction. Finally, the prediction model achieves accurate and efficient traffic sequence prediction, which helps to optimize travel plans, reduce traffic congestion and delays, improve the overall operational efficiency of the transportation system, and save time and energy consumption.

[0125] Optionally, the determining module 410 includes:

[0126] The calculation unit is used to calculate the similarity between each region to be determined in the source city and the target city based on the traffic data of the region to be determined and the traffic data of the target city.

[0127] The determination unit is used to determine the target area based on the similarity between each undetermined area and the target city.

[0128] Optionally, the computing unit includes:

[0129] The first calculation subunit is used to calculate the similarity between the area to be determined and the areas in the target city based on the traffic data of the area to be determined and the traffic data of each area in the target city.

[0130] The second calculation subunit is used to take the average similarity between the region to be determined and each region in the target city as the similarity between the region to be determined and the target city.

[0131] Optionally, the computing unit includes:

[0132] The third calculation subunit is used to calculate the time similarity between the region to be determined and the target city based on the time series data of the region to be determined and the time series data of the target city.

[0133] The fourth calculation subunit is used to calculate the geographical similarity between the area to be determined and the target city based on the geographical data of the area to be determined and the geographical data of the target city.

[0134] The fifth calculation subunit is used to add the temporal similarity and geographical similarity to obtain the similarity between the region to be determined and the target city.

[0135] Optionally, the computing unit includes:

[0136] The sixth calculation subunit is used to calculate the similarity between the area to be determined and the target city based on the traffic data of the area to be determined and the traffic data of the target city, using at least one of the following algorithms: dynamic time warping algorithm, KL divergence-based algorithm, maximum mean error-based algorithm, and JS divergence-based algorithm.

[0137] Optionally, the determining unit includes:

[0138] Extraction sub-units are used to extract regions from the source city that have a similarity higher than a set threshold and meet the connectivity requirements with the target city, using a depth-first search-based region extraction algorithm.

[0139] Optionally, building module 320 includes:

[0140] The merging unit is used to merge the target area with the surrounding undefined area within a set range to obtain a rectangular area;

[0141] The building unit is used to construct a virtual city based on a rectangular region and generate traffic data for the virtual city using a two-dimensional strip wrapping algorithm.

[0142] Optionally, the comparison module 330 includes:

[0143] The feature vector extraction unit is used to form an adjacency matrix from the geographic data of the virtual city and the geographic data of the target city and input it into the graph attention network to extract the feature vectors of the virtual city and the target city through the graph attention network.

[0144] The network weight acquisition unit is used to input the feature vectors of the virtual city and the target city into the weight network composed of multilayer perceptrons to obtain the network weights.

[0145] Optionally, training module 340 includes:

[0146] The first extraction unit is used to extract time series data of a first number of virtual cities, so as to selectively learn the extracted time series data of virtual cities based on network weights through a prediction model.

[0147] The second extraction unit is used to extract a second number of time series data of the target cities in order to learn the extracted time series data of the target cities through the prediction model.

[0148] Optionally, training module 340 includes:

[0149] The third extraction unit is used to extract time-series data of the third number of target cities;

[0150] A loss determination unit is used to determine the loss of the prediction model based on the extracted time-series data of the target city.

[0151] The update unit is used to calculate the gradient based on the loss and update the network weights according to the gradient if the loss is greater than a set value.

[0152] The traffic sequence prediction device provided in Embodiment 4 of the present invention can be used to execute the traffic sequence prediction method provided in any of the above embodiments, and has the corresponding functions and beneficial effects.

[0153] Example 5

[0154] Figure 8 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device 10 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, user equipment, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0155] like Figure 8As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0156] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks and wireless networks.

[0157] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as traffic sequence prediction methods.

[0158] In some embodiments, the traffic sequence prediction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the traffic sequence prediction method by any other suitable means (e.g., by means of firmware).

[0159] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0160] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0161] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0162] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device 10, which includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device 10. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0163] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0164] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0165] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0166] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A traffic sequence prediction method, characterized in that, include: Based on traffic data from the source city and traffic data from the target city, a target area is determined from the source city that meets the requirements for similarity and connectivity with the target city. The traffic data includes time-series data and geographic data. A virtual city is constructed for the target area with the goal of maximizing the usable area, and traffic data for the virtual city is generated. The network weight is obtained by comparing the geographic data of the virtual city with the geographic data of the target city. A prediction model is trained based on the network weights, the time-series data of the virtual city, and the time-series data of the target city. The prediction model is used to predict traffic sequences in the target city. The network weights are obtained by comparing the geographic data of the virtual city with the geographic data of the target city, including: The geographic data of the virtual city and the geographic data of the target city are combined to form an adjacency matrix and input into a graph attention network to extract the feature vectors of the virtual city and the target city. The feature vectors of the virtual city and the target city are input into a weighted network composed of a multilayer perceptron to obtain the network weights.

2. The method according to claim 1, characterized in that, Based on traffic data from the source city and the target city, target areas from the source city that meet the similarity and connectivity requirements of the target city are identified, including: For each undetermined area in the source city, the similarity between the undetermined area and the target city is calculated based on the traffic data of the undetermined area and the traffic data of the target city. The target region is determined based on the similarity between each of the undetermined regions and the target city.

3. The method according to claim 2, characterized in that, Based on the traffic data of the area to be determined and the traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including: Based on the traffic data of the area to be determined and the traffic data of each area in the target city, calculate the similarity between the area to be determined and each area in the target city. The average similarity between the region to be determined and each region in the target city is taken as the similarity between the region to be determined and the target city.

4. The method according to claim 2, characterized in that, Based on the traffic data of the area to be determined and the traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including: Based on the time series data of the region to be determined and the time series data of the target city, calculate the time similarity between the region to be determined and the target city. Based on the geographical data of the region to be determined and the geographical data of the target city, calculate the geographical similarity between the region to be determined and the target city. The temporal similarity is added to the geographical similarity to obtain the similarity between the region to be determined and the target city.

5. The method according to claim 2, characterized in that, Based on the traffic data of the area to be determined and the traffic data of the target city, the similarity between the area to be determined and the target city is calculated, including: Based on the traffic data of the region to be determined and the traffic data of the target city, at least one of the following algorithms is used to calculate the similarity between the region to be determined and the target city: dynamic time warping algorithm, KL divergence-based algorithm, maximum mean error-based algorithm, and JS divergence-based algorithm.

6. The method according to claim 2, characterized in that, Determining the target region based on the similarity between each of the undetermined regions and the target city includes: A depth-first search-based region extraction algorithm is used to extract undetermined regions from the source city that have a similarity higher than a set threshold and whose connectivity meets the requirements, and these regions are designated as target regions.

7. The method according to claim 1, characterized in that, A virtual city is constructed for the target area with the goal of maximizing usable area, and traffic data for the virtual city is generated, including: The target area is merged with the surrounding undefined area within a set range to obtain a rectangular area; A two-dimensional strip packaging algorithm is used to construct a virtual city based on the rectangular region and generate traffic data for the virtual city.

8. The method according to claim 1, characterized in that, A prediction model is trained based on the network weights, the time-series data of the virtual city, and the time-series data of the target city, including: Extract time-series data of a first number of virtual cities, and then selectively learn the extracted time-series data of the virtual cities based on the network weights using the prediction model. Extract time-series data of a second number of target cities to learn the extracted time-series data of the target cities through the prediction model.

9. The method according to claim 1, characterized in that, A prediction model is trained based on the network weights, the time-series data of the virtual city, and the virtual data of the target city, including: Extract time-series data from the third number of target cities; The loss of the prediction model is determined based on the extracted time-series data of the target city. If the loss is greater than a set value, then the gradient is calculated based on the loss and the network weights are updated according to the gradient.

10. A traffic sequence prediction device, characterized in that, include: The determination module is used to determine, based on traffic data from the source city and traffic data from the target city, a target area that meets the similarity and connectivity requirements of the target city. The traffic data includes time-series data and geographic data. The construction module is used to construct a virtual city for the target area with the goal of maximizing the usable area and to generate traffic data for the virtual city; The comparison module is used to compare the geographic data of the virtual city with the geographic data of the target city to obtain the network weight; The training module is used to train a prediction model based on the network weights, the time series data of the virtual city, and the time series data of the target city. The prediction module is used to predict traffic sequences in the target city using the prediction model. The comparison module includes a feature vector extraction unit, which is used to form an adjacency matrix from the geographic data of the virtual city and the geographic data of the target city and input it into the graph attention network to extract the feature vectors of the virtual city and the target city through the graph attention network. The network weight acquisition unit is used to input the feature vectors of the virtual city and the target city into the weight network composed of multilayer perceptrons to obtain the network weights.

11. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the traffic sequence prediction method as described in any one of claims 1-9.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the traffic sequence prediction method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Cross-modal data prediction method based on transfer learning

    CN112863182A