CN111143360B - Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal - Google Patents
Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal Download PDFInfo
- Publication number
- CN111143360B CN111143360B CN201911313031.1A CN201911313031A CN111143360B CN 111143360 B CN111143360 B CN 111143360B CN 201911313031 A CN201911313031 A CN 201911313031A CN 111143360 B CN111143360 B CN 111143360B
- Authority
- CN
- China
- Prior art keywords
- road
- data
- sub
- spatial index
- spatial
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 65
- 238000012545 processing Methods 0.000 claims description 18
- 238000005516 engineering process Methods 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 6
- 238000002910 structure generation Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000008569 process Effects 0.000 description 7
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2228—Indexing structures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Remote Sensing (AREA)
- Software Systems (AREA)
- Traffic Control Systems (AREA)
Abstract
The invention discloses a road uplink and downlink identification method and device based on a spatial index algorithm, a storage medium and a terminal, wherein the method comprises the following steps: acquiring a road data sample set after pre-grouping; acquiring a road section data set corresponding to each road data sample in the road data sample set; inputting the road section data set into a pre-established spatial index data structure to obtain the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction; and identifying the two directions of the uplink and the downlink of the road based on the sub-directions. Therefore, by adopting the embodiment of the application, the accuracy and the efficiency of the identification of the uplink and the downlink of the road can be improved.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for identifying uplink and downlink of a road based on a spatial index algorithm, a storage medium, and a terminal.
Background
In the case of electronic map display, road elements are represented by drawing lines, i.e., a line is represented by connecting a plurality of line segments together, and some roads with an isolation belt in between are represented by drawing lines, typically in the form of double lines, one line representing the upward direction and the downward direction of a road, respectively.
In the current method for identifying the uplink and the downlink of the road, the matching degree of the road sections is calculated according to the spatial position relationship and the shape similarity, so that the uplink and the downlink relationship is obtained. Under the actual condition, the actual road conditions are more, the difference between the uplink and downlink position relationships and the shape is larger, and the error of identifying the uplink and downlink by the method is larger, so that the identification accuracy is reduced.
Disclosure of Invention
The embodiment of the application provides a road uplink and downlink identification method and device based on a spatial index algorithm, a storage medium and a terminal. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later.
In a first aspect, an embodiment of the present application provides a method for identifying uplink and downlink of a road based on a spatial index algorithm, where the method includes:
acquiring a road data sample set after pre-grouping;
acquiring a road section data set corresponding to each road data sample in the road data sample set;
inputting the road section data set into a pre-established spatial index data structure to obtain the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction;
and identifying the two directions of the uplink and the downlink of the road based on the sub-directions.
Optionally, before the acquiring the pre-grouped road data sample set, the method further includes:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
grouping the road section data in the set data according to road names to generate a grouped road data sample set, and taking the grouped road data sample set as a road data sample set which is grouped in advance.
Optionally, before the acquiring the pre-grouped road data sample set, the method further includes:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
and processing the set data based on a spatial index technology to generate a spatial index data structure, wherein the spatial index data structure is used as a pre-established spatial index data structure.
Optionally, the identifying the two directions of the road going down and going down based on the road sub-direction includes:
cutting off the road sub-direction which does not accord with the road driving rule to generate the road sub-direction which accords with the road driving rule;
connecting the road sub-direction conforming to the road driving rule with the nameless road section in the aggregate data to generate a connected road sub-direction;
and splicing the connected road sub-directions to generate two directions of road uplink and downlink.
In a second aspect, an embodiment of the present application provides a device for identifying uplink and downlink of a road based on a spatial index algorithm, where the device includes:
the first set acquisition module is used for acquiring a road data sample set after being grouped in advance;
the second set acquisition module is used for acquiring a road section data set corresponding to each road data sample in the road data sample set;
the sub-direction generating module is used for inputting the road section data set into a pre-established spatial index data structure to acquire the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction;
and the direction identification module is used for identifying the two directions of the road uplink and the road downlink based on the sub-directions.
Optionally, the apparatus further includes:
the first data acquisition module is used for acquiring road section data;
the first data generation module is used for inputting the road section data into a memory set to generate set data;
and the set generation module is used for grouping the road section data in the set data according to the road names to generate a grouped road data sample set, and taking the grouped road data sample set as a road data sample set which is grouped in advance.
Optionally, the apparatus further includes:
the second data acquisition module is used for acquiring road section data;
the second data generation module is used for inputting the road section data into a memory set to generate set data;
and the data structure generation module is used for processing the set data based on a spatial index technology to generate a spatial index data structure, and taking the spatial index data structure as a pre-established spatial index data structure.
Optionally, the direction identifying module includes:
the first sub-direction generating unit is used for cutting off the road sub-direction which does not accord with the road driving rule and then generating the road sub-direction which accords with the road driving rule;
the second sub-direction generating unit is used for connecting the road sub-direction conforming to the road running rule with the nameless road sections in the aggregate data to generate a connected road sub-direction;
and the direction generating unit is used for generating two directions of road uplink and downlink after splicing the connected road sub-directions.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-described method steps.
In a fourth aspect, embodiments of the present application provide a terminal, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
in the embodiment of the application, a road data sample set after being grouped in advance is firstly obtained, then a road data set corresponding to each road data sample in the road data sample set is obtained, then the road data set is input into a space index data structure which is established in advance to obtain the connected road data corresponding to each road data in the road data set, a road sub-direction is generated, and finally the road downlink direction and the road uplink direction are identified based on the sub-direction. In the method, a spatial index data structure is established for road data by using a spatial index technology, so that the speed is relatively high when the same-name road section is searched, and then the sub-direction of each road is obtained through the same-name road section, so that the uplink and downlink relationship of the road is determined. The method can improve the efficiency and accuracy of the identification of the uplink and the downlink of the road, and has better applicability.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
Fig. 1 is a schematic flow chart of a road uplink and downlink identification method based on a spatial index algorithm according to an embodiment of the present application;
fig. 2 is a schematic process diagram of a road uplink and downlink identification process based on a spatial index algorithm according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a road uplink and downlink identification device based on a spatial index algorithm according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another road uplink and downlink identification device based on a spatial index algorithm according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a direction recognition module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The following description and the drawings sufficiently illustrate specific embodiments of the invention to enable those skilled in the art to practice them.
It should be understood that the described embodiments are merely some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention as detailed in the accompanying claims.
In the description of the present invention, it should be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present invention will be understood in specific cases by those of ordinary skill in the art. Furthermore, in the description of the present invention, unless otherwise indicated, "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
Up to now, for the identification of the up and down links on the road, the matching degree of the road segments is calculated according to the spatial position relationship and the shape similarity, so as to obtain the up and down links. Under the actual condition, the actual road conditions are more, the difference between the uplink and downlink position relationships and the shape is larger, and the error of identifying the uplink and downlink by the method is larger, so that the accuracy of identification is reduced. Therefore, the application provides a road uplink and downlink identification method, a device, a storage medium and a terminal based on a spatial index algorithm, so as to solve the problems in the related technical problems. In the technical scheme provided by the application, the spatial index data structure is established for the road data by utilizing the spatial index technology, so that the speed is relatively high when the same-name road section is searched, and then the sub direction of each road is obtained through the same-name road section, so that the uplink and downlink relationship of the road is determined. By using the method, the efficiency and accuracy of the uplink and downlink identification can be improved, and the method has better applicability, and the method is described in detail below by adopting an exemplary embodiment.
The following describes in detail the road uplink and downlink identification method based on the spatial index algorithm provided in the embodiment of the present application with reference to fig. 1 to fig. 2. The method can be realized by a computer program and can be operated on a road uplink and downlink identification device based on a space index algorithm based on a von neumann system. The computer program may be integrated in the application or may run as a stand-alone tool class application. The road uplink and downlink identification device based on the spatial index algorithm in the embodiment of the present application may be a user terminal, including but not limited to: personal computers, tablet computers, handheld devices, vehicle mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem, and the like. User terminals may be called different names in different networks, for example: a user equipment, an access terminal, a subscriber unit, a subscriber station, a mobile station, a remote terminal, a mobile device, a user terminal, a wireless communication device, a user agent or user equipment, a cellular telephone, a cordless telephone, a personal digital assistant (personal digital assistant, PDA), a terminal device in a 5G network or a future evolution network, and the like.
Referring to fig. 1, a flow chart of a method for identifying uplink and downlink of a road based on a spatial index algorithm is provided for an embodiment of the present application. As shown in fig. 1, the method according to the embodiment of the present application may include the following steps:
s101, acquiring a road data sample set after being grouped in advance;
wherein, the pre-grouping is to divide the road names into a group. The grouped road data sample sets are data sample sets of the same road names which are grouped together to form a plurality of groups.
In the embodiment of the application, firstly, the user terminal obtains the road data samples, and then, according to the grouping mode set by the internal program (namely, the same road names are grouped into a group), the road data sample set with the same road names as a group is generated after the grouping is finished.
S102, acquiring a road section data set corresponding to each road data sample in the road data sample set;
the step S101 may be performed to obtain a road data sample set with the same road name as a unit, where the road data sample set with the same road name as a unit includes road data samples with the same road name as a unit, and each road data sample with the same road name as a unit includes one or more road segments under each road name, which is referred to herein as a road segment data set.
In one possible implementation, the user terminal first generates a set of road data samples with the same road name as a group after acquiring the end of the grouping based on step S101. And then acquiring one or more road sections contained under each road name in the road data sample with the same road name as a unit, and generating a road section data set after acquisition.
S103, inputting the road section data set into a pre-established spatial index data structure to obtain the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction;
the spatial index data structure is generated by processing the acquired road section data set based on the spatial index technology. The spatial index technique refers to a data structure that is arranged in a certain order according to the position and shape of the spatial objects or a certain spatial relationship between the spatial objects, and includes summary information of the spatial objects, such as the identification of the objects, circumscribed rectangles, and pointers to entities of the spatial objects. The spatial data query, i.e., spatial index, is a description of data location information stored on a medium, and is used to improve the efficiency of data acquisition by the system, also referred to as a spatial access method (Spatial Access Method SAM). The data structure is arranged according to a certain spatial relation between the position and the shape of the spatial objects or the spatial relation between the spatial objects in a certain sequence, wherein the data structure comprises outline information of the spatial objects, such as an identification circumscribed rectangle of the objects and pointers pointing to entities of the spatial objects.
In the embodiment of the application, the user terminal firstly processes the road section data set based on the spatial index technology to generate the spatial index data structure corresponding to the road section data set, and the purpose of creating the spatial index data structure is to inquire the same road section data more quickly and more efficiently. And acquiring road set data samples with the same name after the space index data structure is established, inputting road segment data corresponding to the road set data samples with the same name into the space index data structure which is established in advance to inquire the road segment data connected with the road set data samples, acquiring the road set data samples after the inquiry, and generating the sub-direction of the road after the acquisition is completed.
And S104, identifying the two directions of the road uplink and the road downlink based on the sub-directions.
Wherein the road sub-direction is obtained according to step S103. The road uplink and downlink directions refer to the road, and the road uplink and downlink directions are specified according to a certain spatial relationship.
In this embodiment of the present application, based on the obtaining of the sub-direction of the road in step S103, further processing is required to obtain the uplink-downlink relationship of the road, for example, if there is a non-name road section, the sub-direction and the non-name road section need to be connected, and the sub-direction of the road that does not conform to the driving rule of the road needs to be cut, for example, in some scenes, the situation such as the case of a roundabout and a missing road section needs to be connected with the sub-direction, and then from the sub-direction after the processing, the user terminal identifies the uplink-downlink relationship of the road at this time through an internal program.
For example, as shown in fig. 2, fig. 2 shows a process diagram executed by the solution of the present application completely, firstly, road segment data is obtained, then the road segment data is loaded into a memory set of a user terminal, then the user terminal establishes a spatial index data structure with the road segment data in the memory set by using a spatial index technology, after the spatial index data structure is established, the user terminal groups the same road segments according to road names through an internal preset program, after the grouping is finished, the road segment data corresponding to the roads with the same names are input into the established spatial index data structure to query and obtain similar road segment data, and then the obtained connected road segment data are connected, and a sub direction is obtained after connection. If the ring island, the missing road section and the like exist, the sub-directions are required to be connected, and after the sub-directions which are in accordance with the running rule are connected according to a certain rule, the uplink direction and the downlink direction of the road are obtained according to a certain spatial relationship. And finally, the user terminal verifies and screens the results of the uplink and downlink data through the QGis and other tools, and when errors occur, the scheme can be re-executed by modifying the original road section data to meet the standard mode of connection, so that the uplink and downlink data on the road are perfected.
In the embodiment of the application, a road data sample set after being grouped in advance is firstly obtained, then a road data set corresponding to each road data sample in the road data sample set is obtained, then the road data set is input into a space index data structure which is established in advance to obtain the connected road data corresponding to each road data in the road data set, a road sub-direction is generated, and finally the road downlink direction and the road uplink direction are identified based on the sub-direction. In the method, a spatial index data structure is established for road data by using a spatial index technology, so that the speed is relatively high when the same-name road section is searched, and then the sub-direction of each road is obtained through the same-name road section, so that the uplink and downlink relationship of the road is determined. The method can improve the efficiency and accuracy of the identification of the uplink and the downlink of the road, and has better applicability.
The following are examples of the apparatus of the present invention that may be used to perform the method embodiments of the present invention. For details not disclosed in the embodiments of the apparatus of the present invention, please refer to the embodiments of the method of the present invention.
Referring to fig. 3, a schematic structural diagram of a road uplink and downlink identification device based on a spatial index algorithm according to an exemplary embodiment of the present invention is shown. The road uplink and downlink identification device based on the spatial index algorithm can be realized into all or part of the terminal through software, hardware or a combination of the two. The device 1 comprises a first set acquisition module 10, a second set acquisition module 20, a sub-direction generation module 30, and a direction identification module 40.
A first set acquisition module 10, configured to acquire a road data sample set after being grouped in advance;
a second set obtaining module 20, configured to obtain a road segment data set corresponding to each road data sample in the road data sample set;
the sub-direction generating module 30 is configured to input the road segment data set into a pre-established spatial index data structure to obtain connected road segment data corresponding to each road segment data in the road segment data set, and generate a road sub-direction;
the direction identifying module 40 is configured to identify two directions of the road going up and down based on the sub-directions.
Optionally, as shown in fig. 4, the device for identifying uplink and downlink of a road based on the spatial index algorithm further includes:
a first data acquisition module 50 for acquiring road section data;
the first data generating module 60 is configured to input the road segment data into a memory set to generate set data;
the set generating module 70 is configured to group road segment data in the set data according to road names to generate a grouped road data sample set, and use the grouped road data sample set as a pre-grouped road data sample set.
Optionally, as shown in fig. 4, the road uplink and downlink identifying device 1 based on the spatial index algorithm further includes:
a second data acquisition module 80 for acquiring road section data;
a second data generating module 90, configured to input the road segment data into a memory set to generate set data;
the data structure generating module 100 is configured to process the aggregate data to generate a spatial index data structure based on a spatial index technique, and use the spatial index data structure as a pre-established spatial index data structure.
Optionally, as shown in fig. 5, the direction identifying module 40 includes:
a first sub-direction generating unit 310, configured to generate a road sub-direction according to the road driving rule after cutting off the road sub-direction not according with the road driving rule;
a second sub-direction generating unit 320, configured to connect the road sub-direction that accords with the road driving rule and the nameless road section in the aggregate data to generate a connected road sub-direction;
and the direction generating unit 330 is configured to splice the connected road sub-directions to generate two directions of road uplink and downlink.
It should be noted that, when the road uplink and downlink identification device based on the spatial index algorithm provided in the foregoing embodiment executes the road uplink and downlink identification method based on the spatial index algorithm, only the division of the foregoing functional modules is used for illustrating, in practical application, the foregoing functional allocation may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the device for identifying the uplink and the downlink of the road based on the spatial index algorithm provided in the above embodiment belongs to the same concept as the embodiment of the method for identifying the uplink and the downlink of the road based on the spatial index algorithm, and detailed implementation processes of the device are shown in the method embodiment, and are not repeated here.
The foregoing embodiment numbers of the present application are merely for describing, and do not represent advantages or disadvantages of the embodiments.
In the embodiment of the application, a road data sample set after being grouped in advance is firstly obtained, then a road data set corresponding to each road data sample in the road data sample set is obtained, then the road data set is input into a space index data structure which is established in advance to obtain the connected road data corresponding to each road data in the road data set, a road sub-direction is generated, and finally the road downlink direction and the road uplink direction are identified based on the sub-direction. In the method, a spatial index data structure is established for road data by using a spatial index technology, so that the speed is relatively high when the same-name road section is searched, and then the sub-direction of each road is obtained through the same-name road section, so that the uplink and downlink relationship of the road is determined. The method can improve the efficiency and accuracy of the identification of the uplink and the downlink of the road, and has better applicability.
The invention also provides a computer readable medium, on which program instructions are stored, which when executed by a processor, implement the road uplink and downlink identification method based on the spatial index algorithm provided by the above method embodiments.
The invention also provides a computer program product containing instructions, which when run on a computer, cause the computer to execute the road uplink and downlink identification method based on the spatial index algorithm according to the above method embodiments.
Referring to fig. 6, a schematic structural diagram of a terminal is provided in an embodiment of the present application. As shown in fig. 6, the terminal 1000 may include: at least one processor 1001, at least one network interface 1004, a user interface 1003, a memory 1005, at least one communication bus 1002.
Wherein the communication bus 1002 is used to enable connected communication between these components.
The user interface 1003 may include a Display screen (Display) and a Camera (Camera), and the optional user interface 1003 may further include a standard wired interface and a wireless interface.
The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the processor 1001 may include one or more processing cores. Processor 1001 utilizes various interfaces and lines to connect various portions of terminal 1000 in its entirety, by executing or executing instructions, programs, code sets, or instruction sets stored in memory 1005, and invoking data stored in memory 1005, performing various functions of terminal 1000 and processing data. Alternatively, the processor 1001 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The processor 1001 may integrate one or a combination of several of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 1001 and may be implemented by a single chip.
The Memory 1005 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 1005 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 1005 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 1005 may also optionally be at least one storage device located remotely from the processor 1001. As shown in fig. 6, an operating system, a network communication module, a user interface module, and a road uplink and downlink identification application based on a spatial index algorithm may be included in a memory 1005 as one type of computer storage medium.
In terminal 1000 shown in fig. 6, user interface 1003 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the processor 1001 may be configured to invoke the road uplink and downlink identification application program based on the spatial index algorithm stored in the memory 1005, and specifically perform the following operations:
acquiring a road data sample set after pre-grouping;
acquiring a road section data set corresponding to each road data sample in the road data sample set;
inputting the road section data set into a pre-established spatial index data structure to obtain the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction;
and identifying the two directions of the uplink and the downlink of the road based on the sub-directions.
In one embodiment, the processor 1001, prior to performing the acquiring the pre-grouped set of road data samples, further performs the following:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
grouping the road section data in the set data according to road names to generate a grouped road data sample set, and taking the grouped road data sample set as a road data sample set which is grouped in advance.
In one embodiment, the processor 1001, prior to performing the acquiring the pre-grouped set of road data samples, further performs the following:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
and processing the set data based on a spatial index technology to generate a spatial index data structure, wherein the spatial index data structure is used as a pre-established spatial index data structure.
In one embodiment, when executing the identifying the two directions of the road downlink based on the sub-direction of the road, the processor 1001 specifically executes the following operations:
cutting off the road sub-direction which does not accord with the road driving rule to generate the road sub-direction which accords with the road driving rule;
connecting the road sub-direction conforming to the road driving rule with the nameless road section in the aggregate data to generate a connected road sub-direction;
and splicing the connected road sub-directions to generate two directions of road uplink and downlink.
In the embodiment of the application, a road data sample set after being grouped in advance is firstly obtained, then a road data set corresponding to each road data sample in the road data sample set is obtained, then the road data set is input into a space index data structure which is established in advance to obtain the connected road data corresponding to each road data in the road data set, a road sub-direction is generated, and finally the road downlink direction and the road uplink direction are identified based on the sub-direction. In the method, a spatial index data structure is established for road data by using a spatial index technology, so that the speed is relatively high when the same-name road section is searched, and then the sub-direction of each road is obtained through the same-name road section, so that the uplink and downlink relationship of the road is determined. The method can improve the efficiency and accuracy of the identification of the uplink and the downlink of the road, and has better applicability.
Those of skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Those skilled in the art may implement the described functionality using different approaches for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention. It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the embodiments disclosed herein, it should be understood that the disclosed methods, products (including but not limited to devices, apparatuses, etc.) may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form. The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
It should be appreciated that the flow charts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. The invention is not limited to the flow and structure that has been described above and shown in the drawings, and various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
Claims (6)
1. The method for identifying the uplink and the downlink of the road based on the spatial index algorithm is characterized by comprising the following steps:
acquiring a road data sample set after pre-grouping;
acquiring a road section data set corresponding to each road data sample in the road data sample set;
inputting the road section data set into a pre-established spatial index data structure to acquire the connected road section data corresponding to each road section data in the road section data set, and generating a road sub-direction;
identifying two directions of the uplink and the downlink of the road based on the sub-directions;
before the acquiring the pre-grouped road data sample set, the method further comprises:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
processing the set data based on a spatial index technology to generate a spatial index data structure, wherein the spatial index data structure is used as a pre-established spatial index data structure; wherein,
the spatial index technology refers to a data structure which is sequentially arranged according to the position and the shape of the spatial objects or the spatial relation among the spatial objects, wherein the data structure comprises outline information of the spatial objects, and the outline information comprises an identification of the objects, an external rectangle and a pointer pointing to a spatial object entity; wherein,
the identifying the two directions of the road going down and going down based on the road sub-direction comprises the following steps:
cutting off the road sub-direction which does not accord with the road driving rule to generate the road sub-direction which accords with the road driving rule;
connecting the road sub-direction conforming to the road driving rule with the nameless road section in the aggregate data to generate a connected road sub-direction;
and splicing the connected road sub-directions to generate two directions of road uplink and downlink.
2. The method of claim 1, wherein prior to obtaining the pre-grouped set of road data samples, further comprising:
acquiring road section data;
inputting the road section data into a memory set to generate set data;
grouping the road section data in the set data according to road names to generate a grouped road data sample set, and taking the grouped road data sample set as a road data sample set which is grouped in advance.
3. A road uplink and downlink identification device based on a spatial index algorithm, the device comprising:
the first set acquisition module is used for acquiring a road data sample set after being grouped in advance;
the second set acquisition module is used for acquiring a road section data set corresponding to each road data sample in the road data sample set;
the sub-direction generating module is used for inputting the road section data set into a pre-established spatial index data structure so as to acquire the connected road section data corresponding to each road section data in the road section data set and generate a road sub-direction;
the direction identification module is used for identifying two directions of the road uplink and the road downlink based on the sub-directions; wherein,
the apparatus further comprises:
the second data acquisition module is used for acquiring road section data;
the second data generation module is used for inputting the road section data into a memory set to generate set data;
the data structure generation module is used for processing the set data based on a spatial index technology to generate a spatial index data structure, and taking the spatial index data structure as a pre-established spatial index data structure;
processing the set data based on a spatial index technology to generate a spatial index data structure, wherein the spatial index data structure is used as a pre-established spatial index data structure; wherein,
the spatial index technology refers to a data structure which is sequentially arranged according to the position and the shape of the spatial objects or the spatial relation among the spatial objects, wherein the data structure comprises outline information of the spatial objects, and the outline information comprises an identification of the objects, an external rectangle and a pointer pointing to a spatial object entity; wherein,
the direction identification module comprises:
the first sub-direction generating unit is used for cutting off the road sub-direction which does not accord with the road driving rule and then generating the road sub-direction which accords with the road driving rule;
the second sub-direction generating unit is used for connecting the road sub-direction conforming to the road running rule with the nameless road sections in the aggregate data to generate a connected road sub-direction;
and the direction generating unit is used for generating two directions of road uplink and downlink after splicing the connected road sub-directions.
4. A device according to claim 3, characterized in that the device further comprises:
the first data acquisition module is used for acquiring road section data;
the first data generation module is used for inputting the road section data into a memory set to generate set data;
and the set generation module is used for grouping the road section data in the set data according to the road names to generate a grouped road data sample set, and taking the grouped road data sample set as a road data sample set which is grouped in advance.
5. A computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the method of any of claims 1-2.
6. An electronic terminal, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method according to any of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911313031.1A CN111143360B (en) | 2019-12-18 | 2019-12-18 | Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911313031.1A CN111143360B (en) | 2019-12-18 | 2019-12-18 | Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111143360A CN111143360A (en) | 2020-05-12 |
CN111143360B true CN111143360B (en) | 2024-02-23 |
Family
ID=70518835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911313031.1A Active CN111143360B (en) | 2019-12-18 | 2019-12-18 | Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111143360B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104077326A (en) * | 2013-03-29 | 2014-10-01 | 北京图盟科技有限公司 | Road data processing method and device |
CN105975527A (en) * | 2016-04-29 | 2016-09-28 | 百度在线网络技术(北京)有限公司 | Road up-down relationship identification method and apparatus |
CN106021282A (en) * | 2016-04-29 | 2016-10-12 | 百度在线网络技术(北京)有限公司 | Method and device for recognizing relations between main roads and side road |
-
2019
- 2019-12-18 CN CN201911313031.1A patent/CN111143360B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104077326A (en) * | 2013-03-29 | 2014-10-01 | 北京图盟科技有限公司 | Road data processing method and device |
CN105975527A (en) * | 2016-04-29 | 2016-09-28 | 百度在线网络技术(北京)有限公司 | Road up-down relationship identification method and apparatus |
CN106021282A (en) * | 2016-04-29 | 2016-10-12 | 百度在线网络技术(北京)有限公司 | Method and device for recognizing relations between main roads and side road |
Also Published As
Publication number | Publication date |
---|---|
CN111143360A (en) | 2020-05-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110413812B (en) | Neural network model training method and device, electronic equipment and storage medium | |
CN111210485B (en) | Image processing method and device, readable medium and electronic equipment | |
CN111159492A (en) | Track point retrieval method and device, storage medium and terminal | |
CN111161195B (en) | Feature map processing method and device, storage medium and terminal | |
CN112650790B (en) | Target point cloud plane determining method and device, electronic equipment and storage medium | |
CN111198705A (en) | Memory backup method and device for preventing ECU from being swiped up, storage medium and electronic equipment | |
CN108847120B (en) | Drawing method based on electronic fence map order thermodynamic diagram distribution | |
CN112132871B (en) | Visual feature point tracking method and device based on feature optical flow information, storage medium and terminal | |
CN112612427B (en) | Vehicle stop data processing method and device, storage medium and terminal | |
CN112258622B (en) | Image processing method and device, readable medium and electronic equipment | |
CN111612434B (en) | Method, apparatus, electronic device and medium for generating processing flow | |
CN111143360B (en) | Road uplink and downlink identification method and device based on spatial index algorithm, storage medium and terminal | |
CN113626547B (en) | Map vector slicing method and device for freight industry, storage medium and terminal | |
CN109189524A (en) | Image resource generation method and device | |
JP2013120201A (en) | Information processing apparatus and method | |
CN113607183B (en) | Method and device for planning transportation route of vehicle, storage medium and terminal | |
CN115544622A (en) | Urban and rural participation type three-dimensional planning design platform, method, equipment and storage medium | |
CN111738415B (en) | Model synchronous updating method and device and electronic equipment | |
CN108829840B (en) | Electronic fence map construction method and device | |
CN113506356A (en) | Drawing method and device of area map, readable medium and electronic equipment | |
CN112070718A (en) | Method and device for determining regional quantization parameter, storage medium and terminal | |
CN110825480A (en) | Picture display method and device, electronic equipment and computer readable storage medium | |
CN112395826B (en) | Text special effect processing method and device | |
CN110263797B (en) | Method, device and equipment for estimating key points of skeleton and readable storage medium | |
CN111445551B (en) | Image design method and device, electronic 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |