Traffic flow determination method, electronic device, storage medium and computer program product

Through the method of combining path map and probability model, the guidance nodes and paths are determined, which solves the accuracy and efficiency of traffic forecasting in the prior art, and realizes traffic calculations that are closer to real scenarios.

CN119889058BActive Publication Date: 2025-07-25BEIJING TRANSPORTATION RES CENT
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510395687.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-25
Estimated Expiration
2045-03-31

AI Technical Summary

Technical Problem

When determining traffic flow, the calculation logic based on economic assumptions cannot reflect the real-world traveler decision-making process, resulting in low prediction accuracy and low computational efficiency when processing large-scale urban road network data, making it difficult to provide a detailed description of traffic conditions.

Method used

The guide node is determined through the path map, the first path is selected according to the probability between adjacent path nodes, and the traffic flow is calculated based on the total number of vehicles. The probability model is trained using individual travel data to generate a traffic prediction method that is closer to the real scene.

Benefits of technology

Improves the accuracy and efficiency of traffic forecasting, avoids getting lost or detoured, and provides a more credible description of traffic conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889058B_ABST
    Figure CN119889058B_ABST
Patent Text Reader

Abstract

The present disclosure provides a traffic flow determination method, an electronic device, a storage medium, and a computer program product. A traffic flow determination method of the present disclosure includes: determining a plurality of guiding nodes from a starting point to an ending point according to a path map, where the path map records all path nodes in a target area and directed road segments between adjacent path nodes, both the starting point and the ending point are path nodes, and the guiding nodes are path nodes that can be passed through during the process from the starting point to the ending point; determining a second probability of a first path from the starting point to the ending point among the plurality of guiding nodes according to a first probability of the directed road segments between adjacent path nodes, the first probability represents a selection probability of the directed road segment when starting from a path node, the first path includes at least part of the plurality of guiding nodes, and the second probability represents a selection probability of all guiding nodes in the first path; and determining the traffic flow of the first path according to the second probability and the total number of vehicles from the starting point to the ending point.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of data processing and the like, and particularly relates to a method for determining traffic flow, an electronic device, a storage medium, and a computer program product. Background Art

[0002] The traffic flow of a lane can help urban planners understand traffic trends, provide a decision-making basis for future road construction and the development of public transportation, and can also be used as a factor affecting signal light time allocation to minimize problems such as congestion. Obviously, determining the traffic flow of a lane has important practical significance. In related technologies, when determining the future traffic flow of a path between two nodes, it is usually assumed that travelers will choose the path with the lowest travel cost. The calculation logic derived from economic assumptions may not fully reflect the complex decision-making process of travelers in the real world, thus affecting the accuracy of prediction and resulting in a disconnection between theory and practice. Additionally, there are also problems with operation efficiency. Especially when dealing with large-scale urban road network data, due to the need to consider a large number of variables and parameters, the calculation time is relatively long. Moreover, in order to accurately apply this model, detailed road flow-delay function data must be obtained, which not only increases the difficulty of preliminary preparation work but also makes model maintenance complex and costly. Finally, since this method is mainly used for macro-level travel mode modeling, its analysis accuracy is relatively low and it is difficult to provide a detailed description of traffic conditions. Summary of the Invention

[0003] The present disclosure provides a method for determining traffic flow, an electronic device, and a computer program product.

[0004] According to one aspect of the present disclosure, there is provided a method for determining traffic flow, including: determining a plurality of guiding nodes from a starting point to an ending point according to a path map, where the path map records all path nodes in a target area and the directed road segments between adjacent path nodes, the starting point and the ending point are both path nodes, and the guiding nodes are path nodes that can be passed through during the process from the starting point to the ending point; determining a second probability of a first path from the starting point to the ending point among the plurality of guiding nodes according to a first probability of the directed road segments between adjacent path nodes, where the first probability represents the selection probability of the directed road segment when starting from the path node, the first path includes at least part of the plurality of guiding nodes, and the second probability represents the selection probability of all guiding nodes in the first path; and determining the traffic flow of the first path according to the second probability and the total number of vehicles from the starting point to the ending point.

[0005] In some embodiments, determining a second probability of a first path from the starting point to the ending point includes: using the starting point as a target point, determining a plurality of passing nodes associated with the target point among the plurality of guiding nodes, where the passing nodes are adjacent to the target point, and there is a directed section in the path map pointing from the target point to the passing node; a target point determination step for determining a new target point from the plurality of passing nodes; when the latest determined target point is the ending point, obtaining a first path formed by the directed sections between the target point and the adjacent target points, and using the product of the first probabilities of the directed sections in the first path as the second probability.

[0006] In some embodiments, the target point determination step includes: calculating a comprehensive probability of each passing node according to the first probability of the directed section from the target point to each passing node, where the comprehensive probability is the product of the first probabilities of the directed sections involved in the passing node from the starting point; and when the maximum comprehensive probability of each passing node is greater than a probability threshold, using the passing node corresponding to the maximum comprehensive probability as the new target point.

[0007] In some embodiments, after the target point determination step, it further includes: when the latest determined target point is not the ending point, determining a plurality of new nodes corresponding to the latest target point, and repeatedly executing the target point determination step until the latest determined target point is the ending point.

[0008] In some embodiments, after obtaining a first path formed by the directed sections between the target point and the adjacent target points, it further includes: determining whether the maximum comprehensive probability of each latest passing node that is not the ending point is greater than the probability threshold; when the maximum comprehensive probability of each latest passing node is greater than the probability threshold, repeatedly executing the target point determination step until the latest target point is the ending point, obtaining another first path, and using the product of the first probabilities of the directed sections in the other first path as the second probability.

[0009] In some embodiments, before determining the plurality of guiding nodes from the starting point to the ending point, it includes: generating a probability model, where the probability model is used to perform the following steps: according to the path map, determining a plurality of guiding nodes from the starting point to the ending point; and according to the first probability of the directed section between adjacent path nodes, determining the second probability of the first path from the starting point to the ending point among the plurality of guiding nodes.

[0010] In some embodiments, before generating the probability model, it includes: converting individual travel data into a first path chain, where the individual travel data includes all path nodes passed by a traveler from a travel starting point to a travel ending point, and the moments when each path node is passed through, and the path chain records the passing order of the traveler for all the path nodes.

[0011] In some embodiments, after converting the individual travel data into a first path chain, it includes: generating the path map according to a plurality of the first path chains.

[0012] In some embodiments, after generating the path map, it includes: determining the passing duration between adjacent path nodes according to the moments when each path node is passed through in the first path chain; and generating a plurality of second path chains according to the passing duration between adjacent path nodes and the path map.

[0013] In some embodiments, generating the probability model includes: calling a path chain to train an original model to obtain the probability model, where the path chain is the first path chain or the second path chain.

[0014] In some embodiments, obtaining the probability model includes: discretizing the path chain into multiple types of characters according to the language structure of the path chain, where the characters include node coding characters, first interval characters, first time characters, second interval characters, second time characters, third interval characters, third time characters, and fourth interval characters; configuring a loss weight for each type of character, where the loss weight is used to measure the importance of the character to the loss value of the probability model, and the node coding character has the largest loss weight; pre-training the original model with the path chain to obtain a process model; inputting start and end point sample data into the process model, controlling the process model to output a predicted path and a predicted probability; comparing the loss between the predicted path and the expected path, and generating a loss value representing the difference between the predicted path and the expected path based on the loss weights of each character; and in the case where the loss value is greater than a loss threshold, adjusting the parameters of the process model until the loss value is less than or equal to the loss threshold to obtain the probability model.

[0015] According to one aspect of the present disclosure, there is provided an electronic device, including: a memory that stores execution instructions; and a processor that executes the execution instructions stored in the memory, so that the processor executes the traffic flow determination method of any embodiment of the present disclosure.

[0016] According to one aspect of the present disclosure, there is provided a readable storage medium storing execution instructions, which when executed by a processor are used to implement the traffic flow determination method according to any embodiment of the present disclosure.

[0017] According to one aspect of the present disclosure, there is provided a computer program product including a computer program, which when executed by a processor implements the traffic flow determination method according to any embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, are used to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are included in this specification and form a part of this specification.

[0019] Figure 1 It is a schematic diagram of an application scenario of the traffic flow determination method according to an embodiment of the present disclosure.

[0020] Figure 2 It is a flowchart of the traffic flow determination method according to an embodiment of the present disclosure.

[0021] Figure 3 It is a schematic diagram of the determination process of the traffic flow according to an embodiment of the present disclosure.

[0022] Figure 4 It is a schematic diagram of a path node according to an embodiment of the present disclosure.

[0023] Figure 5 It is a schematic diagram of a first path according to an embodiment of the present disclosure.

[0024] Figure 6 It is a schematic block diagram of the structure of a traffic flow determination device according to an embodiment of the present disclosure.

[0025] Figure 7 It is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] The present disclosure will be further described in detail below with reference to the drawings and examples. It can be understood that the specific examples described herein are only for explaining the relevant content and are not intended to limit the present disclosure. Additionally, it should be noted that for the sake of description, only parts related to the present disclosure are shown in the drawings.

[0027] It should be noted that, without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.

[0028] The traffic volume of lanes can help urban planners understand traffic trends, provide decision-making basis for future road construction and public transportation development, and can also serve as an influencing factor for the configuration of signal light time to minimize congestion and other problems. Obviously, determining the traffic volume of lanes has important practical significance. In related technologies, the traffic volume is usually determined by the "four-stage method". First, the utility of each mode is calculated by analyzing the time consumption, cost and other factors of different modes of transportation, and the demand between OD pairs (i.e., travel origin-destination pairs) is divided into various modes of transportation using statistical models such as the Logit model (assessment model). Secondly, after the travel mode is clarified, traffic flow is allocated, that is, a specific path is selected for each pair of OD, and the travel volume is allocated according to the principle of cost minimization. In this process, it is assumed that travelers will choose the path with the lowest travel cost, and at the same time, the dynamic characteristics of the road network are taken into account, that is, as the frequency of use of the road section increases, the travel cost will also increase accordingly, which is usually quantified by the flow-delay function. However, this method has some significant flaws: first, there is the problem of disconnection between theory and practice. The calculation logic derived from economic assumptions may not fully reflect the complex decision-making process of travelers in the real world, thus affecting the accuracy of the prediction. Secondly, there is the problem of computational efficiency. Especially when dealing with large-scale urban road network data, the calculation time is long due to the need to consider a large number of variables and parameters. Furthermore, in order to accurately apply this model, detailed road flow-delay function data must be obtained, which not only increases the difficulty of preliminary preparations, but also makes model maintenance complicated and costly. Finally, since this method is mainly used for travel mode modeling at the macro level, its analysis accuracy is relatively low, and it is difficult to provide a detailed description of traffic conditions.

[0029] To this end, the present disclosure proposes a method for determining vehicle flow.

[0030] Figure 1 FIG. 1 is a schematic diagram of an application scenario of a method for determining vehicle flow according to an embodiment of the present disclosure. Figure 1 As shown, in this application scenario, a server 100 and a terminal device 200 may be included. The server 100 and the terminal device 200 may be connected via a network or Bluetooth to exchange data. The server 100 may be a cloud server or a physical server, and the terminal device 200 may be a smart device such as a computer, a mobile phone, or a tablet. As an example, the server 100 may be used to provide the basic data required by the vehicle flow determination method, and the terminal device 200 may perform the vehicle flow determination method of the present disclosure based on the basic data provided by the server 100.

[0031] Figure 2 FIG. 1 is a flow chart of a method for determining vehicle flow according to an embodiment of the present disclosure. Figure 2As shown, the present disclosure proposes a traffic flow determination method M200. By steps S210 to S230, the traffic flow of the first path is determined. Compared with the method of inferring the future traffic flow of the path only based on economic assumptions, it can fit the real traffic scenario and has higher authenticity and credibility. The traffic flow determination method M200 can be run by the Figure 1 terminal device 200 in, and the basic data required for running can be recorded in the Figure 1 server 100 of.

[0032] In step S210, according to the path map, a plurality of guiding nodes from the starting point to the ending point are determined.

[0033] The path map records all the path nodes in the target area and the directed road segments between adjacent path nodes. The target area is an area with traffic flow prediction requirements, which can be an urban area or a part of the urban area, and is not limited here. The path node is a position where the traffic flow or vehicle speed changes in the lane, including intersections, positions where traffic lights are located, positions where pedestrian crosswalks are located, etc. At intersections, vehicle diversion or convergence is involved; at positions where traffic lights are located, vehicle U-turns are involved; at positions where pedestrian crosswalks are located, the passage of pedestrians or bicycles is involved. Of course, the path nodes are not limited to the foregoing examples, and other positions that can cause changes in the traffic flow or vehicle speed in the lane can be used as path nodes, which are not listed one by one here. In addition, since the lane has a direction, there may be multiple path nodes at the same intersection, traffic light, etc. according to the direction of the associated lane.

[0034] According to the analysis requirements of traffic flow, the starting point and the ending point can be any two path nodes in the path map. For example, any path node in a certain residential area can be selected as the starting point, and any path node near a popular business district in the target area can be selected as the ending point. In this way, the traffic flow of the path that can be passed from the residential area to the business district can be predicted, and early warning plans can be made for the paths with relatively more traffic flow, etc.

[0035] A guiding node is a path node that can be passed through during the process from the starting point to the ending point. In the path map of the target area, several path nodes are designed. Therefore, when starting to pass through each path node, there will be multiple directed road segments radiating to multiple next path nodes. However, not all directed road segments can point to the ending point. Obviously, in order to avoid path selections that do not conform to the actual travel scenarios of travelers (such as getting lost or making unnecessary detours), during the process from the starting point to the ending point, the path nodes passed through should be restricted. In other words, according to the situations of the starting point and the ending point, the path nodes in the path map that cannot be driven from the starting point to the ending point are removed, and the path nodes that can be passed through from the starting point to the ending point are retained. These retained path nodes are the guiding nodes. The number of guiding nodes can be determined according to the actual situation and is not restricted here.

[0036] In step S220, according to the first probability of the directed road segment between adjacent path nodes, among multiple guiding nodes, determine the second probability of the first path from the starting point to the ending point.

[0037] Adjacent path nodes refer to two path nodes that are adjacent in space. The two adjacent path nodes are connected by a directed road segment and there are no other path nodes in between. A directed road segment is one or more lanes between two adjacent path nodes, and the lanes belonging to the same directed road segment should have the same direction.

[0038] The first probability is used to represent the selection probability of this directed road segment when starting from the path node. Specifically, since the path node is the position where the traffic flow or vehicle speed of the lane changes, there are usually lane-changing and other situations at the path node. That is to say, when starting from the path node, the selection of at least one directed road segment will be involved. Then, according to the true selection probabilities of multiple individuals for each directed road segment presented by big data, determine the selection probability of the current traveler driving towards any directed road segment associated with the current path node. This selection probability is the first probability.

[0039] All guiding nodes are path nodes that can reach the ending point. Therefore, in order to fit the real travel scenario, starting from the starting point, each time select the guiding node with the largest comprehensive probability until the new guiding node is the ending point. Here, the comprehensive probability is the product of the first probabilities of the directed road segments involved when going from the starting point to each path node. Selecting the node corresponding to the largest comprehensive probability as the target point for the next passage can ensure that the first path determined first is the path with the highest selection probability in the real scenario, ensuring the reliability and authenticity of the predicted path.

[0040] The second probability represents the selection probability of all guiding nodes in the first path, and is essentially the product of the first probabilities of all directed road segments involved in the first path.

[0041] In step S230, according to the second probability and the total number of vehicles from the starting point to the ending point, determine the traffic flow of the first path.

[0042] The total number of vehicles from the starting point to the ending point can be determined based on data such as the maximum capacity of all paths involved from the starting point to the ending point and the empirical value of the number of vehicles traveling during the same historical period. The method for determining the total number of vehicles is not limited, and any method falls within the protection scope of the present disclosure.

[0043] The product of the second probability and the total number of vehicles is the traffic flow of the first path. The traffic flows of the paths involved from the starting point to the ending point should be the total number of vehicles afterwards. It should be noted that the number of the first paths is not unique. After determining the first first path, continue to select the guiding node with the largest combined probability among the subsequent remaining guiding nodes for path prediction to obtain multiple first paths that can reach from the starting point to the ending point. Of course, after the maximum combined probability is less than the probability threshold, the prediction of the first path can be ended to avoid wasting the calculation cost and time cost of calculating the traffic flow of niche paths.

[0044] The traffic flow determination method of the present disclosure determines the guiding nodes through the path map and obtains the first probability between adjacent path nodes, making the speculated first path closer to the real scenario, and there will be no path speculation situations that do not conform to the travel logic such as getting lost or taking a detour. Based on the authenticity and reliability of the path, the calculation of the second probability of the first path is also authentic and reliable. Therefore, the finally obtained traffic flow overcomes the problem of deviating from the actual travel scenario by only relying on the derivation of economic theory in the related art and has credibility.

[0045] Figure 3 It is a schematic diagram of the traffic flow determination process according to an embodiment of the present disclosure. The following combines Figure 3 to describe the traffic flow determination process in more detail.

[0046] In step 301, the individual travel data is converted into path chains. The individual travel data is the real travel information of travelers, including a node sequence and a time sequence. The node sequence includes the path nodes passed from the travel starting point to the travel ending point, and the time sequence includes the moments of arriving at each path node (including the moment of departure from the travel starting point and the moment of arrival at the travel ending point). The intention of obtaining the individual travel data is to use it as training data for a large language model (i.e., the probability model described later). Therefore, for the convenience of analysis by the large language model, the present disclosure converts the individual travel data that can be used as training data into a natural language form. Each path node has a unique node code, so first, the node codes of each path node are converted into the same format. For example, the path node with a node code of 602 is converted into [node_602]. Furthermore, the moment of arriving at each path node is converted into the format of minutes and seconds. For example, 420.00 is converted into 07:00:00. In the present disclosure, each passed path node and the moment of arriving at that node are used as a state. A first delimiter is used between the path node and the arrival moment in the same state <sep>Connection, with a fourth spacer character between two states <next>Connection. Finally, a first path chain that records the passing order of all path nodes of the traveler can be obtained.

[0047] The first path chain can be: [node_602] <sep> 07:00:00 <next>[node_42313] <sep> 07:00:06 <next>[node_42338] <sep> 07:00:44 <next>[node_42339] <sep> 07:00:50 <next>[node_41036] <sep>07:00:56. This path chain indicates that the traveler starts from the path node with node code 602. Starting from 07:00:00, the traveler departs from path node 602, arrives at path node 42313 at 07:00:06, arrives at path node 42339 at 07:00:44, arrives at path node 41036 at 07:00:50, and arrives at path node 41036 at 07:00:56; where path node 41036 is the end point of this trip.

[0048] Figure 4 is a schematic diagram of path nodes according to an embodiment of the present disclosure. The following combines Figure 4 , to illustrate the concept of path nodes. Path nodes usually appear at positions that can affect the traffic flow and vehicle speed of lanes, such as intersections like crossroads, or the positions where traffic lights are located, zebra crossings are located, etc. Since lanes have directions, at the same position that can affect the traffic flow and vehicle speed of lanes, multiple different path nodes will be generated corresponding to different lane directions.

[0049] As Figure 4 shown, in the Y-axis direction, the rightmost lane is a right-turn lane along the reverse direction of the Y-axis. Then, this lane will experience a split situation at the crossroads, so it is regarded as path node N1. The second right lane is a straight-through lane, and this lane will experience a vehicle merging situation at the crossroads, so it is regarded as path node N2; the leftmost lane is a straight-through lane along the positive direction of the Y-axis, and this lane will experience a vehicle merging situation at the crossroads, so it is regarded as path node N5. The second left lane is a left-turn lane along the positive direction of the Y-axis, and this lane will experience a split situation at the crossroads, so it is regarded as path node N6. Similarly, in the X-axis direction, the rightmost lane is a left-turn lane along the reverse direction of the X-axis, which is set as path node N4. The second right lane is a straight-through lane along the reverse direction of the X-axis, which is set as path node N3; the second left lane is a straight-through lane along the positive direction of the X-axis, which is set as path node N7. The leftmost lane is a left-turn lane along the positive direction of the X-axis, which is set as path node N8.

[0050] However, the amount of real individual travel data is relatively small and cannot meet the training requirements of large language models. Therefore, in step 302, based on the first path chain obtained from individual travel data, the path map of the target area is first outlined. Then, in step 303, based on the connectivity between each path node in the path map, a second path chain that is the same as or close to the real travel situation is simulated.

[0051] Specifically, based on all the individual travel data that can be collected, all adjacent path nodes that each path node can connect to are determined to form a path map. And the travel duration from the current path node to each adjacent path node. For example, if the travel duration from path node A to path node B at 8:30 in a certain first path chain is 60 seconds, then a record of 60 seconds is added to the list of the 8 o'clock period from node A to node B.

[0052] Further, randomly select a path node in the path map as the starting point and randomly select a departure time. Then, randomly select a path node adjacent to the current path node in the path map as the next node, and based on the previously recorded list of unit time periods corresponding to the departure time, use the kernel density estimation method to fit the distribution of the travel duration, and randomly select a duration from the distribution as the travel duration between the two nodes this time, and calculate the time to reach the selected next node. Repeat the above process until there is no other adjacent and passable path node for the last selected path node. Usually, the length of the second path chain as training data can include 1000 states. Of course, the lengths of the rest that can support training all fall within the protection scope of this disclosure and are not limited here.

[0053] In step 304, the first path chain and the second path chain are used as training samples to train the model to generate a probability model. That is, the first path chain and the second path chain are combined into a set of path chains. Then, use this set of path chains as samples to train the original model. The original model can be a large language model that can obtain a probability model capable of outputting path chains and second probabilities through pre-training and instruction fine-tuning.

[0054] The following is a more detailed description of the probability model generation process.

[0055] In some embodiments, according to the language structure of the path chain, the path chain is discretized into multiple characters, including node encoding characters, first interval characters, first time characters, second interval characters, second time characters, third interval characters, third time characters, and fourth interval characters. Among them, the form of the node encoding character is [node_id], where id is the node encoding of the path node; the form of the first interval character is <sep>; the forms of the first time character, the second time character, and the third time character are all any number from 00 to 59; the second interval character is set between the first time character and the second time character, written as ": "; the third interval character is set between the second time character and the third time character, written as ": "; the fourth interval character is set between two states, written as <next>。

[0056] In some embodiments, each character can be converted into a corresponding character code to form a vocabulary table representing the relationship between characters and character codes. For example, [node_0001] is set to 1, [node_0002] is set to 2, etc., which are not listed one by one here. In this way, before inputting the path chain into the original model, each character involved in the path chain is first converted into a numerical form through the vocabulary table to facilitate model recognition and processing.

[0057] Furthermore, a loss weight is configured for each type of character. The loss weight is used to measure the importance of the character to the loss value of the probability model, and the node-encoding character has the largest loss weight. In other words, to ensure that the predicted path output by the probability model is the same as or similar to the expected path, the parameters in the probability model are optimized according to the loss value between the predicted path and the expected path until the loss value is less than the loss threshold. To ensure the accuracy of the probability model when predicting path nodes and avoid getting lost or taking detours, when configuring the loss weight, the weight in the case of node-encoding character errors is increased. In other words, if other characters are incorrect, a weight of 0.1 is assigned, while when the node character encoding is incorrect, a weight of 0.3 is assigned, increasing the influence degree of the node character encoding on the loss value of the predicted path.

[0058] Furthermore, the original model is pre-trained using the path chain to obtain a process model. The process model can generate a path chain with a form that meets the requirements, but since it has not undergone instruction fine-tuning, the output path chain temporarily cannot meet the directional output requirement from the specified starting point to the specified ending point. Among them, the model usually outputs results byte by byte. Pre-training is essentially a process of controlling the bytes output by the model each time to be consistent with the bytes of the sample. For example, if the first byte in the sample is "[", then the first byte output by the model should also be "[", and if they are inconsistent, the parameters of the model are adjusted until a path chain that is exactly the same as the sample is output.

[0059] Even further, the start and end point sample data is input into the process model to control the process model to output a predicted path and a predicted probability. The loss between the predicted path and the expected path is compared, and based on the loss weights of each character, a loss value representing the difference between the predicted path and the expected path is generated; and in the case where the loss value is greater than the loss threshold, the parameters of the process model are adjusted until the loss value is less than or equal to the loss threshold to obtain a probability model.

[0060] After obtaining the probability model, the processing of the data to be analyzed can be carried out. That is, according to the departure time, the first path from the starting point to the ending point in the data to be analyzed is determined, as well as the second probability of the first path.

[0061] Specifically, in step 305, a guiding node is determined. That is, according to the starting point, ending point, departure time in the data to be analyzed, and the connectivity of each path node in the path map, the guiding node between the starting point and the ending point is determined.

[0062] Then, step 306 is executed to input the guiding node into the probability model; and step 307 is executed to input the data to be analyzed into the probability model. In the probability model, step 308 is executed with the starting point as the target point. Further, step 309 is executed to determine multiple passing nodes associated with the target point among multiple guiding nodes, where the passing nodes are adjacent to the target point, and there is a directed section in the path map pointing from the target point to the passing nodes.

[0063] Each time a new target point is selected, the passing nodes associated with the current target point are input to the probability model to guide the probability model to make a selection within these specified node ranges, avoiding the situation of getting lost and being unable to reach the ending point, and improving the practicability of this method.

[0064] Specifically, step 310 is executed to calculate the comprehensive probability of each passing node according to the first probability of the directed section from the target point to each passing node. The comprehensive probability is the product of the first probabilities of the directed sections involved from the starting point to the passing node. In step 311, it is determined whether the maximum comprehensive probability among the comprehensive probabilities of each passing node is greater than the probability threshold. When the maximum comprehensive probability of each passing node is greater than the probability threshold, step 312 is executed to use the passing node corresponding to the maximum comprehensive probability as the new target point. Further, step 313 is executed to determine whether the new target point is the ending point. When the determined latest target point is the ending point, step 314 is executed to obtain the first path composed of the directed sections between the target point and the adjacent target points, and use the product of the first probabilities of the directed sections in the first path as the second probability. In step 315, after obtaining multiple first paths and the second probabilities of each first path, the total number of vehicles from the starting point to the ending point in the target area is determined. Then, the total number of vehicles is multiplied by the second probability, and the obtained result is the traffic flow on this path. In some embodiments, when the determined latest target point is not the ending point, multiple new nodes corresponding to the latest target point are determined, and the target point determination steps are repeatedly executed until the determined latest target point is the ending point.

[0065] In some embodiments, after obtaining a first path composed of directed road segments between a target point and adjacent target points, the method further includes: determining whether the maximum comprehensive probability of each latest passing node that is not an end point is greater than a probability threshold; in the case where the maximum comprehensive probability of each latest passing node is greater than the probability threshold, repeatedly executing the target point determination step until the latest target point is the end point, obtaining another first path, and using the product of the first probabilities of the directed road segments in the other first path as the second probability.

[0066] Figure 5 is a schematic diagram of the first path according to an embodiment of the present disclosure. The following combines Figure 5 to illustrate the acquisition process of the first path.

[0067] Taking O as the starting point and D as the end point, the path nodes include O, 1, 2, 3, 4, 5, 6, 7, and D. The directed road segments between two adjacent path nodes are defined as R. It should be noted that these path nodes 1 to 7 between O and D are guiding nodes selected from a path map containing numerous path nodes. The starting point O can only reach the end point D through these guiding nodes. Other path nodes in the path map may not have road segments pointing to the end point D. Currently, taking the location of a hypothetical user as the target point, so the first target point should be the starting point O. At the starting point O, there are two selectable directed paths. The first probability of selecting the directed road segment pointing to path node 1 is 30%, and the first probability of selecting the directed road segment pointing to path node 2 is 70%. At this time, the passing nodes are path node 1 and path node 2. Since the first probability of the directed road segment pointing to path node 2 is greater than the first probability of the directed road segment pointing to path node 1, path node 2 is used as the new target point. At this time, the comprehensive probability corresponding to path node 2 is the first probability 0.7 of the directed road segment between it and the starting point O.

[0068] Further, in the case where the new target point is path node 2, it is determined that the new passing nodes are path node 4 and path node 5. At this time, path node 1 is used as a passing node, and its comprehensive probability is 0.3 (i.e., the first probability of the directed road segment between the starting point O and path node 1); the comprehensive probability of path node 4 is the product of 0.7 and 0.5 (i.e., the first probability of 50% between path node 2 and path node 4), that is, 0.35; similarly, the comprehensive probability of path node 5 is the product of 0.7 and 0.2, that is, 0.14. Among the current passing nodes, path node 4 has the maximum comprehensive probability, so path node 4 is used as the new target point.

[0069] Further, determine the new passing nodes associated with path node 4, namely path node 6 and path node 7. Furthermore, determine that the combined probability of path node 6 is the product of 0.7, 0.5, and 0.2, which is 0.07; determine that the combined probability of path node 7 is the product of 0.7, 0.5, and 0.4, which is 0.14. Among the current passing nodes, the maximum combined probability is 0.3. Therefore, take path node 1 as the new target point and determine the new passing node as path node 3. At this time, the combined probability of path node 3 is the product of 0.3 and 0.3, which is 0.09. Among the current passing nodes, the maximum combined probability is 0.14. That is, take path node 7 and path node 5 as the new target points.

[0070] Further, determine the new passing node associated with path node 7, namely the end point D. Then the maximum combined probability corresponding to the end point D is the product of 0.7, 0.5, 0.4, and 0.6, which is 0.084. Assume that 0.084 is greater than the probability threshold. Then the first path can be obtained: "starting point O → path node 2 → path node 4 → path node 7 → end point D", and the second probability of this first path is 0.084. Moreover, when taking path node 5 as the new target point, the new passing node is path node 7 pointed to by path node 5, and its combined probability is 0.028.

[0071] After determining the first path, continue to judge whether the maximum combined probability 0.09 among the current remaining passing nodes is greater than the probability threshold. Assume that 0.09 is greater than the probability threshold. Then take path node 3 as the new target point, and then determine the new passing node as path node 6. At this time, the combined probability of path node 6 pointed to by path node 3 is the product of 0.3, 0.3, and 0.3, which is 0.027. Then, the maximum combined probability 0.07 among the current passing nodes is path node 6 pointed to by path node 4. Then, take path node 6 as the new target point, and the new passing point is the end point D.

[0072] Further, for the first path "starting point O → path node 2 → path node 4 → path node 6 → end point D", its second probability is the product of 0.7, 0.5, 0.2, and 0.4, which is 0.028.

[0073] Further, among the remaining passing nodes, the maximum combined probability is 0.028. If 0.028 is greater than the probability threshold, then take the path node 7 corresponding to this combined probability as the new target point and determine the new passing point as the end point D. Obtain the first path "starting point O → path node 2 → path node 5 → path node 7 → end point D", and the second probability of this first path is the product of 0.7, 0.2, 0.2, and 0.6, which is 0.0168.

[0074] Finally, using path node 6 as the new target point, the new waypoint is the end point D. The combined probability of the new waypoint is the product of 0.3, 0.3, 0.3, and 0.4, which is 0.0108. If 0.0108 is greater than the probability threshold, the first path "starting point O → path node 1 → path node 3 → path node 6 → end point D" is obtained, and the second probability of this first path is 0.0108.

[0075] For the first path "starting point O → path node 2 → path node 5 → path node 7 → end point D", its second probability is the product of 0.7, 0.2, 0.2, and 0.6, which is 0.0168.

[0076] Of course, when any maximum combined probability is less than or equal to the probability threshold, the process of obtaining the first path and its second probability ends. The probability threshold can be set according to actual needs and is not limited here.

[0077] The traffic flow determination method of the present disclosure creates a path map based on individual travel data. Then, according to the starting point and end point of the data to be analyzed, guiding nodes are determined to avoid path prediction results that do not conform to the actual scenario, such as getting lost or taking a detour during the model prediction process, improving the credibility and efficiency of the results. When selecting a passing section at a certain path node, based on the first probability between adjacent path nodes, the finally inferred first path is closer to the real scenario. On the basis of the path being true and reliable, the calculation of the second probability of the first path is also true and reliable. Therefore, the finally obtained traffic flow overcomes the problem in the related art of deviating from the actual travel scenario only relying on the derivation of economic theory and has credibility.

[0078] Figure 6 It is a structural schematic diagram of a traffic flow determination device according to an embodiment of the present disclosure.

[0079] As Figure 6 shown, a traffic flow determination device 600 is presented, including: a guiding node determination module 610 for determining multiple guiding nodes from the starting point to the end point according to the path map. The path map records all path nodes in the target area and the directed sections between adjacent path nodes. The starting point and the end point are both path nodes, and the guiding nodes are path nodes that can be passed through during the process from the starting point to the end point; a second probability determination module 620 for determining the second probability of the first path from the starting point to the end point among the multiple guiding nodes according to the first probability of the directed sections between adjacent path nodes. The first probability represents the selection probability of the directed section when starting from a path node. The first path includes at least some of the multiple guiding nodes, and the second probability represents the selection probability of all guiding nodes in the first path; and a traffic flow determination module 630 for determining the traffic flow of the first path according to the second probability and the total number of vehicles from the starting point to the end point.

[0080] The traffic flow determination device 600 of the present disclosure may be in the form of computer software, and each module of the traffic flow determination device 600 may be in the form of a computer software module.

[0081] Each module of the traffic flow determination device 600 of the present disclosure is set to implement each step of the traffic flow determination method. Its execution principle and steps can be referred to the foregoing, and will not be elaborated herein.

[0082] Figure 7 It is a structural schematic diagram of an electronic device according to an embodiment of the present disclosure. As Figure 7 shown, the present disclosure further provides an electronic device 1000, including: a processor 1200 and a memory 1300, the memory 1300 stores execution instructions; the processor 1200 executes the execution instructions stored in the memory 1300, so that the processor 1200 executes the traffic flow determination method.

[0083] The hardware structure of the electronic device 1000 can be implemented by using a bus architecture. The bus architecture may include any number of interconnecting buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, a memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.

[0084] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, only one connecting line is shown in this figure, but it does not mean that there is only one bus or one type of bus.

[0085] The present disclosure also provides a readable storage medium storing a computer program which, when executed by a processor, is used to implement the above method. The "readable storage medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples of the readable storage medium include the following: an electrical connection portion (electronic device) having one or more wirings, a portable computer diskette case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM), etc.

[0086] The present disclosure also provides a computer program product. The method of the present disclosure can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, the processes or functions of the present disclosure are executed in whole or in part.

[0087] The computer program or instructions can be stored in a readable storage medium or transmitted from one readable storage medium to another. For example, the computer program or instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired or wireless manner. The readable storage medium can be any accessible available medium or a data storage device such as a server or data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it can also be an optical medium, such as a digital video disc; or it can be a semiconductor medium, such as a solid state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or can include both volatile and non-volatile types of storage media.

[0088] Those skilled in the art should understand that the embodiments of the present disclosure can be provided as a method, an electronic device, a readable storage medium, or a computer program product. Therefore, the present disclosure can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present disclosure can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] This disclosure is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the disclosure. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a means for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or the functions specified in one or more of the blocks.

[0090] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or the functions specified in one or more of the blocks.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more of the flows Figure 1 one or more of the flows and / or blocks Figure 1 or the functions specified in one or more of the blocks.

[0092] In the description of this specification, the description with reference to terms such as "one embodiment / way", "some embodiments / ways", "example", "specific example", or "some examples" means that the specific features, structures, or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of this disclosure. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment / way or example. Moreover, the specific features, structures, or characteristics described can be combined in a suitable manner in any one or more embodiments / ways or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments / ways or examples described in this specification and the features of different embodiments / ways or examples.

[0093] In addition, the terms "first" and "second" are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In the description of the present disclosure, "a plurality of" means at least two, such as two, three, etc., unless otherwise specifically defined.

[0094] Those skilled in the art should understand that the above-described embodiments are merely for clearly illustrating the present disclosure and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications can be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.< / next> < / sep> < / sep> < / next> < / sep> < / next> < / sep> < / next> < / sep> < / next> < / sep> < / next> < / sep>

Claims

1. A method for determining traffic flow, characterized in that, Including: Converting individual travel data into a first path chain, where the individual travel data includes all path nodes passed by a traveler from a travel starting point to a travel ending point and the moments of passing through each path node, and the path chain records the passing order of the traveler through all the path nodes; Generating a path map based on multiple said first path chains; Determining the passing duration between adjacent path nodes according to the moments of passing through each path node in the first path chain, and generating multiple second path chains based on the passing duration between adjacent path nodes and the path map; Generating a probability model, including: training an original model by invoking path chains to obtain the probability model, where the path chains are first path chains or second path chains; the probability model is used to perform the following steps: determining multiple guiding nodes from a starting point to an ending point according to the path map; and determining the second probability of a first path from the starting point to the ending point among the multiple guiding nodes according to the first probability of a directed section between adjacent path nodes; Determining multiple guiding nodes from a starting point to an ending point according to the path map, where the path map records all path nodes in a target area and the directed sections between adjacent path nodes, the starting point and the ending point are both path nodes, and the guiding nodes are path nodes that can be passed through during the process from the starting point to the ending point; Determining the second probability of a first path from the starting point to the ending point among the multiple guiding nodes according to the first probability of a directed section between adjacent path nodes, where the first probability represents the selection probability of the directed section when starting from the path node, the first path includes at least part of the multiple guiding nodes, and the second probability represents the selection probability of all guiding nodes in the first path; and Determining the traffic flow of the first path according to the second probability and the total number of vehicles from the starting point to the ending point; Determining the second probability of a first path from the starting point to the ending point includes: Taking the starting point as a target point, and determining multiple passing nodes associated with the target point among the multiple guiding nodes, where the passing nodes are adjacent to the target point and there is a directed section from the target point to the passing node in the path map; A target point determination step for determining a new target point from multiple said passing nodes; When the latest determined target point is the ending point, obtaining a first path composed of the target point and the directed sections between adjacent target points, and taking the product of the first probabilities of each directed section in the first path as the second probability.

2. The traffic flow determination method according to claim 1, wherein The target point determination step includes: Calculating the comprehensive probability of each passing node according to the first probability of the directed section from the target point to each passing node, where the comprehensive probability is the product of the first probabilities of each directed section involved from the starting point to the passing node; and When the maximum comprehensive probability of each passing node is greater than a probability threshold, taking the passing node corresponding to the maximum comprehensive probability as the new target point.

3. The traffic flow determination method according to claim 1, wherein After the target point determination step, it further includes: In the case where the latest determined target point is not the end point, determine a plurality of new nodes corresponding to the latest target point, and repeatedly execute the target point determination step until the latest determined target point is the end point.

4. The traffic flow determination method according to claim 1, characterized in that, After obtaining the first path composed of the target points and the directed road segments between adjacent target points, it further includes: Determine whether the maximum comprehensive probability of each latest passing node that is not the end point is greater than the probability threshold; In the case where the maximum comprehensive probability of each latest passing node is greater than the probability threshold, repeatedly execute the target point determination step until the latest target point is the end point, obtain another first path, and use the product of the first probabilities of the directed road segments in the other first path as the second probability.

5. The traffic flow determination method according to claim 1, wherein: Obtaining the probability model includes: According to the language structure of the path chain, discretize the path chain into multiple types of characters, including node encoding characters, first interval characters, first time characters, second interval characters, second time characters, third interval characters, third time characters, and fourth interval characters; Configure a loss weight for each type of character, where the loss weight is used to measure the importance of the character to the loss value of the probability model, and the node encoding character has the largest loss weight; Use the path chain to pre-train the original model to obtain a process model; Input the start and end point sample data into the process model, and control the process model to output a predicted path and a predicted probability; Compare the losses between the predicted path and the expected path, and generate a loss value representing the difference between the predicted path and the expected path based on the loss weights of the characters; and In the case where the loss value is greater than the loss threshold, adjust the parameters of the process model until the loss value is less than or equal to the loss threshold to obtain the probability model.

6. An electronic device, characterized in that, It includes: A memory that stores execution instructions; And A processor that executes the execution instructions stored in the memory, so that the processor executes the traffic flow determination method according to any one of claims 1 to 5.

7. A readable storage medium, characterized in that, The executable instructions are stored in the readable storage medium, and when executed by the processor, are used to implement the traffic flow determination method according to any one of claims 1 to 5.

8. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the traffic flow determination method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Vehicle path determination method and device, electronic equipment and storage medium

    CN116933953A

  • OD amount estimation method and device for regional trunk road network, and electronic equipment

    CN118430263A

  • Large language model training method and device, computer equipment and storage medium

    CN119397010A