Traffic flow order evaluation method and device, computer equipment, storage medium and computer program product
By calculating the differences in spatial filling indexes of actual and simulated traffic flows, evaluating the orderliness of traffic flows, solving the problem of difficulty in quantifying the orderliness of traffic flows in the prior art, and providing evaluation indicators for traffic flow optimization.
Patent Information
- Application Number
- CN202510330743.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-20
AI Technical Summary
The prior art is difficult to effectively evaluate the orderliness of traffic flows, which affects the efficiency of urban planning and traffic management.
By determining the actual traffic flow of the target traffic flow type, the actual spatial filling degree index is calculated, and the traffic flow is randomly simulated to obtain the simulated spatial filling degree index, and the order of the traffic flow is evaluated based on the differences between the two.
Quantitative evaluation of the orderly nature of traffic flow is realized, which can reflect the distribution and complexity of traffic flow in the space and provide evaluation indicators of the degree of optimization.
Smart Images

Figure CN120299231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer information technology, and particularly to a method, apparatus, computer device, storage medium, and computer program product for evaluating the orderliness of traffic flow. Background Art
[0002] Urbanization is an important trend of the modern era, and now more than half of the world's population lives in cities. The acceleration of urbanization and the evolution of urban spatial structure have a profound impact on the daily commuting behavior of residents. As a key component of urban dynamics, traffic flow is not only an important consideration in urban planning and traffic management, but also a key indicator of the health and efficiency of urban infrastructure. Therefore, continuously investigating the patterns of traffic flow is crucial for promoting urban planning and the well-being of urban residents.
[0003] In the fields of traffic and urban planning, the orderliness of traffic flow is one of the important indicators for indicating the quality of traffic. Empirically, an orderly traffic flow distribution indicates a well-designed and compactly developed urban planning system, which can reduce vehicle mileage, relieve congestion, while the disorder of traffic flow may lead to traffic congestion, increase travel time, and reduce the quality of life of urban residents.
[0004] To provide more effective guidance for urban and traffic planning, it is crucial to effectively measure the orderliness of traffic flow. Therefore, a way to evaluate the orderliness of traffic flow is needed. Summary of the Invention
[0005] Based on this, in view of the above technical problems, it is necessary to provide a method, apparatus, computer device, storage medium, and computer program product for evaluating the orderliness of traffic flow.
[0006] In a first aspect, the present application provides a method for evaluating the orderliness of traffic flow. The method includes:
[0007] Determine a plurality of actual traffic flows corresponding to the target traffic flow type, where the actual traffic flow has a starting point and an ending point;
[0008] Based on each of the actual traffic flows, determine an actual space filling degree index;
[0009] Randomly simulate the traffic flow between each of the starting points and each of the ending points to obtain a plurality of simulated traffic flows, and based on each of the simulated traffic flows, determine a simulated space filling degree index;
[0010] Based on the difference between the actual space filling degree index and the simulated space filling degree index, determine the traffic flow orderliness evaluation index corresponding to the target traffic flow type.
[0011] In one embodiment, the determining of the multiple actual traffic flows corresponding to the target traffic flow type includes:
[0012] Obtain multiple traffic trajectory information, where the traffic trajectory information is composed of multiple visited coordinates;
[0013] For any traffic trajectory information, determine the starting point and the arrival point based on the multiple visited coordinates of the traffic trajectory information, and use the trajectory information between the starting point and the arrival point as the actual traffic flow.
[0014] In one embodiment, the determining of the starting point and the arrival point based on the multiple visited coordinates of the traffic trajectory information includes:
[0015] Obtain the starting point type and the arrival point type corresponding to the target traffic flow type;
[0016] In the case where the starting point type and / or the arrival point type belongs to the personal function type, determine the expected activity period corresponding to the starting point type and / or the arrival point type;
[0017] Perform clustering processing on the visited coordinates corresponding to the expected activity period in the traffic trajectory information, and determine the starting point and / or the arrival point in the traffic trajectory information according to the clustering result.
[0018] In one embodiment, the determining of the starting point and the arrival point based on the multiple visited coordinates of the traffic trajectory information further includes:
[0019] In the case where the starting point type and / or the arrival point type belongs to the public function type, determine multiple target locations corresponding to the starting point type and / or the arrival point type;
[0020] Determine the starting point and / or the arrival point in the traffic trajectory information according to the corresponding relationship between each visited coordinate and each target location.
[0021] In one embodiment, the determining of the actual space filling degree index based on each of the actual traffic flows includes:
[0022] Determine a first space covering each starting point and determine a second space covering each arrival point;
[0023] Take the Cartesian product of the first space and the second space to obtain a target space, and divide the target space into multiple target subspaces of the same size;
[0024] For any one of the target subspaces, in the case where the target subspace corresponds to any of the actual traffic flows, determine the target subspace as a non-empty target subspace;
[0025] Determine the actual space filling degree index corresponding to the actual traffic flow based on the size of the target subspace and the number of non-empty target subspaces.
[0026] In one embodiment, the randomly simulating the traffic flow between each starting point and each arrival point to obtain a plurality of simulated traffic flows, and determining the simulated space filling degree index based on each simulated traffic flow includes:
[0027] Randomly combine each starting point and each arrival point to obtain a plurality of starting and ending location combinations, respectively simulate the traffic flow corresponding to each starting and ending location combination to obtain an initial simulated traffic flow, and determine an initial simulated space filling degree index based on each initial simulated traffic flow;
[0028] Jump to the step of randomly combining each starting point and each arrival point until a preset condition is met;
[0029] Determine the simulated space filling degree index based on each initial simulated space filling degree index.
[0030] In a second aspect, the present application further provides a traffic flow order evaluation device. The device includes:
[0031] A first determination module, configured to determine a plurality of actual traffic flows corresponding to a target traffic flow type, where the actual traffic flow has a starting point and an arrival point;
[0032] A second determination module, configured to determine an actual space filling degree index based on each actual traffic flow;
[0033] A simulation module, configured to randomly simulate the traffic flow between each starting point and each arrival point to obtain a plurality of simulated traffic flows, and determine a simulated space filling degree index based on each simulated traffic flow;
[0034] A third determination module, configured to determine a traffic flow order evaluation index corresponding to the target traffic flow type based on the difference between the actual space filling degree index and the simulated space filling degree index.
[0035] In one embodiment, the first determination module is further configured to:
[0036] Obtain a plurality of traffic trajectory information, where the traffic trajectory information is composed of a plurality of visited coordinates;
[0037] For any traffic trajectory information, determine a starting point and an arrival point based on the plurality of visited coordinates of the traffic trajectory information, and use the trajectory information between the starting point and the arrival point as the actual traffic flow.
[0038] In one embodiment, the first determination module is further configured to:
[0039] Obtain the starting point type and the arrival point type corresponding to the target traffic flow type;
[0040] When the starting point type and / or the arrival point type belongs to the personal function type, determine the expected activity period corresponding to the starting point type and / or the arrival point type;
[0041] Perform clustering processing on the visit coordinates corresponding to the expected activity period in the traffic trajectory information, and determine the starting point and / or the arrival point in the traffic trajectory information according to the clustering result.
[0042] In one embodiment, the first determination module is further configured to:
[0043] When the starting point type and / or the arrival point type belongs to the public function type, determine a plurality of target locations corresponding to the starting point type and / or the arrival point type;
[0044] Determine the starting point and / or the arrival point in the traffic trajectory information according to the corresponding relationship between each visit coordinate and each target location.
[0045] In one embodiment, the second determination module is further configured to:
[0046] Determine a first space covering each starting point and determine a second space covering each arrival point;
[0047] Take the Cartesian product of the first space and the second space to obtain a target space, and divide the target space into a plurality of target sub-spaces of the same size;
[0048] For any one of the target sub-spaces, when the target sub-space corresponds to any actual traffic flow, determine the target sub-space as a non-empty target sub-space;
[0049] Based on the size of the target sub-space and the number of non-empty target sub-spaces, determine the actual space filling degree index corresponding to the actual traffic flow.
[0050] In one embodiment, the simulation module is further configured to:
[0051] Randomly combine each starting point and each arrival point to obtain a plurality of starting and ending location combinations, respectively simulate the traffic flow corresponding to each starting and ending location combination to obtain an initial simulated traffic flow, and determine an initial simulated space filling degree index based on each initial simulated traffic flow;
[0052] Jump to the step of randomly combining each of the starting points and each of the arrival points until a preset condition is met;
[0053] Determine the simulation space filling degree index based on each of the initial simulation space filling degree indexes.
[0054] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above-mentioned method according to any one of the preceding items is implemented.
[0055] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, and when the computer program is executed by a processor, the above-mentioned method according to any one of the preceding items is implemented.
[0056] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the above-mentioned method according to any one of the preceding items is implemented.
[0057] The above-mentioned traffic flow order evaluation method, device, computer device, storage medium and computer program product calculate the actual space filling degree index based on each actual traffic flow corresponding to the target traffic flow type, and calculate the simulation space filling degree index by randomly simulating the traffic flow between the starting point and the arrival point of each actual traffic flow. Furthermore, based on the difference between the actual space filling degree index and the simulation space filling degree index, the traffic flow order evaluation index corresponding to the target traffic flow type is determined. Since the space filling degree index can reflect the distribution and complexity of the traffic flow in space, and each simulated traffic flow obtained by random simulation represents the most disordered traffic situation corresponding to the target traffic flow type, the traffic flow order evaluation index calculated based on the difference between the actual space filling degree index and the simulation space filling degree index can represent the optimization degree of the actual situation compared with the most disordered traffic situation, that is, it can be used as a numerical value representing the traffic flow order to quantify the traffic flow order. Description of the Drawings
[0058] Figure 1 It is a flowchart of the traffic flow order evaluation method in an embodiment;
[0059] Figure 2 It is a flowchart of step 102 in an embodiment;
[0060] Figure 3 It is a flowchart of step 204 in an embodiment;
[0061] Figure 4 It is a flowchart of step 104 in an embodiment;
[0062] Figure 5 Schematic diagram for calculating box dimension in one embodiment;
[0063] Figure 6 Schematic flowchart of step 106 in one embodiment;
[0064] Figure 7 Structural block diagram of a traffic flow order evaluation device in one embodiment;
[0065] Figure 8 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners
[0066] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0067] In one embodiment, as Figure 1 shown, a traffic flow order evaluation method is provided. In this embodiment, an example is given where the method is applied to a server. It can be understood that the method can also be applied to a terminal, or to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0068] Step 102: Determine a plurality of actual traffic flows corresponding to the target traffic flow type, where the actual traffic flow has a starting point and an ending point.
[0069] In the embodiment of the present application, the target traffic flow type is the type of traffic flow to be evaluated, and the actual traffic flow is the traffic flow that actually occurs in reality and belongs to the target traffic flow type. Each actual traffic flow has a starting point and an ending point.
[0070] Taking an actual example to illustrate, when the target traffic flow type is the commuting flow from the place of residence to the workplace, if resident 1 commutes between the place of residence A1 and the workplace B1, and resident 2 commutes between the place of residence A2 and the workplace B2, then the actual traffic flows can be represented as (A1, B1) and (A2, B2). The starting point corresponding to (A1, B1) is A1, and the ending point is B1. The starting point corresponding to (A2, B2) is A2, and the ending point is B2.
[0071] The actual traffic flow can be actively uploaded by residents to the server; or the server can also collect the traffic trajectory information of residents and identify the actual traffic flow from the traffic trajectory information. In one embodiment, as Figure 2 shown, in the case of identifying the actual traffic flow from the traffic trajectory information, step 102 includes:
[0072] Step 202, obtain multiple traffic trajectory information, where the traffic trajectory information consists of multiple visited coordinates;
[0073] Step 204, for any traffic trajectory information, determine the starting point and the arrival point based on the multiple visited coordinates of the traffic trajectory information, and use the trajectory information between the starting point and the arrival point as the actual traffic flow.
[0074] In the embodiment of the present application, a traffic trajectory information is composed of the coordinates of all locations visited by a resident within a day (hereinafter referred to as visited coordinates). It is possible to determine whether there are a starting point and an arrival point that meet the target traffic flow type based on the multiple visited coordinates of the traffic trajectory information, and then the trajectory information between the starting point and the arrival point can be used as the actual traffic flow.
[0075] For example, clustering processing can be performed on each visited coordinate, and the clustering result represents each location where the resident stayed within the day. It is possible to further determine whether there are a starting point and an arrival point corresponding to the target traffic flow type among each location. For example, when the target traffic flow type is the commuting flow from the place of residence to the workplace, and each location is located in a residential building, a shopping mall, a station, and an office building respectively, it can be determined that the residential building is probably the starting point corresponding to the target traffic flow type, and the office building is probably the arrival point corresponding to the target traffic flow type.
[0076] If according to the above method, a starting point or an arrival point cannot be identified from a certain traffic trajectory information, it indicates that the traffic trajectory information may not contain the actual traffic flow belonging to the target traffic flow type. In subsequent steps, this traffic trajectory information can be not considered. Or if the timestamps of all visited coordinates corresponding to the starting point are all later than the timestamps of all visited coordinates corresponding to the arrival point, it indicates that the traffic trajectory information does not contain the traffic flow from the starting point to the arrival point, and this traffic trajectory information can also be not considered.
[0077] For the traffic trajectory information from which a starting point and an arrival point can be identified, the trajectory information between the starting point and the arrival point in this traffic trajectory information can be used as the actual traffic flow. "The trajectory information between the starting point and the arrival point" refers to all visited coordinates from the last visited coordinate located at the starting point to the first visited coordinate located at the arrival point.
[0078] In one embodiment, the starting point and the arrival point can also be identified according to the starting point type and the arrival point type corresponding to the target traffic flow type. In this case, step 204 includes:
[0079] Step 302, obtain the starting point type and the arrival point type corresponding to the target traffic flow type;
[0080] Step 304: When the starting point type and / or the arrival point type belong to the personal function type, determine the expected activity period corresponding to the starting point type and / or the arrival point type;
[0081] Step 306: Cluster the visited coordinates corresponding to the expected activity period in the traffic trajectory information, and determine the starting point and / or the arrival point in the traffic trajectory information according to the clustering result.
[0082] In the embodiments of the present application, the target traffic flow type corresponds to a starting point type and an arrival point type. For any actual traffic flow belonging to the target traffic flow type, the starting point of the actual traffic flow belongs to the starting point type, and the arrival point belongs to the arrival point type. For example, when the starting point type corresponding to the target traffic flow type is the place of residence and the arrival point type is the school, the starting point of the actual traffic flow belonging to the target traffic flow type is any place of residence of the resident, and the arrival point is any school where the resident studies.
[0083] After obtaining the starting point type and the arrival point type, it can be determined whether the starting point type and the arrival point type belong to the public function type or the personal function type respectively, that is, it is equivalent to determining whether the starting point type and the arrival point type represent the public function or the personal function of the location. The public function is the function that the location has as a public place, and the personal function is the function that the location has for the individual residents. For example, for a certain school, the function of the school as a public place is "school", and the functions for individual residents may include "workplace", "place of residence", "dining place", and so on.
[0084] Taking the example where the starting point type corresponding to the foregoing target traffic flow type is the place of residence and the arrival point type is the school, the starting point type "place of residence" represents the personal function of the location, so the starting point type belongs to the personal function type, and the arrival point type "school" represents the public function of the location, so the arrival point type belongs to the public function type.
[0085] After determining the target traffic flow type, a technician can manually set the starting point type and the arrival point type corresponding to the target traffic flow, and respectively set whether the starting point type and the arrival point type specifically belong to the personal function type or the public function type.
[0086] After the server obtains multiple traffic trajectory information, according to whether the starting point type and the arrival point type specifically belong to the personal function type or the public function type, different methods are used to extract the starting point and the arrival point from the traffic trajectory information. For the starting point type and / or the arrival point type belonging to the personal function type, the server can determine the expected activity period corresponding to the starting point type and / or the arrival point type. The expected activity period is also the period when it is estimated that residents need a certain location to achieve the personal function represented by the first type. The expected activity period can be set by technicians according to the area where the traffic flow order needs to be evaluated, obtained through surveys of residents, etc. For example, when the arrival point type is a dining place, for eastern cities, the expected activity period corresponding to this arrival point type can be set to 11:00 - 13:00, 17:00 - 20:00; for western cities, the expected activity period corresponding to this arrival point type can be set to 13:00 - 15:00, 20:00 - 22:00.
[0087] After obtaining the expected activity period, for each traffic trajectory information, according to the timestamps of each visited coordinate, the visited coordinates within the expected activity period are extracted from the traffic trajectory information, and the visited coordinates are clustered. When the expected activity period is multiple periods, the visited coordinates corresponding to each period need to be clustered separately. After clustering, the location corresponding to the largest cluster can be used as the starting point or the arrival point included in the traffic trajectory information. Since the largest cluster is also the location where residents stay for a relatively long time during the expected activity period, and the location where residents stay for a relatively long time during the expected activity period has a relatively high probability of being the location that meets the personal function needs of residents, using the largest cluster as the starting point or the arrival point helps to improve the recognition accuracy of the starting point and the arrival point.
[0088] In one embodiment, for the starting point type and / or the arrival point type belonging to the public function type, the server can use the following process to identify the starting point and / or the arrival point: when the starting point type and / or the arrival point type belong to the public function type, determine multiple target locations corresponding to the starting point type and / or the arrival point type; according to the corresponding relationship between each visited coordinate and each target location, determine the starting point and / or the arrival point in the traffic trajectory information.
[0089] In the embodiments of the present application, the server may determine multiple target locations belonging to the starting point type and / or the arrival point type. For example, when the arrival point type is a school, the server may determine, from the area where the traffic flow orderliness needs to be evaluated, multiple locations that meet the classification of "school", and use these locations as target locations. The server may then respectively obtain the location coordinate ranges corresponding to each target location, and then respectively determine whether each visited coordinate included in the traffic trajectory information is within any of the location coordinate ranges. If there is a location coordinate range that covers more than a preset number of visited coordinates, it may be determined that the resident has stayed at the target location corresponding to this location coordinate range for a long enough time, and this target location may be used as the starting point and / or arrival point in the traffic trajectory information.
[0090] A practical example is used to illustrate the entire process of identifying the starting point / arrival point based on the traffic trajectory information. Suppose the visited coordinates included in the traffic trajectory information 1 are a1, b1, c1, and the visited coordinates included in the traffic trajectory information 2 are a2, b2, c2, d2. The starting point type corresponding to the target traffic flow type is the place of residence, and the arrival point type is the school. Then the starting point type belongs to the personal function type, and the arrival point type belongs to the public function type.
[0091] For the starting point type "place of residence", first determine the expected activity period corresponding to this starting point type, for example: 0:00 to 6:00. Cluster the visited coordinates (suppose it is b1) in the traffic trajectory information 1 whose timestamps correspond to this expected activity period to obtain a clustering result. Since only 1 clustering result can be obtained from the traffic trajectory information 1, the location corresponding to this clustering result (that is, the location corresponding to b1) may be used as the starting point in the traffic trajectory information 1. Cluster the visited coordinates (suppose it is a2, b2, c2) in the traffic trajectory information 2 whose timestamps correspond to this expected activity period to obtain a clustering result (suppose a2 and b2 correspond to one cluster, and c2 corresponds to one cluster). The location corresponding to the largest clustering result (that is, the location corresponding to a2 and b2) may be used as the starting point in the traffic trajectory information 2.
[0092] For the arrival point type "school", it may be determined which schools exist in the area where the traffic flow orderliness is evaluated. Suppose there are School A, School B, and School C. For each visited coordinate in the traffic trajectory information 1, determine which visited coordinates fall within the location coordinate ranges of School A, School B, and School C. Suppose c1 falls within the location coordinate range of School B, then School B may be used as the arrival point in the traffic trajectory information 1. Similarly, perform the above operations for the traffic trajectory information 2. Suppose d2 falls within the location coordinate range of School A, then School A may be used as the arrival point in the traffic trajectory information 2.
[0093] Then, the trajectory information (b1, c1) between the starting point and the arrival point in the traffic trajectory information 1 is used as the actual traffic flow, and the trajectory information (b2, c2, d2) between the starting point and the arrival point in the traffic trajectory information 2 is used as the actual traffic flow.
[0094] Step 104: Determine the actual space filling degree index corresponding to the actual traffic flow.
[0095] In the embodiment of the present application, the actual space filling degree index is used to characterize the complexity and regularity of the spatial distribution of the actual traffic flow. This index can be calculated based on any mathematical concept that can describe the complexity of the spatial distribution, such as: fractal dimension, information entropy, topological entropy, and so on.
[0096] For example Figure 4 As shown, taking the example that the actual space filling degree index is calculated based on the box dimension in the fractal dimension, step 104 includes the following steps:
[0097] Step 402: Determine the first space covering each starting point and determine the second space covering each arrival point;
[0098] Step 404: Take the Cartesian product of the first space and the second space to obtain the target space, and divide the target space into multiple target subspaces of the same size;
[0099] Step 406: For any target subspace, when the target subspace corresponds to any actual traffic flow, determine the target subspace as a non-empty target subspace;
[0100] Step 408: Based on the size of the target subspace and the number of non-empty target subspaces, determine the actual space filling degree index corresponding to the actual traffic flow.
[0101] In the embodiment of the present application, the dimensions of the first space and the second space can be determined by those skilled in the art according to the actual needs of studying the traffic flow. For example, when it is necessary to study the orderliness of the planar distribution of the traffic flow, the first space and the second space can be two-dimensional spaces. The first space covering each starting point refers to a two-dimensional space that can include the coordinates (x, y) of each starting point on the real two-dimensional plane, and the second space refers to a two-dimensional space that can include the coordinates (x, y) of each arrival point on the real two-dimensional plane. If those skilled in the art have the need to study the orderliness of the traffic flow in three-dimensional space, then the first space and the second space can be three-dimensional spaces. The first space and the second space can be the smallest space in such a space, or can be a space of any size. The embodiment of the present application does not make specific limitations on this.
[0102] Taking the Cartesian product of the first space and the second space, a new target space can be obtained. Furthermore, the target space can be partitioned according to the idea of box dimension to obtain multiple target subspaces of the same size. The target subspaces are the "grid boxes" used in box dimension. Therefore, the dimension of the target subspaces is the same as that of the target space, and the size of each target subspace is the same. And "the same size" means that the projected length in each dimension is the same.
[0103] Then, for each target subspace, it can be determined whether the target subspace is a non-empty target subspace, that is, whether the target subspace corresponds to at least one actual traffic flow. Among them, the definition of "the target subspace corresponds to the actual traffic flow" can be that when any point in the actual traffic flow is located in the target subspace, it is determined that the target subspace corresponds to the actual traffic flow. Or it can also be that only when the starting point or the arrival point of the actual traffic flow is located in the target subspace, it is determined that the target subspace corresponds to the actual traffic flow. The box dimension calculated by the former definition method is more accurate, and the latter definition method has higher calculation efficiency in practical applications. Those skilled in the art can choose any one of the definition methods according to actual needs.
[0104] Furthermore, the box dimension can be calculated based on the size of the target subspace and the number of non-empty target subspaces, and the box dimension can be used as the actual space filling degree index corresponding to the actual traffic flow.
[0105] Refer to Figure 5 As shown, a practical example of calculating the box dimension is used to illustrate the above process. Figure 5 The traffic flow distribution on the two-dimensional plane is shown in (a), where the green dots represent the starting points or the arrival points, and the arrows connecting the two green dots represent the traffic flow. The first space corresponding to each starting point ( Figure 5 the two-dimensional O plane in (b)) and the second space corresponding to each arrival point ( Figure 5 the two-dimensional D plane in (c)) are determined respectively. After taking the Cartesian product of these two planes, a four-dimensional flow space (target space) is obtained. Furthermore, the four-dimensional flow space is divided into multiple target subspaces, as shown in Figure 5 (d). Figure 5 Each square in (d) represents a four-dimensional space. U11 represents the four-dimensional space whose projection on the O plane is O1 and whose projection on the D plane is D1, and so on. Taking the starting point or the arrival point of the actual traffic flow being located in the target subspace, and the target subspace being a non-empty subspace as the judgment criterion, the finally obtained non-empty subspaces are the Figure 5 blue squares in (d). Then the box dimension can be calculated based on the number of blue squares and the side length of the blue squares.
[0106] It should be noted that since the number of dimensions of the target subspace in the embodiments of the present application is not necessarily the commonly used two - dimensional in the box dimension, the existing calculation methods of the box dimension may not be applicable to the embodiments of the present application. When the number of dimensions of the target subspace is not two - dimensional, the actual space filling degree index can be calculated in the following manner:
[0107] Determine the length eigenvalue corresponding to the target subspace;
[0108] Based on the length eigenvalue and the number of non - empty target subspaces, determine the box dimension, and use the box dimension as the actual space filling degree index corresponding to the actual traffic flow.
[0109] Among them, the length eigenvalue corresponding to the target subspace can be any one - dimensional value that can characterize the size of the target subspace. For example, the length of the target subspace in any dimension, the distance between any two dimensions of the target subspace, etc. The embodiments of the present application do not limit this, as long as the method of calculating the length eigenvalue is the same for each target subspace.
[0110] After obtaining the length eigenvalue, the box dimension can be determined with reference to the existing calculation method of the box dimension. See formula (1):
[0111] Formula (1)
[0112] Among them, is the box dimension, is the number of non - empty target subspaces, is the length eigenvalue. In practical applications, by gradually reducing the size of the target subspace and performing linear regression on and the approximate value of the above - mentioned box dimension can be quickly obtained by obtaining the linear regression coefficient.
[0113] Step 106: Randomly simulate the traffic flow between each starting point and each arrival point to obtain a simulated traffic flow, and determine the simulated space filling degree index corresponding to the simulated traffic flow.
[0114] In the embodiments of the present application, randomly simulating the traffic flow between each starting point and each arrival point means randomly selecting a starting point from each starting point, randomly selecting an arrival point from each arrival point, and then randomly constructing the traffic flow between the selected starting point and the selected arrival point. Each randomly constructed traffic flow is collectively referred to as a simulated traffic flow. The simulated traffic flow can reflect the most disordered traffic flow situation corresponding to the target traffic flow type.
[0115] For the simulated traffic flow, a space filling degree index is also calculated, and the simulated space filling degree index can be obtained. The method of calculating the space filling degree index for the simulated traffic flow can refer to the method of calculating the space filling degree index for the actual traffic flow, which will not be elaborated in the embodiments of the present application.
[0116] In one embodiment, accidental errors can be avoided by performing traffic flow simulations multiple times. As Figure 6 shown, step 106 includes:
[0117] Step 602, randomly combine each starting point and each arrival point to obtain multiple combinations of starting and ending locations, respectively simulate the traffic flow corresponding to each combination of starting and ending locations to obtain an initial simulated traffic flow, and determine an initial simulated space filling degree index based on each initial simulated traffic flow;
[0118] Jump to the step of randomly combining each starting point and each arrival point until a preset condition is met;
[0119] Step 604, determine a simulated space filling degree index based on each initial simulated space filling degree index.
[0120] In the embodiments of the present application, after randomly combining each starting point and each arrival point, each combination of starting and ending locations should cover all starting points and all arrival points. The following method can be used for random combination: randomly select a starting point from each existing starting point, randomly select an arrival point from each existing arrival point, after combining the starting point and the arrival point, delete the starting point and the arrival point from each existing starting point and each existing arrival point respectively. Repeat this process until there are no starting points and arrival points left.
[0121] It should be noted that in the embodiments of the present application, starting points corresponding to the same location in different actual traffic flows are regarded as different starting points. Similarly, arrival points corresponding to the same location in different actual traffic flows are also regarded as different arrival points.
[0122] After obtaining each combination of starting and ending locations that cover all starting points and all arrival points, and simulating an initial simulated traffic flow for each combination of starting and ending locations, it is considered that one round of traffic flow simulation is completed. Then, the initial simulated space filling degree index corresponding to this round of traffic flow simulation can be calculated.
[0123] Repeat multiple rounds of traffic flow simulation until a preset condition is met (for example, the number of simulation rounds reaches a preset number (such as 100 times), or each combination of starting and ending locations in each round has covered all possible combinations of starting and ending locations, etc.). Then, the simulated space filling degree index can be calculated through the initial simulated space filling degree indexes of each round. For example: calculate the average value of each initial simulated space filling degree index to obtain the simulated space filling degree index, weight each initial simulated space filling degree index according to the deviation from the average value, and then recalculate the average value to obtain the simulated space filling degree index, etc. The embodiments of the present application do not make specific limitations on how to comprehensively obtain the simulated space filling degree index from each initial simulated space filling degree index.
[0124] Step 108: Determine the traffic flow order evaluation index corresponding to the target traffic flow type based on the difference between the actual space filling degree index and the simulated space filling degree index.
[0125] In the embodiments of the present application, since the actual space filling degree index can represent the complexity of the spatial distribution of the target traffic flow type under actual conditions, and the simulated space filling degree index can represent the complexity of the spatial distribution of the target traffic flow type under the most disordered traffic conditions, the traffic flow order evaluation index calculated based on the difference between the actual space filling degree index and the simulated space filling degree index can represent the optimization degree of the actual situation compared with the most disordered traffic situation. The greater this difference, the stronger the traffic flow order represented by the traffic flow order evaluation index.
[0126] The embodiments of the present application do not limit how to calculate the traffic flow order evaluation index based on the difference between these two indexes. For example, the difference between these two indexes can be directly used as the traffic flow order evaluation index. Or, in order to make the traffic flow order evaluation indexes calculated for different regions where the traffic flow order needs to be evaluated comparable, the idea of relative difference can also be used to calculate the traffic flow order evaluation index. Specifically, it includes the following steps:
[0127] Determine the difference between the simulated space filling degree index and the actual space filling degree index;
[0128] Use the ratio of the difference to the simulated space filling degree index as the traffic flow order evaluation index corresponding to the target traffic flow type.
[0129] In the embodiments of the present application, after taking the difference between the simulated space filling degree index and the actual space filling degree index, the ratio of the difference to the simulated space filling degree index can be used to normalize the difference, so as to obtain the traffic flow order evaluation index. As shown in formula (2):
[0130] Formula (2)
[0131] Where, is the fractal dimension deviation (FDD), that is, the traffic flow order evaluation index. is the simulated space filling degree index, is the actual space filling degree index. The larger the FDD, the higher the traffic flow order.
[0132] The traffic flow orderliness evaluation method provided by the embodiment of the present application calculates the actual space filling degree index based on each actual traffic flow corresponding to the target traffic flow type, and calculates the simulated space filling degree index by randomly simulating the traffic flow between the starting point and the arrival point of each actual traffic flow. Furthermore, based on the difference between the actual space filling degree index and the simulated space filling degree index, the traffic flow orderliness evaluation index corresponding to the target traffic flow type is determined. Since the space filling degree index can reflect the distribution and complexity of the traffic flow in space, and each simulated traffic flow obtained by random simulation represents the most disordered situation of the traffic corresponding to the target traffic flow type, the traffic flow orderliness evaluation index calculated based on the difference between the actual space filling degree index and the simulated space filling degree index can represent the optimization degree of the actual situation compared with the most disordered situation of the traffic, that is, it can be used as a numerical value representing the traffic flow orderliness to quantify the traffic flow orderliness.
[0133] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0134] Based on the same inventive concept, the embodiment of the present application also provides a traffic flow orderliness evaluation device for implementing the above-mentioned traffic flow orderliness evaluation method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the traffic flow orderliness evaluation device provided below can refer to the limitations on the traffic flow orderliness evaluation method in the above text, and will not be repeated here.
[0135] In one embodiment, as Figure 7 shown, a traffic flow orderliness evaluation device 700 is provided, including: a first determination module 702, a second determination module 704, a simulation module 706, and a third determination module 708, where:
[0136] The first determination module 702 is configured to determine a plurality of actual traffic flows corresponding to the target traffic flow type, and the actual traffic flow has a starting point and an arrival point;
[0137] The second determination module 704 is configured to determine an actual space filling degree index based on each of the actual traffic flows;
[0138] The simulation module 706 is configured to randomly simulate the traffic flows between each of the starting points and each of the arrival points, obtain a plurality of simulated traffic flows, and determine a simulated space filling degree index based on each of the simulated traffic flows;
[0139] The third determination module 708 is configured to determine a traffic flow order evaluation index corresponding to the target traffic flow type based on the difference between the actual space filling degree index and the simulated space filling degree index.
[0140] The traffic flow order evaluation device provided by the embodiments of the present application calculates an actual space filling degree index based on each actual traffic flow corresponding to the target traffic flow type, and calculates a simulated space filling degree index by randomly simulating the traffic flows between the starting points and the arrival points of each actual traffic flow. Furthermore, based on the difference between the actual space filling degree index and the simulated space filling degree index, a traffic flow order evaluation index corresponding to the target traffic flow type is determined. Since the space filling degree index can reflect the distribution and complexity of the traffic flow in space, and each simulated traffic flow obtained by random simulation represents the most disordered situation of the traffic corresponding to the target traffic flow type, the traffic flow order evaluation index calculated based on the difference between the actual space filling degree index and the simulated space filling degree index can represent the optimization degree of the actual situation compared to the most disordered situation of the traffic, that is, it can be used as a numerical value representing the traffic flow order to quantify the traffic flow order.
[0141] In one embodiment, the first determination module 702 is further configured to:
[0142] Obtain a plurality of traffic trajectory information, where the traffic trajectory information is composed of a plurality of visited coordinates;
[0143] For any traffic trajectory information, determine a starting point and an arrival point based on the plurality of visited coordinates of the traffic trajectory information, and use the trajectory information between the starting point and the arrival point as the actual traffic flow.
[0144] In one embodiment, the first determination module 702 is further configured to:
[0145] Obtain the starting point type and the arrival point type corresponding to the target traffic flow type;
[0146] In the case that the starting point type and / or the arrival point type belongs to the personal function type, determine the expected activity period corresponding to the starting point type and / or the arrival point type;
[0147] Perform clustering processing on the visit coordinates corresponding to the expected activity period in the traffic trajectory information, and determine the starting point and / or arrival point in the traffic trajectory information according to the clustering result.
[0148] In one embodiment, the first determination module 702 is further configured to:
[0149] In the case where the starting point type and / or the arrival point type belongs to the public function type, determine a plurality of target locations corresponding to the starting point type and / or the arrival point type;
[0150] Determine the starting point and / or arrival point in the traffic trajectory information according to the corresponding relationship between each visit coordinate and each target location.
[0151] In one embodiment, the second determination module 704 is further configured to:
[0152] Determine a first space covering each starting point and determine a second space covering each arrival point;
[0153] Perform a Cartesian product on the first space and the second space to obtain a target space, and divide the target space into a plurality of target sub-spaces of the same size;
[0154] For any one of the target sub-spaces, in the case where the target sub-space corresponds to any actual traffic flow, determine the target sub-space as a non-empty target sub-space;
[0155] Based on the size of the target sub-space and the number of non-empty target sub-spaces, determine the actual space filling degree index corresponding to the actual traffic flow.
[0156] In one embodiment, the simulation module 706 is further configured to:
[0157] Randomly combine each starting point and each arrival point to obtain a plurality of starting and ending location combinations, respectively simulate the traffic flow corresponding to each starting and ending location combination to obtain an initial simulated traffic flow, and determine an initial simulated space filling degree index based on each initial simulated traffic flow;
[0158] Jump to the step of randomly combining each starting point and each arrival point until a preset condition is met;
[0159] Determine the simulated space filling degree index based on each initial simulated space filling degree index.
[0160] Each module in the above device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0161] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 8 shown. The computer device includes a processor, a memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a method for evaluating the orderliness of traffic flow.
[0162] Those skilled in the art can understand that Figure 8 the structure shown in
[0163] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0164] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, it implements the steps in the above method embodiments.
[0165] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by the processor, it implements the steps in the above method embodiments.
[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data that have been authorized by the user or fully authorized by all parties.
[0167] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0168] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0169] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A method for evaluating the orderliness of traffic flow, characterized in that The method includes: Determining a plurality of actual traffic flows corresponding to a target traffic flow type, where the actual traffic flows have starting points and ending points; Determining an actual space filling degree index based on each of the actual traffic flows; Randomly simulating the traffic flows between each of the starting points and each of the ending points to obtain a plurality of simulated traffic flows, and determining a simulated space filling degree index based on each of the simulated traffic flows; Determining a traffic flow order evaluation index corresponding to the target traffic flow type based on the difference between the actual space filling degree index and the simulated space filling degree index.
2. The method according to claim 1, characterized in that The determining of the plurality of actual traffic flows corresponding to the target traffic flow type includes: Obtaining a plurality of traffic trajectory information, where the traffic trajectory information is composed of a plurality of visited coordinates; For any traffic trajectory information, determining a starting point and an ending point based on the plurality of visited coordinates of the traffic trajectory information, and taking the trajectory information between the starting point and the ending point as an actual traffic flow.
3. The method according to claim 2, wherein The determining of the starting point and the ending point based on the plurality of visited coordinates of the traffic trajectory information includes: Obtaining a starting point type and an ending point type corresponding to the target traffic flow type; In the case where the starting point type and / or the ending point type belongs to an individual function type, determining an expected activity period corresponding to the starting point type and / or the ending point type; Performing clustering processing on the visited coordinates corresponding to the expected activity period in the traffic trajectory information, and determining the starting point and / or the ending point in the traffic trajectory information according to the clustering result.
4. The method according to claim 3, characterized in that, The determining of the starting point and the ending point based on the plurality of visited coordinates of the traffic trajectory information further includes: In the case where the starting point type and / or the ending point type belongs to a public function type, determining a plurality of target locations corresponding to the starting point type and / or the ending point type; Determining the starting point and / or the ending point in the traffic trajectory information according to the corresponding relationship between each of the visited coordinates and each of the target locations.
5. The method according to claim 1, wherein The determining of the actual space filling degree index based on each of the actual traffic flows includes: Determining a first space covering each of the starting points and determining a second space covering each of the ending points; Taking the Cartesian product of the first space and the second space to obtain a target space, and dividing the target space into a plurality of target sub-spaces of the same size; For any one of the target sub-spaces, in the case where the target sub-space corresponds to any of the actual traffic flows, determining the target sub-space as a non-empty target sub-space; Determining the actual space filling degree index corresponding to the actual traffic flow based on the size of the target sub-space and the number of non-empty target sub-spaces.
6. The method according to claim 1, characterized in that, The randomly simulating the traffic flows between each of the starting points and each of the ending points to obtain a plurality of simulated traffic flows, and determining a simulated space filling degree index based on each of the simulated traffic flows includes: Randomly combining each of the starting points and each of the ending points to obtain a plurality of starting and ending location combinations, respectively simulating the traffic flows corresponding to each of the starting and ending location combinations to obtain initial simulated traffic flows, and determining an initial simulated space filling degree index based on each of the initial simulated traffic flows; Jump to the step of randomly combining each of the starting points and each of the arrival points until a preset condition is met; Determine the simulation space filling degree index based on each of the initial simulation space filling degree indexes.
7. A traffic flow orderliness evaluation device, characterized in that, The device includes: A first determination module, configured to determine a plurality of actual traffic flows corresponding to a target traffic flow type, where the actual traffic flows have starting points and arrival points; A second determination module, configured to determine an actual space filling degree index based on each of the actual traffic flows; A simulation module, configured to randomly simulate traffic flows between each of the starting points and each of the arrival points to obtain a plurality of simulated traffic flows, and determine a simulated space filling degree index based on each of the simulated traffic flows; A third determination module, configured to determine a traffic flow order evaluation index corresponding to the target traffic flow type based on the difference between the actual space filling degree index and the simulated space filling degree index.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method for calculating urban crossroad mixed traffic order degree
CN101714298A
Urban traffic health index system and evaluation method
CN110222950A
Traffic flow model evaluation method, system and device, and medium
CN110782120A
Multi-scale spatial data processing method, electronic equipment and storage medium
CN115858709A
Regional security risk assessment method, system and device and storage medium
CN116416778A