CN115080866A - Travel path recommendation method and device, storage medium and terminal - Google Patents

Travel path recommendation method and device, storage medium and terminal Download PDF

Info

Publication number
CN115080866A
CN115080866A CN202211003907.4A CN202211003907A CN115080866A CN 115080866 A CN115080866 A CN 115080866A CN 202211003907 A CN202211003907 A CN 202211003907A CN 115080866 A CN115080866 A CN 115080866A
Authority
CN
China
Prior art keywords
data
time
grid
point
target vehicle
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.)
Granted
Application number
CN202211003907.4A
Other languages
Chinese (zh)
Other versions
CN115080866B (en
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.)
China Railway Bridge Science Research Institute Ltd
Beijing Transwiseway Information Technology Co Ltd
China Highway Engineering Consultants Corp
Original Assignee
China Railway Bridge Science Research Institute Ltd
Beijing Transwiseway Information Technology Co Ltd
China Highway Engineering Consultants Corp
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 China Railway Bridge Science Research Institute Ltd, Beijing Transwiseway Information Technology Co Ltd, China Highway Engineering Consultants Corp filed Critical China Railway Bridge Science Research Institute Ltd
Priority to CN202211003907.4A priority Critical patent/CN115080866B/en
Publication of CN115080866A publication Critical patent/CN115080866A/en
Application granted granted Critical
Publication of CN115080866B publication Critical patent/CN115080866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • G06Q50/40

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a method, a device, a storage medium and a terminal for recommending a driving path, wherein the method comprises the following steps: generating a starting point area grid and an end point area grid according to a starting point position and an end point position from a client; loading data of a starting point area grid and an end point area grid in a preset time period in a pre-generated space-time index file, and generating starting point area data and end point area data; determining a plurality of target vehicle identifications according to the starting point region data and the ending point region data, and determining a time point pair of each target vehicle identification; and constructing a result set according to the time point pair of each target vehicle identification, generating a recommended path based on the result set, and recommending the recommended path to the client. According to the method and the device, the recommended paths of the starting point position and the end point position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved.

Description

Travel path recommendation method and device, storage medium and terminal
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a driving path recommendation method, a driving path recommendation device, a storage medium and a terminal.
Background
The highway transportation plays an important role in the economic and social development of China, maintains the stable and efficient operation of a highway traffic network, and has important significance for adjusting the industrial structure, promoting employment and economic development and accelerating the urban and rural integrated construction process. With the increasing complexity of road planning and different driving preferences, how to quickly find a plurality of drivable paths between a departure place and a destination is a problem which developers are eager to solve.
In the prior art, a large amount of road data and vehicle driving data are collected and all the data are stored in a database, and when a driving path needs to be inquired, a server side obtains the data from the database based on a starting position and an ending position for analysis.
Disclosure of Invention
The embodiment of the application provides a method and a device for recommending a driving path, 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 recommending a driving route, where the method includes:
generating a starting point area grid and an end point area grid according to a starting point position and an end point position from a client;
loading data of a starting point area grid and an end point area grid in a preset time period in a pre-generated space-time index file, and generating starting point area data and end point area data;
determining a plurality of target vehicle identifications according to the starting point area data and the ending point area data, and determining a time point pair of each target vehicle identification;
and constructing a result set according to the time point pair of each target vehicle identification, generating a recommended path based on the result set, and recommending the recommended path to the client.
Optionally, before generating the start area grid and the end area grid according to the start position and the end position from the client, the method further includes:
constructing a global main grid set by adopting a GeoHash algorithm and combining preset grid parameters;
setting a data structure for each main grid in the main grid set, dividing each main grid into a plurality of sub-grids, and generating a grid map;
counting all historical vehicle track data according to a preset period;
processing all historical vehicle track data according to a data structure set by each main grid in a grid map to obtain first-class index data and second-class index data;
constructing a storage directory according to the grid ID of each main grid, and storing the data of the first type of index and the data of the second type of index into the storage directory to obtain a space-time index file; wherein the content of the first and second substances,
the data structure comprises a first type index and a second type index, wherein the first type index is used for recording the time when the vehicle enters and exits each main grid, and the second type index is used for recording the time when the vehicle enters and exits each sub grid.
Optionally, generating a start area grid and an end area grid according to the start position and the end position from the client includes:
receiving a starting position and an end position from a client;
and calculating grids of the starting point position and the end point position in a preset range in a pre-generated grid map to obtain a starting point area grid and an end point area grid.
Optionally, determining a plurality of target vehicle identifications according to the start area data and the end area data includes:
traversing in the starting point region data and the ending point region data to obtain a vehicle identifier of the starting point region and a vehicle identifier of the ending point region;
placing the vehicle identification of the starting point area in a preset first set to obtain first set data;
placing the vehicle identification of the terminal area in a preset second set to obtain second set data;
and taking intersection according to the first set data and the second set data to obtain a plurality of target vehicle identifications of the intersection parts.
Optionally, the starting point region data includes starting point first type index data, and the ending point region data includes ending point first type index data; the starting point first-class index data and the end point first-class index data are vehicle data corresponding to the main grid;
determining the time point pair of each target vehicle identification, including:
acquiring the time when each target vehicle identifier enters and exits the grid from the first type of index data of the starting points to obtain a plurality of starting point times of each target vehicle identifier;
sequencing the plurality of starting points according to the time sequence to obtain a plurality of sequenced starting points;
acquiring the time when each target vehicle identification enters and exits the grid from the first-class index data of the destination to obtain a plurality of destination times of each target vehicle identification;
sequencing the plurality of end points according to the time sequence to obtain a plurality of sequenced end points;
and determining the last time in the sequenced starting time moments and the first time in the sequenced end time moments as the time point pair of each target vehicle identification.
Optionally, the start area data includes start second-type index data, and the end area data includes end second-type index data; the starting point second-class index data and the ending point second-class index data are vehicle data corresponding to the sub-grids;
constructing a result set according to the time point pairs of each target vehicle identification, wherein the result set comprises:
searching a sub-grid which is closest to the position of the starting time in the starting point second-class index data to obtain a starting point time sub-grid, and taking the time of the starting point time sub-grid as the starting point time to obtain the starting point time sub-grid and the starting point time of each target vehicle identification;
searching a sub-grid which is closest to the position of the end time in the distance time point pair in the end point second-class index data to obtain an end point time sub-grid, and taking the time of the end point time sub-grid as the end point time to obtain the end point time sub-grid and the end point time of each target vehicle identification;
and storing the identifier of each target vehicle identifier, the starting point time, the ending point time, the starting point time sub-grid and the ending point time sub-grid to obtain a result set.
Optionally, generating a recommended path based on the result set includes:
obtaining the distance difference of each target vehicle identifier according to the distance difference between the starting point time sub-grid and the ending point time sub-grid of each target vehicle identifier in the result set;
sequencing all data in the result set according to the distance difference of each target vehicle identifier to obtain sequenced data;
and outputting the sorted data, and generating a recommended path one by one according to the output sorted data.
In a second aspect, an embodiment of the present application provides a travel path recommendation device, including:
the area grid generating module is used for generating a starting point area grid and an end point area grid according to a starting point position and an end point position from the client;
the region data generation module is used for loading data of a starting region grid and an end region grid in a preset time period in a pre-generated space-time index file and generating starting region data and end region data;
the time point pair determining module is used for determining a plurality of target vehicle identifications according to the starting point region data and the ending point region data and determining the time point pair of each target vehicle identification;
and the search path generation module is used for constructing a result set according to the time point pair of each target vehicle identifier, generating a recommendation path based on the result set and recommending the recommendation path to the client.
In a third aspect, embodiments of the present application provide a computer storage medium having stored thereon a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides 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 have the following beneficial effects:
in the embodiment of the application, the travel path recommendation device firstly generates a start area grid and an end area grid according to a start position and an end position from a client, then loads data of the start area grid and the end area grid in a preset time period in a pre-generated space-time index file, generates start area data and end area data, secondly determines a plurality of target vehicle identifications according to the start area data and the end area data, determines a time point pair of each target vehicle identification, and finally constructs a result set according to the time point pair of each target vehicle identification, generates a recommended path based on the result set, and recommends the recommended path to the client. According to the method and the device, the recommended paths of the starting point position and the end point position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved.
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 flowchart of a method for recommending a driving route according to an embodiment of the present application;
FIG. 2 is a flow chart of spatio-temporal index file generation provided in the practice of the present application;
fig. 3 is a schematic structural diagram of a travel path recommendation device according to an embodiment of the present application;
fig. 4 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 only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
In the description of the present invention, it is to 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 meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. In addition, in the description of the present invention, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, a and/or B, which may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
The application provides a method, a device, a storage medium and a terminal for recommending a driving path, which are used for solving the problems in the related art. In the technical scheme provided by the application, the recommended paths of the starting position and the ending position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved, and the following description is given in detail by adopting an exemplary embodiment.
The following describes in detail a travel path recommendation method provided in an embodiment of the present application with reference to fig. 1 to fig. 2. The method may be implemented in dependence on a computer program, executable on a travel path recommendation device based on a von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
Referring to fig. 1, a flow chart of a method for recommending a driving route is provided in an embodiment of the present application. As shown in fig. 1, the method of the embodiment of the present application may include the steps of:
s101, generating a starting point area grid and an end point area grid according to a starting point position and an end point position from a client;
the client is a user destination, and may be an electronic device for a user to input a starting position and a destination position. The start point region mesh and the end point region mesh are meshes in which the start point position and the end point position are within a preset range in the mesh map.
In the embodiment of the application, when the starting point area grid and the ending point area grid are generated according to the starting point position and the ending point position from the client, the starting point position and the ending point position from the client are received firstly, then the grids of the starting point position and the ending point position within the preset range are calculated in the grid map generated in advance, and the starting point area grid and the ending point area grid are obtained. For example, in searching, grids in a range of 10km near the starting point and a range of 10km near the ending point are calculated in a grid map, and the grids are loaded in parallel in multiple threads.
S102, loading data of a starting point area grid and a finishing point area grid in a preset time period in a pre-generated space-time index file, and generating starting point area data and finishing point area data;
in the embodiment of the application, the grid map and the spatio-temporal index file are generated according to the following steps. Firstly, a GeoHash algorithm is adopted, a main grid set of a global scope is constructed by combining preset grid parameters, a data structure is set for each main grid in the main grid set, each main grid is divided into a plurality of sub-grids, a grid map is generated, all historical vehicle track data are counted according to a preset period, all historical vehicle track data are processed according to the data structure set for each main grid in the grid map, data of a first type of indexes and data of a second type of indexes are obtained, a storage directory is constructed according to grid IDs of each main grid, and the data of the first type of indexes and the data of the second type of indexes are stored in the storage directory, so that a space-time index file is obtained; the data structure comprises a first-class index and a second-class index, the first-class index is used for recording the time when the vehicle enters and exits each main grid, and the second-class index is used for recording the time when the vehicle enters and exits each sub grid.
Specifically, the preset grid parameter may be 360 degrees/214. The preset period may be every day or every month, and is specifically set according to an actual scene. The first type of index may be denoted as a type index and the second type of index may be denoted as a type B index.
In one possible implementation, according to the GeoHash technique, a grid with a length of 360 degrees/214 on a global scale (approximately 2.5km on a side) is generated, for each grid a data structure is designed, which comprises two indices. One is used to record each time each vehicle enters and exits the grid, and is marked as a class A index. In another method, sub-grids with a side length of 360 degrees/217 are generated in each grid (about 300 m), and the in-and-out time of the sub-grids passed by each vehicle in sequence is recorded and recorded as B-type index. Then, all historical vehicle track data are counted every day, an index file is generated for each main grid, finally, the directory is formed by day, the main grid ID (integer) is used for carrying out complementation on the number 256 twice, after the remainder is used for dividing the directory into two levels of subdirectories, the index file is stored in each directory, and the form of the index file is 20220510/104/200/3786856.
For example, as shown in fig. 2, fig. 2 is a flowchart for generating a spatio-temporal index file according to an embodiment of the present disclosure, first generating a class a index and a class B index, then counting a total number of vehicle trajectories every day, generating an index file for each grid, and finally using a daily directory as a directory, and using a main grid ID (long integer) to perform a remainder twice on a number 256, and after dividing the remainder into two sub-directories, storing an index file in each directory, which is shaped as 20220510/104/200/3786856. dat.
S103, determining a plurality of target vehicle identifications according to the starting point area data and the ending point area data, and determining a time point pair of each target vehicle identification;
in the embodiment of the application, when a plurality of target vehicle identifications are determined according to starting point area data and ending point area data, vehicle identifications are firstly obtained in a traversing mode in the starting point area data and the ending point area data to obtain starting point area vehicle identifications and ending point area vehicle identifications, then the starting point area vehicle identifications are placed in a preset first set to obtain first set data, then the ending point area vehicle identifications are placed in a preset second set to obtain second set data, and finally intersection is carried out according to the first set data and the second set data to obtain a plurality of target vehicle identifications of an intersection part.
For example, the vehicle id in the grid near the starting point and the vehicle id near the ending point are respectively put into one set, the two sets are intersected to obtain the vehicle at the intersection part, and finally the vehicle at the intersection part is determined as a plurality of target vehicle identifications.
Specifically, the start area data includes start first-type index data, and the end area data includes end first-type index data; the start first-class index data and the end first-class index data are vehicle data corresponding to the main grid.
Further, when the time point pair of each target vehicle identifier is determined, firstly, the time when each target vehicle identifier enters or exits the grid is obtained from the first-class index data of the starting point, a plurality of starting time of each target vehicle identifier is obtained, then, the plurality of starting time are sequenced according to the time sequence, a plurality of sequenced starting time are obtained, secondly, the time when each target vehicle identifier enters or exits the grid is obtained from the first-class index data of the end point, a plurality of end time of each target vehicle identifier is obtained, the plurality of end time are sequenced according to the time sequence, a plurality of sequenced end time are obtained, and finally, the last time in the plurality of sequenced starting time and the first time in the plurality of sequenced end time are determined as the time point pair of each target vehicle identifier.
For example, the grid entry and exit times of the start point part and the end point part in the class a index are combined, sorted according to time sequence, and the time point pairs of the adjacent parts of the start point time group and the end point time group after sorting are selected to obtain the time point pair of each target vehicle identifier.
And S104, constructing a result set according to the time point pair of each target vehicle identification, generating a recommended path based on the result set, and recommending the recommended path to the client.
Specifically, the start area data includes start second-type index data, and the end area data includes end second-type index data; the starting point second-class index data and the ending point second-class index data are vehicle data corresponding to the sub-grids.
In the embodiment of the application, when constructing the result set according to the time point pair of each target vehicle identifier, first searching the submesh closest to the position of the start time in the time point pair in the start second-class index data to obtain the start time submesh, taking the time of the start time submesh as the start time to obtain the start time submesh and the start time of each target vehicle identifier, then searching the submesh closest to the position of the end time in the time point pair in the end second-class index data to obtain the end time submesh, taking the time of the end time submesh as the end time to obtain the end time submesh and the end time of each target vehicle identifier, and finally storing the identifier, the start time, the end time, the start time submesh and the end time submesh of each target vehicle identifier, a result set is obtained.
In one possible implementation, for the start portion, in the class B index, find the closest grid to the start from the start time onward, use that time as the start time, for the end portion, in the class B index, find the closest grid to the end from the end time backwards, use that time as the end time, and finally put the vehicle ID, start time, end time, start time subgrid, end time subgrid into the result set.
In the embodiment of the application, when the recommended path is generated based on the result set, the distance difference of each target vehicle identifier is obtained according to the distance difference between the starting point time sub-grid and the ending point time sub-grid of each target vehicle identifier in the result set, all data in the result set are ranked according to the distance difference of each target vehicle identifier to obtain ranked data, the ranked data are output, and the recommended path is generated one by one according to the output ranked data.
For example, all data in the result set are sorted from small to large according to the sum of the grid distance differences of the starting point and the ending point, and the data after sorting are output, wherein the sum of the grid distance differences is equal and is sorted from small to large according to the time difference.
In the embodiment of the application, the travel path recommending device firstly generates a starting point area grid and an ending point area grid according to a starting point position and an ending point position from a client, then loads data of the starting point area grid and the ending point area grid in a preset time period in a pre-generated space-time index file, generates starting point area data and ending point area data, secondly determines a plurality of target vehicle identifications according to the starting point area data and the ending point area data, determines a time point pair of each target vehicle identification, and finally constructs a result set according to the time point pair of each target vehicle identification, generates a recommended path based on the result set, and recommends the recommended path to the client. According to the method and the device, the recommended paths of the starting position and the ending position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved.
The following are embodiments of the apparatus of the present invention that may be used to perform embodiments of the method of the present invention. For details which are not disclosed in the embodiments of the apparatus of the present invention, reference is made to the embodiments of the method of the present invention.
Referring to fig. 3, a schematic structural diagram of a travel path recommendation device according to an exemplary embodiment of the invention is shown. The travel route recommendation device may be implemented as all or a part of the terminal by software, hardware, or a combination of both. The device 1 comprises an area grid generating module 10, an area data generating module 20, a time point pair determining module 30 and a search path generating module 40.
A region grid generating module 10, configured to generate a start region grid and an end region grid according to a start position and an end position from a client;
the region data generating module 20 is configured to load data of a start region grid and an end region grid in a preset time period in a pre-generated spatio-temporal index file, and generate start region data and end region data;
a time point pair determining module 30, configured to determine multiple target vehicle identifiers according to the starting point region data and the ending point region data, and determine a time point pair of each target vehicle identifier;
and the search path generation module 40 is configured to construct a result set according to the time point pair of each target vehicle identifier, generate a recommended path based on the result set, and recommend the recommended path to the client.
It should be noted that, when the travel route recommendation device provided in the foregoing embodiment executes the travel route recommendation method, only the division of the above functional modules is taken as an example, and in practical applications, the functions may be distributed to different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the functions described above. In addition, the travel path recommendation device provided by the above embodiment and the travel path recommendation method embodiment belong to the same concept, and the detailed implementation process thereof is referred to as the method embodiment, which is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description, and do not represent the advantages and disadvantages of the embodiments.
In the embodiment of the application, the travel path recommendation device firstly generates a start area grid and an end area grid according to a start position and an end position from a client, then loads data of the start area grid and the end area grid in a preset time period in a pre-generated space-time index file, generates start area data and end area data, secondly determines a plurality of target vehicle identifications according to the start area data and the end area data, determines a time point pair of each target vehicle identification, and finally constructs a result set according to the time point pair of each target vehicle identification, generates a recommended path based on the result set, and recommends the recommended path to the client. According to the method and the device, the recommended paths of the starting position and the ending position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved.
The present invention also provides a computer readable medium having stored thereon program instructions that, when executed by a processor, implement the travel path recommendation method provided by the various method embodiments described above.
The present invention also provides a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of travel path recommendation of the various method embodiments described above.
Please refer to fig. 4, which provides a schematic structural diagram of a terminal according to an embodiment of the present application. As shown in fig. 4, terminal 1000 can include: at least one processor 1001, at least one network interface 1004, a user interface 1003, memory 1005, at least one communication bus 1002.
Wherein a communication bus 1002 is used to enable connective 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 also 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.
Processor 1001 may include one or more processing cores, among other things. The processor 1001, which is connected to various parts throughout the electronic device 1000 using various interfaces and lines, performs various functions of the electronic device 1000 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 1005 and calling data stored in the memory 1005. Alternatively, the processor 1001 may be implemented in at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1001 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, 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 is understood that the modem may not be integrated into the processor 1001, but may be implemented by a single chip.
The Memory 1005 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 may be used to store an instruction, a program, code, a set of codes, or a set 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 various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 1005 may alternatively be at least one memory device located remotely from the processor 1001. As shown in fig. 4, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a travel path recommendation application program.
In the terminal 1000 shown in fig. 4, the user interface 1003 is mainly used as an interface for providing input for a user, and acquiring data input by the user; and the processor 1001 may be configured to call the travel path recommendation application stored in the memory 1005, and specifically perform the following operations:
generating a starting point area grid and an end point area grid according to a starting point position and an end point position from a client;
loading data of a starting point area grid and an end point area grid in a preset time period in a pre-generated space-time index file, and generating starting point area data and end point area data;
determining a plurality of target vehicle identifications according to the starting point region data and the ending point region data, and determining a time point pair of each target vehicle identification;
and constructing a result set according to the time point pair of each target vehicle identification, generating a recommended path based on the result set, and recommending the recommended path to the client.
In one embodiment, the processor 1001, before performing generating the start area grid and the end area grid from the start position and the end position from the client, further performs the following operations:
constructing a main grid set of a global scope by adopting a GeoHash algorithm and combining preset grid parameters;
setting a data structure for each main grid in the main grid set, dividing each main grid into a plurality of sub-grids, and generating a grid map;
counting all historical vehicle track data according to a preset period;
processing all historical vehicle track data according to a data structure set by each main grid in a grid map to obtain first-class index data and second-class index data;
constructing a storage directory according to the grid ID of each main grid, and storing the data of the first type of index and the data of the second type of index into the storage directory to obtain a space-time index file; wherein the content of the first and second substances,
the data structure comprises a first type index and a second type index, wherein the first type index is used for recording the time when the vehicle enters and exits each main grid, and the second type index is used for recording the time when the vehicle enters and exits each sub grid.
In one embodiment, the processor 1001, when executing the generation of the start area grid and the end area grid according to the start position and the end position from the client, specifically performs the following operations:
receiving a starting position and an end position from a client;
and calculating grids of the starting point position and the end point position in a preset range in a pre-generated grid map to obtain a starting point area grid and an end point area grid.
In one embodiment, the processor 1001, when performing the determination of the plurality of target vehicle identifications from the start area data and the end area data, specifically performs the following operations:
traversing in the starting point region data and the ending point region data to obtain a vehicle identifier of the starting point region and a vehicle identifier of the ending point region;
placing the vehicle identification of the starting point area in a preset first set to obtain first set data;
placing the vehicle identification of the terminal area in a preset second set to obtain second set data;
and taking intersection according to the first set data and the second set data to obtain a plurality of target vehicle identifications of the intersection parts.
In one embodiment, when determining the time point pair of each target vehicle identifier, the processor 1001 specifically performs the following operations:
acquiring the time when each target vehicle identifier enters and exits the grid from the first type of index data of the starting points to obtain a plurality of starting point times of each target vehicle identifier;
sequencing the plurality of starting points according to the time sequence to obtain a plurality of sequenced starting points;
acquiring the time when each target vehicle identification enters and exits the grid from the first-class index data of the destination to obtain a plurality of destination times of each target vehicle identification;
sequencing the plurality of end points according to the time sequence to obtain a plurality of sequenced end points;
and determining the last time in the sequenced starting time moments and the first time in the sequenced end time moments as the time point pair of each target vehicle identification.
In one embodiment, the processor 1001, when executing the building of the result set according to the time point pairs identified by each target vehicle, specifically performs the following operations:
searching a sub-grid which is closest to the position of the starting time in the starting point second-class index data to obtain a starting point time sub-grid, and taking the time of the starting point time sub-grid as the starting point time to obtain the starting point time sub-grid and the starting point time of each target vehicle identification;
searching a sub-grid which is closest to the position of the end time in the distance time point pair in the end point second-class index data to obtain an end point time sub-grid, and taking the time of the end point time sub-grid as the end point time to obtain the end point time sub-grid and the end point time of each target vehicle identification;
and storing the identifier of each target vehicle identifier, the starting point time, the ending point time, the starting point time sub-grid and the ending point time sub-grid to obtain a result set.
In one embodiment, the processor 1001 specifically performs the following operations when performing generation of a recommended path based on a result set:
obtaining the distance difference of each target vehicle identifier according to the distance difference between the starting point time sub-grid and the ending point time sub-grid of each target vehicle identifier in the result set;
sequencing all data in the result set according to the distance difference of each target vehicle identifier to obtain sequenced data;
and outputting the sorted data, and generating a recommended path one by one according to the output sorted data.
In the embodiment of the application, the travel path recommendation device firstly generates a start area grid and an end area grid according to a start position and an end position from a client, then loads data of the start area grid and the end area grid in a preset time period in a pre-generated space-time index file, generates start area data and end area data, secondly determines a plurality of target vehicle identifications according to the start area data and the end area data, determines a time point pair of each target vehicle identification, and finally constructs a result set according to the time point pair of each target vehicle identification, generates a recommended path based on the result set, and recommends the recommended path to the client. According to the method and the device, the recommended paths of the starting position and the ending position can be quickly searched out on the basis of big data statistics according to the pre-generated space-time index file, so that the route recommendation efficiency is improved.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program to instruct related hardware, and the program for travel path recommendation may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory or a random access memory.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.

Claims (10)

1. A travel path recommendation method, characterized in that the method comprises:
generating a starting point area grid and an end point area grid according to a starting point position and an end point position from a client;
loading data of the starting point area grid and the end point area grid in a preset time period in a pre-generated space-time index file to generate starting point area data and end point area data;
determining a plurality of target vehicle identifications according to the starting point area data and the ending point area data, and determining a time point pair of each target vehicle identification;
and constructing a result set according to the time point pair of each target vehicle identification, generating a recommended path based on the result set, and recommending the recommended path to the client.
2. The method of claim 1, wherein prior to generating the starting area grid and the ending area grid based on the starting location and the ending location from the client, further comprising:
constructing a main grid set of a global scope by adopting a GeoHash algorithm and combining preset grid parameters;
setting a data structure for each main grid in the main grid set, dividing each main grid into a plurality of sub-grids, and generating a grid map;
counting all historical vehicle track data according to a preset period;
processing all historical vehicle track data according to a data structure set by each main grid in a grid map to obtain first-class index data and second-class index data;
constructing a storage directory according to the grid ID of each main grid, and storing the data of the first type of index and the data of the second type of index into the storage directory to obtain a space-time index file; wherein the content of the first and second substances,
the data structure comprises a first type index and a second type index, the first type index is used for recording the time when the vehicle enters and exits each main grid, and the second type index is used for recording the time when the vehicle enters and exits each sub grid.
3. The method of claim 1, wherein generating the starting area grid and the ending area grid based on the starting position and the ending position from the client comprises:
receiving a starting position and an end position from a client;
and calculating grids of the starting point position and the end point position in a preset range in a pre-generated grid map to obtain a starting point area grid and an end point area grid.
4. The method of claim 1, wherein determining a plurality of target vehicle identifications from the start and end zone data comprises:
traversing and acquiring vehicle identifications in the starting point region data and the ending point region data to obtain starting point region vehicle identifications and ending point region vehicle identifications;
placing the vehicle identification of the starting point area in a preset first set to obtain first set data;
placing the vehicle identification of the terminal area in a preset second set to obtain second set data;
and acquiring intersection according to the first set data and the second set data to obtain a plurality of target vehicle identifications of the intersection.
5. The method according to claim 1, wherein the start area data includes start first-class index data, and the end area data includes end first-class index data; the starting point first-class index data and the ending point first-class index data are vehicle data corresponding to a main grid;
the determining the time point pair of each target vehicle identifier includes:
acquiring the time when each target vehicle identifier enters or exits the grid from the initial first-type index data to obtain a plurality of initial points of each target vehicle identifier;
sequencing the plurality of starting points according to the time sequence to obtain a plurality of sequenced starting points;
acquiring the time when each target vehicle identifier enters and exits the grid from the endpoint first-type index data to obtain a plurality of endpoint times of each target vehicle identifier;
sequencing the plurality of end points according to the time sequence to obtain a plurality of sequenced end points;
and determining the last time in the sequenced starting time moments and the first time in the sequenced ending time moments as the time point pair of each target vehicle identification.
6. The method of claim 1, wherein the start area data comprises a start second type index data and the end area data comprises an end second type index data; the starting point second type index data and the end point second type index data are vehicle data corresponding to sub grids;
the constructing of the result set according to the time point pairs of each target vehicle identifier includes:
searching a sub-grid which is closest to the position of the starting time in the time point pair in the starting point second-type index data to obtain a starting point time sub-grid, and taking the time of the starting point time sub-grid as the starting point time to obtain the starting point time sub-grid and the starting point time of each target vehicle identification;
searching a sub-grid which is closest to the position of the end time in the time point pair in the end point second-class index data to obtain an end point time sub-grid, and taking the time of the end point time sub-grid as the end point time to obtain the end point time sub-grid and the end point time of each target vehicle identification;
and storing the identifier of each target vehicle identifier, the starting point time, the ending point time, the starting point time sub-grid and the ending point time sub-grid to obtain a result set.
7. The method of claim 1, wherein generating a recommended path based on the result set comprises:
obtaining the distance difference of each target vehicle identification according to the distance difference between the starting point time sub-grid and the ending point time sub-grid of each target vehicle identification in the result set;
sequencing all data in the result set according to the distance difference of each target vehicle identifier to obtain sequenced data;
and outputting the sorted data, and generating a recommended path one by one according to the output sorted data.
8. A travel path recommendation device, characterized in that the device comprises:
the area grid generating module is used for generating a starting point area grid and an end point area grid according to a starting point position and an end point position from the client;
the region data generation module is used for loading data of the starting point region grid and the end point region grid in a preset time period in a pre-generated space-time index file to generate starting point region data and end point region data;
the time point pair determining module is used for determining a plurality of target vehicle identifications according to the starting point region data and the ending point region data and determining the time point pair of each target vehicle identification;
and the search path generation module is used for constructing a result set according to the time point pair of each target vehicle identifier, generating a recommendation path based on the result set and recommending the recommendation path to the client.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to perform the method steps according to any of claims 1-7.
10. A 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 steps of any of claims 1-7.
CN202211003907.4A 2022-08-22 2022-08-22 Travel path recommendation method and device, storage medium and terminal Active CN115080866B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211003907.4A CN115080866B (en) 2022-08-22 2022-08-22 Travel path recommendation method and device, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211003907.4A CN115080866B (en) 2022-08-22 2022-08-22 Travel path recommendation method and device, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN115080866A true CN115080866A (en) 2022-09-20
CN115080866B CN115080866B (en) 2022-11-25

Family

ID=83244698

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211003907.4A Active CN115080866B (en) 2022-08-22 2022-08-22 Travel path recommendation method and device, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN115080866B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004301677A (en) * 2003-03-31 2004-10-28 Xanavi Informatics Corp Method of searching for course on navigation device
CN108170790A (en) * 2017-12-27 2018-06-15 北京中交兴路车联网科技有限公司 A kind of method and system based on magnanimity track data retrieval experience route
CN108205562A (en) * 2016-12-19 2018-06-26 千寻位置网络有限公司 Location data storage, search method and its device of GIS-Geographic Information System
CN110737849A (en) * 2019-10-10 2020-01-31 北京百度网讯科技有限公司 Travel scheme recommendation method, device, equipment and storage medium
CN110825830A (en) * 2019-10-30 2020-02-21 广州海格星航信息科技有限公司 Data retrieval method for grid space
CN111859167A (en) * 2019-04-29 2020-10-30 北京四维图新科技股份有限公司 Path acquisition method, device, system and storage medium
CN112183831A (en) * 2020-09-17 2021-01-05 北京三快在线科技有限公司 Route generation method and device, storage medium and electronic equipment
CN113051359A (en) * 2021-03-30 2021-06-29 大连理工大学 Large-scale track data similarity query method based on multi-level index structure
CN114812584A (en) * 2021-01-19 2022-07-29 北京四维图新科技股份有限公司 Path planning method, system, storage medium and equipment

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004301677A (en) * 2003-03-31 2004-10-28 Xanavi Informatics Corp Method of searching for course on navigation device
CN108205562A (en) * 2016-12-19 2018-06-26 千寻位置网络有限公司 Location data storage, search method and its device of GIS-Geographic Information System
CN108170790A (en) * 2017-12-27 2018-06-15 北京中交兴路车联网科技有限公司 A kind of method and system based on magnanimity track data retrieval experience route
CN111859167A (en) * 2019-04-29 2020-10-30 北京四维图新科技股份有限公司 Path acquisition method, device, system and storage medium
CN110737849A (en) * 2019-10-10 2020-01-31 北京百度网讯科技有限公司 Travel scheme recommendation method, device, equipment and storage medium
CN110825830A (en) * 2019-10-30 2020-02-21 广州海格星航信息科技有限公司 Data retrieval method for grid space
CN112183831A (en) * 2020-09-17 2021-01-05 北京三快在线科技有限公司 Route generation method and device, storage medium and electronic equipment
CN114812584A (en) * 2021-01-19 2022-07-29 北京四维图新科技股份有限公司 Path planning method, system, storage medium and equipment
CN113051359A (en) * 2021-03-30 2021-06-29 大连理工大学 Large-scale track data similarity query method based on multi-level index structure

Also Published As

Publication number Publication date
CN115080866B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
US10520326B2 (en) Driving route matching method and apparatus, and storage medium
CN109308540A (en) A kind of distribution plan generation method of distribution vehicle, apparatus and system
CN111854779B (en) Route planning method and device, electronic equipment and readable storage medium
US20150120600A1 (en) Time and location based delivery optimization
EP2750087A1 (en) Methods and systems for determining estimated package delivery/pick-up times
CN105678412A (en) Path planning method and device facing multiple passengers
CN111612122A (en) Method and device for predicting real-time demand and electronic equipment
CN111831899B (en) Navigation interest point recommendation method, device, server and readable storage medium
CN107038620A (en) Based on user call a taxi preference information push and device
CN105051787A (en) Drawing data generation device and drawing device
CN112819226A (en) Parking lot recommendation method and device, storage medium and terminal
CN112348317A (en) Project planning condition generation method and system for smart city
CN111860858A (en) Method and device for determining model updating parameters and readable storage medium
CN115080866B (en) Travel path recommendation method and device, storage medium and terminal
CN107239889B (en) Method for quantitatively evaluating building vulnerability of mountainous area under debris flow stress
CN112712391A (en) Service pushing method and device, electronic equipment and storage medium
CN113722415B (en) Point cloud data processing method and device, electronic equipment and storage medium
CN115718824A (en) Method for judging position of equipment and automatically pushing equipment information through space distance
CN106909612B (en) Method and device for processing following behavior data
CN114357102A (en) Road network data generation method and device
Pugliese et al. MAT-builder: a system to build semantically enriched trajectories
CN115617933A (en) Multi-dimensional trajectory analysis and visualization method and device based on spatio-temporal data
CN110929207B (en) Data processing method, device and computer readable storage medium
CN107391728A (en) Data digging method and data mining device
CN115409222A (en) Graph database-based transportation route planning method, device, equipment and 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