Travel mode determination method, travel mode determination device, travel mode determination equipment and storage medium
1. A travel mode determination method comprises the following steps:
acquiring the spatiotemporal information of a user;
determining road section information of a travel road section of the user based on the spatio-temporal information;
and determining the travel mode of the user in the travel road section based on the road section information.
2. The method of claim 1, wherein the spatiotemporal information includes location information and time information, the segment information includes an endpoint of the travel segment, and the determining the segment information of the travel segment of the user based on the spatiotemporal information includes:
sorting the position information based on the time information to determine an original position point;
if the distance between the adjacent original position points is smaller than a first preset distance, combining the adjacent original position points to determine a combined position point;
and determining an end point of the travel road section of the user based on the combined position point.
3. The method of claim 2, wherein said determining an endpoint for the user's travel segment based on the merged location point comprises:
and if the stay time of the merging position point is longer than a preset time and/or the distance between the merging position point and the predetermined frequently visited place position point of the user is smaller than a second preset distance, determining that the merging position point is the end point of the travel road section of the user.
4. The method of claim 3, further comprising:
acquiring a historical position point of the user within a preset historical time;
clustering the historical position points to obtain at least one class, wherein each class in the at least one class comprises at least one historical position point;
deleting the classes of which the number of the historical position points is less than the preset number and/or the number of the historical position points is less than the preset number in the at least one class to obtain the remaining classes;
and taking the position points corresponding to the residual classes as the position points of the frequent visit places.
5. The method of claims 1-4, wherein the determining a travel pattern of the user within the travel segment based on the segment information comprises:
acquiring to-be-processed information corresponding to the road section information, and determining a travel mode of the user in the travel road section based on the to-be-processed information, wherein the to-be-processed information comprises: identification information of an original position point corresponding to the road section information and related to a travel mode, or travel time of a road section in the same group of the travel road section.
6. The method according to claim 5, wherein the section information includes an end point of the travel section, the to-be-processed information is the identification information related to the travel mode, the obtaining of the to-be-processed information corresponding to the section information, and the determining of the travel mode of the user in the travel section based on the to-be-processed information includes:
receiving reported information corresponding to an original position point between endpoints of the travel road section, wherein the reported information comprises the identification information related to the travel mode;
and taking the travel mode corresponding to the identification information as the travel mode of the user in the travel road section.
7. The method according to claim 5, wherein the road segment information includes an end point and a travel time of the travel road segment, the to-be-processed information is the travel time of a same road segment of the travel road segment, the obtaining of the to-be-processed information corresponding to the road segment information, and the determining of the travel mode of the user in the travel road segment based on the to-be-processed information include:
determining a same group of road sections of the travel road section based on the end points of the travel road section;
determining the number of categories to be clustered and determining the road sections in the same group to be processed;
clustering travel time consumption of the road sections in the same group to be processed to obtain classes of the category number, wherein different classes correspond to different travel modes;
determining a class to which the travel time of the user in the travel road section belongs, and determining a travel mode corresponding to the class as the travel mode of the user in the travel road section.
8. The method of claim 7, wherein the segment information further includes a travel distance of the travel segment, the determining a number of categories to be clustered, and determining a to-be-processed same-group segment of the same-group segment include:
if the travel distance is smaller than a third preset distance, determining the number of the classes to be clustered as a preset number, and taking the same-group road sections as the same-group road sections to be processed; alternatively, the first and second electrodes may be,
and if the travel distance is greater than or equal to a third preset distance, taking the determined number of the travel modes in the same group of road segments as the number of the to-be-clustered road segments, and taking other same group of road segments except the same group of road segments with the determined travel modes in the same group of road segments as the to-be-processed same group of road segments.
9. An apparatus for determining a travel pattern, comprising:
the acquisition module is used for acquiring the spatiotemporal information of a user;
the first determining module is used for determining road section information of a travel road section of the user based on the time-space information;
and the second determining module is used for determining the travel mode of the user in the travel road section based on the road section information.
10. The apparatus of claim 9, wherein the spatiotemporal information comprises location information and time information, the segment information comprises an endpoint of the travel segment, and the first determining module is specifically configured to:
sorting the position information based on the time information to determine an original position point;
if the distance between the adjacent original position points is smaller than a first preset distance, combining the adjacent original position points to determine a combined position point;
and determining an end point of the travel road section of the user based on the combined position point.
11. The apparatus of claim 10, wherein the first determining module is further specifically configured to:
and if the stay time of the merging position point is longer than a preset time and/or the distance between the merging position point and the predetermined frequently visited place position point of the user is smaller than a second preset distance, determining that the merging position point is the end point of the travel road section of the user.
12. The apparatus of claim 11, further comprising:
the third determining module is used for acquiring historical position points of the user within a preset historical time; clustering the historical position points to obtain at least one class, wherein each class in the at least one class comprises at least one historical position point; deleting the classes of which the number of the historical position points is less than the preset number and/or the number of the historical position points is less than the preset number in the at least one class to obtain the remaining classes; and taking the position points corresponding to the residual classes as the position points of the frequent visit places.
13. The apparatus according to any one of claims 9-12, wherein the second determining means is specifically configured to:
acquiring to-be-processed information corresponding to the road section information, and determining a travel mode of the user in the travel road section based on the to-be-processed information, wherein the to-be-processed information comprises: identification information of an original position point corresponding to the road section information and related to a travel mode, or travel time of a road section in the same group of the travel road section.
14. The apparatus of claim 13, wherein the segment information includes an end point of the travel segment, the to-be-processed information is the identification information related to the travel mode, and the second determining module is further specifically configured to:
receiving reported information corresponding to an original position point between endpoints of the travel road section, wherein the reported information comprises the identification information related to the travel mode;
and taking the travel mode corresponding to the identification information as the travel mode of the user in the travel road section.
15. The apparatus of claim 13, wherein the segment information includes an end point and a travel time of the travel segment, the to-be-processed information is a travel time of a same set of segments of the travel segment, and the second determining module is further specifically configured to:
determining a same group of road sections of the travel road section based on the end points of the travel road section;
determining the number of categories to be clustered and determining the road sections in the same group to be processed;
clustering travel time consumption of the road sections in the same group to be processed to obtain classes of the category number, wherein different classes correspond to different travel modes;
determining a class to which the travel time of the user in the travel road section belongs, and determining a travel mode corresponding to the class as the travel mode of the user in the travel road section.
16. The apparatus of claim 15, wherein the segment information further includes a travel distance for the travel segment, and the second determining module is further specifically configured to:
if the travel distance is smaller than a third preset distance, determining the number of the classes to be clustered as a preset number, and taking the same-group road sections as the same-group road sections to be processed; alternatively, the first and second electrodes may be,
and if the travel distance is greater than or equal to a third preset distance, taking the determined number of the travel modes in the same group of road segments as the number of the to-be-clustered road segments, and taking other same group of road segments except the same group of road segments with the determined travel modes in the same group of road segments as the to-be-processed same group of road segments.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
Background
The travel rule of a person is an important subject in urban calculation research, the travel mode is important content in the travel rule, and the research travel mode provides important data for smart city planning.
In the related art, a travel mode is generally determined by adopting a traditional questionnaire mode.
Disclosure of Invention
The disclosure provides a travel mode determining method, device, equipment and storage medium.
According to an aspect of the present disclosure, a travel mode determining method is provided, including: acquiring the spatiotemporal information of a user; determining road section information of a travel road section of the user based on the spatio-temporal information; and determining the travel mode of the user in the travel road section based on the road section information.
According to another aspect of the present disclosure, there is provided a travel mode determining apparatus including: the acquisition module is used for acquiring the spatiotemporal information of a user; the first determining module is used for determining road section information of a travel road section of the user based on the time-space information; and the second determining module is used for determining the travel mode of the user in the travel road section based on the road section information.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the above aspects.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of the above aspects.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the above aspects.
According to the technical scheme disclosed by the invention, the efficiency and accuracy of travel mode determination can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram according to a first embodiment of the present disclosure;
FIG. 2 is a schematic diagram according to a second embodiment of the present disclosure;
FIG. 3 is a schematic diagram according to a third embodiment of the present disclosure;
FIG. 4 is a schematic diagram according to a fourth embodiment of the present disclosure;
FIG. 5 is a schematic diagram according to a fifth embodiment of the present disclosure;
FIG. 6 is a schematic diagram according to a sixth embodiment of the present disclosure;
fig. 7 is a schematic view of an electronic device for implementing any one of the travel mode determination methods according to the embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram according to a first embodiment of the present disclosure, where this embodiment provides a travel mode determining method, including:
101. and acquiring the spatiotemporal information of the user.
102. And determining road section information of the travel road section of the user based on the time-space information.
103. And determining the travel mode of the user in the travel road section based on the road section information.
By determining the road section information based on the space-time information and determining the travel mode based on the road section information, compared with the traditional questionnaire mode, the travel mode determination efficiency and accuracy can be improved.
When a user uses an Application (APP) with a positioning function, the user's spatio-temporal information can be uploaded through the APP. The spatiotemporal information includes location information and time information of the user, and the location information may be latitude and longitude information.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the good custom of the public order. The implementation subject of the travel mode determination method may obtain the spatio-temporal data of the user through various public and legal compliance modes, for example, the spatio-temporal data may be obtained from a public data set, or may be obtained from the user after authorization of the user. The method for determining the travel mode according to the embodiment of the disclosure is executed after being authorized by a user, and the execution process of the method conforms to relevant laws and regulations.
According to the difference of the APP used by the user, different data acquisition modes can be adopted to acquire the spatiotemporal information of the user, for example, when the user uses the APP of a map navigation type, the spatiotemporal information of the user can be periodically acquired, or when the user uses the APP of a news type and a take-out type, the acquisition of the spatiotemporal information of the user can be triggered based on a use event when the user uses the APP of the type.
After the time-space information of the user is obtained, the time-space information comprises time information and position information, and the position information can be sequenced based on the time information to determine an original position point; if the distance between the adjacent original position points is smaller than a first preset distance, combining the adjacent original position points to determine a combined position point; and determining an end point of the travel road section of the user based on the combined position point.
By combining the original position points with the distance smaller than the first preset distance, some noise information can be removed, and the operation complexity is reduced.
For example, for each user, the spatio-temporal information of the user within a preset statistical period, such as a day, may be obtained. As shown in fig. 2, after the time-space information of the user in one day is acquired, the position information in the day is sorted according to the sequence of the time information, the position point corresponding to the sorted position information is used as an original position point, and the dot in fig. 2 represents the original position point.
After the home position points are determined, a distance between adjacent home position points may be calculated based on position information of the home position points and compared with a first preset distance. As shown in fig. 2, the first preset distance is d, the road segments corresponding to the distance between the adjacent original position points being smaller than the first preset distance d are represented by thin solid lines, and the road segments corresponding to the distance between the adjacent original position points being greater than or smaller than the first preset distance d are represented by thick solid lines.
And if the distance between the adjacent original position points is smaller than the preset interval, combining the two adjacent original position points. And if the distance between the adjacent original position points is greater than or equal to the preset interval, keeping the original position points and taking the original position points as combined position points. Therefore, the merged location point may include a location point obtained by merging a plurality of original location points, and/or an original location point. As shown in fig. 3, the merged locus point where a plurality of origin loci are merged is represented by a black locus, and the locus points which remain as the merged locus point are represented by a white locus.
When determining the end point of the travel section of the user based on the merged location point, the determining may include: and if the stay time of the merging position point is longer than a preset time and/or the distance between the merging position point and the predetermined frequently visited place position point of the user is smaller than a second preset distance, determining that the merging position point is the end point of the travel road section of the user.
The end point of the travel road section is determined based on the stay time and/or the frequent visit place position point, so that the actual condition of the travel road section of the user can be met, and the accuracy of the end point of the travel route is improved.
For example, a certain merging location point is obtained by merging a plurality of original location points, the minimum time in the time information of each original location point in the plurality of original location points is t1, and the maximum time is t2, so that the staying time of the merging location point is t2-t 1. If a certain combined position point is an original position point, the dwell time is 0.
As shown in fig. 4, the preset time duration is denoted by t, and the stay time duration of the first merging location point and the fourth merging location point (in the order from left to right) in fig. 4 is longer than the preset time duration, then the first merging location point and the fourth merging location point are the end points of the travel route.
In addition, if the staying time of a certain merging position point is less than the preset time t, but if the distance between the merging position point and the frequently visited place position point of the user is less than the second preset distance, the merging position point is also used as the end point of the travel route. For example, in fig. 4, although the stay time of the second merging location point and the third merging location point is less than the preset time t, if the distance between the second merging location point and the third merging location point and any one of the frequent visit location points of the user is less than the second preset distance D, the two merging location points are also the end points of the travel section.
In some embodiments, the method may further include: acquiring a historical position point of the user within a preset historical time; clustering the historical position points to obtain at least one class, wherein each class in the at least one class comprises at least one historical position point; deleting the classes of which the number of the historical position points is less than the preset number and/or the number of the historical position points is less than the preset number in the at least one class to obtain the remaining classes; and taking the historical position points included in the remaining classes as the frequently visited place position points.
By clustering the historical position points and deleting the historical position points to a certain extent, the effectiveness of the position points in the frequent visit place can be improved.
The preset historical duration is, for example, the last 3 months of the user, and in the last 3 months, the spatiotemporal information of the user in each day of the 3 months can be collected, and the position point corresponding to the position information in the spatiotemporal information is used as the historical position point. Clustering historical position points refers to clustering historical position points with close spatial distances into a class. The Clustering is, for example, a space-Density Clustering (DBSCAN) algorithm, so that at least one class can be obtained, and the Spatial distance of the historical position points in each class is close.
And corresponding to each class, if the number of the historical position points in the class is less than the preset number n, deleting the class. And/or deleting the category if the occurrence frequency of the historical position points in the category is less than the preset frequency m. The time-space information of each historical position point comprises position information and time information, the time information can be a date corresponding to the historical position point, for example, a certain date in a certain month of a certain year, and if the same position information corresponds to a plurality of different dates, the number of times of occurrence of the historical position point of the same position information is the number of the different dates.
After the above-mentioned class is deleted in at least one class, remaining classes are obtained, each of the remaining classes may include at least one historical location point, a location point corresponding to average location information of the historical location points may be used as a location point corresponding to the remaining class, and a location point corresponding to the remaining class may be used as a location point of a frequent visit place of the user, so that, as described above, an end point of the travel route segment may be determined based on the location point of the frequent visit place.
After the end points of the travel sections are obtained, a section between the end points of two adjacent travel sections can be used as one travel section, as shown in fig. 4, since the four merging position points are all travel section end points, three travel sections can be determined and are respectively represented by a first travel section, a second travel section and a third travel section.
For a certain travel section, of the two endpoints of the travel section, the endpoint with the shorter time is taken as the starting point of the travel section, and the endpoint with the longer time is taken as the end point of the travel section.
The link information may include the following information in addition to the end point of the travel link: departure time, arrival time, travel time consumption and travel distance.
The departure time is the time corresponding to the starting point of the travel road section. If the starting point is obtained by combining a plurality of original position points, the latest time of the original position points is taken as the time corresponding to the starting point. And if the starting point is the original position point, taking the time of the original position point as the time corresponding to the starting point.
And the arrival time is the time corresponding to the terminal point of the travel road section. If the end point is obtained by combining a plurality of original position points, the earliest time of the original position points is used as the time corresponding to the end point. And if the end point is the original position point, taking the time of the original position point as the time corresponding to the end point.
And when the trip is consumed, subtracting the time corresponding to the starting point of the trip road section from the time corresponding to the terminal point of the trip road section.
Travel distance, the distance between the end point of the travel section and the start point of the travel section. The distance may be a straight line distance or a manhattan distance. The distance may be calculated based on the position information of the terminal and the position information of the start point. If the end point (starting point or end point) of the travel link is obtained by merging a plurality of original position points, the average position information of the plurality of original position points may be used as the position information of the corresponding end point, and if the end point is an original position point, the position information of the original position point may be used as the position information of the end point.
Therefore, through the above processing, for each travel section of each user, information such as an end point, a travel distance, and a travel time of the travel section may be obtained, and then, a corresponding travel mode may be determined based on the information.
In some embodiments, the determining, based on the section information, a travel mode of the user in the travel section includes: acquiring to-be-processed information corresponding to the road section information, and determining a travel mode of the user in the travel road section based on the to-be-processed information, wherein the to-be-processed information comprises: identification information of an original position point corresponding to the road section information and related to a travel mode, or travel time of a road section in the same group of the travel road section.
Through the identification information or the travel time of the road sections in the same group, the accuracy and efficiency of travel mode determination can be improved.
On one hand, the information to be processed may be identification information of an original location point corresponding to the road segment information, which is related to a travel mode, and then, the travel mode corresponding to the identification information may be determined as the travel mode of the user in the travel road segment.
That is, the road segment information includes an end point of the travel road segment, the to-be-processed information is identification information related to a travel mode, the to-be-processed information corresponding to the road segment information is acquired, and the determining of the travel mode of the user in the travel road segment based on the to-be-processed information includes: receiving reported information corresponding to an original position point between endpoints of the travel road section, wherein the reported information comprises the identification information related to the travel mode; and taking the travel mode corresponding to the identification information as the travel mode of the user in the travel road section.
By determining the corresponding travel mode based on the identification information, the travel mode can be simply, conveniently and quickly obtained when the report information contains the identification information.
Specifically, if the identification information is a driving navigation identification, determining that the travel mode is driving travel; or if the identification information is a wifi identification on the bus and the movement track of the original position point corresponding to the identification information is matched with the bus track, determining that the travel mode is bus travel; or if the identification information is a subway base station identification, determining that the travel mode is subway travel. Wherein, wifi sign and bus orbit on the bus can be preconfigured to learn whether foretell wifi sign is wifi sign and motion orbit on the bus and whether match with the bus orbit.
For a certain original location point, the reported information may include not only the time-space information, but also identification information related to the travel mode. For example, when the user navigates by using the map APP, the information of the user uploaded by the map APP may include a driving navigation identifier in addition to the time-space information, so as to identify that the user is navigating. For another example, when the user uses a certain positioning APP, such as a certain news APP, the uploaded information of the news APP may include the time-space information of the user and may also include a wifi identifier on the bus where the user takes, wherein a mobile device (such as a mobile phone) used by the user may scan or connect to wifi on the bus, and thus the news APP may upload the wifi identifier of the wifi scanned or connected by the mobile device used by the user. For another example, when a user is taking a subway, generally, in order to improve the signal strength of the mobile device, a base station for a mobile signal is deployed at the subway station, and at this time, the uploaded spatio-temporal information may include a subway base station identifier.
If identification information corresponding to any original position point and related to the travel mode is received, the corresponding travel mode can be determined based on the identification information.
For example, two endpoints of the travel road section are an endpoint a and an endpoint B, the endpoint a is obtained by combining the original position points 1-5, the endpoint B is obtained by combining the original position points 6-8, and if the reported information corresponding to any one of the original position points 1-8 includes the identification information, the travel mode of the travel road section is determined to be the travel mode corresponding to the identification information.
On the other hand, if the identification information is not received, the travel mode of the user in the travel road section can be determined based on the travel time of the same group of road sections of the travel road section.
That is, the road segment information includes an end point and travel time of the travel road segment, the to-be-processed information is travel time of a same road segment of the travel road segment, the to-be-processed information corresponding to the road segment information is acquired, and based on the to-be-processed information, a travel mode of the user in the travel road segment is determined, including: determining a same group of road sections of the travel road section based on the end points of the travel road section; determining the number of categories to be clustered and determining the road sections in the same group to be processed; clustering travel time consumption of the road sections in the same group to be processed to obtain classes of the category number, wherein different classes correspond to different travel modes; determining a class to which the travel time of the user in the travel road section belongs, and determining a travel mode corresponding to the class as the travel mode of the user in the travel road section.
Through clustering the travel time of the routes in the same group, the travel mode is determined based on the clustering result, and the efficiency of determining the travel mode can be improved.
The same group of road sections refers to road sections of which the starting points and the terminals are located in the same grid respectively.
As shown in fig. 5, for a city, the map of the city may be divided into a plurality of grids in advance, for example, each grid is 1km × 1km in size. Assume a certain travel segment-X for a certain user, the start and end points of which are denoted a and B, respectively. The preset treatment duration is, for example, the last 1 month. The above manner may be adopted to obtain the road section information of the travel road sections of all the users in the last 1 month, and if the starting point and the terminal of a certain travel road section-Y are also located in the grids where a and B are located, respectively, the travel road section-Y and the travel road section-X are considered to be the same group of road section. Similarly, assuming that the starting point of travel segment-Z is in the grid of a and the ending point of travel segment-Z is in the grid of B, travel segment-Z, travel segment-Y, and travel segment-X are the same group of segments.
In some embodiments, the determining the number of categories to be clustered and determining the to-be-processed road segment in the same group of road segments further include: if the travel distance is smaller than a third preset distance, determining the number of the classes to be clustered as a preset number, and taking the same-group road sections as the same-group road sections to be processed; or, if the travel distance is greater than or equal to a third preset distance, taking the determined number of categories of the travel modes in the same group of road segments as the number of categories to be clustered, and taking other same group of road segments except the same group of road segments with the determined travel modes in the same group of road segments as the same group of road segments to be processed.
By determining the corresponding category number and the road section of the same group to be processed based on the travel distance, the accuracy of the determined travel mode can be improved.
Taking the travel section-X as an example, if the distance between the two end points a and B of the travel section-X is smaller than the third preset distance L, it indicates that the distance between a and B is short, and generally speaking, the travel mode is walking or riding, therefore, the preset number may be two types, the type with short travel time corresponds to walking, and the type with long travel time corresponds to riding.
For example, the travel section-X, the travel section-Y and the travel section-Z are travel sections of the same group, and the travel distance between the two end points of the travel section-X is smaller than a third preset distance L, the k-means distance is performed for the travel time of travel segment-X, travel time of travel segment-Y, and travel time of travel segment-Z, where k is 2, that is, the travel time of the travel road section-X is clustered to the class corresponding to the shorter travel time, and if the travel mode of the user in the travel road section-X is riding, and otherwise, assuming that the travel time of the travel road section-X is clustered to a class corresponding to the longer travel time, the travel mode of the user in the travel road section-X is walking.
Still taking the travel section-X as an example, if the distance between the two end points a and B of the travel section-X is greater than or equal to the third preset distance L, it indicates that the distance between a and B is longer, and generally, the travel mode at this time is driving travel, bus travel or subway travel.
At this time, the number of categories to be clustered and the road segments in the same group to be processed may be determined based on the determined travel mode and the road segments in the same group corresponding to the determined travel mode.
For example, the travel road section-1 to the travel road section-N are the same group of travel road sections, and the travel distance between the two endpoints of the travel road section-1 is greater than or equal to the third preset distance L, assuming that the travel modes of the travel road section-2 to the travel road section-4 are determined, for example, the identification information is determined, specifically, if the identification information corresponding to the travel road section-2 is a driving navigation identifier, the travel mode of the travel road section-2 is driving travel, the identification information corresponding to the travel road section-3 is a bus wifi identifier, the travel mode of the travel road section-3 is bus travel, the identification information corresponding to the travel road section-4 is a bus wifi identifier, and the travel mode of the travel road section-4 is bus travel. Since the determined travel modes are two types, namely driving travel and bus travel, the number of categories to be clustered is 2. In addition, of the travel sections-1 to-N, travel sections other than the travel sections-2 to-4 are taken as the to-be-processed same-group sections.
Then, k-means clustering can be performed on the travel time consumption of the road segments in the same group to be processed, the category k at this time is also 2, and the travel time consumption can be clustered into different categories during clustering, for example, two categories, namely C1 and C2, can be sorted in the order from small to large of the travel time consumption. The travel modes determined by the travel modes can be sorted according to travel time, for example, the average time consumed by driving for traveling is 25 minutes, the average time consumed by bus for traveling is 35 minutes, and then the travel modes can be sorted according to the order of travel time consumption from small to large: driving trip and bus trip. And then determining a corresponding travel mode based on the sorting sequence. For example, if the travel section-1 belongs to class C1, the corresponding travel mode is driving travel, whereas if the travel section-1 belongs to class C2, the corresponding travel mode is bus travel.
It can be understood that, if the travel distance is greater than or equal to the third preset distance and there is no same group of travel segments for which the travel mode has been determined, the number of categories of the clusters may be set to 3, and all the same group of travel segments are taken as the same group of segments to be processed.
Fig. 6 is a schematic diagram of a sixth embodiment according to the present disclosure, which provides a travel mode determination apparatus. As shown in fig. 6, the travel pattern determination apparatus 600 includes: an acquisition module 601, a first determination module 602, and a second determination module 603.
The obtaining module 601 is configured to obtain spatiotemporal information of a user; the first determining module 602 is configured to determine road segment information of a travel road segment of the user based on the spatio-temporal information; the second determining module 603 is configured to determine, based on the road segment information, a travel mode of the user in the travel road segment.
In some embodiments, the spatiotemporal information includes location information and time information, the section information includes an endpoint of the travel section, and the first determining module 602 is specifically configured to: sorting the position information based on the time information to determine an original position point; if the distance between the adjacent original position points is smaller than a first preset distance, combining the adjacent original position points to determine a combined position point; and determining an end point of the travel road section of the user based on the combined position point.
In some embodiments, the first determining module 602 is further specifically configured to: and if the stay time of the merging position point is longer than a preset time and/or the distance between the merging position point and the predetermined frequently visited place position point of the user is smaller than a second preset distance, determining that the merging position point is the end point of the travel road section of the user.
In some embodiments, the apparatus 600 further comprises: the third determining module is used for acquiring historical position points of the user within a preset historical time; clustering the historical position points to obtain at least one class, wherein each class in the at least one class comprises at least one historical position point; deleting the classes of which the number of the historical position points is less than the preset number and/or the number of the historical position points is less than the preset number in the at least one class to obtain the remaining classes; and taking the position points corresponding to the residual classes as the position points of the frequent visit places.
In some embodiments, the second determining module 603 is specifically configured to: acquiring to-be-processed information corresponding to the road section information, and determining a travel mode of the user in the travel road section based on the to-be-processed information, wherein the to-be-processed information comprises: identification information of an original position point corresponding to the road section information and related to a travel mode, or travel time of a road section in the same group of the travel road section.
In some embodiments, the road segment information includes an end point of the travel road segment, the information to be processed is the identification information related to the travel mode, and the second determining module 603 is further specifically configured to: receiving reported information corresponding to an original position point between endpoints of the travel road section, wherein the reported information comprises the identification information related to the travel mode; and taking the travel mode corresponding to the identification information as the travel mode of the user in the travel road section.
In some embodiments, the road segment information includes an end point and travel time of the travel road segment, the to-be-processed information is travel time of a same road segment of the travel road segment, and the second determining module 603 is further specifically configured to: determining a same group of road sections of the travel road section based on the end points of the travel road section; determining the number of categories to be clustered and determining the road sections in the same group to be processed; clustering travel time consumption of the road sections in the same group to be processed to obtain classes of the category number, wherein different classes correspond to different travel modes; determining a class to which the travel time of the user in the travel road section belongs, and determining a travel mode corresponding to the class as the travel mode of the user in the travel road section.
In some embodiments, the road segment information further includes a travel distance of the travel road segment, and the second determining module 603 is further specifically configured to: if the travel distance is smaller than a third preset distance, determining the number of the classes to be clustered as a preset number, and taking the same-group road sections as the same-group road sections to be processed; or, if the travel distance is greater than or equal to a third preset distance, taking the determined number of categories of the travel modes in the same group of road segments as the number of categories to be clustered, and taking other same group of road segments except the same group of road segments with the determined travel modes in the same group of road segments as the same group of road segments to be processed.
In the embodiment, the road section information is determined based on the spatio-temporal information, and the travel mode is determined based on the road section information, so that the efficiency and the accuracy of travel mode determination can be improved compared with the traditional questionnaire mode.
It is to be understood that in the disclosed embodiments, the same or similar elements in different embodiments may be referenced.
It is to be understood that "first", "second", and the like in the embodiments of the present disclosure are used for distinction only, and do not indicate the degree of importance, the order of timing, and the like.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the electronic device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 707 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
A number of components in the electronic device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the electronic device 700 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 701 executes the respective methods and processes described above, such as the determination method of the travel pattern. For example, in some embodiments, the travel pattern determination method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 700 via the ROM 702 and/or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the travel pattern determination method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured by any other suitable means (e.g. by means of firmware) to perform the method of determining the travel mode.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:在线匹配资源的方法、计算设备及存储介质