Bus line network path drawing method and drawing device and machine readable storage medium

By acquiring and matching bus network and road network data, and using simulated annealing algorithm for offset and connection processing, the problem of automating bus network path drawing was solved, achieving efficient, low-cost path drawing and accurate results.

CN120599081BActive Publication Date: 2026-01-16BEIJING GENERAL MUNICIPAL ENG DESIGN & RES INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510641905.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2026-01-16
Estimated Expiration
2045-05-19

AI Technical Summary

Technical Problem

In existing technologies, the drawing of bus network routes suffers from low matching accuracy, high cost of manual drawing and difficulty in reuse, and the drawing order of multiple routes needs to be considered during the manual drawing process, resulting in difficulties in overall control.

Method used

By acquiring bus network and road network data, matching and preprocessing are performed, and then the simulated annealing algorithm is used for offset and connection processing to generate the drawing results of bus network paths, optimizing connection costs to achieve automated drawing.

Benefits of technology

It has enabled the automated drawing of bus network routes, reduced labor costs, improved the accuracy and reusability of the drawing results, and simplified the overall control of multiple routes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599081B_ABST
    Figure CN120599081B_ABST
Patent Text Reader

Abstract

The application discloses a bus line network path drawing method and device and a machine readable storage medium. The drawing method comprises: acquiring bus line network data and road network data; matching the bus line network data and the road network data, determining a road section set of a bus line section passed by each bus line in the bus line network data, to determine a bus line section data set; for each bus line in the bus line network data, performing offset processing on the bus line sections in the road section set according to the travel direction of the bus line, and performing connection processing on the offset bus line sections; and generating a drawing result of a bus line network path corresponding to the bus line data based on the connection cost of the bus line section data set, wherein the connection cost is determined based on the offset processing result and the connection processing result. Thus, the path of the bus line network is automatically drawn.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of intelligent transportation, more particularly, to a bus line network path drawing method and device and machine readable storage medium. BACKGROUND

[0002] Public transportation is an important part of the transportation system. With the appearance of traffic congestion and the development of the "public transportation first" concept, public transportation is playing an increasingly important role in the city. The bus line network is the backbone of public transportation and is an important basis for analyzing existing bus characteristics and optimizing bus routes. The bus line network trajectory is generally obtained by GPS positioning data, which has a low matching degree with the road network. Even if the path matching is completed, it is difficult to analyze the information such as the line and the starting and ending points of each line in the bus line network. Therefore, the path of the bus line network needs to be processed more finely.

[0003] In actual work, when the analysis requirement of the bus line is high, the path of the bus line network is drawn manually. The result drawn by manual drawing is more intuitive, and the analysis of the line of multiple bus lines is more accurate, but the cost of manual labor is high, especially as the research scope expands, the time input grows exponentially. At the same time, the result of manual drawing is difficult to reuse. Since the drawing order of multiple bus lines needs to be considered when drawing, when part of the bus lines in the region are adjusted, the adjusted bus line may have a great impact on the whole map, so it needs to be redrawn. In addition, since the drawing order of multiple bus lines on the road affects the drawing result, the drawing order of different bus lines in the whole road network needs to be considered during the drawing process, and it is difficult to control the whole when drawing manually. Therefore, an automatic means is needed to draw the path of the bus line network.

[0004] Therefore, how to automatically draw the path of the bus line network has become a technical problem to be solved in the field. SUMMARY

[0005] Therefore, how to automatically draw the path of the bus line network has become a technical problem to be solved in the field.

[0006] In a first aspect, the application provides a method for drawing a bus line network path, the method comprising: obtaining bus line network data and road network data; matching the bus line network data and the road network data to determine a road segment set of a bus line segment that each bus line in the bus line network data passes through, so as to determine a bus line segment data set; for each bus line in the bus line network data, performing offset processing on the bus line segments in the road segment set according to the travel direction of the bus line, and performing connection processing on the offset bus line segments; and generating a drawing result of a bus line network path corresponding to the bus line data based on a connection cost of the bus line segment data set, wherein the connection cost is determined based on the offset processing result and the connection processing result.

[0007] Optionally, the generating of the drawing result of the bus line network path corresponding to the bus line data based on the connection cost of the bus line segment data set comprises: determining the connection cost based on the offset processing result and the connection processing result after the offset processing and the connection processing are completed; optimizing the offset processing and / or the connection processing until a preset condition is met, in a case where the preset condition is not met; and generating the drawing result based on the final offset processing result and the connection processing result.

[0008] Optionally, the final offset processing result and the connection processing result are determined based on a simulated annealing algorithm, and the preset condition comprises that a current temperature reaches a preset minimum temperature or an iteration number reaches a preset maximum iteration number.

[0009] Optionally, the performing of the offset processing on the bus line segments in the road segment set according to the travel direction of the bus line for each bus line in the bus line network data comprises: offsetting the bus line segments in the road segment set to the right in sequence according to the travel direction of the bus line based on the travel direction of the bus line.

[0010] Optionally, the bus line segment data set S is: wherein U is a matching relationship matrix representing the matching relationship between the bus line network data and the road network data; R represents a road network data set, and the line elements included in the set R are denoted as {r1, r2, r3,..., r n} and the line element r j represents a road segment r j ; n represents the number of road segments included in the road network data; L represents a bus line network data set, and the line elements included in the set L are denoted as {l1, l2, l3,..., l m} and the line element l i represents a bus line l i; m represents the number of bus lines included in the bus line network data; wherein, u i,j ∈[-1, 0, 1], i∈(1, 2, 3,..., m), j∈(1, 2, 3,..., n).u i,j characterizes the bus line l i whether the matching road section r j ; if the bus line l i matches the road section r j , and the road section start number of the road section r j is the same as the matching start number of the bus line l i matching road section r j , then u i,j is 1; if the bus line l i does not match the road section r j , and the road section start number of the road section r j is different from the matching start number of the bus line l i matching road section r j , then u i,j is-1; if the bus line l i does not match the road section r j , then u i,j is 0.

[0011] Optionally, the first bus line section data set S' after the offset processing is:

[0012]

[0013] wherein, d represents a preset basic offset distance; wherein, X represents an offset position matrix; x i,j represents the offset position of the bus line section r i,j .

[0014] Optionally, the second bus line section data set S'' after the connection processing is:

[0015]

[0016] wherein, Y represents a connection mode matrix, y i,j represents the connection mode of the bus line section r i,j and the connected bus line section; wherein, C represents a connection section set, c i,j represents the connection section element of the bus line section r i,j and the connected bus line section when taking the connection mode y i,j ; wherein, y i,j *c i,j represents the change amount of the bus line section r i,j when taking the connection operation.

[0017] Optionally, the calculation formula of the connection cost is: W =∑ i,j (d*x i,j *r j +y i,j *c i,j ), wherein W represents the connection cost.

[0018] Optionally, before the matching of the bus line network data and the road network data, the drawing method further comprises: preprocessing the bus line network data and the road network data.

[0019] In a second aspect, the present application provides a drawing device of bus line network path, the drawing device comprises: an acquisition module configured to acquire bus line network data and road network data; a matching module configured to match the bus line network data and the road network data, determine a road section set of a bus route section that each bus route in the bus line network data passes through, so as to determine a bus route section data set; an offset connection module configured to, for each bus route in the bus line network data, perform offset processing on the bus route section in the road section set according to the travel direction of the bus route, and perform connection processing on the offset bus route section; and a generation module configured to generate a drawing result of a bus line network path corresponding to the bus route data based on a connection cost of the bus route section data set, wherein the connection cost is determined based on the offset processing result and the connection processing result.

[0020] In a third aspect, the present application provides a drawing device of bus line network path, the drawing device comprises a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor executes the program to realize the drawing method described above.

[0021] In a fourth aspect, the present application provides a machine readable storage medium, the machine readable storage medium stores instructions for causing a machine to execute the drawing method described above.

[0022] According to the technical solution of the present application, the bus line network data and the road network data are acquired, the bus line network data and the road network data are matched to determine the bus route section data set, then the offset processing and the connection processing are performed, and the drawing result of the bus line network path is generated based on the connection cost of the bus route section data set, so that the path of the bus line network is automatically drawn.

[0023] Other features and advantages of the present application will be described in detail in the following specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0024] The accompanying drawings, which form a part of this application, are included to provide a further understanding of the application and are incorporated in and constitute a part of this application. The embodiments of the application illustrated in the drawings are provided to explain the present application and to provide a basis for understanding the present application. In the drawings:

[0025] Figure 1 Flow chart of a bus line network path drawing method according to a preferred embodiment of the present application;

[0026] Figure 2 Structure block diagram of a bus line network path drawing device according to a preferred embodiment of the present application;

[0027] Figure 3 Schematic diagram of a bus line network path drawing result according to a preferred embodiment of the present application. DETAILED DESCRIPTION

[0028] The technical solutions of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0029] In a first aspect, the embodiments of the present application provide a bus line network path drawing method.

[0030] Figure 1 Flow chart of a bus line network path drawing method according to a preferred embodiment of the present application. As shown in Figure 1 , the drawing method includes the following.

[0031] In step S10, bus line network data and road network data are acquired.

[0032] Specifically, the required bus line network data and road network data include complete bus line network vector data and road network vector data within the research scope. The bus line network vector data and road network vector data both have spatial geographic coordinates and drawing directions. The attributes of the bus line include line number, line name, and travel direction. The attributes of the road segment include road segment number and traffic direction. For example, the bus line network data set is L, and the line elements contained in set L are denoted as {l1, l2, l3,..., ln}. Each line element represents a bus line, and the line element li represents the bus line li; m represents the number of bus lines included in the bus line network data. The road network data set is denoted as R, and the line elements contained in set R are denoted as {r1, r2, r3,..., rn}. Each line element represents a road segment, and the line element ri represents the road segment ri; n represents the number of road segments included in the road network data. m i i n j j

[0033] ​​​​​​In step S11, the bus line network data and the road network data are matched to determine the road segment set of the bus line segment that each bus line in the bus line network data passes through, so as to determine the bus line segment data set.

[0034] Optionally, in the embodiments of the present application, taking the bus line network including m bus lines and the road network including n roads as an example, the matching relationship between each bus line in the bus line network and the plurality of road segments in the road network can be represented in the form of a matrix, so as to determine the road segment set that each bus line passes through. When a certain bus line does not pass through a certain road segment, 0 is recorded in the matrix to represent it. For each bus line, the bus line segment is a certain road segment that the bus line passes through.

[0035] The matching relationship between the bus line and the road network segment is recorded as a matching relationship matrix U. The matching relationship matrix is composed of m rows and n columns, that is, the number of rows of the matrix is the same as the number of bus lines, and the number of columns is the same as the number of road network segments, that is:

[0036]

[0037] Wherein: u i,j ∈[-1,0,1],i∈(1,2,3,...,m),j∈(1,2,3,...,n), is used to represent whether the bus line l i passes through or matches the road segment r j . For u i,j , if the bus line l i passes through the road segment r j and the road segment start point number is the same as the matching start point number, it takes the value of 1; if the bus line l i passes through the road segment r j and the road segment start point number is different from the bus line matching road segment start point number, it takes the value of -1; if the bus line l i does not pass through the road segment r j , it takes the value of 0.

[0038] Specifically, the bus line segment r i,j can be represented as: r i,j = u i,j *r j . Wherein, i∈(1,2,3,...,m),j∈(1,2,3,...,n), represents that if the bus line l i passes through the road segment r j , and the road segment start point number is the same as the matching start point number, then the bus line segment r i,j is the same as the road segment r j ; if the bus line l i passes through the road segment r j, and the start point number of the road segment r i,j is different from the matching start point number of the bus route l j , the bus route segment r i has the same attribute information as the road segment r j , but the spatial geographic coordinate drawing direction is opposite; if the bus route l i,j does not pass through the road segment r i,j , the bus route segment r i,j is valued at 0, indicating that the bus route segment does not exist.

[0039] Specifically, the bus route segment data set S can be:

[0040]

[0041] r i,j = u i,j *r j

[0042] Wherein, U is a matching relationship matrix, representing the matching relationship between the bus line network data and the road network data; wherein, R represents a road network data set, and the line elements included in the set R are represented as {r1, r2, r3,..., r n}, the first line element r j represents the road segment r j ; n represents the number of road segments included in the road network data; wherein, the bus line network data set is L, and the line elements included in the set L are represented as {l1, l2, l3,..., l m}, the second line element l i represents the bus route l i ; m represents the number of bus routes included in the bus line network data; wherein, u i,j ∈[-1,0,1], i∈(1,2,3,...,m), j∈(1,2,3,...,n); u i,j represents whether the bus route l i matches the road segment r j ; if the bus route l i matches the road segment r j , and the start point number of the road segment r j is the same as the matching start point number of the bus route l i matching road segment r j , u i,j is valued at 1; if the bus route l i matches the road segment r j , and the start point number of the road segment r j is different from the matching start point number of the bus route l i matching road segment r j , u i,j is valued at-1; if the bus route l i does not match the road segment rj , u i,j = 0. It should be noted that the matching described here is the passing, for example, if the bus route l i matches the road segment r j . i passes the road segment r j .

[0043] The bus route segment dataset S contains elements denoted as {R1, R2, R3,..., R m}, where the element R i represents the bus route l i passing the road segment set in the road network, that is, the bus route l i corresponding to the bus route segment set, satisfying the condition,

[0044] Specifically, the bus route segment set R i (R i ∈ S) contains line elements (that is, the third line element) denoted as {r i,1 , r i,2 , r i,3 ,..., r i,n}, where the third line element r i,j represents the bus route segment r i,j , and the bus route segment r i,j represents the road segment element corresponding to the road segment r i passed by the bus route l j . The bus route segment r i,j expresses whether the bus route l i passes the road segment r j . The attributes of the bus route segment can be the same as those of the road segment in the road network. Specifically, the attributes of the bus route segment r i,j may include the road segment number of the road segment r j , the road segment start point number of the road segment r j , the bus route number of the bus route l i , the bus route name of the bus route l i , whether the bus route l i passes the road segment r j and the passing order in the passing case (the value is null in the non-passing case), the matching start point number of the bus route l i passing the road segment r j , and the spatial geographic information of the road segment r j . It should be noted that the bus route l i passing the road segment r j is the bus route l i matching the road segment rj The segment start number of a segment r j refers to the number of the first segment drawing coordinate point in the segment r j drawn according to the spatial geographic coordinates of the segments in the road network. Similarly, the segment end number of a segment r j refers to the number of the last segment drawing coordinate point in the segment r j drawn according to the spatial geographic coordinates of the segments in the road network. The segment drawing coordinate point of a segment refers to the coordinate point drawn through the segment. A bus route l i passes through or matches a segment r j . The matching start number of the segment r i refers to the number of the segment r j first passed through by the bus route l j when passing through the segment r i . The matching start number of the segment r j may be the segment start number or the segment end number of the segment r j . Optionally, in the case that the segment has a direction attribute DIR, the attribute of the bus route segment r i,j may further include the direction attribute DIR of the segment r j .

[0045] In step S12, for each bus route in the bus route network data, the bus route segments in the segment set are offset according to the travel direction of the bus route, and the offset bus route segments are connected.

[0046] Optionally, in the embodiment of the present application, for each bus route in the bus route network data, the bus route segments in the segment set are offset according to the travel direction of the bus route, which can include the following. Based on the travel direction of the bus route, the bus route segments in the segment set are sequentially offset to the right according to the travel direction of the bus route.

[0047] For each bus route segment of the segment set of each bus route in the bus route segment data set, the bus route segments are sequentially offset at equal intervals on the right according to the travel direction of the bus route, and for different bus route segments of the same bus route in the offset bus route segment data set, the bus route segments are connected according to the front and rear connection position relationship.

[0048] In step S13, based on the connection cost of the bus route segment data set, the drawing result of the bus route network path corresponding to the bus route data is generated, wherein the connection cost is determined based on the offset processing result and the connection processing result.

[0049] Optionally, in the embodiments of the present application, based on the connection cost of the bus route section data set, the drawing result of the bus route data corresponding bus route network path can include the following contents.

[0050] After the offset processing and the connection processing are completed, the connection cost is determined based on the offset processing result and the connection processing result; in the case where the preset condition is not met, the offset processing and / or the connection processing are optimized until the preset condition is met; and the drawing result is generated based on the final offset processing result and the connection processing result.

[0051] Optionally, in the embodiments of the present application, the final offset processing result and the connection processing result are determined based on the simulated annealing algorithm, wherein the preset condition includes that the current temperature reaches a preset minimum temperature or the number of iterations reaches a preset maximum number of iterations.

[0052] In the embodiments of the present application, the total length of the bus route section data set after the offset and connection processing is taken as the connection cost of the bus route section data set, and the offset position and the connection mode of the bus route section are taken as the independent variables to construct an optimization problem, and the simulated annealing algorithm is used for solving.

[0053] Optionally, in the embodiments of the present application, before the bus route network data and the road network data are matched, the drawing method can further include the following contents. The bus route network data and the road network data are preprocessed.

[0054] Optionally, in the embodiments of the present application, preprocessing the bus route network data can include the following contents. For each bus route, a point element set of bus route drawing coordinate points for drawing the bus route is determined, wherein in the point element set, the bus route drawing coordinate points are sequentially sorted according to the travel direction of the bus route.

[0055] Specifically, the bus route network data is preprocessed, and the bus route l i (l i is converted into a point element set according to the bus route drawing coordinate points thereof, denoted as E i , i ∈ (1, 2, 3, …, m), the set E i contains the bus route l i passing through the point elements denoted as {e i,1 , e i,2 , e i,3 , …, e i,p}, p is the number of bus route drawing coordinate points of the bus route l i passing through, and the bus route drawing coordinate points are sequentially numbered according to the passing order of the bus route l i .

[0056] Optionally, in the embodiments of the present application, the road network data is preprocessed, which can be adding an attribute representing the direction of travel to the road segment, the direction of travel attribute DIR.

[0057] Optionally, in the embodiments of the present application, the preprocessing of the road network data can include the following. For any road segment in the road network data, in the case that the direction of travel of the road segment is bidirectional, the direction of travel attribute DIR is added to the road segment and assigned a value of 0; in the case that the direction of travel of the road segment is unidirectional and consistent with the drawing direction of the spatial geographic coordinates of the road segment, the direction of travel attribute DIR is added to the road segment and assigned a value of 1; and in the case that the direction of travel of the road segment is unidirectional and inconsistent with the drawing direction of the spatial geographic coordinates of the road segment, the road segment is redrawn in the reverse order of the drawing coordinate points of the road segment, the direction of travel attribute DIR is added to the redrawn road segment and assigned a value of 1. And the original road segment is deleted and replaced by the redrawn road segment, which is the road segment in the reverse direction of travel.

[0058] The direction of travel attribute of the road network road segment is updated to the direction of travel attribute DIR, the connectivity of the road network is checked and repaired, the spatial topological relationship between the road segments is ensured, the spatial information corrected road network vector data is obtained, and the road network data set R is updated in this way.

[0059] Optionally, in the embodiments of the present application, the matching of the bus line network data and the road network data can be matching by using a hidden Markov model.

[0060] Specifically, the bus line network data and the road network data can be matched according to the following.

[0061] Further, the bus line network and the road network are matched by using a hidden Markov model. By setting the supplement points and deleting the redundant points, it is ensured that each bus line has and only has one matching point with the road segment.

[0062] For the point element set E i of the bus line l i ,i∈(1,2,3,...,m), the bus line drawing coordinate point e i,u (e i,u ∈E i) the most likely matching road segment in the road network. In addition, the supplement points are set to ensure that all road segments of the bus route pass through at least one bus route point element (i.e., a bus route drawing coordinate point) matched therewith. In setting the supplement points, firstly, road segments in the road network passed through by the bus route not matched to the bus route point element are identified, and then for these road segments, a bus route point element is generated by taking the midpoint position of the road segment, so that the point element can be matched to the road segment in the road network passed through by the bus route not matched to the bus route point element. The bus route point element generated by taking the midpoint position of the road segment is the supplement point.

[0063] In addition, for a bus route, if multiple bus route drawing coordinate points of the bus route are matched to the same road segment of the road network, only a matched bus route drawing coordinate point is retained, for example, the first matched bus route drawing coordinate point can be retained, so as to ensure that the bus route drawing coordinate points of each bus route correspond to the matched road segment one by one.

[0064] In the embodiments of the present application, for any bus route, each bus route drawing coordinate point is matched to a road segment, and all the road segments are connected in sequence to obtain the bus route.

[0065] Optionally, in the embodiments of the present application, since part of the road segments of the road network can be bidirectional, that is, the traffic direction attribute DIR = 0, during the matching process, there can be a case that the travel direction of the bus route is inconsistent with the spatial geographic coordinate drawing direction of the road segment. Therefore, the start point number of the road segment and the matching start point number of the bus route matching road segment are recorded during the matching, for identifying the connection direction of the bus route.

[0066] After the bus route network and the road network are matched, the information of the road network set R is updated, and an attribute of the bus route information passing through the road segment is added to each road segment. For example, for any road segment, the added attribute of the bus route information can include the number of bus routes passing through the road segment, the line number of the bus route passing through the road segment, the line name of the bus route passing through the road segment, the sequence of the bus route passing through the road segment, and the matching start point number of the bus route matching the road segment.

[0067] Optionally, in the embodiments of the present application, the bus route road segment data set is sequentially offset (for example, offset at equal intervals) according to the travel direction of the bus route, and a connection processing strategy such as breaking, connecting and extending is adopted to splice the bus route road segments connected in sequence of the same bus route, to obtain the offset splicing processing result of the bus route road segment data set.

[0068] Specifically, for each bus route section of the bus route section set of each bus route in the bus route section data set, the bus route sections are sequentially offset to the right (for example, offset at equal intervals) based on the travel direction of the bus route. That is, based on the travel direction of the bus route, the left and right are distinguished, and the offset order of all bus route sections in the same bus route section set is the same as the travel direction of the bus route corresponding to the bus route section set. Moreover, the interval of the offset of the bus route sections belonging to the same bus route can be the same.

[0069] Optionally, in the embodiments of the present application, for each bus route section in the bus route section set of any bus route, the offset is performed according to the following.

[0070] For the bus route section with the traffic direction attribute DIR=1, the offset is sequentially performed to the right according to the spatial geographic coordinate drawing direction of the bus route section, that is, according to the travel direction of the bus route passing through the bus route section, starting from the starting position (for example, the section start point number). For the bus route section with the traffic direction attribute DIR=1, the travel direction of the bus route passing through the bus route section is the same as the spatial geographic coordinate drawing direction of the bus route section.

[0071] For the bus route section with the traffic direction attribute DIR=0, first, the relationship between the travel direction of the bus route passing through the bus route section and the spatial geographic coordinate drawing direction of the bus route section is determined, and then the offset is performed to the right according to the travel direction of the bus route passing through the bus route section. Specifically, it can include the following. If the section start point number of the bus route section is the same as the matching start point number of the bus route matching the bus route section, the offset is sequentially performed to the right from the original position (that is, the section start point number) according to the spatial geographic coordinate drawing direction of the bus route section; if the section start point number of the bus route section is different from the matching start point number of the bus route matching the bus route section, the offset is sequentially performed to the left from the original position (that is, the section start point number) according to the spatial geographic coordinate drawing direction of the bus route section. Optionally, for the bus route section with the traffic direction attribute DIR=0, variables can be set for the cumulative values of the offset positions on the left and right sides, and an initial offset distance can be set when offsetting, so as to distinguish the different traffic directions of the bus route section on the two sides of the road section.

[0072] Optionally, in the embodiments of the present application, a variable matrix can be set for the offset position of the bus route section, that is, the offset position matrix X. The dimension of the offset position matrix X is consistent with the dimension of the matching relationship matrix U of the bus route section.

[0073]

[0074] wherein x i,j∈ [-m,...-1,0,1,...m], i∈(1,2,3,...,m), j∈(1,2,3,...,n); x i,j represents the bus route l i represents the bus route l j represents the bus route l i,j represents the bus route l j represents the bus route l i,j represents the bus route l j represents the bus route l i represents the bus route l j represents the bus route l i,j represents the bus route l i,j represents the bus route l j represents the bus route l i represents the bus route l j represents the bus route l i,j represents the bus route l

[0075] Optionally, in the embodiments of the present application, the offset constraints satisfied by the offset variables in the offset position matrix X are as follows:

[0076]

[0077] wherein, i 1 ,i 2 ∈(1,2,3,...,m); j∈(1,2,3,...,n). In the embodiments of the present application, the values of the variables in different rows of any column j in the offset position matrix X are different, specifically, the offset values of the bus route sections of any two bus routes passing through the same road section cannot be equal, otherwise the different bus routes will be overlapped on the road section.

[0078] It should be noted that, in the embodiments of the present application, if the bus route l i passes through the road section r j and does not occur offset, the bus route section r i,j is the road section r j ; if the bus route l i passes through the road section r j and occurs offset, the bus route section r i,j is offset relative to the road section r j and the offset value is x i,j , and the bus route section r i,j is the road section r jThe specific embodiment in the bus line passing through it.

[0079] Optionally, in the embodiments of the present application, the elements in the offset position matrix X are randomly generated under the offset constraint condition, for example, can be randomly generated based on the random function under the offset constraint condition, and then offset each bus line section based on the basic offset distance d. The offset bus line section r i,j may be expressed as: i,j = d * x i,j * r j , where i ∈ (1, 2, 3, …, m), j ∈ (1, 2, 3, …, n). r i,j = d * x i,j * r j , which means offsetting each element in the bus line section data set S according to d * x i,j ; if x i,j is 0, the bus line section r i,j does not exist.

[0080] Specifically, the first bus line section data set S' after offset processing is:

[0081]

[0082] Optionally, in the embodiments of the present application, x i,j is determined based on u i,j .

[0083] Optionally, in the embodiments of the present application, the initial solution of the offset position matrix can be randomly generated based on the offset constraint condition, for example, in combination with the random function.

[0084] Optionally, in the embodiments of the present application, the following rules can be used to generate the initial solution of the offset position matrix of the bus line section when determining the initial solution of the offset position variable:

[0085]

[0086] Where max(X[:,j]) represents the maximum value of all values in the jth column of the offset position matrix X: min(X[:,j]) represents the minimum value of all values in the jth column of the offset position matrix X. For the bus line passing through the road network section, by assigning the offset position variable x i,j of the bus line section one by one, it is ensured that the sequence of the offset bus line sections of any two bus lines on different road network sections is consistent, and there is no intersection when subsequent connection, which improves the quality of the initial solution.

[0087] In this embodiment, bus routes sometimes turn at the coordinate points of road segments within the road network, causing some bus route segments to shift and intersect or become disconnected, requiring connection processing. Specifically, a variable matrix, the connection method matrix Y, is set for the connection method of the shifted bus route segment dataset. Its dimension is the same as the dimension of the matching relationship matrix U of the bus route segments, i.e.:

[0088]

[0089] Among them, t i,j ∈[0,-1,1,2],i∈(1,2,3,...,m),j∈(1,2,3,...,n); y i,j Indicates bus route l i On the route section r j The corresponding bus route segment r i,j The connection method adopted with subsequent connecting bus routes.

[0090] Optionally, in the embodiments of this application, y i,j Based on bus route segment r i,j and the connecting bus routes and sections thereafter. i,j' And thus confirmed. Connecting bus route section r i,j' Indicates bus route l i The road segment r in the road network j' The corresponding road segment elements, and the bus route segment r i,j It is a continuation relationship.

[0091] Optionally, in this embodiment of the application, if the bus route segment r i,j No connecting bus routes available for the following sections. i,j' , then y i,j The value is 0; if the bus route segment r i,j There are connecting bus routes on the following sections. i,j' y i,j The values ​​can be -1, 1, and 2, which represent the connection methods of interruption, connection, and extension, respectively.

[0092] Specifically, the values ​​of the connection method variable satisfy the following connection constraints:

[0093]

[0094] The interruption method is applicable when two consecutive bus routes intersect after their segments have shifted. It applies to bus route segments r... i,j and the connecting bus routes and sections thereafter. i,j'The intersection point is broken, and the redundant link is deleted. The deleted redundant link is recorded as a broken line. The connection mode is suitable for the case where two bus route links before and after are disconnected after the offset. The start and end points of the bus route link r i,j and the connecting bus route link r i,j' are connected, and recorded as a connection line. The extension mode is also suitable for the case where two bus route links before and after are disconnected after the offset. If both of the two bus route links before and after need to be extended, the bus route link r i,j and the connecting bus route link r i,j' are respectively extended to the two ends until they intersect. The two extended lines are combined into one object, recorded as an extension line. If only one of the two bus route links before and after needs to be extended, the bus route link that needs to be extended is extended until it intersects. At the intersection point, the bus route link is broken and the redundant link is deleted. The extended line and the deleted redundant link are combined into one object by subtraction, recorded as an extension line. If the bus route link r i,j and the connecting bus route link r i,j' are parallel and not collinear, the extension mode is not available.

[0095] Optionally, in the embodiments of the present application, the initial solution of the connection mode matrix can be randomly generated based on the connection constraint condition, for example, in combination with the random function.

[0096] Optionally, in the embodiments of the present application, the following rules can be used to generate the initial solution of the connection mode matrix of the bus route link when determining the initial solution of the connection mode variable:

[0097]

[0098] Wherein, i∈(1,2,3,...,m),j∈(1,2,3,...,n). For all bus route links in the bus route link data set corresponding to a bus route, first determine whether the bus route link r i,j has a connecting bus route link. If not, let y i,j =0; otherwise, determine whether the bus route link r i,j and the connecting bus route link r i,j' intersect. If they intersect, the broken mode is adopted, and the bus route link r i,j and the connecting bus route link r i,j' are broken at the intersection point. According to the direction of the bus route, the redundant link is deleted at the start point or the end point. If they do not intersect, the connection mode is adopted, and the end point of the bus route link r i,j and the connecting bus route link r i,j'The start points are connected. When determining the initial solution, only the two splicing modes of breaking and connecting are considered to y i,j is assigned, and the initial solution generation speed is improved.

[0099] The set of connection lines, extension lines generated according to the splicing mode, or redundant road segments (broken lines) deleted by breaking is denoted as a splicing road segment set C, which includes elements c i,j , i ∈ (1, 2, 3,..., n), j ∈ (1, 2, 3,..., n) represents the bus route segment r i,j and the successive bus route segment after it when the splicing mode y i,j is taken. The splicing road segment element is a connection line, an extension line, or a broken line, which is determined according to the splicing mode. y i,j *c i,j represents the bus route segment r i,j that undergoes an increase or decrease in the change amount. In order to ensure that the change amount of the bus route segment r i,j is consistent with the actual value when the splicing mode of extension is taken, the change amount can be halved when it is assigned.

[0100] Optionally, in the embodiments of the present application, c i,j is determined based on the splicing mode y i,j , the bus route segment r i,j , and the successive bus route segment r i,j' .

[0101] Specifically, when setting the splicing road segment element, it is necessary to determine the spatial geographic coordinate drawing direction of the bus route segment. If the road segment start point number of the road segment corresponding to the bus route segment is the same as the matching start point number, that is, the travel direction of the bus route is the same as the spatial geographic coordinate drawing direction of the road segment, then the intersection breaking, connection, extension, and the like are performed on the end point of the previous bus route segment and the start point of the next bus route segment. If the road segment start point number of the road segment corresponding to the bus route segment is different from the matching start point number, that is, the travel direction of the bus route is opposite to the spatial geographic coordinate drawing direction of the road segment, then the intersection breaking, connection, extension, and the like are performed on the start point of the previous bus route segment and the end point of the next bus route segment.

[0102] The elements in the splicing mode variable matrix Y are randomly generated under the satisfaction of the splicing constraint condition, for example, are randomly generated based on a random function. The second bus route segment data set S” after the splicing operation is the offset splicing processing result of the bus route segment data set, which can be represented as:

[0103]

[0104] The offset position matrix X and the connection mode matrix Y of the bus route section are the current feasible solution. If it is an initial solution, the offset position matrix X and the connection mode matrix Y of the bus route section are the current initial feasible solution.

[0105] Optionally, in the embodiments of the present application, the offset connection result of the bus route section data set can be optimized with the lowest connection cost as the target, the offset order and the connection mode of the bus route section are adjusted, the improved simulated annealing algorithm is used for iterative search, and the drawing result of the optimized bus route network path is obtained. Specifically, the lowest connection cost is represented by setting a preset minimum temperature or a preset maximum number of iterations.

[0106] Specifically, since each bus route passes through different road network sections, there are situations such as misplacement of the order, intersection of the connection, etc. when the bus route section data set is initially offset and connected, it is necessary to adjust the offset order and the connection mode of the bus route section, so that the total length of the generated connection section is the shortest, and the overall drawing result of the offset bus route network path is smooth.

[0107] Specifically, the connection cost of the bus route section data set is denoted as W, on the one hand, the farther the offset position of the bus route section is from the original section position, the higher the connection cost is; on the other hand, the connection cost increases when the bus route section adopts the connection or extension connection mode, and the connection cost decreases when the bus route section adopts the breaking connection mode. Specifically, it can be expressed as: W = ∑ i,j (d*x i,j *r j +y i,j *c i,j ).

[0108] Wherein, i∈(1,2,3,...,m),j∈(1,2,3,...,n), adjusting the offset position and the connection mode of the bus route section will affect the connection cost.

[0109] Specifically, the drawing problem of the bus line network path is converted into an optimization problem, where the independent variables are the offset position matrix X and the connection mode matrix Y, and the objective function is the minimum connection cost W. That is, the optimal solution of the offset position matrix X and the connection mode matrix Y is obtained to minimize the connection cost W. As the scale of the bus route section expands, the problem solving grows exponentially, which is an NP-hard problem. The simulated annealing algorithm is used for optimization. The offset position and connection mode of the bus route section are taken as the independent variables, the variables are updated and the connection cost is calculated, the relationship between the current connection cost and the current optimal connection cost is judged, and whether the current temperature meets the negative exponential condition or the number of iterations reaches the maximum number of iterations is determined to determine whether to update the current optimal solution and the current optimal connection cost. After cooling, the next iteration is started until the convergence condition is met. Specifically, optimization calculation can be performed according to the following contents.

[0110] ① Set the current temperature t0, the cooling coefficient a, the preset minimum temperature t1, the preset maximum iteration number ω, and other parameters.

[0111] ② Based on the offset constraint condition and the connection constraint condition, the initial feasible solution X0 and Y0 of the offset position matrix X and the connection mode matrix Y are generated by random numbers, for example, generated randomly by the random function combined with the offset constraint condition and the connection constraint condition, and the connection cost W0 is calculated. The initial solution and the connection cost are taken as the current optimal solution and the current optimal connection cost.

[0112] ③ The variable is selected and updated by random number, for example, by random function, the current solution X1 and Y1 of the offset position matrix X and the connection mode matrix Y are recorded. Specifically, when the updated variable is the offset position variable, two elements in the same column and different rows of the offset position matrix are randomly selected, and the values of the elements are exchanged to represent the exchange of the drawing order of the two bus route sections, so as to update the offset position matrix; when the updated variable is the connection mode variable, the element in the connection mode matrix is randomly selected, and its connection mode is adjusted to connection or extension by random number to update the connection mode matrix.

[0113] ④ Objective function calculation, calculate the connection cost after updating the variable value, record the current connection cost W1;

[0114] ⑤ Compare the size of the current connection cost and the current optimal connection cost. If the current connection cost is less than or equal to the current optimal connection cost, i.e. W1≤W0, the current solution and the current connection cost are updated as the current optimal solution and the current optimal connection cost. Otherwise, the acceptance probability of the current solution is calculated A random number σ uniformly distributed in the interval (0, 1) is randomly generated. If If yes, the current solution and the current optimal continuation cost are accepted as the current optimal solution and the current optimal continuation cost value; otherwise, the original optimal solution and the optimal continuation cost value are maintained.

[0115] If yes, the iteration is ended, the current optimal solution and the current optimal continuation cost value are outputted, and the process goes to step ⑦, wherein the offset position matrix and the connection mode matrix in the current optimal solution represent the final offset processing result and the connection processing result respectively. Otherwise, the iteration number and the current temperature are updated, and the process returns to step ②. For example, the update formula is t0' = a*t0.

[0116] ⑦According to the current optimal solution and the current optimal continuation cost value, the offset result of the bus line network path is drawn to obtain the drawing result of the bus line path.

[0117] Optionally, in the embodiments of the present application, the simulated annealing algorithm for bus line network path offset optimization is improved by using strategies such as optimization of initial solution generation, optimization of neighborhood search range, and optimization of target function calculation object.

[0118] Specifically, the initial solution generation method of the offset position matrix is improved. For the bus line section data set S, first, the bus line section is sorted according to the bus line number attribute as the index, and then the initial solution of the offset position matrix X of the bus line section is generated according to the following rules.

[0119]

[0120] Wherein, max(X[:,j]) represents the maximum value of all values in the jth column of the offset position matrix X; min(X[:,j]) represents the minimum value of all values in the jth column of the offset position matrix X.

[0121] When the element u i,j in the matching relationship matrix U takes the value 0, it indicates that the bus line l i does not pass through the section r j , and the bus line section r i,j does not need to be offset; when u i,j takes the value 1, it indicates that the bus line section r i,j is offset to the right, and the offset position is located outside the maximum right offset position of the bus line section r j , that is, x i,j takes the maximum value of the current column of the offset matrix X plus 1; when u i,j takes the value -1, it indicates that the bus line section r i,j is offset to the left, and the offset position is located outside the maximum left offset position of the bus line section r j , that is, x i,jSubtract 1 from the minimum value of the current column of the offset matrix X. This is done by sorting the bus route segments and then pairing x one by one. ij Assigning values ​​ensures that the order of bus routes offset from each other on different road segments is consistent, preventing intersections during subsequent connections and improving the quality of the initial solution.

[0122] In this embodiment, the bus route number attributes of the bus route segments in the bus route segment dataset are sorted, and then the offset position of the bus route segment is set to be outside the outermost position of the current segment offset, so as to ensure that the order of bus route segments offset by any two bus routes on different road network segments is consistent.

[0123] Optionally, in the embodiments of this application, the above description can be used as a reference, considering only the two connection methods of interruption and connection for y. ij Assign values. For all elements in the bus route segment dataset, first determine whether the bus route segment intersects with its successor bus route segment. If they intersect, connect them by breaking the connection; otherwise, connect them by connecting the segments.

[0124] Optionally, in this embodiment, the neighborhood search range of the offset position variable is improved. The neighborhood search interval is narrowed, and the variable whose offset position is to be updated should satisfy the following conditions: two bus route segments are generated by offsetting from the same segment, and subsequent bus route segments are not generated by offsetting from the same segment. In this embodiment, the neighborhood search range of the offset position variable refers to the range of variables in the offset position matrix that determine the offset position to be updated.

[0125] Specifically, for different elements x in the j-th column of the offset matrix X i,j and x i',j Find the bus route segment r respectively i,j With r i',j Each connecting bus route segment r i,j' With r i',j” The offset position variable x to be updated i,j and x i',j The following conditions must be met:

[0126]

[0127] Where i, i' ∈ (1, 2, 3, ..., m), j, j', j” ∈ (1, 2, 3, ..., n). The above constraints represent the bus route l i With l i' All routes passed through j And the offset direction is the same, and the bus route l i On the route section r jThe following road segment r j' With bus route l i' On the route section r j The following road segment r j” Different, therefore, x i,j and x i',j Select the object to update as the offset position variable. This narrows the neighborhood search range, thus improving search speed.

[0128] Optionally, in this embodiment of the application, when exchanging the variable values ​​of two bus route segments in a certain column of the offset position matrix, if other columns in the offset position matrix also contain bus route segments corresponding to these two bus routes, then the positions of these bus route segments are also exchanged.

[0129] Specifically, for different elements x in the j-th column of the offset position matrix X i,j and x i',j When swapping variable values, if the elements in the i-th and i'-th rows of other columns in the offset position matrix X are all non-zero and have the same sign, then the variable values ​​of these elements in the i-th and i'-th rows are also swapped, indicating that the bus route l i With l i' At the same time, the offset positions of all bus routes along the route are swapped to ensure that the order of the offset positions of the bus routes corresponding to any two bus routes is consistent across different road segments, thus avoiding intersections.

[0130] Optionally, in this embodiment, the object of calculation for the objective function's connection cost can be improved. Specifically, when adjusting the offset position matrix X or the connection method matrix Y, only the connection cost ΔW of the currently adjusted bus route is calculated to obtain the current connection cost, thereby improving computational efficiency.

[0131] The technical solution provided in this application proposes a method for generating bus route segment datasets, offsetting and connecting bus route segments, and optimizing bus network path offset results. It also establishes a method for drawing bus network paths. Specifically, by acquiring vector data of the bus network and road network, and preprocessing and matching the bus network and road network data, a bus route segment dataset is generated. An improved simulated annealing algorithm is used to optimize the offset distance and connection method of bus route segments, obtaining bus network path offset results, which are then used to analyze the alignment and interrelationships of each bus route on the road network. The technical solution provided in this application can improve the representation effect of the bus network and enhance processing efficiency and accuracy.

[0132] The technical solution provided in this application can automatically adjust and optimize the offset position and connection method of each route in the bus network, improve the drawing efficiency and accuracy of bus network path offset, and provide support for the analysis of the current characteristics of the bus network and auxiliary decision-making.

[0133] The technical solutions provided by the embodiments of this application have the following advantages: 1) The results of drawing bus network paths have significant advantages in analyzing bus route directions and relationships between multiple bus lines, which is beneficial for judging existing bus characteristics and optimizing bus routes, and plays a significant role in improving the scientific nature of bus analysis; 2) The method of drawing bus network paths has strong reusability after changes in the existing bus network, reducing manual input and significantly improving production efficiency; 3) The spacing and thickness of bus network path offsets can be dynamically set based on the research scope, improving the convenience of analysis and visualization level of the results; 4) Using improved intelligent algorithms to solve complex problems improves search efficiency and result quality, which plays a significant role in improving the scientific nature of the analysis results.

[0134] Secondly, embodiments of this application also provide a device for drawing bus network routes.

[0135] Figure 2 This is a structural block diagram of a bus network route drawing device according to a preferred embodiment of this application. Figure 2 As shown, the drawing device includes an acquisition module 10, a matching module 20, an offset and connection module 30, and a generation module 40. The acquisition module 10 acquires bus network data and road network data. The matching module 20 matches the bus network data and road network data to determine the set of bus route segments traversed by each bus route in the bus network data, thereby determining the bus route segment dataset. The offset and connection module 30, for each bus route in the bus network data, offsets the bus route segments in the segment set according to the direction of travel of the bus route, and then connects the offset bus route segments. The generation module 40 generates the drawing result of the bus network path corresponding to the bus route data based on the connection cost of the bus route segment dataset, wherein the connection cost is determined based on the offset processing result and the connection processing result.

[0136] Optionally, based on the connection cost of the bus route segment dataset, the drawing result of the bus network path corresponding to the bus route data is generated, including: after completing the offset processing and connection processing, determining the connection cost based on the offset processing result and the connection processing result; if the preset conditions are not met, optimizing the offset processing and / or connection processing until the preset conditions are met; and generating the drawing result based on the final offset processing result and connection processing result.

[0137] Optionally, the final offset processing result and the final splicing processing result are determined based on a simulated annealing algorithm, and the preset condition includes that a current temperature reaches a preset minimum temperature or an iteration number reaches a preset maximum iteration number.

[0138] Optionally, for each bus line in the bus line network data, the bus line road segments in the road segment set are offset in the travel direction of the bus line, including: sequentially offseting the bus line road segments in the road segment set to the right in the travel direction of the bus line based on the travel direction of the bus line.

[0139] Optionally, the bus line road segment data set S is: Wherein, U is a matching relationship matrix, representing the matching relationship between the bus line network data and the road network data; wherein, R represents the road network data set, and the line elements included in the set R are represented as (r1, r2, r3,..., r n} and the line element r j represents a road segment r j ; n represents the number of road segments included in the road network data; wherein, the bus line network data set is L, and the line elements included in the set L are represented as (l1, l2, l3,..., lm) m} and the line element l i represents a bus line l i ; m represents the number of bus lines included in the bus line network data; wherein, u i,j ∈[-1, 0, 1], i ∈ (1, 2, 3,..., m), j ∈ (1, 2, 3,..., n); u i,j represents whether the bus line l i matches the road segment r j ; if the bus line l i matches the road segment r j and the road segment start point number of the road segment r j is the same as the matching start point number of the bus line l i matching road segment r j , then u i,j takes the value of 1; if the bus line l i matches the road segment r j and the road segment start point number of the road segment r j is different from the matching start point number of the bus line l i matching road segment r j , then u i,j takes the value of -1; if the bus line l i does not match the road segment r j , then u i,j takes the value of 0.

[0140] Optionally, the first bus route section data set S' after the offset processing is:

[0141]

[0142] wherein d represents a preset basic offset distance; wherein X represents an offset position matrix; x i,j represents an offset position of the bus route section r i,j .

[0143] Optionally, the second bus route section data set S'' after the connection processing is:

[0144]

[0145] wherein Y represents a connection mode matrix, y i,j represents a connection mode of the bus route section r i,j and the connected bus route section connected therewith; wherein C represents a connection section set, c i,j represents a connection section element of the bus route section r i,j and the connected bus route section connected therewith when the connection mode y i,j is taken; wherein y i,j *c i,j represents a change amount of the bus route section r i,j when the connection operation is taken.

[0146] Optionally, the calculation formula of the connection cost is: W = ∑ i,j (d*x i,j *r j +y i,j *c i,j ), wherein W represents the connection cost.

[0147] Optionally, the drawing device further comprises a preprocessing module configured to preprocess the bus line network data and the road network data before matching the bus line network data and the road network data.

[0148] The specific working principle and benefits of the drawing device provided by the embodiments of the present application are similar to those of the drawing method provided by the embodiments of the present application, and will not be repeated here.

[0149] In a third aspect, the embodiments of the present application further provide a drawing device for a bus line network path, which comprises a processor, a memory, and a program stored in the memory and capable of running on the processor, and the processor implements the drawing method described above when executing the program.

[0150] For example, the computer program can be divided into one or more modules stored in the memory and executed by the processor to accomplish the present application. The one or more modules can be a series of computer program instruction segments capable of accomplishing specific functions, which are used to describe the execution process of the computer program in the device.

[0151] The processor can be a central processing unit, and can also be other general-purpose processors, digital signal processors, application-specific integrated circuits, field programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The processor is the control center of the device, which connects various parts of the device through various interfaces and lines.

[0152] The memory can be used to store the computer program and / or modules, and the processor realizes various functions of the device by running or executing the computer program and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required for a function (such as data preprocessing, line network matching, bus trajectory offset, etc.), etc.; the data storage area can store data obtained externally (such as bus line data, road network data, etc.) and data generated by application program processing (such as bus line section data set, offset distance matrix, connection mode matrix, etc.). In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, for example, a hard disk, a memory, a plug-in hard disk, an intelligent memory card, at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0153] It should be noted that the device embodiments described above are only schematic, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. In addition, the connection relationship between the modules in the device embodiment provided by the present application indicates that there is a communication connection between them, which can be realized as one or more communication buses or signal lines. Those skilled in the art can understand and implement it without creative labor.

[0154] In a fourth aspect, the embodiments of the present application further provide a machine readable storage medium, which stores instructions for causing a machine to execute the drawing method described above.

[0155] Figure 3 Fig. 1 is a schematic diagram of a bus route network path according to a preferred embodiment of the present application. As shown, different bus routes are distinguished by color, which can represent the road network segments passed by the bus route network at a macro level, and can show the line position of different bus routes at a micro level. Figure 3

[0156] The above describes the preferred embodiments of the present application in detail, but the present application is not limited to the specific details of the above-described embodiments. Within the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application, and these simple modifications all belong to the protection scope of the present application.

[0157] In addition, it should be noted that each specific technical feature described in the above specific embodiments can be combined in any appropriate manner without contradiction. In order to avoid unnecessary repetition, the present application will not further describe various possible combinations.

[0158] In addition, various different embodiments of the present application can be combined in any manner, as long as it does not deviate from the idea of the present application, and it should be considered as disclosed content of the present application.​

Claims

1. A method of drawing a bus network path, characterized by, The drawing method comprises: obtaining bus line network data and road network data; matching the bus line network data and the road network data, determining a road section set of a bus route section that each bus route in the bus line network data passes through, to determine a bus route section data set; for each bus route in the bus line network data, performing offset processing on the bus route sections in the road section set according to the travel direction of the bus route, and performing connection processing on the offset bus route sections; generating a drawing result of a bus line network path corresponding to the bus route data based on a connection cost of the bus route section data set, wherein the connection cost is determined based on the offset processing result and the connection processing result; wherein generating a drawing result of a bus line network path corresponding to the bus route data based on a connection cost of the bus route section data set comprises: after completing the offset processing and the connection processing, determining the connection cost based on the offset processing result and the connection processing result; in the case where the preset condition is not met, optimizing the offset processing and / or the connection processing until the preset condition is met; generating the drawing result based on the final offset processing result and the connection processing result; wherein the final offset processing result and the connection processing result are determined based on a simulated annealing algorithm, and the preset condition comprises that the current temperature reaches a preset minimum temperature or the number of iterations reaches a preset maximum number of iterations.

2. The rendering method of claim 1, wherein, for each bus route in the bus line network data, performing offset processing on the bus route sections in the road section set according to the travel direction of the bus route, comprises: based on the travel direction of the bus route, sequentially offsetting the bus route sections in the road section set to the right according to the travel direction of the bus route.

3. The rendering method of claim 1 or 2, wherein, The bus route section data set S is: wherein U is a matching relationship matrix representing the matching relationship between the bus line network data and the road network data; Where R represents the road network dataset, and the line features contained in the dataset R are denoted as {r1, r2, r3, ..., r...} n }, line element r j Representative road segment r j ; n represents the number of road segments included in the road network data; Wherein, the bus line network data set is L, and line elements included in the set L are represented as {l1, l2, l3,..., ln} and the line element l m represents a bus line l i ; m represents the number of bus lines included in the bus line network data. i ; m represents the number of bus lines included in the bus line network data. wherein u i,j ∈[-1, 0, 1], i ∈ (1, 2, 3,..., m), j ∈ (1, 2, 3,..., n); u i,j characterizes the bus route l i whether the route segment r j is matched; if the bus route l i matches the route segment r j and the route segment start number of the route segment r j is the same as the matched start number of the bus route l i matching the route segment r j , then u i,j is 1; if the bus route l i matches the route segment r j and the route segment start number of the route segment r j is different from the matched start number of the bus route l i matching the route segment r j , then u i,j is -1; if the bus route l i does not match the route segment r j , then u i,j is 0.

4. The rendering method of claim 3, wherein, The first bus route section data set S' after offset processing is: wherein d represents a preset basic offset distance; wherein X represents a shift position matrix; x i,j represents a shift position of a bus route section r i,j . wherein i∈(1,2,3,...,m),j∈(1,2,3,...,n).

5. The rendering method of claim 4, wherein, The second bus route section data set S'' after connection processing is: where Y represents a transfer mode matrix; y i,j denotes a bus route section r i,j and a transfer mode of a transfer bus route section connected therewith; wherein C denotes a set of transfer link segments; c i,j denotes a bus route link r i,j and a transfer bus route link r i,j a transfer link segment element when performing a transfer wherein y i,j *c i,j denotes the bus route section r i,j the amount of change in which the increase or decrease occurs; wherein i∈(1,2,3,...,m),j∈(1,2,3,...,n).

6. The rendering method of claim 5, wherein, The calculation formula of the connection cost is: wherein W represents the connection cost.

7. The rendering method of claim 1, wherein, Before matching the bus line network data and the road network data, the drawing method further comprises: preprocessing the bus line network data and the road network data.

8. A bus network path drawing device, characterized by comprising: The drawing device comprises: an acquisition module configured to obtain bus line network data and road network data; a matching module configured to match the bus line network data and the road network data, determine a road section set of a bus route section that each bus route in the bus line network data passes through, to determine a bus route section data set; The offset connection module is configured to, for each bus line in the bus line network data, offset the bus line sections in the bus line section set according to the traveling direction of the bus line, and connect the offset bus line sections; The generating module is configured to generate a drawing result of the bus line network path corresponding to the bus line data based on a connection cost of the bus line section data set, wherein the connection cost is determined based on the offset processing result and the connection processing result; The generating module is configured to generate a drawing result of the bus line network path corresponding to the bus line data based on a connection cost of the bus line section data set, wherein the connection cost is determined based on the offset processing result and the connection processing result; After the offset processing and the connection processing are completed, the connection cost is determined based on the offset processing result and the connection processing result; In the case where the preset condition is not met, the offset processing and / or the connection processing is optimized until the preset condition is met; The drawing result is generated based on the final offset processing result and the connection processing result; The final offset processing result and the connection processing result are determined based on the simulated annealing algorithm, and the preset condition includes that a current temperature reaches a preset minimum temperature or an iteration number reaches a preset maximum iteration number.

9. A bus network path drawing device, characterized by comprising: The drawing device includes a processor, a memory, and a program stored on the memory and capable of running on the processor, and the processor implements the drawing method in any one of claims 1 to 7 when executing the program.

10. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores instructions for causing a machine to perform the drawing method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Road network and public transport network matching method and system

    CN113609241A

  • Urban bus route network drawing method and device

    CN113689516A