Fast road network visualization method and system based on piecewise linear and gaussian kernel density function, terminal and storage medium
By replacing the exponential function with a piecewise linear function, and combining the absolute error partitioning algorithm and the binary search method, the computational complexity problem of visualizing the Gaussian kernel density of road networks in large-scale datasets is solved, and efficient high-resolution visualization results are achieved.
Patent Information
- Application Number
- CN202511588690.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-03
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2045-11-03
AI Technical Summary
Existing technologies suffer from high computational complexity when visualizing Gaussian kernel density of road networks on large-scale datasets, and cannot support high-resolution results.
A piecewise linear function is used to replace the exponential function. By defining the absolute error, a piecewise linear function partitioning algorithm is constructed to obtain multiple edges and location data points of the target road network. The approximate edge kernel density function value is calculated, and the road network edges are cut into linear pixels. The shortest path distance is calculated using the binary search method, and an approximate Gaussian kernel density function for the road network is constructed.
It significantly reduces the time complexity of road network Gaussian kernel density visualization, achieves high-resolution visualization of large-scale datasets, and has a space complexity comparable to existing technologies.
Smart Images

Figure CN121095387B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of geographic information science, and particularly relates to a fast road network visualization method and system based on piecewise linear and Gaussian kernel density function, a terminal and a computer readable storage medium. BACKGROUND
[0002] Road network kernel density visualization is an important tool of geographic information system, which has been used in different fields. However, the calculation complexity of road network kernel density visualization is very high, so this tool cannot support large-scale location data sets and high resolution.
[0003] However, most of the existing technologies are based on the shortest path distance sharing method, but the time complexity is still too high, and cannot process large-scale data sets and obtain high-resolution results.
[0004] Therefore, the prior art still needs to be improved and developed. SUMMARY
[0005] The main purpose of the present application is to provide a fast road network visualization method and system based on piecewise linear and Gaussian kernel density function, a terminal and a computer readable storage medium, which aims to solve the problem that the prior art cannot support high resolution and is too low in efficiency in the process of road network Gaussian kernel density visualization of large-scale data.
[0006] To achieve the above purpose, the present application provides a fast road network visualization method based on piecewise linear and Gaussian kernel density function, which comprises the following steps:
[0007] Define the absolute error, construct the division algorithm of piecewise linear function according to the absolute error, and obtain the piecewise linear function and the set interval of the piecewise linear function;
[0008] Obtain a plurality of edges and a plurality of location data points in a target road network, add corresponding aggregation values to all location data points, and construct a plurality of approximate edge kernel density functions according to the corresponding piecewise linear function of the set interval;
[0009] Cut all edges in the target road network into a plurality of linear pixels, calculate the shortest path distance between the nodes of the edge and the nodes of other edges for each edge, calculate the approximate edge kernel density function value of each other edge according to the size of all shortest path distances and all aggregation values for each linear pixel, and construct the visualization result of the target road network according to each approximate edge kernel density function value.
[0010] In the present application, the absolute error is defined, the partition algorithm of the piecewise linear function is constructed according to the absolute error, the piecewise linear function and the set interval of the piecewise linear function are obtained; a plurality of edges and a plurality of position data points in a target road network are obtained, corresponding aggregate values are added to all position data points, and a plurality of approximate edge kernel density functions are constructed according to the piecewise linear function corresponding to the set interval; all edges in the target road network are cut into a plurality of linear pixels, the shortest path distance between the nodes of the edge and the nodes of other edges is calculated for each edge, the approximate edge kernel density function value of each other edge is calculated according to the size of all the shortest path distances and all the aggregate values for each linear pixel, and the visualization result of the target road network is constructed according to each approximate edge kernel density function value. The present application uses the piecewise linear function to replace the exponential function, and determines the interval set under the condition of given absolute error, so as to calculate the approximate road network Gaussian kernel density function according to the interval set and the corresponding piecewise linear function. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a flow chart of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0012] Figure 2 is the road network kernel density visualization diagram of the traffic accident data points of A city of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0013] Figure 3 is the cutting schematic diagram of the linear pixel of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0014] Figure 4 is the schematic diagram of the piecewise linear function of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0015] Figure 5 is the aggregation schematic diagram of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0016] Figure 6 is the first schematic diagram of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0017] Figure 7 is the second schematic diagram of the preferred embodiment of the fast road network visualization method based on piecewise linear and Gaussian kernel density function of the present application;
[0018] Figure 8is a third schematic diagram of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0019] Figure 9 is a fourth schematic diagram of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0020] Figure 10 is a time schematic diagram of a first road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0021] Figure 11 is a time schematic diagram of a second road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0022] Figure 12 is a time schematic diagram of a third road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0023] Figure 13 is a time schematic diagram of a fourth road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0024] Figure 14 is a spatial overhead schematic diagram of a road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0025] Figure 15 is a density bias schematic diagram of a road network kernel density visualization of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions;
[0026] Figure 16 is a road network Gaussian kernel density visualization diagram of a preferred embodiment of the present invention's fast road network visualization method based on piecewise linear and Gaussian kernel density functions under different absolute errors of different methods;
[0027] Figure 17 is a structure diagram of a preferred embodiment of the present invention's fast road network visualization system based on piecewise linear and Gaussian kernel density functions;
[0028] Figure 18 is a structure diagram of a preferred embodiment of the present invention's terminal. DETAILED DESCRIPTION
[0029] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention 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 merely illustrative of the invention and are not intended to limit the invention.
[0030] The preferred embodiment of the present invention describes a fast road network visualization method based on piecewise linearity and Gaussian kernel density function, such as... Figure 1 As shown, the fast road network visualization method based on piecewise linear and Gaussian kernel density functions includes the following steps:
[0031] Road network kernel density visualization is an important tool in Geographic Information Systems (GIS) and can be applied to multiple fields (such as transportation science and urban planning). It allows for the study of traffic conditions and population flow. Figure 2 As shown, this demonstrates how to visualize a dataset of traffic accidents in City A using road network kernel density. Figure 2 In the text, (a) represents each data point. Figure 2 In (b), the two colors represent traffic accident hotspots and coldspots, respectively, while... Figure 2 The data points in (a) are converted to Figure 2 The visualization result in (b) requires dividing each segment of the road network into segments of size [size missing]. σ Linear pixels (such as) Figure 3 As shown in the figure, each linear pixel is colored based on the value of the road network kernel density function.
[0032] However, the computational complexity of road network kernel density visualization is very high. Therefore, this tool cannot support large-scale location datasets and high resolution (i.e., a large number of linear pixels). Existing methods for accelerating the computation of road network kernel density visualization can only handle polynomial-based kernel functions and require the characteristics of short tail and distance additivity. However, Gaussian kernels do not possess these two characteristics and cannot achieve the scenario proposed in this invention. Therefore, this invention improves the time complexity by using an approximate method for computing road network Gaussian kernel density visualization.
[0033] Step S10: Define the absolute error, construct a partitioning algorithm for piecewise linear functions based on the absolute error, and obtain the piecewise linear functions and the set interval of the piecewise linear functions.
[0034] Specifically, an absolute error and an initial set of intervals of piecewise linear functions are defined, the initial set of intervals is defined as an empty set, a minimum value of the initial set of intervals is defined as 0, and an exponential function is constructed according to the minimum value; an iteration condition value is constructed, the iteration condition value is defined as the exponential function, when the iteration condition value is not less than the absolute error, a maximum value of the initial set of intervals is determined, and the initial set of intervals is updated according to the minimum value and the maximum value; the minimum value is updated as the maximum value, the iteration condition value is updated according to the updated minimum value, and the initial set of intervals is iteratively updated until the iteration condition value is less than the absolute error, and an interval set is obtained.
[0035] In one embodiment of the present disclosure, the piecewise linear function is first used to approximate the exponential function under the condition of a given absolute error , and a partition algorithm of the piecewise linear function is established:
[0036]
[0037] wherein represents a constant defined by the absolute error, , , and all represent different intervals, , and respectively represent different slopes of the piecewise linear function, , and respectively represent different intercepts of the piecewise linear function. As Figure 4 shown, an embodiment of a piecewise linear function is shown, wherein , ,..., , , , , , , , and respectively represent the lengths of different intervals.
[0038] Further, the absolute error is input in the partition algorithm (partition of the piecewise linear function), and an interval set (and different intervals of the above partition) is obtained:
[0039] (1) Set the interval set as an empty set, and define a minimum value in the interval as 0, and defined as an exponential function or a negative exponential function the value (and the iteration condition value mentioned above) of the minimum value defined as an absolute error, the following iteration is performed;
[0040] (2) find the maximum value in the current interval so that is the maximum, while also satisfying that the corresponding piecewise linear function is not greater than the absolute error, that is:
[0041] ;
[0042] wherein and respectively represent the slope and intercept of the current piecewise linear function;
[0043] At the same time, in the corresponding interval , the expressions of the slope and intercept of the current piecewise linear function are as follows:
[0044] ;
[0045] ;
[0046] Then the union of the initial interval (i.e. the interval set mentioned above) and the current interval (i.e. the interval ) is defined as the interval of the current iteration calculation, and the maximum value of the current iteration calculation is defined as the minimum value of the interval of the next iteration calculation, and when the iteration calculation is completed, the final interval set is output.
[0047] Further, the above maximization problem can be converted to the following way to solve:
[0048] .
[0049] Step S20, obtain a plurality of edges and a plurality of position data points in the target road network, add corresponding aggregation values to all position data points, and construct a plurality of approximate edge kernel density functions according to the piecewise linear function corresponding to the set interval;
[0050] Wherein, when the interval set and the corresponding piecewise linear function are calculated, the exponential function in the expression of the road network Gaussian kernel density function can be replaced by the piecewise linear function, so as to obtain the expression of the approximate road network Gaussian kernel density function :
[0051] ;
[0052] In theory, if the set of intervals is calculated according to the above process, then It will then be within the absolute error range, while also possessing short-tail characteristics (such as...) Figure 4 (as shown) and the property of distance additivity (as can be seen from piecewise linear functions).
[0053] Specifically, the target road network is obtained based on the edge set and the location data point set of each edge on the target road network; for each pair of nodes on each edge, the shortest path distance from each node to all the location data points on the edge is calculated; based on all the shortest path distances, multiple aggregation values are added to each location data point.
[0054] ;
[0055] ;
[0056] in, and All represent aggregate values. This represents a constant, taking values of 0, 1, and 2. Indicates location data points, and Represents a node. Indicates from Node to location data point All data points, Indicates from Node to location data point All data points, Indicates the first One location data point, express Node to location data point shortest path distance Power of 1 express Node to location data point shortest path distance Power of 1 Represent the target road network; construct an approximate Gaussian kernel density function for the road network based on the piecewise linear function corresponding to the set interval:
[0057] ;
[0058] in, express The approximate Gaussian kernel density function of the road network. Represents linear pixels. Represents a set of location data points. This represents the bandwidth value of the Gaussian kernel density function of the approximate road network. denotes a piecewise linear function, denotes to the shortest path distance, denotes the number of.
[0059] wherein, for a target road network, it is set that is a set of position data points of any edge on the target road network, so as to obtain the following expression:
[0060] ;
[0061] ;
[0062] wherein, denotes an approximate edge road network kernel density function of the edge , the purpose of which is to speed up the calculation of each , so as to speed up the calculation of , in order to achieve this purpose, the algorithm is divided into two parts: adding aggregation values (as shown in Figure 5 ) for each data point on the road network and using binary search to calculate each .
[0063] Step S30, cutting all edges in the target road network into a plurality of linear pixels, calculating the shortest path distance between the nodes of each edge and the nodes of other edges for each edge, for each linear pixel, calculating the approximate edge kernel density function value of each other edge according to the size of all the shortest path distances and all the aggregation values, and constructing the visualization result of the target road network according to each approximate edge kernel density function value.
[0064] Specifically, cutting all edges in the target road network into a plurality of linear pixels, iteratively calculating the shortest path distance between all nodes on the current edge and all nodes on each edge respectively; calculating the shortest distance of each linear pixel to the nodes of other edges, and calculating the approximate edge kernel density function of each other edge through different expressions and all aggregation values according to all the shortest distances, until all linear pixels are iteratively calculated.
[0065] wherein, after adding aggregation values for each data point of each edge , binary search can be used to calculate each :
[0066] (1) for each edge The shortest path distance of the two nodes of the current edge to any node in the road network is calculated by iteration, and then the iteration is performed on each linear pixel in the current edge:
[0067] (a), first set the initial value of linear pixel to 0;
[0068] (b), then perform iteration on each edge to obtain the shortest path distance of the linear pixel to the two nodes respectively and :
[0069] ;
[0070] Accordingly, the initial value and the sum of the current iteration are calculated , and the sum is used as the initial value of the next round;
[0071] (c), when the iteration on the current edge is completed, the is obtained:
[0072] .
[0073] (2), after the iteration on all edges is completed, the approximate road network Gaussian kernel density function of all linear pixels is returned.
[0074] Further, for each of the edges, the shortest path distance of all nodes of the current edge to any node is iteratively calculated:
[0075] ;
[0076] ;
[0077] wherein, denotes a node different from the nodes on the current edge, and denote the nodes on the current edge, denotes the shortest path distance between and , and denotes the value of in the first case, denotes the shortest path distance between and , and denotes the value of in the first case, denotes the target road network, Indicates the iteration condition value. This represents the bandwidth value of the Gaussian kernel density function for the approximate road network.
[0078] Furthermore, when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is in the first case, processing all position data points of the corresponding other edges is avoided; when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is in the second case, all the aggregate values of all linear pixels are calculated based on all interval sets, and the approximate edge kernel density function is calculated based on all the aggregate values.
[0079] ;
[0080] in, Indicates the first A set of intervals, Indicates the index of a range set. This represents a constant, taking values of 0, 1, and 2. Represents aggregate value, Indicates in Internal location data points To the node The distance is the greatest. Indicates in Internal location data points To the node The distance is the greatest;
[0081] ;
[0082] in, Represents linear pixels Approximate edge kernel density function, Representing an edge The location data point set on the top This represents a constant defined by the absolute error. express The slope of the line segment. This represents the bandwidth value of the Gaussian kernel density function of the approximate road network. Representing an edge The left node, Indicates from linear pixels To the node The shortest path distance, Indicated Intercept of line segment, Indicates the first aggregate value. Indicates the second aggregate value. represents a third aggregation value; when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is a third case, all the aggregation values of all the linear pixels are calculated according to all the interval sets, and the approximate edge kernel density function is calculated according to all the aggregation values:
[0083] ;
[0084] wherein, represents a right node of an edge , represents a shortest path distance from a linear pixel to a node ; when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is a fourth case, all the aggregation values of all the linear pixels are calculated according to all the interval sets, and the approximate edge kernel density function is calculated according to all the aggregation values; an approximate road network kernel density function value is calculated according to each approximate edge kernel density function value, and different colors are added to all the linear pixels according to the approximate road network kernel density function value, so as to obtain a visualization result of the target road network.
[0085] wherein, for different cases, in the step (b) above, there are different cases that need to calculate in different ways. Specifically: when and , that is, the above first case, all the points on the current edge do not need to be processed.
[0086] Further, when and , that is, the above second case, the expression of
[0087] ;
[0088] then a binary search method is needed to find out the corresponding and of each interval (as shown in Figure 6 , the corresponding and of the third interval are shown), and then the aggregation value can be calculated, so that can be calculated.
[0089] Further, when and , that is, the above third case, the expression of can be shown as:
[0090] ;
[0091] Then we need to use a binary search algorithm to find each interval. corresponding and (like Figure 7 As shown, the third interval is illustrated. corresponding and Then the aggregate value can be calculated, thereby calculating the... .
[0092] Furthermore, when and In the case of the fourth scenario mentioned above, it is necessary to consider two sub-cases and calculate using other expressions. .
[0093] Specifically, when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is the first sub-case, all the aggregated values of all linear pixels are calculated based on all interval sets, and the approximate edge kernel density function is calculated based on all the aggregated values:
[0094] ;
[0095] When the relationship between all the shortest path distances on the linear pixel and the iteration condition value is the second sub-case, a target position data point that satisfies the preset condition is determined on the edge. Based on the target position data point, the left interval set and the right interval set containing the left node and all right nodes are calculated respectively. The approximate edge kernel density function is calculated according to the calculation formula of the second case and the left interval set. The approximate edge kernel density function is calculated according to the calculation formula of the third case and the right interval set.
[0096] Among them, when When, i.e., the first sub-case mentioned above, such as Figure 8 As shown, it can be seen from the node Starting search range and from nodes The initial search range (two black dashed lines) does not intersect, therefore it can be... The calculation (as described in the expression for the first sub-case above) can also be performed directly using the concepts of the second and third cases. .
[0097] when When, i.e., the second sub-case mentioned above, such as Figure 9 As shown, it can be seen from the node Starting search range and from nodes The starting search ranges (two black dotted lines) will intersect. To calculate , a binary search is needed to find data points such that is maximum while satisfying (this condition is based on ). Assuming is in the interval and (as shown in Figure 9 , ), it will include the interval (or ) without being in the set interval (or ) of data points of the dataset (or ). At this time, the concept based on the second case and the concept of the third case can be used to calculate .
[0098] The present application uses piecewise linear functions to replace exponential functions and determines the interval set under the condition of given absolute error to calculate the approximate road network Gaussian kernel density function according to the interval set and the corresponding piecewise linear function.
[0099] Further, in the embodiments disclosed by the present application, it is proved that the time complexity required by the two methods of calculating , namely the PLAN method and the PLAN+ method disclosed by the present application, is , respectively, so the time complexity of calculating the road network Gaussian kernel density visualization by the two methods is and respectively, and the corresponding spatial complexity is equivalent to the spatial complexity obtained by the SOTA (current optimal technology) method, and the specific results are shown in Table 1 as follows:
[0100] Table 1: Table of theoretical results of road network Gaussian kernel density visualization
[0101]
[0102] Further, as shown in Figure 10 , Figure 11 , Figure 12 , Figure 13 , Figure 14 , Figure 15 and Figure 16 , the experimental results of the comparison between the method disclosed by the present application (defined as the PLAN method and the PLAN+ method) and the SOTA method are as follows:
[0103] Among them, Figure 10It demonstrates the temporal variation of the Gaussian kernel density of the generated road network when different linear pixel sizes are changed; Figure 11 The time-varying effect of the generated Gaussian kernel density visualization of the road network is shown when different bandwidth values are changed; Figure 12 This demonstrates the temporal variation of the generated Gaussian kernel density visualization of the road network when the dataset size is changed. Figure 13 The time-varying effect of the generated Gaussian kernel density visualization of the road network is shown when different absolute errors are changed; Figure 14 It demonstrates changing different linear pixel sizes ( Figure 14 (a) and Figure 14 (b) and dataset size ( Figure 14 (c) and Figure 14 In (d) of the middle, in place C ( Figure 14 (a) and Figure 14 (c) and Dingdi ( Figure 14 (b) and Figure 15 In (d) of the diagram, the spatial overhead of generating a visualization of the Gaussian kernel density of the road network is calculated. Figure 16 This demonstrates the actual maximum density deviation in generating a Gaussian kernel density visualization of the road network when varying the absolute error.
[0104] Furthermore, Figure 16 This demonstrates the use of the EXACT (SOTA) method ( Figure 16 (a) in the present invention and the (PLAN or PLAN+) method disclosed herein ( Figure 16 (b) Figure 16 (c) Figure 16 (d) Figure 16 (e) and Figure 17 (f) in the figure shows the subjective accuracy comparison of the visualization of Gaussian kernel density of the generated road network with different absolute errors.
[0105] The above comparison process was verified on four large-scale datasets. The results show that the two methods disclosed in this invention achieve speedups of 32.47 to 2936.88 times, with only 1.87 to 2.15 times the space overhead. Moreover, the generated approximate road network Gaussian kernel density visualization results are almost identical to the accurate results, which greatly improves the efficiency of road network Gaussian kernel density visualization.
[0106] Furthermore, such as Figure 18 As shown, based on the above-mentioned fast road network visualization method based on piecewise linearity and Gaussian kernel density function, the present invention also provides a fast road network visualization system based on piecewise linearity and Gaussian kernel density function, wherein the fast road network visualization system based on piecewise linearity and Gaussian kernel density function includes:
[0107] The piecewise linear function construction module 51 is configured to define an absolute error, construct a division algorithm of a piecewise linear function according to the absolute error, and obtain a piecewise linear function and a set interval of the piecewise linear function.
[0108] The expression construction module 52 is configured to obtain a plurality of edges and a plurality of position data points in a target road network, add corresponding aggregate values to all the position data points, and construct a plurality of approximate edge kernel density functions according to the piecewise linear function corresponding to the set interval.
[0109] The function value calculation module 53 is configured to cut all the edges in the target road network into a plurality of linear pixels, calculate, for each edge, a shortest path distance between nodes of the edge and nodes of other edges, calculate, for each linear pixel, an approximate edge kernel density function value of each other edge according to sizes of all the shortest path distances and all the aggregate values, and construct a visualization result of the target road network according to each approximate edge kernel density function value.
[0110] Further, as shown in Figure 18 Based on the above piecewise linear and Gaussian kernel density function-based fast road network visualization method and system, the application further provides a terminal, which comprises a processor 10, a memory 20 and a display 30. Only some components of the terminal are shown, but it should be understood that all the shown components are not required, and more or less components can be alternatively implemented.
[0111] The memory 20 can be an internal storage unit of the terminal in some embodiments, for example, a hard disk or a memory of the terminal. The memory 20 can also be an external storage device of the terminal in other embodiments, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory 20 can include both an internal storage unit and an external storage device of the terminal. The memory 20 is configured to store application software and various data installed on the terminal, for example, program codes of the terminal. The memory 20 can also be configured to temporarily store data that has been output or will be output. In an embodiment, the memory 20 stores a piecewise linear and Gaussian kernel density function-based fast road network visualization program 40, which can be executed by the processor 10, so as to implement the piecewise linear and Gaussian kernel density function-based fast road network visualization method in the application.
[0112] The processor 10 can be a Central Processing Unit (CPU), microprocessor or other data processing chip in some embodiments, for running program codes stored in the memory 20 or processing data, such as executing the fast freeway network visualization method based on piecewise linear and Gaussian kernel density function and the like.
[0113] The display 30 can be an LED display, liquid crystal display, touch liquid crystal display, OLED (Organic Light-Emitting Diode) touch and the like in some embodiments. The display 30 is used for displaying information of the terminal and for displaying a visualized user interface. The components of the terminal communicate with each other through a system bus.
[0114] In an embodiment, when the processor 10 executes the fast freeway network visualization program 40 based on piecewise linear and Gaussian kernel density function in the memory 20, the steps of the fast freeway network visualization method based on piecewise linear and Gaussian kernel density function as described above are implemented:
[0115] The present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a fast freeway network visualization program based on piecewise linear and Gaussian kernel density function, and the fast freeway network visualization program based on piecewise linear and Gaussian kernel density function implements the steps of the fast freeway network visualization method based on piecewise linear and Gaussian kernel density function as described above when executed by a processor.
[0116] In summary, the present application provides a fast freeway network visualization method based on piecewise linear and Gaussian kernel density function and related equipment, the method comprising: defining an absolute error, constructing a division algorithm of a piecewise linear function according to the absolute error, obtaining a piecewise linear function and a set interval of the piecewise linear function; obtaining a plurality of edges and a plurality of position data points in a target road network, adding corresponding aggregation values to all position data points, and constructing a plurality of approximate edge kernel density functions according to the piecewise linear function corresponding to the set interval; cutting all edges in the target road network into a plurality of linear pixels, calculating the shortest path distance between the nodes of the edge and the nodes of other edges for each edge, and for each linear pixel, calculating the approximate edge kernel density function value of each other edge according to the size of all the shortest path distances and all the aggregation values, and constructing a visualization result of the target road network according to each approximate edge kernel density function value.
[0117] It should be noted that, in the present document, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element preceded by "comprises a" does not, without more constraints, foreclose the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0118] Of course, those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware (such as a processor, a controller, etc.) through a computer program, and the program can be stored in a computer readable computer readable storage medium, and the program can include the processes of the above-mentioned method embodiments when executed. The computer readable storage medium can be a memory, a magnetic disc, an optical disc, etc.
[0119] It should be understood that the application is not limited to the above examples, and those skilled in the art can make improvements or changes according to the above description, and all these improvements and changes shall fall within the protection scope of the appended claims of the present application.
Claims
1. A fast freeway network visualization method based on piecewise linear and Gaussian kernel density functions, characterized in that, The fast road network visualization method based on piecewise linear and Gaussian kernel density function comprises: Defining an absolute error, constructing a division algorithm of a piecewise linear function according to the absolute error, obtaining a piecewise linear function and a set interval of the piecewise linear function; Obtaining a plurality of edges and a plurality of position data points in a target road network, adding corresponding aggregate values to all position data points, and constructing a plurality of approximate edge kernel density functions according to the piecewise linear function corresponding to the set interval; Cutting all edges in the target road network into a plurality of linear pixels, calculating the shortest path distance between the nodes of each edge and the nodes of other edges, and for each linear pixel, calculating the approximate edge kernel density function value of each other edge according to the size of all shortest path distances and all aggregate values, and constructing a visualization result of the target road network according to each approximate edge kernel density function value; The calculation of the approximate edge kernel density function value of each other edge according to the size of all shortest path distances and all aggregate values, and the construction of the visualization result of the target road network according to each approximate edge kernel density function value, specifically includes: When the relationship between all shortest path distances on the linear pixel and the iteration condition value is the first case, avoid processing all position data points of the corresponding other edge; When the relationship between all shortest path distances on the linear pixel and the iteration condition value is the second case, calculate all aggregate values of all linear pixels according to all interval sets, and calculate the approximate edge kernel density function according to all aggregate values: ; in, Indicates the first A set of intervals, Indicates the index of a range set. This represents a constant, taking values of 0, 1, and 2. Represents aggregate value, Indicates in Internal location data points To the node The distance is the greatest. Indicates in Internal location data points To the node The distance is the greatest; ; wherein, denotes a linear pixel approximated edge kernel density function, denotes an edge position data point set, denotes a constant defined by an absolute error, denotes a slope of a line segment, denotes a bandwidth value of an approximated road network Gaussian kernel density function, denotes a left node of an edge , denotes a shortest path distance from a linear pixel to a node , denotes a line segment intercept of , denotes a first aggregated value, denotes a second aggregated value, denotes a third aggregated value; When the relationship between all shortest path distances on the linear pixel and the iteration condition value is the third case, calculate all aggregate values of all linear pixels according to all interval sets, and calculate the approximate edge kernel density function according to all aggregate values: ; wherein, denotes the right node of , denotes the shortest path distance from the linear pixel to the node ; When the relationship between all shortest path distances on the linear pixel and the iteration condition value is the fourth case, calculate all aggregate values of all linear pixels according to all interval sets, and calculate the approximate edge kernel density function according to all aggregate values: According to each approximate edge kernel density function value, calculate the approximate road network kernel density function value, and add different colors to all linear pixels according to the approximate road network kernel density function value, to obtain the visualization result of the target road network.
2. The method for fast freeway network visualization based on piecewise linear and Gaussian kernel density function according to claim 1, characterized in that, The definition of the absolute error, the construction of the division algorithm of the piecewise linear function according to the absolute error, and the obtaining of the piecewise linear function and the set interval of the piecewise linear function, specifically includes: Defining an absolute error and an initial set interval of a piecewise linear function, defining the initial set interval as an empty set, and defining the minimum value of the initial set interval as 0, and constructing an exponential function according to the minimum value; Constructing an iteration condition value, defining the iteration condition value as the exponential function, determining the maximum value of the initial set interval when the iteration condition value is not less than the absolute error, and updating the initial set interval according to the minimum value and the maximum value; updating the minimum value as the maximum value, updating the iteration condition value according to the updated minimum value, and iteratively updating the initial set interval until the iteration condition value is less than the absolute error, to obtain an interval set.
3. The fast freeway network visualization method based on piecewise linear and Gaussian kernel density function according to claim 2, characterized in that, The method comprises the following steps of: obtaining a plurality of edges and a plurality of position data points in a target road network, adding corresponding aggregate values to all the position data points, and constructing a plurality of approximate edge kernel density functions according to the piecewise linear functions corresponding to the set intervals. The method comprises the following steps of: obtaining a target road network, and obtaining a set of edges on the target road network and a set of position data points of each edge; For each node of each edge, the method comprises the following steps of: calculating a shortest path distance from each node to all the position data points on the edge. For each position data point, the method comprises the following steps of: adding a plurality of aggregate values according to all the shortest path distances: ; ; in, and All represent aggregate values. This represents a constant, taking values of 0, 1, and 2. Indicates location data points, and Represents a node. Indicates from Node to location data point All data points, Indicates from Node to location data point All data points, Indicates the first One location data point, express Node to location data point shortest path distance Power of 1 express Node to location data point shortest path distance Power of 1 Indicates the target road network; The method comprises the following steps of: constructing an approximate road network Gaussian kernel density function according to the piecewise linear functions corresponding to the set intervals. ; wherein, denotes an approximated road network Gaussian kernel density function, denotes a linear pixel, denotes a set of location data points, denotes a bandwidth value of the approximated road network Gaussian kernel density function, denotes a piecewise linear function, denotes a shortest path distance from to denotes a number of 4. The method for fast road network visualization based on piecewise linear and Gaussian kernel density function of claim 1, wherein, The method comprises the following steps of: cutting all the edges in the target road network into a plurality of linear pixels, calculating shortest path distances between nodes of each edge and nodes of other edges for each edge, and calculating approximate edge kernel density function values of each of the other edges according to sizes of all the shortest path distances and all the aggregate values for each linear pixel. The method comprises the following steps of: cutting all the edges in the target road network into a plurality of linear pixels, and iteratively calculating shortest path distances between all the nodes on a current edge and all the nodes on each edge. The method comprises the following steps of: calculating shortest distances from each linear pixel to nodes of other edges, and calculating approximate edge kernel density functions of each of the other edges according to different expressions and all the aggregate values until all the linear pixels are iteratively calculated.
5. The fast freeway network visualization method based on piecewise linear and Gaussian kernel density function according to claim 4, characterized in that, The method comprises the following steps of: iteratively calculating shortest path distances between all the nodes on a current edge and all the nodes on each edge for each edge. The method comprises the following steps of: iteratively calculating shortest path distances between all the nodes on a current edge and any node for each edge. ; ; wherein, denotes a node different from the node on the current edge, and denotes the node on the current edge, denotes the shortest path distance between , denotes the value of in the first case, denotes the shortest path distance between , denotes the value of in the first case, denotes the target road network, denotes the iteration condition value, denotes the bandwidth value of the approximated road network Gaussian kernel density function.
6. The method for fast freeway network visualization based on piecewise linear and Gaussian kernel density function of claim 1, wherein, The fourth case comprises a first sub-case and a second sub-case. The method comprises the following steps of: when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is the fourth case, calculating all the aggregate values of all the linear pixels according to all the interval sets, and calculating the approximate edge kernel density function according to all the aggregate values. The method comprises the following steps of: when the relationship between all the shortest path distances on the linear pixel and the iteration condition value is the first sub-case, calculating all the aggregate values of all the linear pixels according to all the interval sets, and calculating the approximate edge kernel density function according to all the aggregate values. ; When the relationship between all the shortest path distances on the linear pixel and the iteration condition value is the second sub-case, a target position data point satisfying a preset condition is determined on the edge, left interval set and right interval set containing the left node and all right nodes are calculated according to the target position data point respectively, the approximate edge kernel density function is calculated according to the calculation formula of the second case and the left interval set, and the approximate edge kernel density function is calculated according to the calculation formula of the third case and the right interval set.
7. A fast freeway network visualization system based on piecewise linear and Gaussian kernel density functions, characterized by, The fast road network visualization system based on piecewise linear and Gaussian kernel density function is applied to the fast road network visualization method based on piecewise linear and Gaussian kernel density function as claimed in any one of claims 1-6, and comprises: A piecewise linear function construction module is configured to define an absolute error, construct a division algorithm of a piecewise linear function according to the absolute error, and obtain a piecewise linear function and a set interval of the piecewise linear function. An expression construction module is configured to obtain a plurality of edges and a plurality of position data points in a target road network, add corresponding aggregation values to all position data points, and construct a plurality of approximate edge kernel density functions according to the corresponding piecewise linear function of the set interval. A function value calculation module is configured to cut all edges in the target road network into a plurality of linear pixels, calculate shortest path distances between nodes of the edges and nodes of other edges for each edge, calculate approximate edge kernel density function values of each other edge according to the sizes of all the shortest path distances and all the aggregation values for each linear pixel, and construct a visualization result of the target road network according to each approximate edge kernel density function value.
8. A terminal, characterized by comprising: The terminal comprises a memory, a processor, and a fast road network visualization program based on piecewise linear and Gaussian kernel density function stored on the memory and executable on the processor, and the fast road network visualization program based on piecewise linear and Gaussian kernel density function implements the steps of the fast road network visualization method based on piecewise linear and Gaussian kernel density function as claimed in any one of claims 1-6 when executed by the processor.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a fast road network visualization program based on piecewise linear and Gaussian kernel density function, and the fast road network visualization program based on piecewise linear and Gaussian kernel density function implements the steps of the fast road network visualization method based on piecewise linear and Gaussian kernel density function as claimed in any one of claims 1-6 when executed by the processor.
Citation Information
Patent Citations
Space-time kernel density visualization method and system based on module compression, terminal and readable storage medium
CN120217168A
Two-dimensional scalar field data visualization method and system based on colormap optimization
US20210272235A1