Traffic prediction method and device, storage medium and electronic equipment
By constructing a traffic distribution map and node weights, and combining traffic conservation and graph embedding algorithms, the problems of missing historical data and data non-smoothness are solved, and accurate traffic prediction is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SENSETIME TECH DEV CO LTD
- Filing Date
- 2022-05-13
- Publication Date
- 2026-04-28
AI Technical Summary
Existing technologies for traffic forecasting suffer from problems such as missing historical data, uneven data flow, and inability to observe branch traffic, leading to decreased forecast accuracy.
By constructing a traffic distribution map, utilizing traffic conservation constraints and node weights, and combining graph embedding algorithms and neural networks, initial traffic measurement and correction are performed to determine the target predicted traffic.
It enables accurate traffic prediction even in the absence of historical data, improving the accuracy and reliability of predictions and adapting to complex traffic scenarios.
Smart Images

Figure CN114997364B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, storage medium and electronic device for traffic prediction. Background Technology
[0002] Traffic flow forecasting is widely used in various scenarios, such as predicting the flow rate of liquids in pipelines or predicting pedestrian or vehicle traffic flow on roads in traffic management. The models built for traffic flow forecasting often deviate from reality and require a high degree of completeness in historical traffic data. This can lead to reduced accuracy of the forecasting solution, or in many cases, the inability to implement the forecasting solution due to missing historical traffic data. Summary of the Invention
[0003] To address at least one of the aforementioned technical problems, this disclosure proposes a traffic prediction technology solution.
[0004] According to some embodiments of this disclosure, a traffic flow prediction method is provided, comprising: acquiring a traffic flow distribution map for a target time period, the traffic flow distribution map including nodes indicating traffic flow in each direction at an intersection and connection relationships between adjacent nodes, the connection relationships representing traffic flow paths between nodes with upstream and downstream relationships, wherein a first node and a second node in the traffic flow distribution map are a node with known traffic flow and a node with unknown traffic flow, respectively; determining the initial measured traffic flow of each second node based on traffic flow conservation constraints and the traffic flow of each first node; determining the weight of each node in the traffic flow distribution map based on the traffic flow of each first node and the initial measured traffic flow of each second node, the weight representing the traffic contribution of each node to downstream nodes; and correcting the initial measured traffic flow of each second node based on the weight of each node to determine the target predicted traffic flow of each second node. Based on the above configuration, the coarse-complemented traffic is corrected by combining the weight of each node. The weight accurately measures the traffic contribution of each node to the downstream nodes, thus obtaining accurate target predicted traffic. Both the design of the coarse-complemented traffic and the introduction of the concept of traffic contribution fully consider the traffic conservation constraint, so as to obtain accurate prediction results and not be affected by factors such as historical traffic defects or data unsmoothness.
[0005] In some possible implementations, determining the weight of each node in the traffic distribution map based on the traffic of each first node and the initial measured traffic of each second node includes: extracting information based on the spatial correlation of nodes in the traffic distribution map, combined with the topology of the traffic distribution map, to obtain spatial correlation information corresponding to each node; and aggregating the spatial correlation information corresponding to each node to obtain the weight of each node. Based on the above configuration, the purpose of this spatial correlation-based information extraction is to obtain the correlation information of each node in the traffic distribution map. This correlation information is obtained by fully considering the node's topological position in the traffic distribution map, the traffic of the node and its neighboring nodes (including known traffic and initial measured traffic), and reflects the traffic relationship between the node and its neighboring nodes. Then, based on this correlation information, the traffic contribution of a node to its downstream neighbors can be determined, thereby comprehensively determining the traffic contribution of each node to its downstream nodes from both data and topology perspectives. Adjusting the initial measured traffic based on this traffic contribution can yield an accurate traffic prediction value.
[0006] In some possible implementations, the step of aggregating the spatial relevance information corresponding to each node to obtain the weight of each node includes: for each node, determining the neighboring nodes corresponding to each node from the out-degree direction of each node; and determining the weight of each node in the out-degree direction based on the fusion result of the spatial relevance information of the neighboring nodes. Based on the above configuration, by determining the neighboring nodes in the out-degree direction, the spatial relevance information of downstream nodes can be used to influence the weight of the nodes, thereby making the weight of the nodes more reflective of the node's contribution to the traffic of downstream nodes.
[0007] In some possible implementations, the step of correcting the initial measured traffic of each second node based on the weight of each node to determine the target predicted traffic of each second node includes: determining the information propagation volume of each node based on the weight of each node, the traffic of each first node, and the initial measured traffic of each second node, wherein the information propagation volume represents the traffic received by each node from upstream and propagated downstream; and determining the target predicted traffic of each second node based on the information propagation volume of each node. Based on the above configuration, by fusing the traffic contribution of each node, the actual traffic of each first node, and the initial measured traffic of each second node, the information propagation volume of each node receiving traffic from upstream and propagating downstream can be determined. Based on this information propagation volume, the target predicted traffic of the second node can be accurately determined. This prediction process fully considers the topological distribution of nodes and the multiple relationships between adjacent nodes in terms of topology, traffic, and semantics, thereby obtaining accurate prediction results.
[0008] In some possible implementations, determining the target predicted traffic for each second node based on the information propagation volume of each node includes: determining the state information corresponding to each node, wherein the state information includes at least one of the following: the relationship between the traffic flow direction of each node and the target time period, and static scene information related to the traffic of each node; and determining the target predicted traffic for each second node based on the state information corresponding to each node and the information propagation volume of each node. Based on the above configuration, traffic prediction can consider not only the topological information and traffic flow relationship between nodes, but also static information, such as the relationship between traffic and the target time period, and scene information related to the nodes, thereby further improving the accuracy of the target predicted traffic.
[0009] In some possible implementations, the method further includes: determining branch traffic based on the traffic of each first node and the target predicted traffic of each second node, wherein the branch traffic is traffic existing within a range determined based on the traffic distribution map, and the branch traffic does not belong to the traffic corresponding to a node in the traffic distribution map. Based on the above configuration, not only can the traffic at the second node in the traffic distribution map be determined, but also the traffic situation of branches that cannot be represented in the traffic distribution map can be determined.
[0010] In some possible implementations, determining the initial measured flow of the second node based on the flow conservation constraint and the flow of the first node includes: determining a third node, which is a second node that has not yet been assigned initial measured flow; determining a missing node and a flow reference node corresponding to each direction of each third node, where the missing node is another third node adjacent to each third node in each direction, and the flow reference node is another node adjacent to each third node in each direction but not belonging to the missing node; determining the third node with the fewest missing nodes as the fourth node, and determining the target direction corresponding to the fewest missing nodes; and determining the initial measured flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction. Based on the above configuration, by selecting the fourth node and the target direction based on the principle of minimizing missing flow information each time preliminary flow prediction is performed, and then using the flow conservation constraint in the target direction to perform preliminary flow prediction for the fourth node, the known flow information can be fully utilized to improve the accuracy of the preliminary flow prediction, and accurate preliminary flow prediction is beneficial to obtaining accurate target predicted flow in the end.
[0011] In some possible implementations, determining the initial measured flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction includes: determining the initial measured flow of the fourth node based on the flow conservation constraint, a preset constraint, and the flow reference node corresponding to the fourth node in the target direction; the preset constraint includes at least one of the following: a first constraint limiting the flow of each positively correlated unknown neighbor to the average flow value associated with the target time period, wherein the positively correlated unknown neighbor is a positively correlated neighbor of the fourth node with unknown flow and not yet assigned initial measured flow; a second constraint limiting the remaining flow to be evenly distributed among each negatively correlated unknown neighbor, wherein the negatively correlated unknown neighbor is a negatively correlated neighbor of the fourth node with unknown flow and not yet assigned initial measured flow, the remaining flow being the difference between the total flow flowing into the fourth node and the sum of known flows, wherein the sum of known flows is the sum of flows of the negatively correlated known neighbors of the fourth node. Based on the above configuration, by combining the first constraint or the second constraint, a flow conservation equation can be established in the target direction based on the flow of the flow reference node of the fourth node, thereby calculating the initial measured flow of the fourth node. The assumptions of the first and second constraints are helpful in estimating reasonable initial flow rates, thus establishing a data foundation for subsequent accurate flow rate prediction.
[0012] In some possible implementations, the step of extracting spatial correlation information from the traffic distribution map based on the traffic of each first node and the initial measured traffic of each second node, combined with the topology of the traffic distribution map, to obtain spatial correlation information corresponding to each node includes: based on a graph embedding algorithm, according to the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, and according to the topology of the traffic distribution map, extracting spatial correlation information from the traffic distribution map to obtain graph embedding information corresponding to each node, wherein the graph embedding information is the expression result of the spatial correlation information; the step of aggregating the spatial correlation information corresponding to each node to obtain the weight of each node includes: aggregating the graph embedding information corresponding to each node based on a graph attention mechanism to obtain the weight of each node. Based on the above configuration, the extraction of graph embedding information from the traffic distribution map can obtain the spatial correlation information of each node while fully considering the topology and traffic distribution of the traffic distribution map. This information helps to accurately determine the traffic contribution of each node to its downstream nodes.
[0013] In some possible implementations, the graph embedding information aggregation based on the graph attention mechanism to obtain the weight of each node includes: acquiring a flow node distribution map and graph embedding information corresponding to each flow node, wherein the flow node includes the flow node corresponding to the intersection and the connection relationship between adjacent flow nodes, the connection relationship representing the flow path between flow nodes with upstream and downstream relationships, and the flow nodes in the flow node distribution map have a unique spatial correspondence with the flow in the flow node distribution map; determining the weight of each node based on the first graph embedding information corresponding to each node and at least one of the following graph information; the graph information includes: the second graph embedding information corresponding to the downstream neighbor of each node, the graph embedding information of the flow node corresponding to each node in the flow node distribution map, the graph embedding information of the flow node corresponding to the downstream neighbor of each node in the flow node distribution map, and the graph embedding information of the flow node determined in the flow node distribution map based on the outflow direction of the downstream neighbor of each node. Based on the above configuration, the weight of each node calculated based on the above content can be used as the weight of the out-degree direction of the node in the flow distribution diagram, which is used to characterize the flow contribution of the node to the downstream nodes. Various factors are taken into account in the weight calculation process, such as the topological distribution of flow or flow node, and the flow direction distribution at the flow granularity and flow node granularity. By comprehensively considering various information, the accuracy of weight prediction is improved.
[0014] In some possible implementations, the method further includes: inputting the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map into a first network to obtain the information propagation volume of each node in the traffic distribution map; inputting the traffic distribution map and the target time period into a second network to obtain the state information corresponding to each node; and inputting the information propagation volume of each node and the state information corresponding to each node into a third network to obtain the target predicted traffic of each second node. Based on the above configuration, node traffic prediction results can be directly obtained through an end-to-end neural network with high accuracy.
[0015] In some possible implementations, the first network, the second network, and the third network form an end-to-end network, which is trained based on at least one of the following losses: a first loss determined by the difference between the target predicted flow and the actual flow of any sample node; and a second loss determined by the difference between the total flow into any sample node and the total flow out of any sample node. Based on the above configuration, the end-to-end network trained using the above loss function can be used to predict flow completion for continuously or intermittently missing flow, and in the process of flow completion prediction, it fully considers the potential spatial relationships of each node and its impact on the flow of downstream nodes, thus possessing good prediction accuracy.
[0016] According to some embodiments of this disclosure, a traffic prediction apparatus is provided. The apparatus includes a traffic distribution map acquisition module for acquiring a traffic distribution map for a target time period. The traffic distribution map includes nodes indicating traffic flow in each direction at an intersection and connection relationships between adjacent nodes. The connection relationships characterize traffic flow paths between nodes with upstream and downstream relationships. The first node and the second node in the traffic distribution map are respectively nodes with known traffic flow and nodes with unknown traffic flow. A preliminary measurement module is used to determine the preliminary measurement traffic flow of each second node based on traffic conservation constraints and the traffic flow of each first node. A traffic contribution prediction module is used to determine the weight of each node in the traffic distribution map based on the traffic flow of each first node and the preliminary measurement traffic flow of each second node. The weight characterizes the traffic contribution of each node to downstream nodes. A correction module is used to correct the preliminary measurement traffic flow of each second node based on the weight of each node to determine the target predicted traffic flow of each second node.
[0017] In some possible implementations, the traffic contribution prediction module is used to extract information based on the spatial correlation of nodes in the traffic distribution map based on the traffic of each first node and the initial measured traffic of each second node, and in combination with the topology of the traffic distribution map, to obtain the spatial correlation information corresponding to each node; and to aggregate the spatial correlation information corresponding to each node to obtain the weight of each node.
[0018] In some possible implementations, the traffic contribution prediction module is used to determine the neighboring nodes corresponding to each node from the out-degree direction of each node; and to determine the weight of each node in the out-degree direction based on the fusion result of the spatial correlation information of the neighboring nodes.
[0019] In some possible implementations, the correction module is used to determine the information propagation volume of each node based on the weight of each node, the traffic of each first node, and the initial measured traffic of each second node, wherein the information propagation volume represents the traffic received by each node from upstream and propagated downstream; and to determine the target predicted traffic of each second node based on the information propagation volume of each node.
[0020] In some possible implementations, the correction module is used to determine the status information corresponding to each node, the status information including at least one of the following: the relationship information between the flow direction of each node and the target time period, and the static scene information related to the flow of each node; and to determine the target predicted flow of each second node based on the status information corresponding to each node and the information propagation volume of each node.
[0021] In some possible implementations, the correction module is configured to determine branch traffic based on the traffic of each first node and the target predicted traffic of each second node, wherein the branch traffic is traffic that exists within a range determined based on the traffic distribution map, and the branch traffic does not belong to the traffic corresponding to a node in the traffic distribution map.
[0022] In some possible implementations, the initial measurement module is configured to: determine a third node, which is a second node that has not yet been assigned initial measurement flow; determine a missing node and a flow reference node corresponding to each direction for each third node, wherein the missing node is another third node adjacent to each third node in each direction, and the flow reference node is another node adjacent to each third node in each direction but not belonging to the missing node; determine the third node with the fewest missing nodes as the fourth node, and determine a target direction corresponding to the fewest missing nodes; and determine the initial measurement flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction.
[0023] In some possible implementations, the initial measurement module is used to determine the initial measurement flow of the fourth node based on the flow conservation constraint, the preset constraint, and the flow reference node corresponding to the fourth node in the target direction; the preset constraint includes at least one of the following: a first constraint limiting the flow of each positively correlated unknown neighbor to the average flow value associated with the target time period, wherein the positively correlated unknown neighbor is a positively correlated neighbor of the fourth node with unknown flow and not yet assigned initial measurement flow; a second constraint limiting the remaining flow to be evenly distributed among each negatively correlated unknown neighbor, wherein the negatively correlated unknown neighbor is a negatively correlated neighbor of the fourth node with unknown flow and not yet assigned initial measurement flow, wherein the remaining flow is the difference between the total flow flowing into the fourth node and the sum of known flows, and the sum of known flows is the sum of flows of the negatively correlated known neighbors of the fourth node.
[0024] In some possible implementations, the traffic contribution prediction module is used to extract information based on the spatial correlation of nodes in the traffic distribution map according to the topology of the traffic distribution map, based on the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, to obtain the graph embedding information corresponding to each node, wherein the graph embedding information is the expression result of the spatial correlation information; the step of aggregating the spatial correlation information corresponding to each node to obtain the weight of each node includes: aggregating the graph embedding information corresponding to each node based on the graph attention mechanism to obtain the weight of each node.
[0025] In some possible implementations, the flow contribution prediction module is used to acquire a flow node distribution map and graph embedding information corresponding to each flow node. The flow nodes include flow nodes corresponding to intersections and connection relationships between adjacent flow nodes. The connection relationships represent the flow path between flow nodes with upstream and downstream relationships. The flow nodes in the flow node distribution map have a unique spatial correspondence with the flow in the flow node distribution map. Based on the first graph embedding information corresponding to each node and at least one of the following graph information, the weight of each node is determined. The graph information includes: the second graph embedding information corresponding to the downstream neighbor of each node, the graph embedding information of the flow node corresponding to each node in the flow node distribution map, the graph embedding information of the flow node corresponding to the downstream neighbor of each node in the flow node distribution map, and the graph embedding information of the flow node determined in the flow node distribution map based on the outflow direction of the downstream neighbor of each node.
[0026] In some possible implementations, the traffic contribution prediction module is used to input the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map into a first network to obtain the information propagation amount of each node in the traffic distribution map; the correction module is used to input the traffic distribution map and the target time period into a second network to obtain the status information corresponding to each node; and input the information propagation amount of each node and the status information corresponding to each node into a third network to obtain the target predicted traffic of each second node.
[0027] In some possible implementations, the first network, the second network, and the third network form an end-to-end network, which is trained based on at least one of the following losses: a first loss determined based on the difference between the target predicted flow of any sample node and the actual flow of any sample node; and a second loss determined based on the difference between the total flow into any sample node and the total flow out of any sample node.
[0028] According to other embodiments of this disclosure, a computer-readable storage medium is also provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or at least one program being loaded and executed by a processor to implement a traffic prediction method as described in any of the above embodiments.
[0029] According to other embodiments of this disclosure, a computer program or instructions are also provided that, when executed by a processor, implement a traffic prediction method of some of the embodiments described above.
[0030] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0031] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description
[0032] To more clearly illustrate the technical solutions and advantages in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0033] Figure 1 A flowchart illustrating a traffic prediction method according to an embodiment of the present disclosure is shown;
[0034] Figure 2 This diagram illustrates a traffic distribution scenario according to an embodiment of the present disclosure.
[0035] Figure 3 A schematic diagram of traffic distribution according to an embodiment of the present disclosure is shown;
[0036] Figure 4 A schematic flowchart of a preliminary traffic prediction method according to an embodiment of the present disclosure is shown;
[0037] Figure 5 A schematic diagram of a target predicted traffic determination method according to an embodiment of the present disclosure is shown;
[0038] Figure 6 A schematic diagram illustrating a process for predicting road network traffic flow based on an end-to-end network according to an embodiment of the present disclosure is shown.
[0039] Figure 7 A block diagram of a traffic prediction apparatus according to an embodiment of the present disclosure is shown;
[0040] Figure 8 A block diagram of an electronic device according to an embodiment of the present disclosure is shown;
[0041] Figure 9 A block diagram of another electronic device according to an embodiment of the present disclosure is shown. Detailed Implementation
[0042] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0044] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0045] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0046] In this document, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0047] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.
[0048] Related technologies can be used for flow prediction, such as water flow prediction, vehicle flow prediction, and pedestrian flow prediction. Taking vehicle flow prediction as an example, the following are the main problems in the prediction process:
[0049] First, historical information is unavailable. Traffic parameters, whether speed or flow, exhibit significant periodicity over time, showing phenomena such as morning and evening rush hours. However, for roads lacking monitoring equipment, flow data is continuously missing. Related technologies that predict traffic flow on these roads based on neural networks require historical traffic flow data as a foundation, but this foundational data is difficult to obtain.
[0050] Second, the data space is not smooth. Even at the same intersection and on the same approach lane, traffic flow can vary significantly depending on the direction of turn. This demonstrates the spatial non-smoothness of the data. Many related technologies infer traffic flow from adjacent intersections, but these methods rely on the assumption of spatial smoothness. In other words, the spatial non-smoothness leads to decreased prediction accuracy in practical applications.
[0051] Third, it is impossible to observe traffic flow on side streets. Traffic flow is conserved, meaning that vehicles do not disappear after entering a road segment, but they may enter a parking space in the road or leave through a side alley in the middle of the road. This situation is difficult to predict, which further hinders the prediction of traffic flow based on the principle of traffic flow conservation.
[0052] Of course, apart from traffic flow prediction, other types of traffic flow prediction may also have at least one of the above-mentioned problems, which may lead to a lack of implementation conditions or a decrease in prediction accuracy in the traffic flow prediction schemes in related technologies. Therefore, this disclosure provides a traffic flow prediction scheme.
[0053] Figure 1 A flowchart of a traffic prediction method according to an embodiment of the present disclosure is shown, such as Figure 1 As shown, the above method includes:
[0054] S101: Obtain the traffic distribution map for the target time period. The traffic distribution map includes nodes indicating traffic in each direction at the intersection and the connection relationship between adjacent nodes. The connection relationship represents the traffic flow path between nodes with upstream and downstream relationships. The first node and the second node in the traffic distribution map are nodes with known traffic and nodes with unknown traffic, respectively.
[0055] This disclosure does not limit the implementation scenario of traffic flow prediction. It can be applied to various traffic flow prediction scenarios, such as liquid flow, pedestrian flow, vehicle flow, and data flow. The flow in a certain direction is the smallest unit for traffic flow prediction in this disclosure. This disclosure takes vehicle flow prediction as an example for detailed explanation. In the scenario of vehicle flow prediction, a road segment is a spatial unit for traffic management. A road segment represents the connection segment between two adjacent intersections. For ease of expression, we can take road segment S as the connection segment between the upstream intersection C1 and the downstream intersection C2. For road segment S, there are three flows flowing into the downstream intersection C2. These three flows are the flow in the left-turn direction, the flow in the straight direction, and the flow in the right-turn direction. An intersection is a location where multiple road segments converge. If the intersection is a crossroads, it means that four road segments converge at the intersection, and there are 3*4=12 directions of flow at the intersection. If the intersection is a T-junction, it means that three road segments converge at the intersection, and there are 3*3=9 directions of flow at the intersection.
[0056] Figure 2 This diagram illustrates a traffic distribution scenario according to an embodiment of the present disclosure. Figure 3 A schematic diagram of traffic distribution according to an embodiment of the present disclosure is shown. Figure 2 and Figure 3 Only nodes directly associated with node M6 are shown; other nodes are not displayed. Figure 2 It includes 3 intersections and 11 flow paths, each flow path consisting of inflow and outflow edges. Figure 2 Each flow in Figure 3 A node corresponds to a node in the traffic distribution map.
[0057] Specifically, at the first intersection I1, there are three traffic flows: M1, M2, and M3, which correspond to... Figure 3 Nodes 1, 2, and 3 are present. At the second intersection I2, there are five traffic flows: M4, M5, M6, M7, and M8. These correspond to... Figure 3 Nodes 4, 5, 6, 7, and 8 are listed. At the third intersection I3, there are three traffic flows, namely... Figure 2 M9, M10, and M11 in the text correspond to... Figure 3Nodes 9, 10, and 11 in the diagram. In this embodiment, the target node is any node in the traffic distribution diagram. The upstream and downstream nodes of the target node can be determined. In this embodiment, two types of nodes are defined as upstream nodes. The outflow edge of the first type of upstream node is connected to the inflow edge of the target node and is adjacent to the target node. The second type of upstream node shares the traffic of a certain first type of upstream node with the target node. The inflow edge of the downstream node is connected to the outflow edge of the target node. Therefore, the traffic of the target node flows into the downstream node.
[0058] In this disclosure, the concept of the target node's neighbors refers to the nodes adjacent to the target node in the traffic distribution map. Figure 3 Taking node 6 as the target node as an example, nodes 1, 2, 3, 4, and 5 are upstream nodes of the target node and are neighbors in the upstream direction. The traffic of nodes 1, 2, and 3 flows into the target node, which has a positive effect on increasing the traffic of the target node. Therefore, nodes 1, 2, and 3 are positively correlated neighbors of the target node. Nodes 4 and 5 divert the traffic of the target node, so they are negatively correlated neighbors of the target node.
[0059] S102: Based on the flow conservation constraint and the flow of each first node, determine the initial flow of each second node.
[0060] To predict the flow of nodes with unknown flow in a flow distribution map based on nodes with known flow, preliminary flow completion can be performed in step S102. A preliminary flow value is predicted for each second node (the node with unknown flow), i.e., the initial measured flow. This process is also called flow completion. Although this initial flow prediction considers the flow conservation constraint, it does not take into account the deeper information flow relationships between nodes. Therefore, it is not very accurate compared to the final predicted target flow and can be considered a coarse flow prediction. The flow conservation constraint is... Figure 2 and Figure 3 In the corresponding scenario, this can be understood as the total flow into a certain road segment being approximately equal to the total flow out of that road segment within the same time period. Figure 2 Taking flow M6 as an example: in the upstream direction, M6+M5+M4≈M1+M2+M3; similarly, in the downstream direction, M6+M7+M8≈M9+M10+M11.
[0061] During the traffic completion process, preliminary traffic prediction can be performed on each of the aforementioned second nodes one by one. At each step, one target from each of the aforementioned second nodes is selected for preliminary traffic prediction, until preliminary traffic prediction for all second nodes is completed. Specifically, the specific method for the aforementioned preliminary traffic prediction is as follows: Figure 4As shown, it includes the following steps:
[0062] S201: Determine the third node, which is the second node that has not yet been assigned initial test traffic.
[0063] As the traffic completion process progresses, more and more second nodes will be assigned initial test traffic. When making preliminary traffic predictions each time, it is necessary to first identify the second nodes that have not yet been assigned initial test traffic, i.e., the third nodes.
[0064] S202: Determine the missing node and the flow reference node corresponding to each direction of each third node. The missing node is the other third node adjacent to each third node in each direction. The flow reference node is the other node adjacent to each third node in each direction that is not the missing node.
[0065] In the traffic distribution map, there are only two directions: upstream and downstream. Therefore, this step requires determining the missing node and traffic reference node corresponding to each third node in the upstream direction, as well as the missing node and traffic reference node corresponding to each third node in the downstream direction.
[0066] The missing node can be considered as an unknown neighbor of each third node in the upstream or downstream direction, that is, an unknown flow node among the neighbors of each third node that has not yet been assigned initial flow. The flow reference node is a known neighbor of each third node in the upstream or downstream direction. The flow reference node can be a first node with known flow or a second node that has been assigned initial flow.
[0067] by Figure 3 Taking node 6 as an example, its upstream neighbors are nodes 1 to 5. If only node 5 has known traffic, and nodes 1 to 4 are second nodes that have not yet been assigned initial traffic, then nodes 1 to 4 are the missing nodes of node 6 in the upstream direction, while node 5 is the traffic reference node of node 6 in the upstream direction.
[0068] S203: The third node with the fewest missing nodes is determined as the fourth node, and the target direction corresponding to the fewest missing nodes is determined.
[0069] by Figure 3 For example, node 6 has 4 missing nodes upstream and 2 missing nodes downstream, while node 11 has only 1 missing node upstream. Since node 11 has the fewest missing nodes upstream, it can be designated as the fourth node, and the upstream direction can be determined as the target direction.
[0070] S204: Based on the above flow conservation constraints and the flow reference node corresponding to the fourth node in the above target direction, determine the initial flow of the fourth node.
[0071] By selecting the fourth node and the target direction based on the principle of minimizing missing traffic information during each preliminary traffic prediction, and then using the traffic conservation constraint in the target direction to perform preliminary traffic prediction for the fourth node, the accuracy of the preliminary traffic prediction can be improved by making full use of the known traffic information. Accurate preliminary traffic prediction is conducive to obtaining accurate target traffic prediction in the end.
[0072] This disclosure does not limit the specific method for determining the initial measured flow of the fourth node based on the aforementioned flow conservation constraints and the flow reference node corresponding to the fourth node in the aforementioned target direction. For example, when the downstream direction is taken as the target direction, if there are several downstream negatively correlated neighbors that have not yet been assigned initial measured flow, it can be assumed that these several downstream negatively correlated neighbors share the flow equally, thereby determining the initial measured flow of the fourth node based on the aforementioned flow conservation constraints. Alternatively, when the upstream direction is taken as the target direction, if there are several upstream positively correlated neighbors that have not yet been assigned initial measured flow, it can be assumed that these several upstream positively correlated neighbors contribute the flow to an equal degree as a known upstream neighbor, thereby determining the initial measured flow of the fourth node based on the aforementioned flow conservation constraints.
[0073] In one embodiment, determining the initial measured flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction includes: determining the initial measured flow of the fourth node based on the flow conservation constraint, a preset constraint, and the flow reference node corresponding to the fourth node in the target direction; the preset constraint includes at least one of the following:
[0074] The first constraint is that the traffic of each positively correlated unknown neighbor is the average traffic value associated with the target time period. These positively correlated unknown neighbors are the fourth node's positively correlated neighbors with unknown traffic that have not yet been assigned initial traffic. The concept of positively correlated neighbors has been described previously and will not be repeated here.
[0075] The second constraint restricts the distribution of remaining traffic evenly among each negatively correlated unknown neighbor. These negatively correlated unknown neighbors are those of the fourth node that have unknown traffic and have not yet been assigned initial measured traffic. The remaining traffic is the difference between the total traffic flowing into the fourth node and the sum of known traffic. The sum of known traffic is the sum of traffic from the fourth node's negatively correlated known neighbors. Negatively correlated known neighbors are those with known traffic or those that have already been assigned initial measured traffic. The concept of negatively correlated neighbors has been described previously and will not be repeated here.
[0076] By combining the first or second constraint, a flow conservation equation can be established in the target direction based on the flow of the fourth node's reference node, thereby calculating the initial measured flow of the fourth node. The assumptions of the first and second constraints are helpful in estimating a reasonable initial measured flow, thus establishing a data foundation for subsequent accurate flow prediction.
[0077] S103: Based on the flow of each of the first nodes in the above flow distribution diagram and the initial measured flow of each of the second nodes, determine the weight of each node in the above flow distribution diagram. The weight represents the flow contribution of each node to the downstream nodes.
[0078] The embodiments disclosed herein do not limit the method of determining the weights. For example, the weights can be determined based on experience and the scenario. For example, in a traffic flow prediction scenario, if there is a school near a certain node, it can be determined that the node contributes a lot to the traffic of downstream nodes during the school dismissal period. If there is a large hall near a certain node, and important meetings are held in that hall, then the node will also contribute a lot to the traffic of downstream nodes during the time when the meeting ends. If there are no gathering places near a certain node, it can be determined that the node contributes very little to the traffic of downstream nodes.
[0079] In one embodiment, based on the traffic of each of the first nodes and the initial measured traffic of each of the second nodes in the traffic distribution map, and combined with the topology of the traffic distribution map, information extraction based on node spatial correlation can be performed to obtain the spatial correlation information corresponding to each node. Information aggregation is then performed on the spatial correlation information corresponding to each node to obtain the weight of each node. Specifically, the purpose of this information extraction based on node spatial correlation is to obtain the correlation information of each node in the traffic distribution map. This correlation information is obtained by fully considering the node's topological position in the traffic distribution map, the traffic of the node and its neighboring nodes (including known traffic and initial measured traffic), and reflects the traffic relationship between the node and its neighboring nodes. Based on this correlation information, the traffic contribution of a node to its downstream neighbors can be determined, thereby comprehensively determining the traffic contribution of each node to its downstream nodes from both data and topology perspectives. Adjusting the initial measured traffic based on this traffic contribution can yield an accurate traffic prediction value.
[0080] This disclosure does not limit the specific method of extracting spatial correlation information for each node based on the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, combined with the topology of the traffic distribution map. For example, based on a graph embedding algorithm, according to the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, information extraction based on the spatial correlation of nodes is performed on the traffic distribution map according to the topology of the traffic distribution map to obtain graph embedding information corresponding to each node. This graph embedding information is the expression result of the spatial correlation information. The above-mentioned information aggregation of the spatial correlation information corresponding to each node to obtain the weight of each node includes: information aggregation of the graph embedding information corresponding to each node based on a graph attention mechanism to obtain the weight of each node.
[0081] For urban intersections, significant differences in traffic flow are common, manifesting as spatial unevenness. This is frequently seen at intersections where main roads and side roads merge, and at junctions between different functional areas. To obtain the complex and dynamic relationships between traffic nodes, after the previous step, known traffic nodes already possess traffic flow, and unknown traffic nodes are supplemented with initial traffic measurements. Therefore, for the traffic distribution map, each node in the map has a corresponding traffic flow. Based on the traffic flow corresponding to each node and the node topology, graph embedding information of the nodes can be obtained through a graph embedding algorithm. This disclosure does not limit the specific content of the graph embedding algorithm; related technologies can be referenced, such as Node2vec. Node2vec is a graph representation method that combines depth-first search and breadth-first search. Since traffic nodes lack distinctive features, this disclosure chooses Node2vec as a graph embedding method. Compared to other graph embedding methods that focus on node features, this method places more emphasis on the relationships between nodes. The weights used in the Node2vec random walk phase are determined based on the traffic flow of the nodes in the traffic distribution map. Of course, Node2vec can be replaced by other graph representation algorithms in related technologies. Extracting graph embedding information from the traffic distribution map can yield spatial correlation information for each node, taking into full account the topology and traffic distribution of the traffic distribution map. This information helps to accurately determine the traffic contribution of each node to its downstream nodes.
[0082] In one embodiment, a flow node distribution map can also be obtained based on the flow distribution map. The flow node includes at least two inflow edges and at least two outflow edges. The flow nodes in the flow node distribution map have a unique spatial correspondence with the flows in the flow distribution map. A flow node can be considered a convergence point of flows. Figure 3For example, if M1-M11 represent flow, then I1-I3 represent flow nodes. Based on the flow distribution map, the flow node distribution map can be obtained by referring to the spatial topology and flow direction. Since the flow of each node in the flow distribution map can be uniquely determined, and the flow node is the convergence point of the flow, the flow of each flow node in the flow node distribution map can be determined based on the flow distribution map. In other words, the flow of each flow node in the flow node distribution map is also known. Based on the same idea as calculating the graph embedding information of each node according to the flow distribution map mentioned above, the graph embedding information of the flow node corresponding to each flow node can also be calculated.
[0083] For each node in the traffic distribution map, its neighboring nodes can be determined from its out-degree direction. Based on the fusion of spatial correlation information of these neighboring nodes, the weight of each node in its out-degree direction is determined. This process can take into account the traffic of each node, which can be converted into useful information for generating the weights through upsampling, full connectivity, or other methods. By determining neighboring nodes in the out-degree direction, the spatial correlation information of downstream nodes can be used to influence node weights, thus making the node weights more accurately reflect the node's contribution to the traffic of downstream nodes.
[0084] The weight of each node is determined based on the first graph embedding information corresponding to each node and at least one of the following graph information: the second graph embedding information corresponding to the downstream neighbors of each node, the graph embedding information of the flow nodes corresponding to each node in the flow node distribution graph, the graph embedding information of the flow nodes corresponding to the downstream neighbors of each node in the flow node distribution graph, and the graph embedding information of the flow nodes determined in the flow node distribution graph based on the outflow direction of the downstream neighbors of each node. Wherein, the flow nodes in the flow node distribution graph and the flow in the flow node distribution graph have a unique spatial correspondence, and each flow node includes at least two inflow edges and at least two outflow edges. The weight of each node calculated based on the above can be used as the weight of the outflow direction of that node in the flow distribution graph, used to characterize the node's contribution to the flow of downstream nodes. Various factors are comprehensively considered in the weight calculation process, such as the topological distribution of flow or flow nodes, and the flow direction distribution at the flow granularity and flow node granularity. By comprehensively considering various information, the accuracy of weight prediction is improved.
[0085] In one specific implementation, with Figure 2 and Figure 3 Taking the following scenario as an example, the weight of the target node can be determined through the following six inputs, where the target node is any node in the traffic distribution map:
[0086] (1) The first graph embedding information E of the target node Mi ;
[0087] (2) The second graph embedding information E corresponding to the downstream neighbor Mj ;
[0088] (3) Graph embedding information E of the flow structure at the intersection where the target node is located. Ii ;
[0089] (4) The graph embedding information E of the downstream neighbor's corresponding flow node in the above flow node distribution diagram. Ij ;
[0090] (5) Graph embedding information E of the flow at the next intersection in the direction pointed to by the downstream neighbor. Inext ;
[0091] (6) Randomly initialized time slot embedding vector E t The granularity of the time slot embedding vector can be set autonomously, for example, to one hour. That is, time slots belonging to the same hour will share the same time slot embedding vector. By fusing these inputs, the weights of the target node can be learned. Of course, this disclosure does not limit the fusion method; for example, it can be concatenated, convolutional, summed, multiplied, etc. (Adding E...) Inext This is to make downstream neighbors more distinctive while adding more path information, because when calculating the weights of different neighbors from the same direction, E Ii and E Ij It's the same. In addition, add an intersection point E. Inext This allows the model to better capture information about critical paths in the road network. However, since the traffic flow at locations with missing data is likely to be continuously missing, the graph embedding information of the missing nodes is difficult for the model to perceive. Since the distribution of the graph embedding vectors corresponding to the relevant downstream neighbors obtained by the method mentioned above is similar, the adjacency relationships learned from nodes with known traffic flow can be generalized to nodes with missing data, thereby improving the predictive ability of the weights.
[0092] S104: Based on the weight of each of the above nodes, the initial measured flow of each of the above second nodes is corrected to determine the target predicted flow of each of the above second nodes.
[0093] Based on the above configuration, this embodiment of the disclosure completes the correction of coarse-complemented traffic by combining the weight of each node. The weight accurately measures the traffic contribution of each node to the downstream node, thereby obtaining accurate target predicted traffic. Both the design of coarse-complemented traffic and the introduction of the concept of traffic contribution fully consider the traffic conservation constraint, thus obtaining accurate prediction results, and are not affected by factors such as historical traffic defects or data unsmoothness.
[0094] In one embodiment, such as Figure 5As shown, this diagram illustrates a method for determining the target predicted flow. Based on the weight of each node, the initial predicted flow of each second node is corrected to determine the target predicted flow of each second node, including:
[0095] S1041: Based on the weight of each node, the traffic of each first node and the initial measured traffic of each second node, determine the information propagation volume of each node. The information propagation volume represents the traffic received by each node from upstream and propagated downstream.
[0096] The embodiments disclosed herein do not limit the method for determining the amount of information propagation. For example, the weight of each node, the traffic of each of the first nodes and the initial measured traffic of each of the second nodes can be fused to obtain the amount of information propagation of each node. Of course, this disclosure does not limit the fusion method. For example, fusion can be performed by convolution, summation, weighted summation, nonlinear activation and other methods.
[0097] After obtaining the weight of each node as described above, the weight of each node and the weights corresponding to its positively correlated neighbors can be fused. The fused weights are then further fused with the traffic of each of the first nodes and the initial measured traffic of each of the second nodes to obtain the information propagation volume of each node. The weight fusion process can also be understood as a weight correction process, essentially allocating traffic from positively correlated neighbors to enhance the weight's representation of the node's traffic contribution. This disclosure does not limit the specific fusion method; for example, it can be achieved through normalization, weighted summation, and / or nonlinear superposition.
[0098] S1042: Based on the information propagation volume of each of the above nodes, determine the target predicted flow of each of the above second nodes.
[0099] This disclosure does not limit the method of determining the target predicted traffic based on information propagation volume. For example, the target predicted traffic can be obtained directly based on information propagation volume, or some perturbation or noise can be superimposed on the information propagation volume to obtain a smoother target predicted traffic. Based on the above configuration, by fusing the traffic contribution of each node, the actual traffic of each of the aforementioned first nodes, and the initial measured traffic of each of the aforementioned second nodes, the information propagation volume of each node receiving upstream traffic and propagating it downstream can be determined. Based on this information propagation volume, the target predicted traffic of the second node can be accurately determined. This prediction process fully considers the topological distribution of nodes and the multiple relationships between adjacent nodes in terms of topology, traffic, and semantics, thereby obtaining accurate prediction results.
[0100] In a specific embodiment, determining the target predicted traffic of each second node based on the information propagation volume of each node includes:
[0101] S10421: Determine the status information corresponding to each of the above nodes. The status information includes at least one of the following: the relationship information between the flow direction of traffic of each of the above nodes and the target time period, and the static scene information related to traffic of each of the above nodes.
[0102] To further improve the accuracy of traffic flow prediction and to analyze unobservable branch road traffic within the traffic flow distribution map based on the prediction results, state information can be introduced to further enhance the accuracy of traffic flow prediction. This disclosure does not limit the state information. For example, the state information may include points of interest features of possible branch roads corresponding to a node or features of the lane itself, such as the number of lanes and road grade. Furthermore, traffic flow is highly correlated with time; therefore, the influence of the target time period can also be considered.
[0103] S10422: Based on the state information corresponding to each of the above nodes and the information propagation volume of each of the above nodes, determine the target predicted flow of each of the above second nodes.
[0104] Specifically, based on the aforementioned state information of each node, such as its feature vector, this state information can be fused with the node's propagation information. The traffic of each node is then predicted based on the fusion result. Since the traffic of the first node is known, the predicted traffic of the second node can be retained. This disclosure does not limit the fusion method; for example, addition, concatenation, or convolution can be used. Based on the aforementioned configuration, traffic prediction can consider not only the topological information and traffic flow relationships between nodes, but also static information, such as the relationship between traffic and the target time period, and scene information related to the nodes, thereby further improving the accuracy of the predicted traffic.
[0105] Furthermore, branch flows can be determined based on the flow of each first node and the target predicted flow of each second node. These branch flows are flows within the range determined by the flow distribution map and do not belong to the flows corresponding to nodes in the flow distribution map. Since the target predicted flow of each second node has been predicted above, and the actual flow of each first node is known, based on the flow conservation constraint, for a node in the flow distribution map, if the flow flowing into and out of that node is not equal, it indicates that there is a branch in the path where that node is located, from which some flow flows in or out. Based on the actual flow of each first node and the target predicted flow of each second node, the branch flows can be determined. For example, for road segment A, the actual flow of the node corresponding to the flow flowing into the road segment is T1, and the target predicted flow of the node corresponding to the flow flowing out of the road segment is T2. Since T1 is significantly greater than T2, it indicates that there is at least one branch in road segment A, from which flow T1-T2 flows out of road segment A. For example, for road segment B, the target predicted flow of the node corresponding to the flow flowing into this segment is T3, and the actual flow of the node corresponding to the flow flowing out of this segment is T4. Since T3 is significantly less than T4, this indicates that there is at least one branch in road segment B from which flow T4-T3 flows into road segment B. Based on this configuration, not only can the flow at the second node in the flow distribution map be determined, but also the flow of branches that cannot be represented in the flow distribution map can be determined.
[0106] The preceding embodiments of this disclosure provide a specific method for traffic prediction. In the actual prediction process, traffic prediction can be performed based on an end-to-end network. This end-to-end network includes at least a first network, a second network, and a third network connected sequentially. Specifically, the traffic of each of the first nodes in the traffic distribution map and the initial measured traffic of each of the second nodes are input into the first network to obtain the information propagation volume of each node in the traffic distribution map. The traffic distribution map and the target time period are input into the second network to obtain the state information corresponding to each node. The information propagation volume of each node and the state information corresponding to each node are input into the third network to obtain the target predicted traffic of each second node. The node traffic prediction results can be directly obtained through an end-to-end neural network with high accuracy.
[0107] like Figure 6 As shown, it illustrates the specific steps of implementing the method of this disclosure based on the above-mentioned end-to-end network, taking road network traffic flow prediction as an example:
[0108] Step 1: The traffic of each of the first nodes and the initial measured traffic of each of the second nodes in the traffic distribution diagram are input into the first network. This first network also receives the topology information of the traffic distribution diagram. The first network outputs the information propagation volume of each node within the target time period. This disclosure does not limit the size of the target time period; it can be set arbitrarily.
[0109] In one embodiment, the following steps may be performed in the first network:
[0110] (1) Use Node2vec to generate graph embedding information for each node.
[0111] (2) The traffic of each node is converted into the first feature vector of that node through a shared upsampled fully connected layer.
[0112] (3) The first feature vectors of each node and its neighbors are concatenated, and some other information is also concatenated, including the traffic graph embedding information obtained by node2vec, the graph embedding information of the nodes, and the time vector corresponding to the target time period.
[0113] (4) The concatenated vector is passed through a meta-learning network to obtain the weight of each node.
[0114] (5) Normalize the weights according to the out-degree direction of each node.
[0115] (6) The first feature vector in the previous text is weighted and summed according to the normalized weights, and the nonlinear activation function is calculated to obtain the information propagation amount of each node.
[0116] Step 2: Input the above traffic distribution map and the above target time period into the second network to obtain the status information corresponding to each node.
[0117] Step 3: Input the information propagation volume of each node and the corresponding state information of each node into the third network to obtain the target predicted flow of each second node.
[0118] In one embodiment, the following steps may be performed in the third network:
[0119] (i) Input the state information of each node and obtain the second feature vector pointed to by the state information through a fully connected operation.
[0120] (ii) Add the amount of information disseminated and the second feature vector together.
[0121] (iii) Input the summed information into LSTM (Long Short-Term Memory Artificial Neural Network) to predict the target predicted flow of each node in the target time period. Of course, LSTM can be replaced by other time series subnetworks.
[0122] This disclosure does not limit the training method of the end-to-end network. During the training phase, the traffic of the sample nodes can be predicted, and the loss function of the end-to-end network can be designed. Combined with the prediction results of the traffic of the sample nodes, the model loss can be calculated, and the parameters of the end-to-end network can be adjusted according to the model loss feedback until the convergence condition is met. Of course, this disclosure does not limit the design method of the loss function, as long as the traffic conservation constraint is followed.
[0123] In one embodiment, the above end-to-end network is trained based on at least one of the following losses:
[0124] The first loss is determined based on the difference between the target predicted flow to any sample node and the actual flow to any sample node. The second loss is determined based on the difference between the total flow into any sample node and the total flow out of any sample node.
[0125] If any sample node belongs to the first sample node, the first loss can be determined based on the difference between the target predicted flow of that sample node and the actual flow of any of the aforementioned sample nodes. For branch flow, when the flow of all positively and negatively correlated neighbors in the upstream or downstream direction is known, the true value of the branch flow can be determined, and the model parameters can be adjusted based on the difference between the true value and the predicted branch flow. In some cases, the loss function of the end-to-end network can be determined based on the first loss and the second loss. Specifically, this loss function can be obtained by weighted summation of the first loss and the second loss. The weights can be set by the user. Experiments have shown that a weight ratio of 8:1 for the first loss and the second loss yields better convergence results.
[0126] The end-to-end network trained using the aforementioned loss function can be used for traffic completion prediction of continuously or intermittently missing traffic. Furthermore, the traffic completion prediction process fully considers the potential spatial relationships between nodes and their impact on downstream node traffic, resulting in excellent prediction accuracy. Moreover, the traffic prediction method disclosed herein has a small granularity, adapting to spatial non-smoothness issues, and does not rely on the actual historical traffic of nodes with missing traffic. It also allows for sample nodes unaware of their actual traffic during the training phase without affecting the model's predictive ability.
[0127] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further.
[0128] In addition, this disclosure also provides a flow prediction device, electronic device, computer-readable storage medium, and program, all of which can be used to implement any of the flow prediction methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding descriptions in the method section and will not be repeated here.
[0129] Figure 7 A flow prediction apparatus according to an embodiment of the present disclosure is shown. Figure 7 As shown, the device, applied to a server, includes:
[0130] The traffic distribution map acquisition module 101 is used to acquire the traffic distribution map under the target time period. The traffic distribution map includes nodes indicating the traffic in each direction at the intersection and the connection relationship between adjacent nodes. The connection relationship represents the traffic flow path between nodes with upstream and downstream relationships. The first node and the second node in the traffic distribution map are nodes with known traffic and nodes with unknown traffic, respectively.
[0131] The initial measurement module 102 is used to determine the initial measurement flow of each second node based on the flow conservation constraint and the flow of each first node.
[0132] The flow contribution prediction module 103 is used to determine the weight of each node in the flow distribution diagram based on the flow of each of the first nodes and the initial measured flow of each of the second nodes in the flow distribution diagram. The weight represents the flow contribution of each node to the downstream nodes.
[0133] The correction module 104 is used to correct the initial measured flow of each of the second nodes based on the weight of each node, and to determine the target predicted flow of each of the second nodes.
[0134] In some possible implementations, the traffic contribution prediction module is used to extract information based on the spatial correlation of nodes in the traffic distribution map based on the traffic of each of the first nodes and the initial measured traffic of each of the second nodes in the traffic distribution map, and in combination with the topology of the traffic distribution map, to obtain the spatial correlation information corresponding to each node; and to aggregate the spatial correlation information corresponding to each node to obtain the weight of each node.
[0135] In some possible implementations, the traffic contribution prediction module is used to determine the neighboring nodes corresponding to each node from the out-degree direction of each node; and to determine the weight of each node in the out-degree direction based on the fusion result of the spatial correlation information of the neighboring nodes.
[0136] In some possible implementations, the correction module is used to determine the information propagation volume of each node based on the weight of each node, the traffic of each of the first nodes, and the initial measured traffic of each of the second nodes, wherein the information propagation volume represents the traffic received by each node from upstream and propagated downstream; and to determine the target predicted traffic of each of the second nodes based on the information propagation volume of each node.
[0137] In some possible implementations, the correction module is used to determine the status information corresponding to each node, the status information including at least one of the following: the relationship information between the flow direction of each node and the target time period, and the static scene information related to the flow of each node; and to determine the target predicted flow of each second node based on the status information corresponding to each node and the information propagation volume of each node.
[0138] In some possible implementations, the correction module is used to determine branch traffic based on the traffic of each first node and the target predicted traffic of each second node, wherein the branch traffic is traffic that exists within the range determined based on the traffic distribution map, and the branch traffic does not belong to the traffic corresponding to the node in the traffic distribution map.
[0139] In some possible implementations, the above-mentioned preliminary measurement module is used to determine a third node, which is a second node that has not yet been assigned preliminary measurement flow; determine a missing node and a flow reference node corresponding to each direction of each third node, where the missing node is another third node adjacent to each third node in each direction, and the flow reference node is another node adjacent to each third node in each direction that is not a missing node; determine the third node with the fewest missing nodes as the fourth node, and determine a target direction corresponding to the fewest missing nodes; and determine the preliminary measurement flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction.
[0140] In some possible implementations, the aforementioned preliminary measurement module is used to determine the preliminary measurement flow of the fourth node based on the aforementioned flow conservation constraints, preset constraints, and the flow reference node corresponding to the fourth node in the aforementioned target direction; the aforementioned preset constraints include at least one of the following: a first constraint limiting the flow of each positively correlated unknown neighbor to the average flow value associated with the aforementioned target time period, wherein the positively correlated unknown neighbors are the positively correlated neighbors of the fourth node with unknown flow and not yet assigned preliminary measurement flow; a second constraint limiting the remaining flow to be evenly distributed among each negatively correlated unknown neighbor, wherein the negatively correlated unknown neighbors are the negatively correlated neighbors of the fourth node with unknown flow and not yet assigned preliminary measurement flow, wherein the remaining flow is the difference between the total flow flowing into the fourth node and the sum of known flows, wherein the sum of known flows is the sum of flows of the negatively correlated known neighbors of the fourth node.
[0141] In some possible implementations, the traffic contribution prediction module is used to perform information extraction based on node spatial correlation in the traffic distribution map according to the topology of the traffic distribution map, based on the traffic of each of the first nodes and the initial measured traffic of each of the second nodes in the traffic distribution map, to obtain the graph embedding information corresponding to each node. The graph embedding information is the expression result of the spatial correlation information. The above-mentioned information aggregation of the spatial correlation information corresponding to each node to obtain the weight of each node includes: information aggregation of the graph embedding information corresponding to each node based on the graph attention mechanism to obtain the weight of each node.
[0142] In some possible implementations, the traffic contribution prediction module is used to obtain a traffic node distribution map and graph embedding information corresponding to each traffic node. The traffic nodes include traffic nodes corresponding to intersections and connection relationships between adjacent traffic nodes. The connection relationships represent the traffic flow paths between traffic nodes with upstream and downstream relationships. The traffic nodes in the traffic node distribution map and the traffic in the traffic node distribution map have a unique spatial correspondence. Based on the first graph embedding information corresponding to each node and at least one of the following graph information, the weight of each node is determined. The graph information includes: the second graph embedding information corresponding to the downstream neighbor of each node, the graph embedding information of the traffic node corresponding to each node in the traffic node distribution map, the graph embedding information of the traffic node corresponding to the downstream neighbor of each node in the traffic node distribution map, and the graph embedding information of the traffic node determined in the traffic node distribution map based on the outflow direction of the downstream neighbor of each node.
[0143] In some possible implementations, the traffic contribution prediction module is used to input the traffic of each of the first nodes and the initial measured traffic of each of the second nodes in the traffic distribution map into a first network to obtain the information propagation amount of each node in the traffic distribution map; the correction module is used to input the traffic distribution map and the target time period into a second network to obtain the status information corresponding to each node; and input the information propagation amount of each node and the status information corresponding to each node into a third network to obtain the target predicted traffic of each second node.
[0144] In some possible implementations, the first network, the second network, and the third network form an end-to-end network, which is trained based on at least one of the following losses: a first loss determined based on the difference between the target predicted flow of any sample node and the actual flow of any sample node; and a second loss determined based on the difference between the total flow into any sample node and the total flow out of any sample node.
[0145] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0146] This disclosure also proposes a computer-readable storage medium storing at least one instruction or at least one program segment, which, when loaded and executed by a processor, implements the aforementioned method. The computer-readable storage medium may be a non-volatile computer-readable storage medium.
[0147] According to some other embodiments of this disclosure, a computer program or instructions are also provided that, when executed by a processor, implement the traffic prediction method described above.
[0148] This disclosure also proposes an electronic device, including: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured for the method described above.
[0149] Electronic devices can be provided as terminals, servers, or other forms of devices.
[0150] Figure 8 This diagram illustrates a block diagram of an electronic device according to an embodiment of the present disclosure. For example, the electronic device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, or other terminal.
[0151] Reference Figure 8The electronic device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.
[0152] Processing component 802 typically controls the overall operation of electronic device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.
[0153] Memory 804 is configured to store various types of data to support the operation of electronic device 800. Examples of this data include instructions for any application or method operating on electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0154] Power supply component 806 provides power to various components of electronic device 800. Power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 800.
[0155] Multimedia component 808 includes a screen that provides an output interface between the aforementioned electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
[0156] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when electronic device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
[0157] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.
[0158] Sensor assembly 814 includes one or more sensors for providing state assessments of various aspects of electronic device 800. For example, sensor assembly 814 can detect the on / off state of electronic device 800, the relative positioning of components such as the display and keypad of electronic device 800, changes in position of electronic device 800 or a component of electronic device 800, the presence or absence of user contact with electronic device 800, orientation or acceleration / deceleration of electronic device 800, and temperature changes of electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.
[0159] Communication component 816 is configured to facilitate wired or wireless communication between electronic device 800 and other devices. Electronic device 800 can access wireless networks based on communication standards, such as WiFi, 2G, 3G, 4G, 5G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the aforementioned communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0160] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.
[0161] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 804 including computer program instructions that can be executed by a processor 820 of an electronic device 800 to perform the above-described method.
[0162] Figure 9 A block diagram of another electronic device according to an embodiment of the present disclosure is shown. For example, electronic device 1900 may be provided as a server. (Refer to...) Figure 9 The electronic device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by memory 1932 for storing instructions, such as application programs, that can be executed by the processing component 1922. The application programs stored in memory 1932 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 1922 is configured to execute instructions to perform the methods described above.
[0163] Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input / output (I / O) interface 1958. Electronic device 1900 can operate on an operating system stored in memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.
[0164] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions that can be executed by a processing component 1922 of an electronic device 1900 to perform the above-described method.
[0165] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.
[0166] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0167] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0168] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.
[0169] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0170] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0171] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0172] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which includes one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0173] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A flow prediction method, characterized in that, The method includes: Obtain a traffic distribution map for the target time period. The traffic distribution map includes nodes indicating traffic flow in each direction at the intersection and the connection relationship between adjacent nodes. The connection relationship represents the traffic flow path between nodes with upstream and downstream relationships. The first node and the second node in the traffic distribution map are nodes with known traffic and nodes with unknown traffic, respectively. Based on the flow conservation constraint and the flow of each first node, the initial measured flow of each second node is determined. Based on the correlation information of each node in the traffic distribution map, the corresponding weights are determined. The correlation information is obtained based on the topological position of the node in the traffic distribution map, the traffic of the node and its neighboring nodes, and reflects the traffic relationship between the node and its neighboring nodes. The weights represent the traffic contribution of each node to the downstream nodes. This step specifically includes: based on the graph embedding algorithm, according to the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, and according to the topology of the traffic distribution map, information based on the spatial correlation of nodes is extracted to obtain the graph embedding information corresponding to each node. The graph embedding information is the expression result of the spatial correlation information. Based on the graph attention mechanism, the graph embedding information corresponding to each node is aggregated to obtain the weight of each node. Based on the weight of each node, the initial measured flow of each second node is corrected to determine the target predicted flow of each second node.
2. The method according to claim 1, characterized in that, The graph attention mechanism is used to aggregate the graph embedding information corresponding to each node to obtain the weight of each node, including: For each node, determine the neighboring nodes corresponding to each node from the out-degree direction of each node; Based on the fusion result of the spatial correlation information of the neighboring nodes, the weight of each node in the out-degree direction is determined.
3. The method according to claim 1 or 2, characterized in that, The step of correcting the initial measured traffic of each second node based on the weight of each node to determine the target predicted traffic of each second node includes: Based on the weight of each node, the traffic of each first node, and the initial measured traffic of each second node, the information propagation volume of each node is determined, wherein the information propagation volume represents the traffic received by each node from upstream and propagated downstream. The target predicted flow of each second node is determined based on the information propagation volume of each node.
4. The method according to claim 1, characterized in that, The step of determining the target predicted traffic of each second node based on the information propagation volume of each node includes: Determine the status information corresponding to each node, wherein the status information includes at least one of the following: the relationship information between the flow direction of each node and the target time period, and the static scene information of each node related to the flow; Based on the state information corresponding to each node and the information propagation volume of each node, the target predicted traffic of each second node is determined.
5. The method according to claim 1, characterized in that, The method further includes: Based on the flow of each first node and the target predicted flow of each second node, a branch flow is determined. The branch flow is the flow that exists within the range determined based on the flow distribution map, and the branch flow does not belong to the flow corresponding to the node in the flow distribution map.
6. The method according to claim 1, characterized in that, The determination of the initial flow of the second node based on the flow conservation constraint and the flow of the first node includes: Determine the third node, which is the second node that has not yet been assigned initial measurement flow; Determine the missing node and the traffic reference node corresponding to each direction for each third node. The missing node is the other third node adjacent to each third node in each direction, and the traffic reference node is the other node adjacent to each third node in each direction that is not the missing node. The third node with the fewest missing nodes is determined as the fourth node, and the target direction corresponding to the fewest missing nodes is determined. Based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction, the initial measured flow of the fourth node is determined.
7. The method according to claim 6, characterized in that, The step of determining the initial measured flow of the fourth node based on the flow conservation constraint and the flow reference node corresponding to the fourth node in the target direction includes: Based on the flow conservation constraint, the preset constraint, and the flow reference node corresponding to the fourth node in the target direction, the initial measured flow of the fourth node is determined. The preset constraints include at least one of the following: A first constraint is imposed, which limits the traffic of each positively correlated unknown neighbor to the average traffic value associated with the target time period. The positively correlated unknown neighbors are the positively correlated neighbors of the fourth node with unknown traffic and which have not yet been assigned initial measured traffic. A second constraint is imposed to distribute the remaining flow equally among each negatively correlated unknown neighbor, wherein the negatively correlated unknown neighbor is the fourth node’s negatively correlated neighbor with unknown flow and which has not yet been assigned initial flow, and the remaining flow is the difference between the total flow flowing into the fourth node and the sum of known flows, wherein the sum of known flows is the sum of flows of the fourth node’s negatively correlated known neighbors.
8. The method according to claim 1, characterized in that, The graph attention mechanism is used to aggregate the graph embedding information corresponding to each node to obtain the weight of each node, including: Obtain the flow node distribution map and the graph embedding information corresponding to each flow node. The flow node includes the flow node corresponding to the intersection and the connection relationship between adjacent flow nodes. The connection relationship represents the flow path between flow nodes with upstream and downstream relationships. The flow nodes in the flow node distribution map and the flow in the flow distribution map have a unique spatial correspondence. The weight of each node is determined based on the first graph embedding information corresponding to each node and at least one of the following graph information; The graph information includes: second graph embedding information corresponding to the downstream neighbors of each node, graph embedding information of the flow node corresponding to each node in the flow node distribution graph, graph embedding information of the flow node corresponding to the downstream neighbors of each node in the flow node distribution graph, and graph embedding information of the flow node determined in the flow node distribution graph based on the outflow direction of the downstream neighbors of each node.
9. The method according to claim 3, characterized in that, The method further includes: The traffic of each first node and the initial measured traffic of each second node in the traffic distribution diagram are input into the first network to obtain the information propagation amount of each node in the traffic distribution diagram. The traffic distribution map and the target time period are input into the second network to obtain the status information corresponding to each node. The information propagation volume of each node and the corresponding state information of each node are input into the third network to obtain the target predicted traffic of each second node.
10. The method according to claim 9, characterized in that, The first network, the second network, and the third network form an end-to-end network, which is trained based on at least one of the following losses: The first loss is determined based on the difference between the target predicted traffic of any sample node and the actual traffic of any sample node; The second loss is determined based on the difference between the total flow into any sample node and the total flow out of any sample node.
11. A flow prediction device, characterized in that, The device includes: The traffic distribution map acquisition module is used to acquire a traffic distribution map under a target time period. The traffic distribution map includes nodes indicating traffic in each direction at the intersection and the connection relationship between adjacent nodes. The connection relationship represents the traffic flow path between nodes with upstream and downstream relationships. The first node and the second node in the traffic distribution map are nodes with known traffic and nodes with unknown traffic, respectively. The initial test module is used to determine the initial test flow of each second node based on the flow conservation constraint and the flow of each first node. The traffic contribution prediction module is used to determine the corresponding weights based on the correlation information of each node in the traffic distribution map. The correlation information is obtained based on the topological position of the node in the traffic distribution map, the traffic of the node and its neighboring nodes, and reflects the traffic relationship between the node and its neighboring nodes. The weight represents the traffic contribution of each node to the downstream nodes. This step specifically includes: based on the graph embedding algorithm, according to the traffic of each first node and the initial measured traffic of each second node in the traffic distribution map, and according to the topology of the traffic distribution map, extracting information based on the spatial correlation of nodes to obtain the graph embedding information corresponding to each node. The graph embedding information is the expression result of the spatial correlation information. Based on the graph attention mechanism, the graph embedding information corresponding to each node is aggregated to obtain the weight of each node. The correction module is used to correct the initial measured flow of each second node based on the weight of each node, and to determine the target predicted flow of each second node.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement a traffic prediction-based method as described in any one of claims 1 to 10.
13. An electronic device, characterized in that, The method includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor implements a traffic prediction-based method as described in any one of claims 1 to 10 by executing the instructions stored in the memory.
Citation Information
Patent Citations
Traffic flow prediction method and device
CN111243267A