Method and device for determining travel mode, equipment, storage medium and product
By obtaining user action trajectory and road attribute data and combining classified prediction, the problem of low prediction accuracy of travel modes in existing navigation technologies is solved, and the prediction accuracy is improved.
Patent Information
- Application Number
- CN202310679822.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-08
- Publication Date
- 2024-12-10
AI Technical Summary
In the existing navigation technology, when GPS is used to obtain the real-time position coordinates of users to determine travel mode, complex road conditions lead to a decrease in the accuracy of travel mode prediction.
By obtaining multiple position coordinates corresponding to the target object's action trajectory within the historical time range and road attribute data matching the trajectory, multiple track attribute data are obtained, and classification prediction is performed based on the trajectory and road attribute data to determine the travel method.
Improve the prediction accuracy of travel methods and avoid prediction errors due to road conditions.
Smart Images

Figure CN119104075A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of geographic information technology, and in particular to a method, apparatus, device, storage medium, and product for determining a travel mode. Background Art
[0002] With the continuous development of navigation technology, people usually need to rely on navigation software to provide corresponding travel services when traveling. For example, when walking, navigation software is needed to provide a route map to the destination. When driving, navigation software is needed to provide real-time traffic results (for example, Road A is congested, Road B is unobstructed). Therefore, it is necessary to judge the user's travel mode and provide corresponding travel services.
[0003] In related technologies, the user's real-time location coordinates are usually obtained through the Global Positioning System (GPS), and the user's driving speed is determined based on the changes in the user's location coordinates, so that the user's current travel mode is judged based on the driving speed. For example, when the user's coordinate position changes by 150 meters every 10 seconds, it is determined that the user's travel mode is driving.
[0004] However, in related technologies, due to the complex road conditions, relying solely on changes in location coordinates will result in users who are stuck in traffic being judged to be traveling by walking, thereby reducing the accuracy of travel mode prediction. Summary of the Invention
[0005] The embodiments of the present application provide a method, apparatus, device, storage medium, and product for determining a travel mode, which can improve the accuracy of travel mode prediction. The technical solution is as follows.
[0006] In one aspect, a method for determining a travel mode is provided, the method comprising:
[0007] Acquire multiple position coordinates corresponding to a target object's movement trajectory within a historical time range, and acquire road attribute data corresponding to a target road that has a position matching relationship with the movement trajectory, wherein the road attribute data is used to indicate road features corresponding to the target road;
[0008] acquiring a plurality of first trajectory attribute data based on a positional relationship between the plurality of position coordinates, wherein the first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the action trajectory;
[0009] Based on the trajectory interaction relationship between the plurality of position coordinates and the road attribute data, a plurality of second trajectory attribute data are obtained, wherein the second trajectory attribute data refers to the movement characteristic changes corresponding to the position coordinates on the action trajectory and the target road;
[0010] The action trajectory is classified and predicted based on the multiple first trajectory attribute data and the multiple second trajectory attribute data to obtain a travel mode prediction result of the target object, where the travel mode prediction result is used to indicate the type of travel mode of the target object in the historical time range.
[0011] In another aspect, a device for determining a travel mode is provided, the device comprising:
[0012] an acquisition module, configured to acquire a plurality of position coordinates corresponding to a target object's movement trajectory within a historical time range, and to acquire road attribute data corresponding to a target road that has a position matching relationship with the movement trajectory, wherein the road attribute data is used to indicate road features corresponding to the target road;
[0013] The acquisition module is further configured to acquire a plurality of first trajectory attribute data based on a positional relationship between the plurality of position coordinates, wherein the first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the action trajectory;
[0014] The acquisition module is further configured to obtain a plurality of second trajectory attribute data based on trajectory interaction relationships between the plurality of position coordinates and the road attribute data, wherein the second trajectory attribute data refers to movement feature changes corresponding to movement characteristics between the position coordinates on the action trajectory and the target road;
[0015] a prediction module, configured to classify and predict the action trajectory based on the plurality of first trajectory attribute data and the plurality of second trajectory attribute data, to obtain a travel mode prediction result of the target object, wherein the travel mode prediction result is used to indicate the type of travel mode of the target object within the historical time range.
[0016] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for determining the travel mode as described in any of the above-mentioned embodiments of the present application.
[0017] On the other hand, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored. The at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a method for determining a travel mode as described in any of the above-mentioned embodiments of the present application.
[0018] In another aspect, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for determining a travel mode described in any of the above embodiments.
[0019] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:
[0020] Based on obtaining multiple location coordinates corresponding to the target object's movement trajectory within a historical timeframe, road attribute data corresponding to target roads that have a positional matching relationship with the movement trajectory is also obtained. This not only allows for obtaining multiple first trajectory attribute data based on the positional relationship between the multiple location coordinates, but also allows for obtaining multiple second trajectory attribute data based on the trajectory interaction relationship between the multiple location coordinates and the road attribute data. The movement trajectory is then classified and predicted using the first and second trajectory attribute data, resulting in a predicted travel mode for the target object. Specifically, by classifying and predicting the target object's travel mode based on the relationship between the real-time location coordinates corresponding to the movement trajectory and the road, it is possible to avoid inaccurate predictions of the target object's travel mode due to road conditions, thereby improving the accuracy of travel mode predictions. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0022] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0023] Figure 2 is a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application;
[0024] Figure 3 is a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application;
[0025] Figure 4 is a schematic diagram of a method for obtaining road matching results provided by another exemplary embodiment of the present application;
[0026] Figure 5 is a flow chart of a method for determining a travel mode provided by another exemplary embodiment of the present application;
[0027] Figure 6 is a flow chart of a method for determining a travel mode provided by another exemplary embodiment of the present application;
[0028] Figure 7 is a flow chart of a method for determining a travel mode provided by another exemplary embodiment of the present application;
[0029] Figure 8 This is a structural block diagram of a device for determining a travel mode provided by an exemplary embodiment of the present application;
[0030] Figure 9 This is a structural block diagram of a device for determining a travel mode provided by another exemplary embodiment of the present application;
[0031] Figure 10 It is a structural diagram of a server provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0032] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0033] First, the implementation environment of this application is introduced. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, such as Figure 1 As shown, the implementation environment includes a terminal 110 and a server 120 , and the terminal 110 and the server 120 are connected via a communication network 130 .
[0034] Terminal 110 runs a target application capable of providing travel services, such as a navigation application, a travel application, or a mobile travel application. When terminal 110 receives a selection from a target user requesting a travel service function while the target application is running, a travel mode prediction request is generated and sent to server 120 to determine the travel mode type corresponding to the target user.
[0035] After receiving the travel mode prediction request, the server 120 obtains multiple position coordinates corresponding to the target object's movement trajectory within the historical time range according to the GPS, and obtains road attribute data corresponding to the target road that has a position matching relationship with the movement trajectory, obtains multiple first trajectory attribute data according to the position relationship between the multiple position coordinates, and obtains multiple second trajectory attribute data according to the trajectory interaction relationship between the multiple position coordinates and the road attribute data, thereby classifying and predicting the movement trajectory according to the first trajectory attribute data and the second trajectory attribute data, and obtaining the travel mode type of the target object. According to the travel mode type of the target object, a travel service that matches the travel mode type is determined from the travel service set, and the rendering data and travel mode type corresponding to the travel service are fed back to the terminal 110 as the prediction result.
[0036] After receiving the prediction result, the terminal 110 renders the display interface according to the rendering data corresponding to the travel service in the prediction result, thereby displaying the travel service function interface corresponding to the travel mode type, which is used to provide the target object with travel services matching the travel mode type.
[0037] Among them, the terminal 110 includes at least one of the terminals such as smart phones, tablet computers, portable laptops, desktop computers, smart speakers, smart wearable devices, smart voice interaction devices, smart home appliances, and vehicle-mounted terminals. The server 120 can be used in scenarios where command operations are implemented in the fields of smart transportation, vehicle-mounted terminals, and the Internet of Things.
[0038] It is worth noting that the above-mentioned communication network 130 can be implemented as a wired network or a wireless network, and the communication network 130 can be implemented as any one of a local area network, a metropolitan area network or a wide area network, which is not limited in the embodiments of the present application.
[0039] It is worth noting that the above-mentioned server 120 can be implemented as a cloud server in the cloud, where cloud technology refers to a hosting technology that unifies a series of resources such as hardware, software, and network in a wide area network or local area network to realize data calculation, storage, processing and sharing.
[0040] In some embodiments, the server 120 may also be implemented as a node in a blockchain system.
[0041] It is worth noting that the embodiment of the present application provides a method for determining a travel mode, which can be implemented by the terminal 110 alone, by the server 120 alone, or by the terminal 110 and the server 120 in collaboration.
[0042] Among them, when the terminal 110 and the server 120 collaborate to implement the solution provided by the embodiment of the present application, the terminal 110 and the server 120 can be directly or indirectly connected through wired or wireless communication, and the embodiment of the present application does not limit this.
[0043] In the embodiment of the present application, the method for determining the travel mode and its implementation provided by the server 120 are business services in the application service layer.
[0044] It should be noted that before collecting the user's relevant data and during the process of collecting the user's relevant data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to remind the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining the user's relevant data after obtaining the user's confirmation operation on the prompt interface or pop-up window. Otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the user's relevant data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with the relevant laws, regulations and standards of the relevant region.
[0045] Combined with the above-mentioned noun introduction and implementation environment, the method for determining the travel mode provided in the embodiment of the present application is described. The method is executed by the server as an example. For schematic illustration, please refer to Figure 2 , which shows a flowchart of a method for determining a travel mode provided by an exemplary embodiment of the present application, the method includes the following steps.
[0046] Step 210 : Acquire multiple position coordinates corresponding to the target object's movement trajectory within a historical time range.
[0047] Schematically, an action trajectory refers to the spatial characteristics of the action of the target object, which is composed of the route from the starting position to the ending position within the historical time range. For example, if the target object drives from position a to position b within the historical time range, then a driving trajectory from position a to position b within the historical time range is obtained.
[0048] In some embodiments, the target object's movement trajectory is related to the target object's travel mode type, where the travel mode refers to the mode of transportation used by the target object during the movement, including at least one of the travel modes such as walking, cycling, driving, taking the subway, taking the high-speed rail, taking a plane, and taking a ferry.
[0049] In an optional case, the location coordinates include obtaining the geographic location coordinates of the target object at a certain moment according to a specified time interval within a historical time range. For example, the action trajectory corresponds to three location coordinates, namely coordinate a, coordinate b and coordinate c, where the three location coordinates are the geographic location coordinates obtained every 5 seconds within a historical time range of 20 seconds.
[0050] In another optional embodiment, the position coordinates further include at least one of motion attribute data such as motion time, motion speed, motion direction, and motion acceleration. The motion time refers to the time point corresponding to when the target object moves to the coordinate position based on the motion trajectory; the motion speed refers to the instantaneous speed corresponding to when the target object moves to the coordinate position based on the motion trajectory; the motion direction refers to the direction corresponding to the instantaneous speed when the target object moves to the coordinate position based on the motion trajectory; and the motion acceleration refers to the acceleration corresponding to the instantaneous speed when the target object moves to the coordinate position based on the motion trajectory.
[0051] In some embodiments, the location coordinates are obtained in at least one of the following ways:
[0052] 1. After determining the historical time range, use GPS to read multiple location coordinates of the target object within the historical time range;
[0053] 2. The server pre-sets a location folder for storing the location coordinates corresponding to the target object according to the specified time interval. After determining the historical time range, multiple location coordinates within the historical time range are read from the location folder according to the historical time range.
[0054] It is worth noting that the above-mentioned method for obtaining position coordinates is only an illustrative example and is not limited to this embodiment of the present application.
[0055] Optionally, the historical time range is determined according to the moment when the user selects the travel service. For example, if the terminal receives the user's selection operation for the travel service at the current moment, the five minutes before the current moment will be used as the historical time range; or, based on the pre-set time range, the historical time range is generated in real time with the current moment as the starting point. That is, there is no need to receive the user's selection operation for the travel service, and the five minutes before the current moment is always used as the historical time range to continuously obtain multiple position coordinates of the target object within the historical time range.
[0056] Schematically, the multiple position coordinates corresponding to the motion trajectory are a set of geographical location coordinates arranged in chronological order.
[0057] Step 220: Acquire road attribute data corresponding to the target road that has a position matching relationship with the action trajectory.
[0058] The road attribute data is used to indicate the road features corresponding to the target road.
[0059] Optionally, the position matching relationship includes at least one of the following situations:
[0060] 1. The road where the target object's trajectory is generated. For example, the target object's trajectory a is generated on road A.
[0061] 2. The road closest to the target object's trajectory. For example, the vertical distance between the target object's trajectory s and road K is the shortest.
[0062] 3. The road with the highest degree of overlap with the coordinate positions in the target object's trajectory. For example, if the target object's trajectory m includes 10 coordinate positions, 2 of which are on road C and 8 on road D, then road D and trajectory m have a position matching relationship.
[0063] It is worth noting that the above-mentioned matching situations regarding the position matching relationship are merely illustrative examples and are not limited to the embodiments of the present application.
[0064] Optionally, there is only one target road that has a position matching relationship with the action trajectory; or, there are multiple target roads that have a position matching relationship with the action trajectory, which is not limited.
[0065] In some embodiments, the road attribute data includes multiple different types of road features corresponding to the target road, including at least one of road shape, road type, road connectivity, and the like.
[0066] The road shape refers to the set of coordinates generated by GPS after obtaining the corresponding road position coordinates at specified distance intervals. For example, using the road centerline as the standard, the corresponding road position coordinates on the road centerline are obtained every 5 meters. Finally, multiple road position coordinates on the road centerline are connected to obtain the corresponding road shape.
[0067] Among them, road type refers to the functional type of the road divided according to its function during the construction process, such as: highway, national highway, provincial highway, rural road, expressway, sidewalk, non-motorized vehicle lane, etc.
[0068] Among them, the connectivity relationship refers to the connection relationship between roads. For example, Road A and Road B intersect to form an intersection; one end of Road C is divided into two exits, which are the entrances of Road E and Road F respectively. Therefore, Road C, Road E and Road F belong to the connectivity relationship.
[0069] In some embodiments, the target road is first determined based on the movement trajectory of the target object within a historical time range, and then the road attribute data related to the target road is read from a pre-stored road data folder, wherein the road data folder includes road attribute data corresponding to multiple pre-stored roads.
[0070] Optionally, the target road is determined by at least one of the following methods:
[0071] 1. Determine a location coordinate (e.g., a first location coordinate) and road attribute data corresponding to multiple candidate roads from the motion trajectory. Match the first location coordinate with the road attribute data corresponding to the multiple candidate roads to obtain matching degrees corresponding to the multiple candidate roads. Select at least one candidate road with the highest matching degree as the target road. For example, obtain a set of road coordinates corresponding to the road shapes corresponding to the multiple candidate roads, and then determine the matching degree corresponding to each candidate road based on the distance between the first location coordinate and each location coordinate. The closer the distance, the higher the matching degree. The at least one candidate road with the highest matching degree is then determined as the target road.
[0072] 2. Generate a recommended route based on the destination input by the target user. Then, based on the target user's movement trajectory over the past timeframe, identify a road from the recommended routes that matches the target user's movement trajectory as the target road.
[0073] 3. Pre-train a road matching model, input multiple position coordinates corresponding to the target object's movement trajectory into the road matching model for road analysis, and the output result is the target road.
[0074] It is worth noting that the above-mentioned method for obtaining the target road is only an illustrative example and is not limited to this embodiment of the present application.
[0075] Illustratively, in the first case above, the matching method includes at least one of multiple matching methods such as geometric matching, probabilistic matching, and matching based on a hidden Markov model.
[0076] Geometric matching refers to matching based on the connection results between the location coordinates and the road attribute data corresponding to the candidate roads. For example, the vertical distance between the location coordinates and the candidate road is calculated as the matching degree between the behavior trajectory and the candidate road.
[0077] Probabilistic matching refers to obtaining roads that match the movement trajectories of other objects with the same movement trajectory as the target object within a specified time range, thereby determining the number of times each candidate road matches the movement trajectory within the specified time range, thereby generating a matching degree between the movement trajectory and the candidate road. The higher the number, the greater the probability that the movement trajectory is the target road corresponding to the target road.
[0078] Among them, matching based on the hidden Markov model means that for a location coordinate, there will be one or more road location coordinates on candidate roads within a certain distance. The closer the location coordinate as a vertex in the Markov chain is to the road location coordinate on the candidate road, the greater the probability that the location coordinate meets the location matching relationship with the candidate road.
[0079] Step 230 : Acquire a plurality of first trajectory attribute data based on the positional relationship between the plurality of position coordinates.
[0080] The first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the motion trajectory.
[0081] Illustratively, the first trajectory attribute data is used to describe changes in speed, direction, driving time, and acceleration between two adjacent position coordinates among a plurality of position coordinates.
[0082] Optionally, when corresponding to the speed dimension, the first trajectory attribute data refers to the speed difference between two adjacent position coordinates, where the speed difference = the distance difference between the two position coordinates / the time difference between the two position coordinates, which is used to describe the change in the instantaneous speed between the two adjacent position coordinates.
[0083] Optionally, when corresponding to the direction dimension, the first trajectory attribute data refers to the angle between the connection result between two adjacent position coordinates and a specified direction (for example, the north direction), which is used to describe the direction change of the trajectory between the two adjacent position coordinates.
[0084] Optionally, in the case of corresponding acceleration, the first trajectory attribute data refers to the difference between the accelerations corresponding to two adjacent position coordinates, and is used to describe the change of the instantaneous acceleration between the two adjacent position coordinates.
[0085] Optionally, first trajectory attribute data corresponding to any two adjacent position coordinates from a plurality of position coordinates is obtained; or, adjacent first position coordinates and second position coordinates are determined from a plurality of position coordinates, and the first trajectory attribute data is obtained only based on the positional relationship between the first position coordinates and the second position coordinates.
[0086] Step 240 : obtaining a plurality of second trajectory attribute data based on the trajectory interaction relationship between the plurality of position coordinates and the road attribute data.
[0087] The second trajectory attribute data refers to the change in movement characteristics corresponding to the position coordinates on the action trajectory and the target road.
[0088] Schematically, the second trajectory attribute data is used to represent changes in the distance, movement direction, and movement speed of the position coordinates and the target road.
[0089] Optionally, in the case of the distance dimension, the second trajectory attribute data refers to a vertical distance between one of the multiple position coordinates and a road shape corresponding to the target road, and is used to describe the distance between the target object at the position coordinate and the target road.
[0090] Optionally, in the case of the motion direction dimension, the second trajectory attribute data refers to the angle between the connection result between two adjacent position coordinates in multiple position coordinates and the road shape corresponding to the target road, which is used to describe the offset change between the two adjacent position coordinates and the target road.
[0091] Optionally, in the case of the motion speed dimension, the second trajectory attribute data refers to the motion speed corresponding to all position coordinates that meet the position matching relationship with the target road within a specified time range, based on the moment corresponding to the specified position coordinate among multiple position coordinates, wherein all position coordinates include position coordinates corresponding to objects other than the target object.
[0092] Step 250 : Classify and predict the action trajectory based on the plurality of first trajectory attribute data and the plurality of second trajectory attribute data to obtain a travel mode prediction result of the target object.
[0093] The travel mode prediction result is used to indicate the type of travel mode of the target object in the historical time range.
[0094] Illustratively, the travel mode prediction result refers to a travel mode analysis of the target object's movement trajectory by combining multiple first trajectory attribute data and multiple second trajectory attribute data, thereby determining the type of travel mode used by the target object within a historical time range. For example, based on the first trajectory attribute data and the second trajectory attribute data of object a within a historical time range, it is predicted that object a traveled on foot within the historical time range.
[0095] Optionally, the method for obtaining the travel mode prediction result includes at least one of the following methods:
[0096] 1. Pre-train a travel mode prediction model, input multiple first trajectory attribute data and multiple second trajectory attribute data into the travel mode prediction model, and output the model result, which is the travel mode type corresponding to the target object;
[0097] 2. Since both the first and second trajectory attribute data are specific numerical values, the first and second trajectory attribute data corresponding to the location coordinates are weightedly combined to obtain the numerical result corresponding to the coordinate position. By setting different numerical thresholds for the multiple candidate travel modes, a target numerical threshold that matches the numerical result is determined based on the numerical result corresponding to the coordinate position, and the candidate travel mode corresponding to the target numerical threshold is used as the travel mode prediction result corresponding to the target object.
[0098] It is worth noting that the above-mentioned method for obtaining travel mode prediction results is only an illustrative example and is not limited to this embodiment of the present application.
[0099] In summary, the travel mode determination method provided in the embodiments of the present application, based on obtaining multiple position coordinates corresponding to the target object's movement trajectory within a historical time range, also obtains road attribute data corresponding to the target road that has a position matching relationship with the movement trajectory. Thus, not only multiple first trajectory attribute data are obtained based on the positional relationship between the multiple position coordinates, but also multiple second trajectory attribute data are obtained based on the trajectory interaction relationship between the multiple position coordinates and the road attribute data. The movement trajectory is then classified and predicted by combining the first trajectory attribute data and the second trajectory attribute data, thereby obtaining a travel mode prediction result for the target object. That is, by classifying and predicting the travel mode of the target object based on the relationship between the real-time position coordinates corresponding to the movement trajectory of the target object and the road, it is possible to avoid incorrect predictions of the target object's travel mode due to the influence of road conditions, thereby improving the accuracy of travel mode predictions.
[0100] In an optional embodiment, the target road is determined by geometric matching. For example, please refer to Figure 3 , which shows a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application, that is, step 220 includes steps 221 to 224, step 230 includes steps 231 and 232, and step 240 also includes step 241, such as Figure 3 As shown, the method includes the following steps.
[0101] Step 221: Obtain the first position coordinates in the motion trajectory.
[0102] Optionally, a position coordinate is randomly acquired from a plurality of position coordinates in the motion trajectory as the first position coordinate.
[0103] Optionally, a designated position coordinate is selected from a plurality of position coordinates in the motion trajectory as the first position coordinate, for example, a designated position coordinate arranged in the middle of the plurality of position coordinates is selected as the first position coordinate.
[0104] Step 222: Obtain road attribute data corresponding to each of the plurality of candidate roads based on the first position coordinates.
[0105] Illustratively, after obtaining the movement trajectory of the target object, multiple candidate roads are screened from the road set according to the first position coordinates, and road attribute data corresponding to the candidate roads are read from a pre-stored road data folder.
[0106] Optionally, the screening method includes at least one of the following methods:
[0107] 1. Generate a screening range with the first coordinate position as the center and the preset distance as the radius. Based on the road shapes of each road, select the roads corresponding to the road shapes that intersect with the screening range as candidate roads;
[0108] 2. Obtain a set of road coordinates corresponding to multiple roads, calculate the distance between the position coordinates corresponding to the road and the first position coordinates, set a distance threshold, and select the roads corresponding to the road position coordinates that reach the distance threshold as candidate roads.
[0109] It is worth noting that the above screening methods are merely illustrative examples and are not limited to these in the embodiments of the present application.
[0110] In step 223 , geometric matching is performed between the road attribute data corresponding to the plurality of candidate roads and the first position coordinates to determine the road matching results corresponding to the plurality of candidate roads.
[0111] The road matching result is used to indicate the geometric position relationship between the first position coordinates and the road attribute data.
[0112] Schematically, the road matching result refers to the road matching degree between the candidate road as the target road and the first position coordinate. The higher the road matching degree, the greater the probability of the candidate road being the target road.
[0113] In this embodiment, the road matching result corresponding to the candidate road is determined by calculating the vertical distance between the first position coordinate and the road shape corresponding to the candidate road and the angle between the line result between the first position coordinate and the adjacent second position coordinate and the candidate road.
[0114] For illustration, please refer to Figure 4 , which shows a schematic diagram of a road matching result acquisition method provided by an exemplary embodiment of the present application, such as Figure 4As shown, the first position coordinate 401, the second position coordinate 405 adjacent to the first position coordinate 401, and the road shape corresponding to the candidate road 402 and the road shape corresponding to the candidate road 403 are currently displayed. According to the movement trajectory, it can be seen that the target object moves from the first position coordinate 401 to the second position coordinate 405. First, the first vertical distance 404 between the candidate road 402 and the first position coordinate 401 is calculated according to the road shape corresponding to the candidate road 402, and the second vertical distance 406 between the candidate road 403 and the first position coordinate 401 is calculated according to the road shape corresponding to the candidate road 403. The first angle between the candidate road 402 and the candidate road 402 is calculated according to the connection result between the first position coordinate 401 and the second position coordinate 405, and the second angle between the candidate road 403 and the candidate road 403 is calculated according to the connection result between the first position coordinate 401 and the second position coordinate 405.
[0115] For candidate road 402, the first vertical distance 404 and the first angle are weighted together to obtain a road matching result corresponding to candidate road 402. For candidate road 403, the second vertical distance 406 and the second angle are weighted together to obtain a road matching result corresponding to candidate road 403.
[0116] That is, the vertical distance and the angle corresponding to the candidate road are weightedly combined to obtain the road matching result corresponding to the candidate road. For details, please refer to Formula 1.
[0117] Formula 1:
[0118] Among them, and are pre-set normalized weights, and and are different. is the vertical distance between the candidate road and the first position coordinate, represents the angle between the line between the first position coordinate and the second position coordinate and the candidate road, and represents the road matching result, which is a specific value.
[0119] In step 224 , the candidate road with the highest matching degree with the action trajectory road is determined from the road matching results corresponding to the plurality of candidate roads as the target road.
[0120] Illustratively, after obtaining road matching results corresponding to a plurality of candidate roads and the first position coordinates, the road matching results are sorted according to road matching degrees, and the candidate road with the highest road matching degree is selected as the target road.
[0121] Step 231 : obtaining motion attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate respectively based on the motion trajectory.
[0122] The motion attribute data includes at least one of the motion speed, motion direction, motion time, and motion acceleration of the position coordinates on the motion trajectory.
[0123] Schematically, the motion attribute data corresponding to the position coordinates is used to describe the motion parameter characteristics of the target object when it is at the position coordinates in the motion trajectory.
[0124] In some embodiments, the plurality of position coordinates include adjacent i-th position coordinates and i+1-th position coordinates, where i is a positive integer.
[0125] Schematically, two adjacent position coordinates are obtained in sequence from a plurality of position coordinates corresponding to the motion trajectory. In this embodiment, the coordinate positions are implemented as GPS coordinate points.
[0126] In some embodiments, parameter analysis is performed on two adjacent position coordinates according to the motion trajectory, thereby obtaining motion attribute data corresponding to the two adjacent position coordinates.
[0127] Step 232 : Obtain first trajectory attribute data corresponding to the ith position coordinate and the (i+1)th position coordinate according to the motion parameter relationship between the motion attribute data corresponding to the ith position coordinate and the (i+1)th position coordinate.
[0128] Schematically, the motion parameter relationship refers to the parameter changes of two adjacent position coordinates for the same type of motion attribute data. For example, for motion speed, the motion parameter relationship is realized as the speed change between two adjacent position coordinates.
[0129] In this embodiment, for the motion speed data, the speed change = the distance difference between two adjacent position coordinates / the motion time difference, and the speed change is taken as the speed change corresponding to the two adjacent position coordinates.
[0130] In this embodiment, for the motion direction data, the motion directions corresponding to two adjacent position coordinates are first obtained, and the motion directions corresponding to the two adjacent position coordinates are connected to obtain a connection result. The angle formed by the connection result and the specified direction is used as the direction change corresponding to the two adjacent position coordinates. That is, the first trajectory attribute data includes motion direction change data, and the motion direction change data refers to the direction change of two adjacent position coordinates on the motion trajectory; the connection result between the motion direction corresponding to the i-th position coordinate and the motion direction corresponding to the i+1-th position coordinate is obtained; and the angle generated by the connection result and the specified direction is used as the motion direction change data corresponding to the i-th position coordinate and the i+1-th position coordinate.
[0131] Step 241 : obtaining second trajectory attribute data corresponding to the plurality of position coordinates based on a motion parameter relationship between the motion attribute data corresponding to the plurality of position coordinates and the road attribute data.
[0132] Schematically, a designated position coordinate is determined from a plurality of position coordinates, and then the second trajectory attribute data corresponding to the designated position coordinate is obtained according to a motion parameter relationship between the designated position coordinate and the road attribute data corresponding to the target road.
[0133] In some embodiments, the vertical distances between multiple position coordinates and the target road are determined based on the road position of the target road as the second trajectory attribute data corresponding to the multiple position coordinates respectively; and / or, the angle between the line result between two adjacent position coordinates in the multiple position coordinates and the road segment corresponding to the target road is determined as the second trajectory attribute data corresponding to the two adjacent position coordinates; and / or, the movement speeds corresponding to multiple associated position coordinates having a position matching relationship with the target road are determined based on the movement moments corresponding to the multiple position coordinates respectively, as the second trajectory attribute data corresponding to the multiple position coordinates respectively.
[0134] In this embodiment, the specified position coordinate is implemented as the first position coordinate as an example for explanation. For the distance data, the vertical distance between the first position coordinate and the road shape corresponding to the target road is determined as the distance change result between the coordinate position and the target road; for the movement direction data, the second position coordinate adjacent to the first position coordinate is determined, and the connection result between the first position coordinate and the second position coordinate is obtained, and the angle generated between the connection result and the road shape of the target road is used as the direction change result between the coordinate position and the target road; for the movement moment data, for the movement moment corresponding to the first position coordinate, the movement speed of the target road corresponding to all associated position coordinates that have a position matching relationship with it within the specified time range corresponding to the movement moment is determined as the movement speed matching result between the coordinate position and the target road, wherein the associated position coordinates include both the position coordinates of the target object and the position coordinates of other objects.
[0135] In summary, the travel mode determination method provided in the embodiments of the present application, based on obtaining multiple position coordinates corresponding to the target object's movement trajectory within a historical time range, also obtains road attribute data corresponding to the target road that has a position matching relationship with the movement trajectory. Thus, not only multiple first trajectory attribute data are obtained based on the positional relationship between the multiple position coordinates, but also multiple second trajectory attribute data are obtained based on the trajectory interaction relationship between the multiple position coordinates and the road attribute data. The movement trajectory is then classified and predicted by combining the first trajectory attribute data and the second trajectory attribute data, thereby obtaining a travel mode prediction result for the target object. That is, by classifying and predicting the travel mode of the target object based on the relationship between the real-time position coordinates corresponding to the movement trajectory of the target object and the road, it is possible to avoid incorrect predictions of the target object's travel mode due to the influence of road conditions, thereby improving the accuracy of travel mode predictions.
[0136] In this embodiment, by acquiring a variety of different motion attribute data corresponding to two adjacent position coordinates, first trajectory attribute data of different data types can be obtained, which can improve the accuracy of subsequent prediction of the target object's motion trajectory.
[0137] In this embodiment, the change of the two adjacent position coordinates in the movement direction can be accurately grasped by the angle between the line connecting the two adjacent position coordinates in the movement direction and the specified direction.
[0138] In this embodiment, by obtaining motion attribute data corresponding to multiple position coordinates, different types of second trajectory attribute data are obtained based on the parameter relationship between the motion attribute data corresponding to the multiple position coordinates and the road attribute data. The motion change of each position coordinate in the motion trajectory can be determined in combination with the road conditions, which is used to improve the accuracy of the subsequent prediction process of the target object's motion trajectory.
[0139] In this embodiment, different types of second trajectory attribute data are obtained through different calculation methods, and the movement changes between various position coordinates and the target road can be obtained in combination with the road conditions, so as to improve the accuracy of the travel mode type prediction.
[0140] In this embodiment, by geometrically matching the first position coordinate among multiple position coordinates with the candidate roads, road matching results corresponding to multiple candidate roads are obtained, and the candidate road with the highest matching degree is selected as the target road, which can improve the accuracy of travel mode prediction.
[0141] In an optional embodiment, classification prediction is performed using a pre-trained travel mode prediction model. For example, please refer to Figure 5 , which shows a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application, that is, step 250 includes steps 251 to 253, such as Figure 5 As shown, the method includes the following steps.
[0142] Step 251 : Arrange the plurality of first trajectory attribute data and the plurality of second trajectory attribute data according to a data arrangement rule to obtain a data arrangement result.
[0143] Schematically, since both the first trajectory attribute data and the second trajectory attribute data are specific numerical values, they are divided according to different attribute types, and the trajectory attribute data of the same attribute type (first trajectory attribute data / second trajectory attribute data) are sorted according to the numerical values to obtain the data arrangement results corresponding to the trajectory attribute data of different attribute types.
[0144] In this embodiment, the speed changes corresponding to two adjacent position coordinates are arranged from high to low according to the speed values, thereby obtaining a data arrangement result corresponding to the speed changes corresponding to the two adjacent position coordinates.
[0145] In this embodiment, the direction changes corresponding to two adjacent position coordinates are arranged from high to low according to the degree of the included angle, thereby obtaining a data arrangement result corresponding to the direction changes corresponding to the two adjacent position coordinates.
[0146] In this embodiment, the distance change results between the coordinate position and the target road are arranged from high to low according to the distance, so as to obtain the data arrangement result corresponding to the distance change results between the coordinate position and the target road.
[0147] In this embodiment, the direction change results between the coordinate position and the target road are arranged from high to low according to the angle between them, thereby obtaining a data arrangement result corresponding to the direction change results between the coordinate position and the target road.
[0148] In this embodiment, the movement speed matching results between the coordinate position and the target road are arranged from high to low according to the speed values, thereby obtaining a data arrangement result corresponding to the movement speed matching results between the coordinate position and the target road.
[0149] Step 252 : Screening the plurality of first trajectory attribute data and the plurality of second trajectory data according to the data arrangement result to obtain a plurality of screened data.
[0150] In this embodiment, after obtaining the data arrangement results corresponding to the trajectory attribute data of different attribute types, the numerical mean, median, average value and other parameters corresponding to the different data arrangement results are obtained as screening data.
[0151] Taking the speed change corresponding to two adjacent position coordinates as an example, after obtaining the data arrangement result corresponding to the speed change corresponding to the two adjacent position coordinates, the data arrangement result containing 10 data is currently obtained. The median refers to the average result corresponding to the fifth data and the sixth data selected from the 10 data (if the data arrangement result is an odd number, the data in the middle position is directly selected as the median); the numerical average includes at least one of the 25th percentile, the 75th percentile and the 95th percentile (it can also be other percentiles, without limitation), among which the 25th percentile refers to the data at the one-quarter position (25%) of the 10 data, that is, the average result corresponding to the second data and the third data, the 75th percentile refers to the data at the three-quarter position (75%) of the 10 data, and the 95th percentile refers to the data at the 95th percentile of the 10 data; the average value refers to the result after averaging the 10 data.
[0152] Step 253: Classify and predict the multiple filtered data to obtain a travel mode prediction result of the target object.
[0153] In some embodiments, a plurality of screening data are input into a pre-trained travel mode prediction model, and a travel mode prediction result of the target object is output.
[0154] In this embodiment, after obtaining a plurality of screening data, the plurality of screening data are input into a pre-trained travel mode prediction model, and the model output result is used as the travel mode prediction result of the target object.
[0155] In summary, the travel mode determination method provided in the embodiments of the present application, based on obtaining multiple position coordinates corresponding to the target object's movement trajectory within a historical time range, also obtains road attribute data corresponding to the target road that has a position matching relationship with the movement trajectory. Thus, not only multiple first trajectory attribute data are obtained based on the positional relationship between the multiple position coordinates, but also multiple second trajectory attribute data are obtained based on the trajectory interaction relationship between the multiple position coordinates and the road attribute data. The movement trajectory is then classified and predicted by combining the first trajectory attribute data and the second trajectory attribute data, thereby obtaining a travel mode prediction result for the target object. That is, by classifying and predicting the travel mode of the target object based on the relationship between the real-time position coordinates corresponding to the movement trajectory of the target object and the road, it is possible to avoid incorrect predictions of the target object's travel mode due to the influence of road conditions, thereby improving the accuracy of travel mode predictions.
[0156] In this embodiment, by screening the data arrangement results corresponding to the plurality of first trajectory attribute data and the plurality of second trajectory attribute data, the data used for prediction can be streamlined and the travel mode prediction efficiency can be improved.
[0157] In some embodiments, the training process of the travel mode prediction model is illustrated, for example, please refer to Figure 6 , which shows a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application, such as Figure 6 As shown, the method includes the following steps.
[0158] Step 610 : Obtain sample position coordinates corresponding to a plurality of sample motion trajectories, and obtain road attribute data corresponding to a plurality of sample roads that have a position matching relationship with the plurality of sample motion trajectories.
[0159] Among them, the sample movement trajectory is marked with travel mode labels, which include driving trajectory labels, walking trajectory labels and cycling trajectory labels.
[0160] Schematically, a set of rules is used to select high-confidence sample trajectories and sample roads, thereby obtaining multiple sample location coordinates corresponding to the sample trajectories. High confidence means a high degree of match between the sample trajectories and the corresponding sample roads, meaning there is a high probability that the sample trajectories are correctly labeled.
[0161] In some embodiments, the plurality of sample roads are shuffled, and every five sample roads are used as a sample set for training.
[0162] Schematically, the sample action trajectories include sample walking trajectories, sample cycling trajectories, and sample vehicle trajectories, wherein the sample walking trajectories are marked with walking trajectory labels, the sample cycling trajectories are marked with cycling trajectory labels, and the sample vehicle trajectories are marked with vehicle trajectory labels.
[0163] In step 620, the sample position coordinates and road attribute data corresponding to the vehicle trajectory label are used as positive samples, and the sample position coordinates and road attribute data corresponding to the walking trajectory label and the cycling trajectory label are used as negative samples. The sample prediction model is input to output the travel mode prediction results corresponding to the multiple sample action trajectories.
[0164] In this embodiment, the sample position coordinates and road attribute data corresponding to the vehicle trajectory label are used as positive samples, the sample position coordinates and road attribute data corresponding to the walking trajectory label and the cycling trajectory label are used as negative samples, and the sample sets corresponding to multiple sample roads are input into the sample prediction model together, and the travel mode prediction results corresponding to the multiple sample action trajectories are output.
[0165] Among them, the architecture adopted by the sample prediction model is the eXtreme Gradient Boosting (XGB) model.
[0166] Step 630 : Based on the difference between the travel mode prediction result and the travel mode label, the sample prediction model is trained to obtain a travel mode prediction model.
[0167] In this embodiment, a target loss function is generated according to the difference between the travel mode prediction result and the travel mode label, and the sample prediction model is trained by the target loss function to obtain the travel mode prediction model.
[0168] In summary, the method for determining the travel mode provided in the embodiment of the present application, after obtaining multiple content data under at least two modes corresponding to the prediction task and extracting the first feature representations corresponding to the multiple content data, obtains multiple candidate feature processing methods, and selects the target feature processing method from them according to the prediction target corresponding to the prediction task and the data attributes corresponding to the content data, thereby performing feature processing on the multiple first feature representations according to the feature screening method and / or feature dimensionality reduction method in the target feature processing method to obtain multiple second feature representations, and finally performing content prediction based on the second feature representation to obtain the prediction result corresponding to the prediction task. That is, after extracting the first feature representations corresponding to the multiple content data corresponding to the prediction task, the most suitable feature processing method is selected according to the prediction task and the content data to perform feature processing on the first feature representation again, so that the processed second feature representation is more consistent with the prediction task, thereby improving the accuracy of the final predicted content, and according to different prediction tasks and different content data, the selection result of the feature processing method can be dynamically adjusted.
[0169] For illustration, please refer to Figure 7 , which shows a flow chart of a method for determining a travel mode provided by an exemplary embodiment of the present application. Taking the method applied to a travel service scenario as an example, the method includes the following steps.
[0170] Step 701: Obtain the movement trajectory.
[0171] The multiple location coordinate points corresponding to the target object's movement trajectory within the historical time range are obtained through GPS, which are called trajectory points.
[0172] Step 702: Acquire multiple road attribute data.
[0173] A plurality of road attribute data corresponding to a plurality of candidate roads are read from a pre-stored road data folder, including at least one of road shape, road type, road connectivity, etc. corresponding to the candidate roads.
[0174] Step 703: road matching.
[0175] The trajectory points in the action trajectory are geometrically matched with multiple candidate roads to obtain road matching results corresponding to the multiple candidate roads, from which a single target road that meets the position matching relationship with the action trajectory is determined.
[0176] Step 704: Acquire trajectory attribute data.
[0177] A plurality of first trajectory attribute data are determined according to a positional relationship between a plurality of position coordinates, and a plurality of second trajectory attribute data are determined according to a trajectory interaction relationship between the position coordinates and the road attribute data.
[0178] Step 705: Determine the screening data.
[0179] The plurality of first track attribute data and the plurality of second track attribute data are arranged according to an arrangement rule to obtain a plurality of data arrangement results.
[0180] The mean, median, 25th quantile, 75th quantile and 95th quantile are extracted from the results of multiple data arrangement to obtain multiple screening data.
[0181] Step 706: classification prediction.
[0182] Multiple filtered data are input into the pre-trained XGB model, and the output is the travel mode prediction result of the target object, that is, the travel mode of the target object is "walking", "driving" or "cycling".
[0183] The server determines the travel service corresponding to the travel mode type based on the travel mode prediction results of the target object and feeds it back to the terminal for display, so as to provide the user with travel services that are adapted to the travel mode.
[0184] In summary, the method for determining the travel mode provided in the embodiment of the present application, after obtaining multiple content data under at least two modes corresponding to the prediction task and extracting the first feature representations corresponding to the multiple content data, obtains multiple candidate feature processing methods, and selects the target feature processing method from them according to the prediction target corresponding to the prediction task and the data attributes corresponding to the content data, thereby performing feature processing on the multiple first feature representations according to the feature screening method and / or feature dimensionality reduction method in the target feature processing method to obtain multiple second feature representations, and finally performing content prediction based on the second feature representation to obtain the prediction result corresponding to the prediction task. That is, after extracting the first feature representations corresponding to the multiple content data corresponding to the prediction task, the most suitable feature processing method is selected according to the prediction task and the content data to perform feature processing on the first feature representation again, so that the processed second feature representation is more consistent with the prediction task, thereby improving the accuracy of the final predicted content, and according to different prediction tasks and different content data, the selection result of the feature processing method can be dynamically adjusted.
[0185] The beneficial effects brought by this application:
[0186] 1. Samples: A large number of high-confidence samples are screened based on rules in certain scenarios, and then generalized to all scenarios using trajectory attribute data. This approach is low-cost and easy to start.
[0187] 2. Features:
[0188] (1) Speed: There is a big difference between driving, cycling and walking, especially in terms of top speed;
[0189] (2) Direction change: Compared with cars and walking, cycling is more flexible and can change direction faster;
[0190] (3) Distance from the road / angle between the trajectory direction and the road line: The possibility of walking and cycling off the road is greater (crossing the grass, crossing the road, entering the building, etc.);
[0191] (4) GPS point matching road speed: When the road is congested, the speed of walking, cycling and driving is very different.
[0192] Figure 8 This is a structural block diagram of a travel mode determination device provided by an exemplary embodiment of the present application. Figure 8 As shown, the device includes:
[0193] An acquisition module 810 is configured to acquire multiple position coordinates corresponding to a target object's movement trajectory within a historical time range, and to acquire road attribute data corresponding to a target road that has a position matching relationship with the movement trajectory, wherein the road attribute data indicates road characteristics corresponding to the target road;
[0194] The acquisition module 810 is further configured to acquire a plurality of first trajectory attribute data based on the positional relationship between the plurality of position coordinates, wherein the first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the motion trajectory;
[0195] The acquisition module 810 is further configured to obtain a plurality of second trajectory attribute data based on trajectory interaction relationships between the plurality of position coordinates and the road attribute data, wherein the second trajectory attribute data refers to movement characteristic changes corresponding to movement characteristics between the position coordinates on the action trajectory and the target road;
[0196] The prediction module 820 is configured to classify and predict the action trajectory based on the plurality of first trajectory attribute data and the plurality of second trajectory attribute data to obtain a travel mode prediction result of the target object, where the travel mode prediction result is used to indicate the type of travel mode of the target object within the historical time range.
[0197] In some embodiments, the plurality of position coordinates include adjacent i-th position coordinates and i+1-th position coordinates, where i is a positive integer;
[0198] like Figure 9 As shown, the acquisition module 810 includes:
[0199] an acquiring unit 811, configured to acquire motion attribute data corresponding to the i-th position coordinate and the (i+1)-th position coordinate, respectively, based on the motion trajectory, the motion attribute data including at least one of a motion speed, a motion direction, a motion time, and a motion acceleration of the position coordinate along the motion trajectory;
[0200] The acquisition unit 811 is further configured to obtain first trajectory attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate based on a motion parameter relationship between the motion attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate respectively.
[0201] In some embodiments, the first trajectory attribute data includes motion direction change data, and the motion direction change data refers to the direction change of the two adjacent position coordinates on the motion trajectory;
[0202] The acquisition unit 811 is also used to obtain the connection result between the movement direction corresponding to the i-th position coordinate and the movement direction corresponding to the i+1-th position coordinate; and use the angle generated by the connection result and the specified direction as the movement direction change data corresponding to the i-th position coordinate and the i+1-th position coordinate.
[0203] In some embodiments, the acquisition module 810 is also used to obtain motion attribute data corresponding to multiple position coordinates based on the motion trajectory, and the motion attribute data includes at least one of the motion speed, motion direction, motion time, and motion acceleration of the position coordinates on the motion trajectory; based on the motion parameter relationship between the motion attribute data corresponding to the multiple position coordinates and the road attribute data, the second trajectory attribute data corresponding to the multiple position coordinates are obtained.
[0204] In some embodiments, the acquisition module 810 is further used to determine the vertical distances between the multiple position coordinates and the target road based on the road position of the target road as the second trajectory attribute data corresponding to the multiple position coordinates respectively; and / or, to determine the angle between the line result between two adjacent position coordinates in the multiple position coordinates and the road segment corresponding to the target road as the second trajectory attribute data corresponding to the two adjacent position coordinates; and / or, to determine the movement speeds corresponding to the multiple associated position coordinates having a position matching relationship with the target road based on the movement moments corresponding to the multiple position coordinates respectively, as the second trajectory attribute data corresponding to the multiple position coordinates respectively.
[0205] In some embodiments, the prediction module 820 is further configured to arrange the plurality of first trajectory attribute data and the plurality of second trajectory attribute data according to a data arrangement rule to obtain a data arrangement result; filter the plurality of first trajectory attribute data and the plurality of second trajectory data according to the data arrangement result to obtain a plurality of filtered data; and perform the classification prediction on the plurality of filtered data to obtain a travel mode prediction result of the target object.
[0206] In some embodiments, the prediction module 820 is further configured to input the plurality of screening data into a pre-trained travel mode prediction model, and output a travel mode prediction result for the target object.
[0207] In some embodiments, the apparatus further comprises:
[0208] The acquisition module 810 is further configured to acquire sample location coordinates corresponding to a plurality of sample motion trajectories, and to acquire road attribute data corresponding to a plurality of sample roads that have a position matching relationship with the plurality of sample motion trajectories, wherein the sample motion trajectories are annotated with travel mode labels, wherein the travel mode labels include a driving trajectory label, a walking trajectory label, and a cycling trajectory label.
[0209] An input module 830 is configured to input the sample location coordinates and road attribute data corresponding to the vehicle trajectory label as positive samples, and the sample location coordinates and road attribute data corresponding to the walking trajectory label and the cycling trajectory label as negative samples, into a sample prediction model, and output travel mode prediction results corresponding to each of the multiple sample motion trajectories;
[0210] The training module 840 is used to train the sample prediction model based on the difference between the travel mode prediction result and the travel mode label to obtain the travel mode prediction model.
[0211] In some embodiments, the acquisition module 810 is also used to obtain the first position coordinates in the action trajectory; obtain road attribute data corresponding to multiple candidate roads based on the first position coordinates; geometrically match the road attribute data corresponding to the multiple candidate roads with the first position coordinates to determine the road matching results corresponding to the multiple candidate roads, and the road matching results are used to indicate the geometric position relationship between the first position coordinates and the road attribute data; determine the candidate road with the highest degree of matching with the action trajectory road from the road matching results corresponding to the multiple candidate roads as the target road.
[0212] In summary, the travel mode determination device provided by the embodiment of the present application, after obtaining multiple content data under at least two modes corresponding to the prediction task and extracting the first feature representations corresponding to the multiple content data, obtains multiple candidate feature processing methods, and selects a target feature processing method from them according to the prediction target corresponding to the prediction task and the data attribute corresponding to the content data, thereby performing feature processing on the multiple first feature representations according to the feature screening method and / or feature dimensionality reduction method in the target feature processing method to obtain multiple second feature representations, and finally performing content prediction based on the second feature representation to obtain the prediction result corresponding to the prediction task. That is, after extracting the first feature representations corresponding to the multiple content data corresponding to the prediction task, the most suitable feature processing method is selected according to the prediction task and the content data to perform feature processing on the first feature representation again, so that the processed second feature representation is more consistent with the prediction task, thereby improving the accuracy of the final predicted content, and according to different prediction tasks and different content data, the selection result of the feature processing method can be dynamically adjusted.
[0213] It should be noted that the travel mode determination device provided in the above embodiment is merely illustrated by the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, i.e., the internal structure of the device can be divided into different functional modules to perform all or part of the functions described above. Furthermore, the travel mode determination device provided in the above embodiment and the travel mode determination method embodiment are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0214] Figure 10 The following is a schematic diagram showing the structure of a server provided by an exemplary embodiment of the present application. Specifically:
[0215] The server 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the CPU 1001. The server 1000 also includes a mass storage device 1006 for storing an operating system 1013, application programs 1014, and other program modules 1015.
[0216] The mass storage device 1006 is connected to the central processing unit 1001 via a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1006 and its associated computer-readable media provide non-volatile storage for the server 1000. That is, the mass storage device 1006 may include a computer-readable medium (not shown) such as a hard disk or a compact disc read-only memory (CD-ROM) drive.
[0217] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other solid-state storage technology, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1004 and mass storage device 1006 can be collectively referred to as memory.
[0218] According to various embodiments of the present application, the server 1000 may also be connected to a remote computer on a network such as the Internet for operation. That is, the server 1000 may be connected to the network 1012 via the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to other types of networks or remote computer systems (not shown).
[0219] The memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.
[0220] An embodiment of the present application also provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the travel mode determination method provided by the above-mentioned method embodiments.
[0221] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the travel mode determination method provided by the above-mentioned method embodiments.
[0222] Embodiments of the present application further provide a computer program product, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for determining a travel mode described in any of the above embodiments.
[0223] Optionally, the computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a solid-state drive (SSD), or an optical disk. Among them, the random access memory may include a resistance random access memory (ReRAM) and a dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0224] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.
[0225] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for determining a travel mode, It is characterized in that The method comprises: Acquire multiple position coordinates corresponding to the action trajectory of the target object within the historical time range, and acquire road attribute data corresponding to the target road that has a position matching relationship with the action trajectory, wherein the road attribute data is used to indicate the road features corresponding to the target road; Acquire a plurality of first trajectory attribute data based on the positional relationship between the plurality of position coordinates, wherein the first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the action trajectory; Based on the trajectory interaction relationship between the plurality of position coordinates and the road attribute data, a plurality of second trajectory attribute data are obtained, wherein the second trajectory attribute data refers to the movement characteristic changes corresponding to the position coordinates on the action trajectory and the target road; The action trajectory is classified and predicted according to the multiple first trajectory attribute data and the multiple second trajectory attribute data to obtain a travel mode prediction result of the target object, where the travel mode prediction result is used to indicate the type of travel mode of the target object in the historical time range.
2. The method according to claim 1, It is characterized in that The multiple position coordinates include adjacent i-th position coordinates and i+1-th position coordinates, where i is a positive integer; The acquiring a plurality of first trajectory attribute data based on the positional relationship between the plurality of position coordinates comprises: Based on the motion trajectory, acquiring motion attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate, respectively, the motion attribute data including at least one of a motion speed, a motion direction, a motion time, and a motion acceleration of the position coordinate on the motion trajectory; According to the motion parameter relationship between the motion attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate respectively, the first trajectory attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate is obtained.
3. The method according to claim 2, It is characterized in that The first trajectory attribute data includes movement direction change data, and the movement direction change data refers to the direction change of the two adjacent position coordinates on the action trajectory; The obtaining, according to the motion parameter relationship between the motion attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate, the first trajectory attribute data corresponding to the i-th position coordinate and the i+1-th position coordinate respectively comprises: Obtaining a connection result between the movement direction corresponding to the i-th position coordinate and the movement direction corresponding to the i+1-th position coordinate; The angle formed by the connection result and the specified direction is used as the movement direction change data corresponding to the i-th position coordinate and the i+1-th position coordinate.
4. The method according to any one of claims 1 to 3, It is characterized in that The obtaining of a plurality of second trajectory attribute data based on the trajectory interaction relationship between the plurality of position coordinates and the road attribute data comprises: Based on the motion trajectory, acquiring motion attribute data corresponding to a plurality of position coordinates, the motion attribute data comprising at least one of a motion speed, a motion direction, a motion time, and a motion acceleration of the position coordinates on the motion trajectory; Based on the motion parameter relationship between the motion attribute data corresponding to the plurality of position coordinates and the road attribute data, the second trajectory attribute data corresponding to the plurality of position coordinates are obtained.
5. The method according to claim 4, It is characterized in that The obtaining of the second trajectory attribute data corresponding to the plurality of position coordinates respectively based on the motion parameter relationship between the motion attribute data corresponding to the plurality of position coordinates and the road attribute data comprises: Determine vertical distances between the plurality of position coordinates and the target road based on the road position of the target road as second trajectory attribute data respectively corresponding to the plurality of position coordinates; Determine the angle between a line result between two adjacent position coordinates among the plurality of position coordinates and a road segment corresponding to the target road as second track attribute data corresponding to the two adjacent position coordinates; Based on the movement moments respectively corresponding to the multiple position coordinates, the movement speeds respectively corresponding to the multiple associated position coordinates having a position matching relationship with the target road are determined as the second trajectory attribute data respectively corresponding to the multiple position coordinates.
6. The method according to any one of claims 1 to 3, It is characterized in that The classifying and predicting the action trajectory according to the plurality of first trajectory attribute data and the plurality of second trajectory attribute data to obtain a travel mode prediction result of the target object includes: Arranging the plurality of first trajectory attribute data and the plurality of second trajectory attribute data according to a data arrangement rule to obtain a data arrangement result; Performing data screening on the plurality of first trajectory attribute data and the plurality of second trajectory data according to the data arrangement result to obtain a plurality of screened data; The classification prediction is performed on the multiple screening data to obtain a travel mode prediction result of the target object.
7. The method according to claim 6, It is characterized in that The performing the classification prediction on the plurality of screening data to obtain the travel mode prediction result of the target object includes: The plurality of screening data are input into a pre-trained travel mode prediction model, and a travel mode prediction result of the target object is outputted.
8. The method according to claim 7, It is characterized in that Before inputting the plurality of screening data into a pre-trained travel mode prediction model and outputting a travel mode prediction result of the target object, the method further includes: Obtaining sample position coordinates corresponding to a plurality of sample action trajectories, and obtaining road attribute data corresponding to a plurality of sample roads that have a position matching relationship with the plurality of sample action trajectories, wherein the sample action trajectories are marked with travel mode labels, and the travel mode labels include a vehicle trajectory label, a walking trajectory label, and a cycling trajectory label; The sample position coordinates and road attribute data corresponding to the vehicle trajectory label are used as positive samples, and the sample position coordinates and road attribute data corresponding to the walking trajectory label and the cycling trajectory label are used as negative samples, and the sample prediction model is input to obtain the travel mode prediction results corresponding to the multiple sample action trajectories respectively; Based on the difference between the travel mode prediction result and the travel mode label, the sample prediction model is trained to obtain the travel mode prediction model.
9. The method according to any one of claims 1 to 3, It is characterized in that The step of acquiring the road attribute data corresponding to the target road that has a position matching relationship with the action trajectory includes: Obtaining a first position coordinate in the motion trajectory; Acquire road attribute data corresponding to a plurality of candidate roads respectively based on the first position coordinates; geometrically matching the road attribute data respectively corresponding to the plurality of candidate roads with the first position coordinates to determine road matching results respectively corresponding to the plurality of candidate roads, the road matching results being used to indicate a geometric position relationship between the first position coordinates and the road attribute data; A candidate road having the highest matching degree with the action trajectory road is determined from the road matching results respectively corresponding to the plurality of candidate roads as the target road.
10. A device for determining a travel mode, It is characterized in that The device comprises: An acquisition module, used to acquire a plurality of position coordinates corresponding to a movement trajectory of a target object within a historical time range, and to acquire road attribute data corresponding to a target road that has a position matching relationship with the movement trajectory, wherein the road attribute data is used to indicate a road feature corresponding to the target road; The acquisition module is further used to acquire a plurality of first trajectory attribute data based on the position relationship between the plurality of position coordinates, wherein the first trajectory attribute data refers to a change in movement characteristics of two adjacent position coordinates in the plurality of position coordinates on the action trajectory; The acquisition module is further used to obtain a plurality of second trajectory attribute data based on the trajectory interaction relationship between the plurality of position coordinates and the road attribute data, wherein the second trajectory attribute data refers to the movement feature change corresponding to the position coordinate on the action trajectory and the target road; A prediction module is used to classify and predict the action trajectory according to the multiple first trajectory attribute data and the multiple second trajectory attribute data to obtain a travel mode prediction result of the target object, wherein the travel mode prediction result is used to indicate the type of travel mode of the target object in the historical time range.
11. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for determining the travel mode as described in any one of claims 1 to 9.
12. A computer-readable storage medium, It is characterized in that The storage medium stores at least one program, and the at least one program is loaded and executed by the processor to implement the method for determining the travel mode as described in any one of claims 1 to 9.
13. A computer program product, It is characterized in that It comprises a computer program, which, when executed by a processor, implements the method for determining the travel mode as described in any one of claims 1 to 9.
