Vehicle flow determination method, electronic device, storage medium and computer program product
Through the combination of path maps and probability models, the lane traffic flow is determined, which solves the problems of low prediction accuracy and low computing efficiency in the prior art, and achieves higher prediction accuracy and lower computing costs.
Patent Information
- Application Number
- CN202510395687.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
When determining lane traffic flow, the calculation logic based on economic assumptions may not fully reflect the complex decision-making process of travelers in the real world, resulting in low prediction accuracy; at the same time, the computing efficiency is low, the calculation time is long when processing large-scale urban road network data, and the acquisition of detailed road traffic-delay function data increases the difficulty of preliminary preparation and model maintenance costs.
The multiple guide nodes from the start point to the end point are determined through the path map, and the second probability of the first path is determined based on the selection probability of directed road sections between adjacent path nodes, and the traffic volume of the first path is finally determined. This method converts individual travel data into path chains, generates a probability model, and optimizes parameters to improve the reliability and authenticity of the predicted path.
It improves the accuracy and authenticity of traffic forecasts, reduces calculation time, reduces the cost of preliminary preparation and model maintenance, and provides a more detailed description of traffic conditions.
Smart Images

Figure CN119889058A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to technical fields such as data processing, and more particularly to a method for determining vehicle flow, an electronic device, a storage medium, and a computer program product. Background Art
[0002] 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 be used 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, when determining the future traffic volume 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 in this method may not fully reflect the complex decision-making process of travelers in the real world, thereby affecting the accuracy of the prediction and causing the problem of disconnection between theory and practice. In addition, there are also problems with computational efficiency, especially when processing large-scale urban road network data, because a large number of variables and parameters need to be considered, resulting in a long calculation time. 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 preparation work, 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. Summary of the invention
[0003] The present disclosure provides a vehicle flow determination method, an electronic device, and a computer program product.
[0004] According to one aspect of the present disclosure, a method for determining vehicle flow is provided, comprising: determining a plurality of guide nodes from a starting point to an end point according to a path map, the path map recording all path nodes in a target area and directed road sections between adjacent path nodes, the starting point and the end point being both path nodes, the guide node being a path node that can be passed through in the process from the starting point to the end point; determining a second probability of a first path from the starting point to the end point among the plurality of guide nodes according to a first probability of directed road sections between adjacent path nodes, the first probability representing a probability of selecting the directed road section when starting from the path node, the first path including at least some of the plurality of guide nodes, the second probability representing a probability of selecting all guide nodes in the first path; and determining the vehicle flow of the first path according to the second probability and the total number of vehicles from the starting point to the end point.
[0005] In some embodiments, determining the second probability of the first path from the starting point to the end point includes: taking the starting point as the target point, determining multiple way nodes associated with the target point from the multiple guide nodes, wherein the way nodes are adjacent to the target point, and there are directed sections from the target point to the way nodes in the path map; a target point determination step for determining a new target point from the multiple way nodes; when the latest target point determined is the end point, obtaining a first path consisting of the target point and the directed sections between the adjacent target points, and taking the product of the first probabilities of each directed section in the first path as the second probability.
[0006] In some embodiments, the target point determination step includes: calculating the comprehensive probability of each of the via nodes based on the first probability of the directed road segments from the target point to each of the via nodes, the comprehensive probability being the product of the first probabilities of each of the directed road segments involved from the starting point to the via nodes; and when the maximum comprehensive probability of each of the via nodes is greater than a probability threshold, taking the via node corresponding to the maximum comprehensive probability as the new target point.
[0007] In some embodiments, after the target point determination step, it also includes: when the latest target point determined is not the end point, determining multiple new nodes corresponding to the latest target point, and repeating the target point determination step until the latest target point determined is the end point.
[0008] In some embodiments, after obtaining a first path consisting of the target point and the directed road segments between adjacent target points, it also includes: determining whether the maximum comprehensive probability of each latest passing node that is not the end point is greater than a probability threshold; when the maximum comprehensive probability of each latest passing node is greater than the probability threshold, repeating the target point determination step until the latest target point is the end point, obtaining another first path, and taking the product of the first probabilities of each directed road segment in the other first path as the second probability.
[0009] In some embodiments, before determining multiple guide nodes from the starting point to the end point, it includes: generating a probability model, wherein the probability model is used to perform the following steps: determining multiple guide nodes from the starting point to the end point based on a path map; and determining a second probability of a first path from the starting point to the end point among the multiple guide nodes based on a first probability of directed segments between adjacent path nodes.
[0010] In some embodiments, before generating a probability model, it includes: converting individual travel data into a first path chain, wherein the individual travel data includes all path nodes passed by the traveler from the travel starting point to the travel end point, and the time of passing through each path node, and the path chain records the order in which the traveler passes through all the path nodes.
[0011] In some implementations, after converting the individual travel data into a first path chain, the method 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 travel time between adjacent path nodes based on the time when each path node is passed in the first path chain; and generating multiple second path chains based on the travel time between adjacent path nodes and the path map.
[0013] In some embodiments, generating a probability model includes: calling a path chain to train an original model to obtain the probability model, and the path chain is the first path chain or the second path chain.
[0014] In some embodiments, obtaining the probability model includes: according to the language structure of the path chain, discretizing the path chain into a plurality of characters, the characters including node code characters, first spacing characters, first time characters, second spacing characters, second time characters, third spacing characters, third time characters and fourth spacing characters; configuring a loss weight for each of the characters, the loss weight being used to measure the importance of the character to the loss value of the probability model, and the node code character having the maximum loss weight; using the path chain to pre-train the original model to obtain a process model; inputting the start and end point sample data into the process model to control the process model to output a predicted path and a predicted probability; performing a loss comparison 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 weight of each of the characters; and when 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, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, so that the processor executes the vehicle flow determination method of any embodiment of the present disclosure.
[0016] According to one aspect of the present disclosure, a readable storage medium is provided, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement the vehicle flow determination method of any embodiment of the present disclosure.
[0017] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the vehicle flow determination method of any embodiment of the present disclosure is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.
[0019] Figure 1 It is a schematic diagram of an application scenario of the vehicle flow determination method according to an embodiment of the present disclosure.
[0020] Figure 2 It is a flowchart of a method for determining vehicle flow according to an embodiment of the present disclosure.
[0021] Figure 3 It is a schematic diagram of the process of determining vehicle flow according to an embodiment of the present disclosure.
[0022] Figure 4 is a schematic diagram of a path node according to an embodiment of the present disclosure.
[0023] Figure 5 is a first path schematic diagram according to an embodiment of the present disclosure.
[0024] Figure 6 It is a schematic block diagram of the structure of a vehicle 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
[0026] The present disclosure is further described in detail below in conjunction with the accompanying drawings and examples. It is understood that the specific examples described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.
[0027] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying 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 method M200 for determining vehicle flow, which determines the vehicle flow of the first path through steps S210 to S230. Compared with the method of inferring the future vehicle flow of the path based only on economic assumptions, the method M200 can fit the real traffic scene and has higher authenticity and credibility. Figure 1 The terminal device 200 in the operation, the basic data required for the operation can be recorded in Figure 1 In the server 100.
[0032] In step S210, a plurality of guide nodes from the starting point to the end point are determined according to the path map.
[0033] The path map records all the path nodes in the target area and the directed sections between the adjacent path nodes, where the target area is an area with traffic flow prediction needs, which can be an urban area or a part of an urban area, and is not limited here. Path nodes are locations in the lane where traffic flow or speed changes will occur, including intersections, traffic lights, pedestrian zebra crossings, etc. At intersections, it involves vehicle diversion or convergence; at traffic lights, it involves vehicle U-turns; at pedestrian zebra crossings, it involves pedestrians or bicycles. Of course, path nodes are not limited to the aforementioned examples. Other locations that can cause changes in lane traffic flow or speed can be used as path nodes, which are not listed here one by one. In addition, since lanes are directional, there may be multiple path nodes at the same intersection, traffic light, etc., depending on the direction of the associated lane.
[0034] According to the analysis requirements of traffic flow, the starting point and the end point can be selected from any two path nodes in the path map. For example, you can choose any path node in a residential area as the starting point and any path node near a popular business district in the target area as the end point. In this way, you can predict the traffic flow of the path from the residential area to the business district, and make early warning plans for the paths with relatively more traffic flow.
[0035] A guide node is a path node that can be passed through in the process from the starting point to the end point. In the path map of the target area, several path nodes are designed. Therefore, when starting to travel from each path node, there will be multiple directed sections radiating to multiple next path nodes, but not all directed sections can point to the end point. Obviously, in order to avoid path selection that does not conform to the actual travel scenario of travelers (such as getting lost or unnecessary detours), the path nodes passed through should be constrained in the process from the starting point to the end point. In other words, according to the situation of the starting point and the end point, the path nodes in the path map that cannot be driven from the starting point to the end point are eliminated, and the path nodes that can be passed from the starting point to the end point are retained. These retained path nodes are guide nodes. The number of guide nodes can be determined according to actual conditions and is not limited here.
[0036] In step S220, a second probability of a first path from the start point to the end point is determined among a plurality of guide nodes according to the first probability of the directed path segment between adjacent path nodes.
[0037] Adjacent path nodes refer to two path nodes that are adjacent in space. The two adjacent path nodes are connected by a directed segment and there are no other path nodes in between. A directed segment is one or more lanes between two adjacent path nodes. Lanes belonging to the same directed segment should have the same direction.
[0038] The first probability is used to characterize the probability of selecting the directed road segment when starting from the path node. Specifically, since the path node is the location where the lane traffic volume or speed changes, there are usually lane changes at the path node, that is, when starting from the path node, it involves the selection of at least one directed road segment. Then, based on the real selection probability of multiple individuals for each directed road segment presented by the big data, the selection probability of the current traveler driving to any directed road segment associated with the current path node is determined, and this selection probability is the first probability.
[0039] The guide nodes are all path nodes that can reach the destination. Therefore, in order to fit the real travel scenario, starting from the starting point, the guide node with the largest comprehensive probability is selected each time until the new guide node is the destination. The comprehensive probability here is the product of the first probabilities of each directional road segment involved from the starting point to each path node. Selecting the node corresponding to the maximum comprehensive probability as the target point for the next trip can ensure that the first path determined by priority is the path with the highest probability of being selected in the real scenario, ensuring the reliability and authenticity of the predicted path.
[0040] The second probability represents the selection probability of all guide nodes in the first path, and is essentially the product of the first probabilities of all directed segments involved in the first path.
[0041] In step S230, the traffic volume of the first path is determined according to the second probability and the total number of vehicles from the starting point to the end point.
[0042] The total number of vehicles from the starting point to the end point can be determined based on the maximum capacity of all paths involved from the starting point to the end point and the experience value of vehicles traveling in the same period in history. There is no limitation on the method of determining the total number of vehicles, 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 flow of the paths involved from the starting point to the end point should be followed by the total number of vehicles. It should be noted that the number of first paths is not unique. After determining the first first path, the guide node with the largest comprehensive probability is selected from the remaining guide nodes for path prediction to obtain multiple first paths that can go from the starting point to the end point. Of course, after the maximum comprehensive probability is less than the general threshold, the prediction of the first path can be ended to avoid the waste of computational cost and time cost of extrapolating the traffic flow of minority paths.
[0044] The vehicle flow determination method disclosed in the present invention determines the guide node and obtains the first probability between adjacent path nodes through the path map, so that the inferred first path is closer to the real scene, and there will be no path inference situations that do not conform to the travel logic, such as getting lost or taking a detour. On the basis of the authenticity of the path, the calculation of the second probability of the first path is also authentic and credible. Therefore, the vehicle flow finally obtained overcomes the problem of the related art that only relies on the derivation of economic theory and deviates from the actual travel scene, and has credibility.
[0045] Figure 3 FIG. 1 is a schematic diagram of a process for determining vehicle flow according to an embodiment of the present disclosure. Figure 3 The process of determining the traffic volume is described in more detail.
[0046] In step 301, the individual travel data is converted into a path chain. The individual travel data is the real travel information of the traveler, including a node sequence and a time series, wherein the node sequence includes the path nodes passed from the travel starting point to the travel end point, and the time series includes the time of arrival at each path node (including the time of departure from the travel starting point and the time of arrival at the travel end point). The original intention of obtaining the individual travel data is to be used as training data for a large language model (i.e., the probability model described later). Therefore, in order to facilitate the analysis of 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 the node code of each path node is first converted to the same format. For example, the path node with the node code 602 is converted to [node_602]. Furthermore, the time of arrival at each path node is converted into a minute and second format, for example, 420.00 is converted to 07:00:00. In the present disclosure, each path node passed through and the time of arrival at the node are regarded as a state. The first separator is used between the path node and the arrival time in the same state. <sep>Connect, use the fourth spacer character between the two states <next>Finally, the first path chain that records the order of all the 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 takes the path node with node code 602 as the starting point, departs from path node 602 at 07:00:00, 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; path node 41036 is the end point of this trip.
[0048] Figure 4 is a schematic diagram of a path node according to an embodiment of the present disclosure. Figure 4 , the concept of path nodes is explained. Path nodes usually appear at locations that can affect the traffic flow and speed of the lane, such as intersections, or traffic lights, zebra crossings, etc. Since lanes have directions, different lane directions will generate multiple different path nodes at the same location that can affect the traffic flow and speed of the lane.
[0049] like Figure 4 As shown, in the Y-axis direction, the right lane is a right-turn lane in the opposite direction of the Y-axis, so this lane will be split at the intersection, so it is set as path node N1, the right second lane is a straight lane, and vehicles will merge into this lane at the intersection, so it is set as path node N2; the left lane is a straight lane in the positive direction of the Y-axis, and vehicles will merge into this lane at the intersection, so it is set as path node N5, and the left second lane is a left-turn lane in the positive direction of the Y-axis, and this lane will be split at the intersection, so it is set as path node N6. Similarly, in the X-axis direction, the right lane is a left-turn lane in the opposite direction of the X-axis, which is set as path node N4, the right second lane is a straight lane in the opposite direction of the X-axis, which is set as path node N3; the left second lane is a straight lane in the positive direction of the X-axis, which is set as path node N7, and the left lane is a left-turn lane in 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 a large language model. Therefore, in step 302, a path map of the target area is first outlined based on the first path chain obtained from the individual travel data. 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 time from the current path node to each adjacent path node. For example, in a first path chain, the travel time from path node A to path node B at 8:30 is 60 seconds, then add a 60-second record from node A to node B in the list of the 8 o'clock period.
[0052] Furthermore, a path node is randomly selected in the path map as the starting point, and a departure time is randomly selected. Then, a path node adjacent to the current path node is randomly selected in the path map as the next node, and based on the previously recorded list of unit time periods corresponding to the departure time, the kernel density estimation method is used to fit the distribution of the travel time, and a time length is randomly selected from the distribution as the travel time between the two nodes this time, and the time to arrive at the selected next node is calculated. Repeat the above process until the last selected path node has no other path node adjacent to it and can pass through. Typically, the length of the second path chain used as training data can contain 1000 states. Of course, the remaining lengths that can support training fall within the protection scope of the present 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 and generate a probability model. That is, the first path chain and the second path chain are combined into a set of path chains. Then, the set of these path chains is used as a sample for training the original model. The original model can be a large language model, which can obtain a probability model capable of outputting the path chain and the second probability 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 a plurality of characters, the characters including a node code character, a first spacing character, a first time character, a second spacing character, a second time character, a third spacing character, a third time character, and a fourth spacing character. The node code character is in the form of [node_id], where id is the node code of the path node; the first spacing character is in the form of <sep>; The first time character, the second time character and the third time character are all in the form of 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 the two states, written as <next>.
[0056] In some implementations, each character may be converted into a corresponding character code to form a vocabulary that characterizes the relationship between the character and the character code. For example, [node_0001] is set to 1, [node_0002] is set to 2, etc., which are not listed here one by one. In this way, before inputting the path chain into the original model, the characters involved in the path chain are first converted into numerical values through the vocabulary to facilitate model recognition and processing.
[0057] Furthermore, a loss weight is configured for each character, and the loss weight is used to measure the importance of the character to the loss value of the probability model, and the node-coded character has the largest loss weight. In other words, in order to ensure that the predicted path output by the probability model is the same or similar to the expected path, the various parameters in the probability model will be optimized according to the loss value between the predicted path and the expected path until the loss value is less than the loss threshold. In order to ensure the accuracy of the probability model when predicting path nodes and avoid getting lost or detouring, when configuring the loss weight, the weight of the node-coded character error is increased. In other words, if the remaining characters are wrong, they are assigned a weight of 0.1, and when the node character encoding is wrong, it will be assigned a weight of 0.3, which increases the influence 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 the process model. The process model can generate a path chain that meets the requirements, but because it has not been fine-tuned by instructions, the output path chain cannot currently achieve the directional output requirements from the specified starting point to the specified end point. Among them, the model usually outputs results in single bytes. Pre-training is essentially the 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 "[". If it is inconsistent, the model parameters are adjusted until the output is a path chain that is completely consistent with the sample.
[0059] Furthermore, the starting and ending point sample data are input into the process model, and the process model is controlled to output the predicted path and predicted probability. The predicted path and the expected path are compared for loss, and based on the loss weight of each character, a loss value representing the difference between the predicted path and the expected path is generated; and when the loss value is greater than the loss threshold, the process model is parameter adjusted until the loss value is less than or equal to the loss threshold, thereby obtaining a probability model.
[0060] After the probability model is obtained, the data to be analyzed can be processed, that is, according to the departure time, a first path from the starting point to the end point in the data to be analyzed and a second probability of the first path are determined.
[0061] Specifically, in step 305, a guide node is determined. That is, a guide node between the start point and the end point is determined according to the start point, the end point, the departure time in the data to be analyzed, and the connectivity of each path node in the path map.
[0062] Then, step 306 is executed to input the guide 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 to use the starting point as the target point. Further, step 309 is executed to determine multiple waypoints associated with the target point from the multiple guide nodes, wherein the waypoints are adjacent to the target point, and there are directed sections from the target point to the waypoints in the path map.
[0063] Each time a new target point is selected, the nodes along the way associated with the current target point are input into the probability model to guide the probability model to select within the specified node range, thus avoiding the situation of getting lost and unable to reach the destination, thereby improving the practicality 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 road section from the target point to each passing node, and the comprehensive probability is the product of the first probabilities of each directed road section involved from the starting point to the passing node. In step 311, it is determined whether the maximum comprehensive probability in the comprehensive probability of each passing node is greater than the probability threshold. In the case where the maximum comprehensive probability of each passing node is greater than the probability threshold, step 312 is executed to take 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 end point. In the case where the latest target point determined is the end point, step 314 is executed to obtain a first path composed of directed roads between the target point and the adjacent target point, and the product of the first probabilities of each directed road section in the first path is used as the second probability. In step 315, after obtaining multiple first paths and the second probability of each first path, the total number of vehicles in the target area from the starting point to the end point is determined. Then, the total number of vehicles is multiplied by the second probability, and the result obtained is the traffic flow on the path. In some implementations, when the latest target point determined is not the end point, multiple new nodes corresponding to the latest target point are determined, and the target point determination step is repeated until the latest target point determined is the end point.
[0065] In some embodiments, after obtaining a first path consisting of a target point and directed road segments between adjacent target points, it also includes: determining whether the maximum comprehensive probability of each latest passing node that is not the end point is greater than a probability threshold; when the maximum comprehensive probability of each latest passing node is greater than the probability threshold, repeating the target point determination step until the latest target point is the end point, obtaining another first path, and taking the product of the first probabilities of each directed road segment in the other first path as the second probability.
[0066] Figure 5 This is a first path schematic diagram according to an embodiment of the present disclosure. Figure 5 , the process of obtaining the first path is explained.
[0067] With 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, and the directed section between two adjacent path nodes is defined as R. It should be noted that these path nodes 1 to 7 between O and D are guide nodes selected in the path map containing many path nodes, and the starting point O can only reach the end point D through these guide nodes. Other path nodes in the path map may not have a section pointing to the end point D. At present, the location of the imaginary user is taken as the target point, so the first target point should be the starting point O. At the starting point O, there are two directed paths that can be selected. The first probability of selecting the directed section pointing to path node 1 is 30%, and the first probability of selecting the directed section 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 section pointing to path node 2 is greater than the first probability of selecting the directed section 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 of the directed section between it and the starting point O, which is 0.7.
[0068] Furthermore, when the new target point is path node 2, the new passing nodes are determined to be 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 section between 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 between path node 2 and path node 4 is 50%), i.e., 0.35; similarly, the comprehensive probability of path node 5 is the product of 0.7 and 0.2, i.e., 0.14. Among the current passing nodes, path node 4 has the largest comprehensive probability, so path node 4 is used as the new target point.
[0069] Furthermore, new waypoints related to path node 4 are determined, namely, path node 6 and path node 7. Furthermore, the comprehensive probability of path node 6 is determined to be the product of 0.7, 0.5 and 0.2, that is, 0.07; the comprehensive probability of path node 7 is determined to be the product of 0.7, 0.5 and 0.4, that is, 0.14. Among the current waypoints, the maximum comprehensive probability is 0.3, so path node 1 is used as the new target point, and the new waypoint is determined to be path node 3. At this time, the comprehensive probability of path node 3 is the product of 0.3 and 0.3, that is, 0.09. Among the current waypoints, the maximum comprehensive probability is 0.14, that is, path node 7 and path node 5 are used as new target points.
[0070] Furthermore, a new waypoint related to path node 7 is determined, namely, end point D. Then the maximum comprehensive probability corresponding to end point D is the product of 0.7, 0.5, 0.4 and 0.6, namely, 0.084. Assuming that 0.084 is greater than the probability threshold, 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 the first path is 0.084. Moreover, when path node 5 is the new target point, the new waypoint is path node 7 pointed to by path node 5, and its comprehensive probability is 0.028.
[0071] After determining the first path, continue to determine whether the maximum comprehensive probability of 0.09 between the remaining waypoints is greater than the probability threshold. Assuming that 0.09 is greater than the probability threshold, then path node 3 is used as the new target point, and then the new waypoint is determined to be path node 6. At this time, the comprehensive probability of path node 6 pointed to by path node 3 is the product of 0.3, 0.3 and 0.3, that is, 0.027. Then, the maximum comprehensive probability of 0.07 among the current waypoints is path node 6 pointed to by path node 4. Then, path node 6 is used as the new target point, and the new waypoint 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, that is, 0.028.
[0073] Furthermore, among the remaining waypoints, the maximum comprehensive probability is 0.028. If 0.028 is greater than the probability threshold, the path node 7 corresponding to the comprehensive probability is used as the new target point, and the new waypoint is determined to be the end point D. The first path "starting point O→path node 2→path node 5→path node 7→end point D" is obtained, and the second probability of the first path is the product of 0.7, 0.2, 0.2 and 0.6, that is, 0.0168.
[0074] Finally, path node 6 is the new target point, and the new waypoint is the end point D. The comprehensive probability of the new waypoint is the product of 0.3, 0.3, 0.3 and 0.4, that 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 the 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, that is, 0.0168.
[0076] Of course, when any maximum comprehensive probability is less than or equal to the probability threshold, the process of acquiring the first path and its second probability is terminated. The probability threshold can be set according to actual needs and is not limited here.
[0077] The traffic flow determination method of the present invention is based on the itinerary path map of individual travel data. Then, according to the starting point and end point of the data to be analyzed, the guide node is determined to avoid the path prediction results that do not conform to the actual scene, such as getting lost or taking a detour, in the model prediction process, thereby improving the credibility and efficiency of the results. When selecting a passable section at a certain path node, the first probability between adjacent path nodes is used as the basis, so that the final inferred first path is closer to the real scene. On the basis that the path is authentic and credible, the calculation of the second probability of the first path is also authentic and credible. Therefore, the traffic flow finally obtained overcomes the problem of the related technology that only relies on the derivation of economic theory and deviates from the actual travel scene, and is credible.
[0078] Figure 6 It is a schematic block diagram of the structure of a vehicle flow determination device according to an embodiment of the present disclosure.
[0079] like Figure 6 As shown, a vehicle flow determination device 600 is shown, including: a guide node determination module 610, which is used to determine multiple guide nodes from the starting point to the end point according to a path map, the path map records all the path nodes in the target area and the directed sections between the adjacent path nodes, the starting point and the end point are both path nodes, and the guide node is a path node that can be passed through in the process from the starting point to the end point; a second probability determination module 620, which is used to determine the second probability of the first path from the starting point to the end point among multiple guide nodes according to the first probability of the directed section between adjacent path nodes, 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 guide nodes, and the second probability represents the selection probability of all guide nodes in the first path; and a vehicle flow determination module 630, which is used to determine the vehicle 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 vehicle flow determination device 600 of the present disclosure may be in the form of computer software, and each module of the vehicle flow determination device 600 may be in the form of computer software modules.
[0081] The various modules of the vehicle flow determination device 600 disclosed in the present invention are configured to implement the various steps of the vehicle flow determination method. The execution principles and steps thereof may be referred to in the foregoing text and will not be described in detail here.
[0082] Figure 7 FIG. 1 is a schematic block diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 7 As shown, the present disclosure also 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 vehicle flow determination method.
[0083] The hardware structure of the electronic device 1000 can be implemented using a bus architecture. The bus architecture can include any number of interconnected buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300 and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, 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 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.
[0085] The present disclosure also provides a readable storage medium, in which a computer program is stored, and the computer program is used to implement the above method when executed by a processor. "Readable storage medium" can be any device that can contain, store, communicate, propagate or transmit a program for use with an instruction execution system, device or equipment or in combination with these instruction execution systems, devices or equipment. More specific examples of readable storage media include the following: an electrical connection portion (electronic device) with one or more wirings, a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable 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 instruction is loaded and executed, the process or function of the present disclosure is executed in whole or in part.
[0087] The computer program or instructions may be stored in a readable storage medium or transmitted from one readable storage medium to another readable storage medium, for example, the computer program or instructions may be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired or wireless means. The readable storage medium may be any available medium that can be accessed or a data storage device such as a server, data center, etc. that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; it may also be an optical medium, such as a digital video disk; it may also be a semiconductor medium, such as a solid state drive. The computer readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0088] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, electronic devices, readable storage media, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may 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] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present disclosure. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes 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 a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0092] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments / methods or examples described in this specification and features of different embodiments / methods or examples, unless they are contradictory.
[0093] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0094] Those skilled in the art should understand that the above embodiments are only for the purpose of 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 may 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 vehicle flow, characterized in that: include: Determine a plurality of guide nodes from a starting point to an end point according to a path map, wherein the path map records all path nodes in a target area and directed sections between adjacent path nodes, wherein both the starting point and the end point are path nodes, and the guide nodes are path nodes that can be passed through in the process from the starting point to the end point; Determining, among the plurality of guide nodes, a second probability of a first path from the starting point to the end point based on a first probability of a directed path segment between adjacent path nodes, the first probability representing a probability of selecting the directed path segment when starting from the path node, the first path including at least some of the plurality of guide nodes, the second probability representing a probability of selecting all guide nodes in the first path; and The vehicle flow of the first path is determined according to the second probability and the total number of vehicles from the starting point to the end point.
2. The method for determining vehicle flow according to claim 1, characterized in that: Determining a second probability of a first path from the starting point to the end point includes: Taking the starting point as a target point, determining a plurality of waypoints associated with the target point from the plurality of guide nodes, wherein the waypoints are adjacent to the target point, and there are directed sections from the target point to the waypoints in the path map; A target point determination step, for determining a new target point from a plurality of said passing nodes; When the latest target point determined is the end point, a first path consisting of the target point and directed segments between adjacent target points is obtained, and the product of the first probabilities of the directed segments in the first path is used as the second probability.
3. The method for determining vehicle flow according to claim 2, characterized in that: The target point determination step comprises: Calculating the comprehensive probability of each of the via nodes according to the first probability of the directional segment from the target point to each of the via nodes, wherein the comprehensive probability is the product of the first probabilities of each of the directional segments involved from the starting point to the via nodes; and When the maximum comprehensive probability of each of the passing nodes is greater than the probability threshold, the passing node corresponding to the maximum comprehensive probability is used as the new target point.
4. The method for determining vehicle flow according to claim 2 or 3, characterized in that: After the target point determination step, the method further includes: In the case that the latest determined target point is not the end point, a plurality of new nodes corresponding to the latest target point are determined, and the target point determination step is repeatedly performed until the latest determined target point is the end point.
5. The method for determining vehicle flow according to claim 2 or 3, characterized in that: After obtaining a first path consisting of the target point and the directed segments between adjacent target points, the method further includes: Determine whether the maximum comprehensive probability of each latest passing node other than the end point is greater than a probability threshold; When the maximum comprehensive probability of each latest passed node is greater than the probability threshold, the target point determination step is repeated until the latest target point is the end point, another first path is obtained, and the product of the first probabilities of each directed segment in the other first path is used as the second probability.
6. The method for determining vehicle flow according to claim 1, characterized in that: Before determining multiple guide nodes from the starting point to the end point, including: Generate a probability model, the probability model is used to perform the following steps: determine a plurality of guide nodes from a starting point to an end point according to a path map; and determine a second probability of a first path from the starting point to the end point in the plurality of guide nodes according to a first probability of directed segments between adjacent path nodes.
7. The method for determining vehicle flow according to claim 6, characterized in that: Before generating the probability model include: The individual travel data is converted into a first path chain, wherein the individual travel data includes all path nodes passed by the traveler from the travel starting point to the travel end point, and the time when the traveler passes through each path node. The path chain records the order in which the traveler passes through all the path nodes.
8. The method for determining vehicle flow according to claim 7, characterized in that: After converting the individual travel data into the first path chain, including: The path map is generated according to a plurality of the first path chains.
9. The method for determining vehicle flow according to claim 8, characterized in that: After generating the path map, the following steps are included: Determine the travel time between adjacent path nodes according to the time when each path node is passed in the first path chain; and A plurality of second path chains are generated according to the travel time between adjacent path nodes and the path map.
10. The method for determining vehicle flow according to claim 9, characterized in that: Generate probabilistic models, including: The path chain is called to train the original model to obtain the probability model, and the path chain is the first path chain or the second path chain.
11. The method for determining vehicle flow according to claim 10, characterized in that: Obtaining the probability model includes: According to the language structure of the path chain, the path chain is discretized into a plurality of characters, wherein the characters include a node code character, a first spacing character, a first time character, a second spacing character, a second time character, a third spacing character, a third time character and a fourth spacing character; A loss weight is configured for each of the characters respectively, wherein 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 maximum loss weight; Pre-training the original model using the path chain to obtain a process model; Inputting the start and end point sample data into the process model, and controlling the process model to output the predicted path and predicted probability; Comparing the loss of 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 weight of each of the characters; and When the loss value is greater than the loss threshold, parameters of the process model are adjusted until the loss value is less than or equal to the loss threshold, thereby obtaining the probability model.
12. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory, so that the processor executes the vehicle flow determination method according to any one of claims 1 to 11.
13. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which are used to implement the vehicle flow determination method according to any one of claims 1 to 11 when executed by a processor.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the vehicle flow determination method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Vehicle driving track processing method and related device
CN113276874A
Traffic jam tracing method based on multi-source data
CN113724489A
Path speculation method and device based on electronic fence, computer equipment and medium
CN114584928A
Dynamic OD traffic flow calculation completion method, electronic equipment and storage medium
CN115662144A
Text error correction method and device based on intention consistency and medium
CN116136957A