CN112069280A - Road data processing method, device, equipment and storage medium - Google Patents

Road data processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN112069280A
CN112069280A CN202010926683.9A CN202010926683A CN112069280A CN 112069280 A CN112069280 A CN 112069280A CN 202010926683 A CN202010926683 A CN 202010926683A CN 112069280 A CN112069280 A CN 112069280A
Authority
CN
China
Prior art keywords
road
point
lines
line
tail
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010926683.9A
Other languages
Chinese (zh)
Inventor
江黄波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202010926683.9A priority Critical patent/CN112069280A/en
Publication of CN112069280A publication Critical patent/CN112069280A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling

Abstract

The invention relates to the technical field of big data, and provides a road data processing method, a road data processing device, road data processing equipment and a road data processing storage medium, wherein the method comprises the following steps: acquiring first road data of a target road to be analyzed on a navigation map, wherein the first road data is a road marked with a name on the navigation map and comprises a plurality of lines for forming the road, and each line has a head point, a tail point and road attributes; splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections; acquiring intersections between target roads; according to the method, a plurality of road sections are split according to the intersection points to generate a target road section, line objects with the same traffic behavior attribute are combined into one road object for analysis by the target road section, the attribute corresponding to the line is not repeated, the data volume can be effectively reduced, and the analysis efficiency and accuracy are improved. In addition, the invention also relates to a block chain technology, and the road data and the analysis result can be stored in the block chain.

Description

Road data processing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of big data technologies, and in particular, to a road data processing method, apparatus, device, and storage medium.
Background
The mobile internet brings the map derived from the position into full play, the traffic behavior implied in the data of the electronic navigation map used by the user has great mining value, and the user behavior data can be analyzed only based on the basic data of the navigation map. The data structure is divided based on application scenes convenient for navigation, for example, a large road is divided into a plurality of lines according to navigation requirements (such as turning, lane change, trans-regional trans-provincial crossing and the like can be disconnected), points comprise the head and tail points of the lines or a plurality of broken line points are arranged on one line with irregular bending, so that a straight line is formed by connecting the head and the tail points, a bent line is formed by connecting a plurality of points, and the road is formed by the lines. However, in the traffic behavior analysis, the division of lines is too fine, and when a line in the road data is directly used as a basic analysis target, many targets having the same traffic behavior attribute are generated, which results in data redundancy and resource waste.
Disclosure of Invention
The invention provides a road data processing method, a device, equipment and a storage medium, which can combine line objects with the same traffic behavior attribute into one road object for analysis, ensure that the attributes corresponding to the line are not repeated, effectively reduce the data volume and improve the analysis efficiency and accuracy.
To achieve the above object, the present invention provides a road data processing method, including:
acquiring first road data of a target road to be analyzed on a navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections;
acquiring intersections between the target roads;
and splitting the plurality of road sections according to the intersection points to generate a target road section.
Optionally, the road attribute comprises at least one of: national road, provincial road, expressway, county road, lane number, speed limit level and the code of the provincial and urban area where the line is located.
Optionally, before the step of splicing the lines with the same road attribute according to the head point and the tail point thereof to generate the plurality of road segments, the method further includes:
collecting lines on each target road to generate a first line set;
sorting all lines in the first line set along the road direction of a target road to obtain a sorted second line set; wherein the road orientation is a direction in which the vehicle travels along the road;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections, specifically:
and splicing the head points or the tail points with the same longitude and latitude of the lines in the sorted second line set according to the road attributes to generate a plurality of road sections.
Optionally, the lines in the second line set are spliced with the head points or the tail points with the same longitude and latitude according to the road attributes to generate a plurality of road segments, specifically:
defining a doubly linked list and selecting an unmatched line from said second set of lines;
and matching the lines with other lines in the second line set in a one-to-one correspondence manner based on a doubly linked list, and sequentially splicing head points or tail points with the same longitude and latitude according to the road attributes to generate a plurality of road sections.
Optionally, the obtaining of the intersection between the target road segments specifically includes:
splitting lines forming the road section based on a head point and a tail point, and acquiring a head point coordinate and a tail point coordinate of each line;
generating a point set according to the head point coordinates and the tail point coordinates of each line;
combining the points in the point set according to the coordinates of the points to obtain the occurrence frequency of each point;
acquiring intersections between the target road sections according to the occurrence times of each point; wherein the intersection is a point having a number of occurrences greater than two.
Optionally, judging whether the line where the head point or the tail point in the point set is located is more than two lines;
when the line where the head point or the tail point is located is judged to be more than two lines, the head point or the tail point is a cross point;
and when the line where the head point or the tail point is located is judged to be not more than two lines, the head point or the tail point is not the intersection point.
Optionally, the method further comprises:
acquiring second road data of a target road to be analyzed on the navigation map, wherein the second road data is a road without a marked name on the navigation map and comprises a plurality of lines for forming the road without the marked name, and each line has a head point, a tail point and a lane number attribute;
aggregating to generate an area line set according to the attribute of the province or the city where the line on the road without the name in the second road data is located;
splicing the lines in the area line set according to the head point and the tail point of the lines to generate a plurality of road sections;
and merging the lines with the same attribute in the road section to generate the target road section.
The present invention also provides a road data processing apparatus, comprising:
the road data acquisition module is used for acquiring first road data of a target road to be analyzed on the navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
the multi-road-segment generating module is used for splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road segments;
the intersection acquisition module is used for acquiring intersections among the target roads;
and the target road section generation module is used for splitting the plurality of road sections according to the intersection points so as to generate the target road section.
The present invention also provides an electronic device, including a memory and a processor, where the memory stores a road data processing program operable on the processor, and the road data processing program, when executed by the processor, implements the following steps:
acquiring first road data of a target road to be analyzed on a navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections;
acquiring intersections between the target roads;
and splitting the plurality of road sections according to the intersection points to generate target road sections.
Optionally, the road attribute comprises at least one of: national road, provincial road, expressway, county road, lane number, speed limit level and the code of the provincial and urban area where the line is located.
Optionally, before the step of splicing the lines with the same road attribute according to the head point and the tail point thereof to generate the plurality of road segments, the method further includes:
collecting lines on each target road to generate a first line set;
sorting all lines in the first line set along the road direction of a target road to obtain a sorted second line set; wherein the road orientation is a direction in which the vehicle travels along the road;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections, specifically:
and splicing the head points or the tail points with the same longitude and latitude of the lines in the sorted second line set according to the road attributes to generate a plurality of road sections.
Optionally, the obtaining of the intersection between the target road segments specifically includes:
splitting lines forming the road section based on a head point and a tail point, and acquiring a head point coordinate and a tail point coordinate of each line;
generating a point set according to the head point coordinates and the tail point coordinates of each line;
combining the points in the point set according to the coordinates of the points to obtain the occurrence frequency of each point;
acquiring intersections between the target road sections according to the occurrence times of each point; wherein the intersection is a point having a number of occurrences greater than two.
Further, to achieve the above object, the present invention also provides a computer-readable storage medium including a storage data area storing data created according to use of a block chain node and a storage program area storing a computer program, characterized in that the computer program realizes the road data processing method as described above when executed by a processor.
The road data processing method, the device, the equipment and the storage medium provided by the invention configure the road attribute for the given line through the road where the given line is located, splice the head point and the tail point of the line with the same road attribute to generate a plurality of road sections, then find out the cross points in the plurality of road sections, finally split the plurality of road sections based on the cross points to merge the same road attribute line in the navigation map basic road data into the road section object, ensure that the attribute corresponding to the line is not repeated, thereby only needing to analyze the road section object of the section, effectively reducing the data volume, improving the processing speed, avoiding the calculation redundancy and improving the analysis efficiency and the accuracy.
Drawings
Fig. 1 is a schematic flow chart of a road data processing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present invention;
fig. 3 is a block diagram of a road data processing program in an electronic device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The execution subject of the road data processing method provided by the embodiment of the present application includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the road data processing method may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The server includes but is not limited to: the system comprises a single server, a server cluster, a cloud server cluster and the like.
The invention provides a road data processing method. Fig. 1 is a schematic flow chart of a road data processing method according to an embodiment of the present invention. The method may be performed by a device, which may be implemented by software and/or hardware, in particular the road data processing method may be performed by an electronic device, in particular by one or more processors within the electronic device.
In this embodiment, the road data processing method includes:
s101, acquiring first road data of a target road to be analyzed on a navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, and each line has a head point, a tail point and road attributes.
In the present embodiment, since a road is composed of lines, a plurality of lines where roads overlap appear, and therefore, a line where a plurality of roads overlap is found by arranging road attribute lines for the lines according to the road where the line is located. Wherein the road attribute includes at least one of the following: national road, provincial road, expressway, county road, lane number, speed limit grade and the code of the provincial and urban area where the line is located; for example, national G101 is composed of (l)1、l2、l3、l4) Composition l1Number of lanes of 5, l2The number of lanes is 3, l3Has a lane number of 4, l4Number of lanes of 2, lane-saving S202 is composed of (l)5、l3、l6) Composition l5The number of lanes is 4, l3Has a lane number of 4, l6The number of lanes of is 2, then l1The road attribute of (1) is G101 national road + the number of lanes is 5, then l3Includes a G101 national road + the number of lanes is 4, and a S202 province road + the number of lanes is 4, which includes two road attributes according to the road on which the line is located.
It should be noted that each line in the navigation map has a unique identifiable identification number, and preferably, in this embodiment, each line in the navigation map is used as an identification number through a character string formed by numbers, and the identification number of the numbers is readable, convenient to search and convenient to operate, so long as the identification number of each line is ensured to be unique. Of course, it is understood that the identification code identifier may also be a two-dimensional code, a bar code, an identifiable graphic code that records data symbol information on a plane in a black-and-white pattern according to a certain rule by using a specific geometric figure, or a character string representation composed of numbers, and the like, and the present invention is not limited in particular.
And S102, splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections.
In this embodiment, because the data of the overlapped lines is too much, if all the lines are directly analyzed, the data is too much, useless data is processed, and the problems of resource waste, low processing speed, calculation redundancy and the like are caused, therefore, after a plurality of road segments (intermediate segments) are generated by splicing the head points and the tail points of the lines with the same road attributes, analysis is performed, but in the splicing process, because a plurality of lines are connected together to form a ring in a road and each line in a navigation map has a unique identifiable identification number, a plurality of lines with different splicing orders appear on the lines in the same segment of the road segment, and therefore, in order to ensure that the segment of the same segment is not affected by the splicing order, all the lines of each road segment need to be sequenced and then spliced.
Specifically, the step S102 performs the following steps:
s1021, collecting lines on each target road to generate a first line set;
s1022, sequencing all lines in the first line set along the driving direction of the target road to obtain a second line set after sequencing; wherein the road orientation is a direction in which the vehicle travels along the road;
s1023, splicing the lines in the sorted line set according to the head points or the tail points with the same road attributes and the same longitude and latitude to generate a plurality of road sections;
wherein, after the lines on each target road which is not ordered are supposed to be gathered, a first line set with the line set { a, B, c, d, f, e.. N } is generated, a line such as B is randomly taken out from the first line set, then lines except B are sequentially selected from the first line set, and are sequentially compared with the road attributes of the head and tail points of B, and the lines with the same road attributes are spliced with B, the 6 lines of abcdef form a ring, a can be connected with f, if the line is randomly selected for the first time, the last generated line segment is abcdef, if the line is randomly selected for the first time, the last generated line segment is fedcba, the two line segments are the same line segment, but when data processing is carried out, the two line segments are difficult to judge that the two line segments are the same by using a program stored in a character string, therefore, after the line sets are ordered, therefore, whether a or f is selected first, the generated road section is ensured to be abcdef at last, and fedcba does not occur (namely, the generated road section is only abcdef no matter which one of a-f is selected first), so as to ensure that the road sections generated for the same road section are the same each time. Specifically, the sorting mode may be set according to an actual situation, for example, sorting according to the size of the identification code, and the like, which is not described herein again.
It should be noted that the S1023 further includes the following steps:
the first step is as follows: defining a doubly linked list and selecting an unmatched line from said second set of lines;
the second step is that: and matching the lines with other lines in the second line set in a one-to-one correspondence manner based on a doubly linked list, and sequentially splicing head points or tail points with the same longitude and latitude according to the road attributes to generate a plurality of road sections.
Specifically, the method comprises the following steps: the method is realized by self-defining a UDF function connected by a line, defining a two-way linked list, taking out a line object a from a road, matching a with other lines in the road one by one, splicing the lines together when the road attributes are the same and the longitude and latitude of the head point or the tail point are the same, and taking out the spliced line segment as a plurality of road sections when the line meeting the conditions cannot be found through circular connection. The definition method of the head and tail points of the line can be as follows: 1. according to a one-way passing line on a navigation map, a direction from a head point to a tail point is defined as a forward direction, and the direction is the same as the passing direction of the line in reality, for example: the direction of a line in reality points from the left, if the line is marked to be in the forward direction on the map, the left side is a head point, and if the line is marked to be in the reverse direction, the left side is a tail point, and the right side is a head point; 2. if the line is bidirectional or does not know whether the line is unidirectional or bidirectional, the head and tail points on the map randomly take the head and tail of the line.
And S103, acquiring the intersection between the target roads.
And S104, splitting the plurality of road sections according to the intersection points to generate target road sections.
In this embodiment, since the plurality of road segments do not divide the intersection between roads, the road segments cannot be accurately analyzed in the plurality of road segments of the line with a plurality of road attributes, for example, at an intersection, a provincial road branches into national roads, and at this position, along the direction of the road, the traffic conditions of the provincial road and the national roads at the next road segment of the intersection change (for example, after passing through the intersection, the road attributes change, such as the traffic volume and the number of lanes change), that is, the roads in S103 and S104, the roads in S105 and G108, the roads in G101 and G102 all have intersection, and the intersection is the place where such different roads intersect. Therefore, it is necessary to split a plurality of road segments (middle segments) into different segment objects by finding an intersection so as to be able to correctly analyze the situation of a specific segment (if the entire plurality of road segments (middle segments) are analyzed, the traffic attribute of the specific segment cannot be accurately acquired).
Specifically, the step S103 further includes the steps of:
s1031, splitting lines forming the road section based on a head point and a tail point, and acquiring a head point coordinate and a tail point coordinate of each line;
s1032, generating a point set according to the head point coordinates and the tail point coordinates of each line;
s1033, combining the points in the point set according to the coordinates of the points to obtain the occurrence frequency of each point;
s1034, acquiring intersections among the target road sections according to the occurrence times of each point; wherein the intersection is a point having a number of occurrences greater than two.
In this embodiment, it is further determined whether a line on which a head point or a tail point in the point set is located is more than two lines, and when it is determined that the line on which the head point or the tail point is located is more than two lines, the head point or the tail point is a cross point; and when the line where the head point or the tail point is located is judged to be not more than two lines, the head point or the tail point is not the intersection point. For example, assume all lines on all roads are l1、l2、l3And l4Including five points, i, a, b, c, d and e1The head and tail points of (a) and (b), l2The head and tail points of (1) are c and b, l3D and b, and d and e for l4, the point set of a points is { a, l1The point set of points b, l is { b, l }1,l2,l3The point set of points c is { c, l }2The point set of points d is { d, l }3,l4The point set of e points is { e, l }4},Therefore, if the number of lines corresponding to the point b is more than two, the point b is crossed by at least 3 lines, so that the point b is a cross point, and the place corresponding to the real road cross point is a fork.
In addition to the above embodiments, in a preferred embodiment of the present invention, warning indications may be provided for vehicles traveling on multiple road overlapping lines, so as to avoid danger caused by more vehicles traveling on multiple road overlapping lines than on one road.
In an embodiment of the present invention, the road data and the analysis result may be stored in a node of the block chain.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method further includes:
acquiring second road data of a target road to be analyzed on the navigation map, wherein the second road data is a road without a marked name on the navigation map and comprises a plurality of lines for forming the road without the marked name, and each line has a head point, a tail point and a lane number attribute;
aggregating to generate an area line set according to the attribute of the province or the city where the line on the road without the name in the second road data is located;
splicing the lines in the area line set according to the head point and the tail point of the lines to generate a plurality of road sections;
and merging the lines with the same attribute in the road section to generate the target road section.
Specifically, lines on a road without a road name are small roads without a more formal name, the lines are merged according to provincial and urban areas to which the lines belong, the lines in each area are connected together to generate a road section if the road attributes of the number of lanes are the same, the lines are not independently used as a road section, the implementation manner of the lines is the same as that of the method, then the lines with the same lane number attribute in the basic road data of the navigation map are merged into a target road section, and then all the target road sections generate a non-repetitive id.
The road data processing method, the device, the equipment and the storage medium provided by the invention configure the road attribute for the given line by the road where the given line is located, splice the head point and the tail point of the line with the same road attribute to generate a plurality of road sections (middle sections), then find out the cross points in the plurality of road sections (middle sections), finally split the plurality of road sections (middle sections) based on the cross points to merge the same road attribute line in the navigation map basic road data into the road section object, ensure that the attributes corresponding to the line are not repeated, thereby only needing to analyze the road section object of the section, effectively reducing the data volume, improving the processing speed, avoiding the calculation redundancy and improving the analysis efficiency and the accuracy.
The invention also provides electronic equipment and the electronic equipment 1. Fig. 2 is a schematic diagram of an internal structure of an electronic device according to an embodiment of the present invention.
In this embodiment, the electronic device 1 may be a computer, an intelligent terminal or a server. The electronic device 1 comprises at least a memory 11, a processor 13, a communication bus 15 and a network interface 17. In this embodiment, the electronic device 1 is an intelligent terminal.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of the road data processing program 111, but also to temporarily store data that has been output or is to be output.
The processor 13 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for executing program codes stored in the memory 11 or Processing data.
The communication bus 15 is used to realize connection communication between these components.
The network interface 17 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), and is typically used to establish a communication link between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface may further comprise a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
While FIG. 2 shows only the electronic device 1 with components 11-17, those skilled in the art will appreciate that the configuration shown in FIG. 2 does not constitute a limitation of the electronic device, and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
In the embodiment of the electronic device 1 shown in fig. 2, a road data processing program 111 is stored in the memory 11; the processor 13 implements the following steps when executing the road data processing program 111 stored in the memory 11:
furthermore, an embodiment of the present invention also provides a computer-readable storage medium, on which a road data processing program 111 is stored, which is executable by one or more processors to implement the following operations:
acquiring first road data of a target road to be analyzed on a navigation map; wherein the first road data includes a plurality of lines for constituting a road, each line having a head point, a tail point, and a road attribute.
And splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections.
And acquiring the intersection between the target roads.
And splitting the plurality of road sections according to the intersection points to generate a target road section.
In the present embodiment, since a road is composed of lines, a plurality of lines where roads overlap appear, and therefore, a line where a plurality of roads overlap is found by arranging road attribute lines for the lines according to the road where the line is located. Wherein the road attribute comprises at least one of: national road, provincial road, expressway, county road, lane number, speed limit grade and the code of the provincial and urban area where the line is located; for example, national G101 is composed of (l)1、l2、l3、l4) Composition l1Number of lanes of 5, l2The number of lanes is 3, l3Has a lane number of 4, l4Number of lanes of 2, lane-saving S202 is composed of (l)5、l3、l6) Composition l5The number of lanes is 4, l3Has a lane number of 4, l6The number of lanes of is 2, then l1The road attribute of (1) is G101 national road + the number of lanes is 5, then l3Includes a G101 national road + the number of lanes is 4, and a S202 province road + the number of lanes is 4, which includes two road attributes according to the road on which the line is located.
It should be noted that each line in the navigation map has a unique identifiable identification number, and preferably, in this embodiment, each line in the navigation map is used as an identification number through a character string formed by numbers, and the identification number of the numbers is readable, convenient to search and convenient to operate, so long as the identification number of each line is ensured to be unique. Of course, it is understood that the identification code identifier may also be a two-dimensional code, a bar code, an identifiable graphic code that records data symbol information on a plane in a black-and-white pattern according to a certain rule by using a specific geometric figure, or a character string representation composed of numbers, and the like, and the present invention is not limited in particular.
In this embodiment, since the data of the overlapped lines is too much, if all the lines are analyzed directly, the data is too much and useless data is processed, which causes problems of resource waste, slow processing speed, calculation redundancy, etc., therefore, by requiring the joining of the head and tail points of the lines having the same road attribute to generate a plurality of road segments (intermediate segments), analysis is performed, but during the joining, because a plurality of lines in a road are connected together to form a ring and each line in a navigation map has a unique identifiable identification number, the lines in the road section of the same section have a plurality of lines in different splicing sequences, therefore, in order to ensure that the road segments of the same segment are not affected by the splicing sequence, all lines of each road need to be sorted and then spliced, and specifically, the lines on each target road are gathered to generate a first line set; sequencing all lines in the first line set along the driving direction of a target road to obtain a second line set after sequencing; and finally, splicing the lines in the sorted line set according to the head points or the tail points with the same road attributes and the same longitude and latitude to generate a plurality of road sections (middle sections). For example, assuming that a line set which is not sorted is { a, B, c, d, f, e.. N }, randomly taking a line such as B out of the line set, sequentially selecting lines except B from the line set, sequentially comparing the line with the road attributes of the head and tail points of B, splicing the lines with the same road attributes with B, assuming that 6 lines of abcdef form a ring, a can be connected with f, if a is randomly selected for the first time, the last generated road segment is abcdef, if f is randomly selected for the first time, the last generated road segment is fedcba, the two road segments are the same road segment, but in data processing, because the two road segments are both difficult to judge that the two road segments are the same by a program stored in a character string, after the line set is sorted, the last generated road segment can be guaranteed to be abcdef regardless of whether a or f is selected for the first time, the fedcba does not appear (i.e. the generated road segment is only abcdef regardless of which one of a-f is selected first), so as to ensure that the road segment generated for the same road segment is the same each time. Specifically, the sorting mode may be set according to an actual situation, for example, sorting according to the size of the identification code, and the like, which is not described herein again.
It should be noted that, the lines in the sorted line set are spliced according to the head point or the tail point with the same road attribute and the same longitude and latitude to generate a plurality of road segments (middle segments), which specifically includes: the method is realized by self-defining a UDF function connected by a line, defining a two-way linked list, taking out a line object a from a road, matching a with other lines in the road one by one, splicing the lines together when the road attributes are the same and the longitude and latitude of the head point or the tail point are the same, and taking out the spliced line segment as a plurality of road segments (middle segments) when the line meeting the conditions cannot be found through circular connection. The definition method of the head and tail points of the line can be as follows: 1. according to a one-way passing line on a navigation map, a direction from a head point to a tail point is defined as a forward direction, and the direction is the same as the passing direction of the line in reality, for example: the direction of a line in reality points from the left, if the line is marked to be in the forward direction on the map, the left side is a head point, and if the line is marked to be in the reverse direction, the left side is a tail point, and the right side is a head point; 2. if the line is bidirectional or does not know whether the line is unidirectional or bidirectional, the head and tail points on the map randomly take the head and tail of the line.
In addition, since the multiple road segments (middle segments) do not divide the intersection between roads, the road segments cannot be accurately analyzed in the multiple road segments (middle segments) of the line with multiple road attributes, for example, at an intersection, a province road branches into national roads, and at the position, the traffic conditions of the province road and the national roads at the next road segment of the intersection along the direction of the road change (for example, after the intersection is passed, the road attributes change, such as the traffic flow and the number of lanes change), that is, the roads in S103 and S104, the roads in S105 and G108, and the roads in G101 and G102 all have intersection, whereThe place where such different roads intersect is an intersection. Therefore, it is necessary to split a plurality of road segments (middle segments) into different segment objects by finding an intersection so as to be able to correctly analyze the situation of a specific segment (if the entire plurality of road segments (middle segments) are analyzed, the traffic attribute of the specific segment cannot be accurately acquired), specifically: splitting lines forming the road section based on a head point and a tail point, and acquiring a head point coordinate and a tail point coordinate of each line; generating a point set according to the head point coordinates and the tail point coordinates of each line; combining the points in the point set according to the coordinates of the points to obtain the occurrence frequency of each point; acquiring intersections between the target road sections according to the occurrence times of each point; the intersection is a point with the occurrence frequency more than twice, whether a line where a head point or a tail point in the point set is located is more than two lines is judged, and when the line where the head point or the tail point is located is judged to be more than two lines, the head point or the tail point is the intersection; and when the line where the head point or the tail point is located is judged to be not more than two lines, the head point or the tail point is not the intersection point. For example, assume all lines on all roads are l1、l2、l3And l4Including five points, i, a, b, c, d and e1The head and tail points of (a) and (b), l2The head and tail points of (1) are c and b, l3D and b, and d and e for l4, the point set of a points is { a, l1The point set of points b, l is { b, l }1,l2,l3The point set of points c is { c, l }2The point set of points d is { d, l }3,l4The point set of e points is { e, l }4Therefore, if the line corresponding to the point b is more than two, b is intersected by at least 3 lines, so that b is an intersection point, and the place corresponding to the actual road intersection point is a fork.
The warning prompt can be carried out on the vehicles running on the multiple road superposition lines, so that the danger caused by more vehicles running on the multiple road superposition lines than on one road can be avoided.
On the basis of the above embodiment, in a preferred embodiment of the present invention, the method further comprises the steps of obtaining second road data of a target road to be analyzed on the navigation map; the first road data is a target road with a name on a navigation map; the second road data is a target road without a name on the navigation map;
aggregating the lines of roads without names on the navigation map according to the attributes of provinces or urban areas where the lines are located to generate an area line set;
and splicing the lines in the regional line set according to the attributes with the same number of lanes so as to combine the lines with the same attributes to generate the target road section.
Specifically, the lines on the road without the road name are the minor roads without the more formal names, the merging mode of the lines is to aggregate the lines according to the provincial and urban areas to which the lines belong, if the road attributes of the number of lanes of the lines in each area are the same, the lines are connected together to generate a road section, and if the road attributes of the number of lanes of the lines are not the same, the lines are independently used as a road section, and the implementation mode of the method is the same as that of the method.
The road data processing method, the device, the equipment and the storage medium provided by the invention configure the road attribute for the given line by the road where the given line is located, splice the head point and the tail point of the line with the same road attribute to generate a plurality of road sections (middle sections), then find out the cross points in the plurality of road sections (middle sections), finally split the plurality of road sections (middle sections) based on the cross points to merge the same road attribute line in the navigation map basic road data into the road section object, ensure that the attributes corresponding to the line are not repeated, thereby only needing to analyze the road section object of the section, effectively reducing the data volume, improving the processing speed, avoiding the calculation redundancy and improving the analysis efficiency and the accuracy.
Referring to fig. 3, an embodiment of the present invention further provides a road data processing apparatus, including:
the road data acquisition module 10 is used for acquiring first road data of a target road to be analyzed on a navigation map; wherein the first road data includes a plurality of lines for constituting a road, each line having a head point, a tail point, and a road attribute.
The multiple road segment generating module 20 is configured to splice lines with the same road attribute according to the head point and the tail point of the lines, so as to generate multiple road segments.
And an intersection acquiring module 30, configured to acquire an intersection between the target roads.
And the target road segment generating module 40 is configured to split the plurality of road segments according to the intersection points to generate a target road segment.
Furthermore, an embodiment of the present invention also provides a computer-readable storage medium, where a road data processing program 111 is stored on the computer-readable storage medium, where the road data processing program 111 is executable by one or more processors to implement the following operations:
acquiring first road data of a target road to be analyzed on a navigation map; wherein the first road data includes a plurality of lines for constituting a road, each line having a head point, a tail point, and a road attribute.
And splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections.
And acquiring the intersection between the target roads.
And splitting the plurality of road sections according to the intersection points to generate a target road section.
Embodiments of the computer-readable storage medium of the present invention are substantially the same as the embodiments of the electronic device and method described above, and will not be described herein in detail.
Alternatively, in other embodiments, the road data processing program 111 may be further divided into one or more modules, and the one or more modules are stored in the memory 11 and executed by one or more processors (in this embodiment, the processor 13) to implement the present invention, where the module referred to in the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is used for describing the execution process of the road data processing program in the electronic device.
For example, referring to fig. 3, which is a schematic diagram of program modules of the road data processing program 111 in an embodiment of the electronic device of the present invention, in this embodiment, the road data processing program 111 may be divided into a road data acquiring module 10, a plurality of road segment generating modules 20, an intersection acquiring module 30, and a target road segment generating module 40, exemplarily:
the road data acquisition module 10 is used for acquiring first road data of a target road to be analyzed on a navigation map; wherein the first road data includes a plurality of lines for constituting a road, each line having a head point, a tail point, and a road attribute.
The multiple road segment generating module 20 is configured to splice lines with the same road attribute according to the head point and the tail point of the lines, so as to generate multiple road segments.
And an intersection acquiring module 30, configured to acquire an intersection between the target roads.
And the target road segment generating module 40 is configured to split the plurality of road segments according to the intersection points to generate a target road segment.
The functions or operation steps implemented by the program modules such as the road data obtaining module 10, the multiple road segment generating module 20, the intersection obtaining module 30, and the target road segment generating module 40 when executed are substantially the same as those of the above embodiments, and are not described herein again.
It should be noted that the above-mentioned numbers of the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments. And the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method of road data processing, comprising:
acquiring first road data of a target road to be analyzed on a navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections;
acquiring intersections between the target roads;
and splitting the plurality of road sections according to the intersection points to generate a target road section.
2. The road data processing method according to claim 1, wherein the road attribute includes at least one of: national road, provincial road, expressway, county road, lane number, speed limit level and the code of the provincial and urban area where the line is located.
3. The road data processing method according to claim 1 or 2, wherein, before the step of generating the plurality of road segments by splicing lines having the same road attribute according to the head point and the tail point thereof, the method further comprises:
collecting lines on each target road to generate a first line set;
sorting all lines in the first line set according to the road direction of the target road to obtain a second line set after sorting, wherein the road direction is the direction of the vehicle running along the road;
and splicing the head points or the tail points with the same longitude and latitude of the lines in the second line set according to the road attributes to generate a plurality of road sections.
4. The road data processing method of claim 3, wherein the lines in the second line set are spliced with the head points or the tail points with the same longitude and latitude according to the road attributes to generate a plurality of road segments, specifically:
defining a doubly linked list and selecting an unmatched line from said second set of lines;
and matching the lines with other lines in the second line set in a one-to-one correspondence manner based on a doubly linked list, and sequentially splicing head points or tail points with the same longitude and latitude according to the road attributes to generate a plurality of road sections.
5. The road data processing method according to claim 1, wherein the acquiring of the intersection between the target road segments includes:
splitting lines forming the road section based on a head point and a tail point, and acquiring a head point coordinate and a tail point coordinate of each line;
generating a point set according to the head point coordinates and the tail point coordinates of each line;
combining the points in the point set according to the coordinates of the points to obtain the occurrence frequency of each point;
and acquiring the intersection between the target road sections according to the occurrence times of each point, wherein the intersection is a point with the occurrence times more than two.
6. The road data processing method according to claim 5, further comprising:
judging whether the line where the head point or the tail point in the point set is located is more than two lines or not;
when the line where the head point or the tail point is located is judged to be more than two lines, the head point or the tail point is a cross point;
and when the line where the head point or the tail point is located is judged to be not more than two lines, the head point or the tail point is not the intersection point.
7. The road data processing method according to claim 1, characterized in that the method further comprises:
acquiring second road data of a target road to be analyzed on the navigation map, wherein the second road data is a road without a marked name on the navigation map and comprises a plurality of lines for forming the road without the marked name, and each line has a head point, a tail point and a lane number attribute;
aggregating to generate an area line set according to the attribute of the province or the city where the line on the road without the name in the second road data is located;
splicing the lines in the area line set according to the head point and the tail point of the lines to generate a plurality of road sections;
and merging the lines with the same attribute in the road section to generate the target road section.
8. A road data processing apparatus, comprising:
the road data acquisition module is used for acquiring first road data of a target road to be analyzed on the navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
the multi-road-segment generating module is used for splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road segments;
the intersection acquisition module is used for acquiring intersections among the target roads;
and the target road section generation module is used for splitting the plurality of road sections according to the intersection points so as to generate the target road section.
9. An electronic device comprising a memory and a processor, the memory having stored thereon a road data processing program operable on the processor, the road data processing program when executed by the processor implementing the steps of:
acquiring first road data of a target road to be analyzed on a navigation map; the first road data is a road marked with a name on the navigation map, and comprises a plurality of lines for forming the road, wherein each line has a head point, a tail point and road attributes;
splicing the lines with the same road attribute according to the head point and the tail point of the lines to generate a plurality of road sections;
acquiring intersections between the target roads;
and splitting the plurality of road sections according to the intersection points to generate target road sections.
10. A computer-readable storage medium comprising a storage data area storing data created according to use of a blockchain node and a storage program area storing a computer program, characterized in that the computer program realizes the road data processing method according to any one of claims 1 to 7 when executed by a processor.
CN202010926683.9A 2020-09-04 2020-09-04 Road data processing method, device, equipment and storage medium Pending CN112069280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010926683.9A CN112069280A (en) 2020-09-04 2020-09-04 Road data processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010926683.9A CN112069280A (en) 2020-09-04 2020-09-04 Road data processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112069280A true CN112069280A (en) 2020-12-11

Family

ID=73662941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010926683.9A Pending CN112069280A (en) 2020-09-04 2020-09-04 Road data processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112069280A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112732859A (en) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 Prompt information generation method and device, electronic equipment and storage medium
CN112733078A (en) * 2020-12-29 2021-04-30 武汉中海庭数据技术有限公司 Method and device for smoothly connecting multiple lines among multiple road segments of crowdsourced data
CN112789619A (en) * 2020-12-31 2021-05-11 华为技术有限公司 Simulation scene construction method, simulation method and device
CN114049327A (en) * 2021-11-16 2022-02-15 中国测绘科学研究院 Improved large-range road center line block extraction algorithm
CN114419145A (en) * 2022-03-29 2022-04-29 腾讯科技(深圳)有限公司 Road element labeling method, device, equipment and storage medium
CN114577225A (en) * 2022-04-28 2022-06-03 北京百度网讯科技有限公司 Map drawing method and device, electronic equipment and storage medium
CN115240429A (en) * 2022-08-11 2022-10-25 深圳市城市交通规划设计研究中心股份有限公司 Pedestrian and vehicle flow statistical method, electronic equipment and storage medium
CN115512601A (en) * 2022-11-15 2022-12-23 武汉智图科技有限责任公司 Automatic splicing method and device for geographic information non-connection linear elements
CN116718181A (en) * 2023-08-11 2023-09-08 腾讯科技(深圳)有限公司 Map generation method, map generation device, electronic equipment and storage medium

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733078A (en) * 2020-12-29 2021-04-30 武汉中海庭数据技术有限公司 Method and device for smoothly connecting multiple lines among multiple road segments of crowdsourced data
CN112733078B (en) * 2020-12-29 2023-10-10 武汉中海庭数据技术有限公司 Method and device for smooth connection among multiple paths of fragments of crowdsourcing data
CN112789619A (en) * 2020-12-31 2021-05-11 华为技术有限公司 Simulation scene construction method, simulation method and device
CN112732859A (en) * 2021-01-25 2021-04-30 腾讯科技(深圳)有限公司 Prompt information generation method and device, electronic equipment and storage medium
CN114049327A (en) * 2021-11-16 2022-02-15 中国测绘科学研究院 Improved large-range road center line block extraction algorithm
CN114419145B (en) * 2022-03-29 2022-07-01 腾讯科技(深圳)有限公司 Road element labeling method, device, equipment and storage medium
WO2023185275A1 (en) * 2022-03-29 2023-10-05 腾讯科技(深圳)有限公司 Road element labeling method and apparatus, and device and storage medium
CN114419145A (en) * 2022-03-29 2022-04-29 腾讯科技(深圳)有限公司 Road element labeling method, device, equipment and storage medium
CN114577225A (en) * 2022-04-28 2022-06-03 北京百度网讯科技有限公司 Map drawing method and device, electronic equipment and storage medium
CN115240429A (en) * 2022-08-11 2022-10-25 深圳市城市交通规划设计研究中心股份有限公司 Pedestrian and vehicle flow statistical method, electronic equipment and storage medium
CN115240429B (en) * 2022-08-11 2023-02-14 深圳市城市交通规划设计研究中心股份有限公司 Pedestrian and vehicle flow statistical method, electronic equipment and storage medium
CN115512601A (en) * 2022-11-15 2022-12-23 武汉智图科技有限责任公司 Automatic splicing method and device for geographic information non-connection linear elements
CN115512601B (en) * 2022-11-15 2023-02-28 武汉智图科技有限责任公司 Automatic splicing method and device for geographic information non-connection linear elements
CN116718181A (en) * 2023-08-11 2023-09-08 腾讯科技(深圳)有限公司 Map generation method, map generation device, electronic equipment and storage medium
CN116718181B (en) * 2023-08-11 2023-10-20 腾讯科技(深圳)有限公司 Map generation method, map generation device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112069280A (en) Road data processing method, device, equipment and storage medium
CN111951144B (en) Method and device for determining violation road section and computer readable storage medium
KR20210038712A (en) Validation of road intersections
CN112634612B (en) Intersection flow analysis method and device, electronic equipment and storage medium
CN110083668B (en) Data management system, management method, terminal and storage medium for high-precision map
WO2022205616A1 (en) Method and apparatus for constructing navigation elements in map
CN110619426A (en) Road network model construction method, device, equipment and storage medium
CN109085764B (en) Method and device for optimizing creation of unmanned simulation scene
CN111597287A (en) Map generation method, device and equipment
CN114661055A (en) Emergency logistics vehicle optimal path planning method, device, equipment and storage medium
CN113722342A (en) High-precision map element change detection method, device and equipment and automatic driving vehicle
CN111047107B (en) Road traffic time prediction method, device, electronic equipment and storage medium
CN116858261A (en) Navigation route dynamic planning method, device, computer equipment and storage medium
Santos et al. GBUS-Route GeoTracer
CN114023095B (en) Traffic restriction identification method and device and electronic equipment
CN112699202B (en) Forbidden road identification method and device, electronic equipment and storage medium
CN111866722A (en) Method, system, device and storage medium for generating electronic fence
CN112735130B (en) Traffic data processing method and device, electronic equipment and medium
CN115277767A (en) Internet of vehicles data processing method and device and electronic equipment
CN107491564B (en) Topographic map data storage method and device
CN112885129B (en) Method, device and equipment for determining road speed limit and computer readable storage medium
JP6140592B2 (en) Cyclic route search apparatus and method, computer program for searching a circular route, and recording medium recording the computer program
CN116718181B (en) Map generation method, map generation device, electronic equipment and storage medium
CN115048015B (en) Automatic driving simulation scene construction method and system based on high-precision map
CN113823082B (en) Navigation data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination