Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. 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.
Fig. 1 is a schematic flow chart of a method for recommending a travel route according to an embodiment of the present invention, and as shown in fig. 1, the method for recommending a travel route includes steps S101 and S102, specifically:
s101, obtaining travel information started by a client, and obtaining a label corresponding to the travel information, wherein the travel information at least comprises a plurality of lines of information determined by the client.
Specifically, the client according to the embodiment of the present invention may be an application program on a device such as a mobile phone, a personal computer, a tablet computer, and the like, and in a usage scenario of the present invention, when a user is ready to go from a place a to a place B, the client is opened and a piece of journey information is started, that is, the user starts the journey information on the client when knowing a departure place and a destination of the user and being ready to depart, and since the user already knows the departure place and the destination of the user, route information from the departure place to the destination can be further obtained through experience or map software and recorded in the journey information.
The route information refers to a route of public transportation to be taken from a departure place to a destination, such as a plurality of routes from a place to a place B: line 1: seating 511 buses to the C ground first, and seating 512 buses at the C ground; line 2: the subway No. 1 line is positioned to the D ground, and then the subway No. 2 line is positioned on the D ground; line 3: if 533 paths are located directly, the travel information comprises route information of 511-C-512 and route information of D1-D-D2, wherein D1 and D2 represent a subway No. 1 line and a subway No. 2 line; one route information is 533.
When information related to a trip, including at least route information, is filled into created trip information, the created trip information is called created trip information, and the created trip information belongs to one of the start-up trip information, and in addition, the trip information created in the start-up history also belongs to the start-up trip information.
The tags are information used for determining the attributes of the trip information in the embodiment of the invention, for example, "go to work", "go to school", "go home" and "have a dinner together" all belong to the tags, and the content of the tags is simple, comprehensive and intuitive. In the embodiment of the invention, a label of the journey information can be directly input by a user through a client, or can be obtained after the journey information started by the client is analyzed.
S102, analyzing the labels, and if the travel information corresponding to the labels belongs to a first type of travel, periodically acquiring the current position information and the traffic condition information of the client to predict the time consumption of the routes corresponding to the information of the plurality of routes.
The first category of trips of embodiments of the present invention refers to conventional, fixed trips, e.g., trips that are frequently repeated, with fixed routes, such as commuting, getting to and from school, getting to children, etc. If the travel information corresponding to the label belongs to the first type of travel, the subsequent steps are continuously executed, and the time consumption of the route corresponding to the route information is estimated. If the travel information corresponding to the label does not belong to the first type of travel, subsequent steps will not be executed.
The current position information of the client can be acquired through a GPS positioning module of a terminal where the client is located, and also can be acquired through other modules for positioning, such as a Beidou positioning module and a Galileo positioning module.
The traffic condition information refers to traffic condition information located downstream of the current position of the client on the line, such as congestion conditions, the position of a vehicle on the line, the predicted time and traveling speed of arriving at the next station, and the like.
According to the embodiment of the invention, the route time consumption of the user or other users at the same historical time is obtained by integrating the current position information and the traffic condition information and then by a big data technology, and the route time consumption at the current time is predicted.
It should be noted that, in the embodiment of the present invention, by acquiring the trip information started by the user and the corresponding tag, the route on which the user is going to take and the type of the trip are obtained, and if it is determined that the first-class trip belongs to the first-class trip according to the tag, the current location information and the traffic condition information of the client are periodically collected to predict the time consumption of the route corresponding to the several pieces of route information.
On the basis of the foregoing embodiments, as an optional embodiment, the predicting a route time consumption corresponding to the several pieces of route information further includes: and sending a risk prompt to the client according to the line time consumption corresponding to the plurality of pieces of line information.
Specifically, the sequence of the line time consumption can be obtained by predicting the line time consumption corresponding to each piece of line information, and if the time consumption of all lines is greater than the preset time, a risk prompt is sent to the user. For example, if the time consumed for at least one route is not more than the preset time, the shortest time-consuming route is recommended to the user. In an optional embodiment, the preset time may be obtained by adding the user to the travel information, for example, by counting the travel information started by the client history.
On the basis of the foregoing embodiments, as an optional embodiment, the obtaining of the label corresponding to the trip information specifically includes: sending a plurality of preset labels to the client, and taking the label selected by the client as a label corresponding to the travel information; or sending a blank label to be filled to the client, and obtaining a label corresponding to the travel information through a filled note returned by the semantic analysis client.
Specifically, after the travel information started by the client is acquired, the embodiment of the invention sends a plurality of preset tags, such as "work on duty", "work off duty", "school on duty", "home return", and "dinner party", to the client for the user to select through the client.
In another optional embodiment, the embodiment of the present invention may send the tag to be filled to the client, and the user fills the tag by himself/herself, and then the meaning of the tag filled by the user can be known by semantic recognition. The semantic recognition method can adopt the prior art, and is not further limited herein.
On the basis of the foregoing embodiments, as an optional embodiment, the periodically collecting current location information and traffic condition information of the client further includes:
and generating a travel model according to the position information of the client and the traffic condition information which are periodically acquired, wherein the travel model comprises travel basic information, real-time line information and real-time bus information.
The journey model of the embodiment of the invention specifically comprises the following information:
(1) and (4) travel basic information. The trip consists of at least the following attributes: departure place, destination, bus route set with direction, label name, label type, moment of arriving at destination, historical travel record and the like;
(2) real-time routing information. The real-time line comprises the current traffic road conditions (unblocked, jammed and interrupted) of all covered actual roads in a certain driving direction (ascending or descending) of a certain bus line, the current stay time of each station, the current driving time consumption between every two sequential stations and the like;
(3) real-time bus information. The real-time bus information includes information (license plate number, position, station number, estimated time of arrival at the next station, running speed, shift number, etc.) of buses (buses, subways, ferries, etc.) which actually run online, a line departure schedule, departure intervals, and the like.
It should be noted that, according to the position information of the client periodically acquired and in combination with the acquisition time of each position information, the embodiment of the present invention may obtain the movement trajectory of the client, and by analyzing the movement trajectory, the departure location, the boarding time consumption, the transfer point, the transfer time consumption, and the travel time consumption of the user may be determined. Generally, a point where the user starts the travel information is set as a departure point. According to the route information in the travel information, the getting-on place of the user can be obtained by combining the starting place, when the user leaves the getting-on place, the time consumed for getting-on can be determined, the time consumed for waiting for the car can be also called, if transfer exists in the travel information, the time for transfer, the transfer place, the time consumed for waiting for transfer and the like can be obtained, and the route time consumed corresponding to the plurality of pieces of route information is predicted by statistics.
On the basis of the foregoing embodiments, as an optional embodiment, the embodiment of the present invention further includes that, correspondingly to the number of times of starting the trip information started by the user side, the estimated time consumption of the line corresponding to the pieces of line information is specifically:
if the starting times are more than 2, updating the journey model according to position information and traffic condition information which are collected after the user terminal starts the journey information historically, and predicting the time consumption of the routes corresponding to the information of the plurality of routes according to the updated journey model.
It should be noted that, by retrieving the starting times of the same trip information, it may be performed to check whether the trip information is actually the first type of trip, because the embodiment of the present invention may periodically collect the location information and the traffic condition information of the client after determining that the trip information is the first type of trip, and if it is found that the client has not been completed according to the route recorded in the trip information for many times in history, the tag corresponding to the trip information may be changed to another type, so that the trip route is not selected any more in the future. In addition to the above functions, the statistical starting times can also be obtained by updating the journey model according to the position information and the traffic condition information collected after the user starts the journey information historically, and the route time consumption corresponding to the plurality of route information is predicted according to the updated journey model.
On the basis of the foregoing embodiments, the predicting, according to the updated trip model, the route time consumption corresponding to the pieces of route information further includes:
and detecting whether the updated journey model meets a preset integrity requirement, and if so, predicting the time consumption of the routes corresponding to the plurality of route information according to the updated journey model.
It should be noted that whether the travel model is complete means whether the user is performing a "fixed" travel, in the embodiment of the present invention, whether the travel model is complete is mainly determined by detecting whether the destination is recorded in the travel model, and the premise of obtaining the destination is that the user uses the same travel information before, and the embodiment of the present invention can definitely determine that the travel reaches the end point by collecting the location information of the client.
On the basis of the foregoing embodiments, the predicting the route time consumption corresponding to the pieces of route information specifically includes: and for any piece of route information, acquiring and summing the consumed time of a user from a departure place to an arrival place, the waiting time of each transfer and the consumed time of a departure place to a destination according to the route information, and taking the sum as the route consumed time corresponding to the route.
Fig. 2 is a schematic structural diagram of a device for recommending a travel route according to an embodiment of the present invention, and as shown in fig. 2, the device for recommending a travel route includes: atrip acquisition module 201 and aprediction module 202, wherein:
ajourney acquisition module 201, configured to acquire journey information started by a client and acquire a tag corresponding to the journey information, where the journey information at least includes information of a plurality of lines determined by the client;
and theprediction module 202 is configured to analyze the tag, and if the travel information corresponding to the tag belongs to the first type of travel, periodically acquire current location information and traffic condition information of the client to predict route time consumption corresponding to the pieces of route information.
The device for recommending a route according to the embodiment of the present invention specifically executes the flow of the method for recommending a route according to the above-mentioned embodiment, and please refer to the content of the method for recommending a route according to the above-mentioned embodiment, which is not described herein again. The method for recommending the travel route obtains travel information and a corresponding label started by a user, learns the route to be taken by the user and the type of the travel, periodically collects current position information and traffic condition information of a client if the travel is confirmed to belong to a first type of travel according to the label, and predicts the travel time corresponding to the plurality of pieces of route information.
Fig. 3 is a schematic entity structure diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 3, the electronic device may include: a processor (processor)310, a communication Interface (communication Interface)320, a memory (memory)330 and acommunication bus 340, wherein theprocessor 310, thecommunication Interface 320 and thememory 330 communicate with each other via thecommunication bus 340. Theprocessor 310 may invoke a computer program stored on thememory 330 and executable on theprocessor 310 to perform the method for recommending a travel route provided by the above embodiments, for example, including: the method comprises the steps of obtaining travel information started by a client and obtaining a label corresponding to the travel information, wherein the travel information at least comprises a plurality of pieces of route information determined by the client, analyzing the label, and periodically collecting current position information and traffic condition information of the client if the travel information corresponding to the label belongs to a first type of travel so as to predict route time consumption corresponding to the plurality of pieces of route information.
In addition, the logic instructions in thememory 330 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or make a contribution to the prior art, or may be implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
An embodiment of the present invention further provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is implemented to perform a method for recommending a travel route provided in the foregoing embodiments when executed by a processor, and the method includes: the method comprises the steps of obtaining travel information started by a client and obtaining a label corresponding to the travel information, wherein the travel information at least comprises a plurality of pieces of route information determined by the client, analyzing the label, and periodically collecting current position information and traffic condition information of the client if the travel information corresponding to the label belongs to a first type of travel so as to predict the time consumption of a route corresponding to the plurality of pieces of route information
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed 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 modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.