An abnormal trajectory identification method and device, electronic equipment and storage medium
By extracting features and developing a recognition model from ride-hailing vehicle trajectory data, the problem of tampering with ride-hailing vehicle trajectories has been solved, and the accuracy of mileage and fare calculations has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU HIKVISION SYST TECH CO LTD
- Filing Date
- 2021-12-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technology cannot effectively identify the tampered driving trajectory of ride-hailing vehicles, resulting in inaccurate calculation of mileage and fare.
By extracting features from vehicle trajectory data, identifying trajectory points with sudden changes in direction and position, using preset thresholds to determine whether the trajectory is abnormal, and combining this with a trajectory recognition model for identification.
Effectively identify and correct tampered driving trajectories to ensure the accuracy of mileage and cost calculations.
Smart Images

Figure CN114331475B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing technology, and in particular to a method, apparatus, electronic device and storage medium for identifying abnormal trajectories. Background Technology
[0002] Currently, after completing each ride-hailing order, drivers report their travel data, including the route and passenger pick-up / drop-off locations, to the platform. The platform then determines the mileage based on this route and calculates the fare. However, some drivers manipulate this data to increase their fares. They submit false routes, and the mileage calculated based on this false data differs from the actual mileage, resulting in a higher fare.
[0003] Due to the characteristics of ride-hailing services, such as the flexible and unpredictable pick-up and drop-off locations, and the variable driving routes influenced by road conditions and passenger-specified routes, the driving trajectories in different travel data sets vary greatly. Therefore, there is no standard driving trajectory to refer to for each individual travel data set, making it impossible to determine the authenticity of the driving trajectory. Furthermore, the mileage in the travel data is often adaptively manipulated, making it impossible to determine the authenticity of the driving trajectory based on the mileage alone. In conclusion, it is currently impossible to identify the problem of ride-hailing services misreporting driving routes. Summary of the Invention
[0004] This application provides a method, apparatus, electronic device, and storage medium for identifying abnormal trajectories, which can effectively identify abnormal driving trajectories.
[0005] To achieve the above technical objectives, this application adopts the following technical solution:
[0006] In a first aspect, embodiments of this application provide a method for identifying abnormal trajectories. The method includes: acquiring vehicle driving trajectory data; the driving trajectory data includes: the collection locations and collection times of multiple trajectory points; performing feature extraction on the driving trajectory data to obtain first feature data; the first feature data is used to characterize trajectory points with abrupt changes in direction and / or trajectory points with abrupt changes in position among the multiple trajectory points; and determining whether the driving trajectory characterized by the driving trajectory data is abnormal based on the first feature data.
[0007] Understandably, if a vehicle's trajectory includes a trajectory oriented in direction one (Track 1) and a subsequent trajectory oriented in direction two (Track 2) connected to it, and the angle between directions one and two is less than 90 degrees, then it can be determined that the vehicle has made a U-turn, or that the direction of travel has abruptly changed from trajectory one to trajectory two. Normally, U-turns occur only once or twice in a normal driving trajectory, meaning that abrupt changes in direction typically occur only once or twice. Therefore, electronic devices can extract features from the driving trajectory data to obtain first feature data, which can characterize the trajectory points with abrupt changes in direction among multiple trajectory points. Based on these trajectory points with abrupt changes in direction, it can be determined whether the driving trajectory represented by the driving trajectory data is abnormal.
[0008] Secondly, the first feature data obtained by the electronic device can also characterize trajectory points with abrupt position changes among multiple trajectory points. Trajectory points with abrupt position changes can indicate that the distance between two trajectory points with adjacent acquisition times exceeds the normal driving range, or that the same trajectory point appears repeatedly at different acquisition times. These all indicate that the driving trajectory represented by the driving trajectory data is abnormal. Therefore, by using trajectory points with abrupt position changes, it is also possible to determine whether the driving trajectory represented by the driving trajectory data is abnormal. In this way, abnormal driving trajectories can be identified.
[0009] In one possible implementation, the first feature data is used to characterize trajectory points with abrupt position changes among multiple trajectory points. The aforementioned feature extraction of the driving trajectory data to obtain the first feature data includes: for each trajectory point among the multiple trajectory points, determining the distance between that trajectory point and its first adjacent trajectory point; and counting a first number; the first number is the number of trajectory points among the multiple trajectory points whose distance is greater than a preset distance threshold. The first feature data includes the first number.
[0010] The first adjacent trajectory point refers to a trajectory point whose acquisition time is adjacent to that of the trajectory point among multiple trajectory points; different trajectory points correspond to different first adjacent trajectory points.
[0011] Understandably, the normal distance between each trajectory point and its corresponding first adjacent trajectory point should be within a preset distance threshold. This preset distance threshold can refer to the distance the vehicle travels at a normal speed within a data collection interval. Therefore, the electronic device can calculate the distance between each trajectory point and its corresponding first adjacent trajectory point. Then, based on the trajectory points whose distance exceeds the preset distance threshold, it can be determined whether the driving trajectory represented by the driving trajectory data is abnormal.
[0012] In another possible implementation, the first feature data is used to characterize trajectory points with abrupt changes in direction among multiple trajectory points. The aforementioned feature extraction of the driving trajectory data to obtain the first feature data includes: for each trajectory point among multiple trajectory points, determining the first and second line segments corresponding to that trajectory point, and the angle between the first and second line segments; and counting a second number; this second number is the number of trajectory points among the multiple trajectory points whose angle is less than a preset angle threshold. The first feature data includes the second number.
[0013] The first line segment connects the trajectory point to its second adjacent trajectory point. The second line segment connects the trajectory point to its third adjacent trajectory point. The second adjacent trajectory point was acquired before the trajectory point's acquisition time and its acquisition location is adjacent to the trajectory point's acquisition location. The third adjacent trajectory point was acquired after the trajectory point's acquisition time and its acquisition location is adjacent to the trajectory point's acquisition location.
[0014] Understandably, when a vehicle's direction of travel changes from towards its destination to away from it, there is a noticeable acute angle at the point where the direction of travel changes. Therefore, the electronic device can set a preset angle threshold to an acute angle (i.e., an angle less than 90°), and for each trajectory point, determine the angle between the first and second line segments connecting that trajectory point. Then, based on the trajectory points among multiple trajectory points whose angle is less than the preset angle threshold (i.e., an acute angle), the electronic device can determine whether the driving trajectory represented by the driving trajectory data is abnormal.
[0015] In another possible implementation, the first feature data is used to characterize trajectory points with abrupt position changes among multiple trajectory points. The first feature data obtained by extracting features from the driving trajectory data includes: for each trajectory point among the multiple trajectory points, if the acquisition position of the trajectory point is different from the acquisition position of the preceding trajectory point, then determining the first trajectory point whose acquisition position is within a preset range from the non-adjacent trajectory points among the multiple trajectory points; counting the third number corresponding to each trajectory point among the multiple trajectory points, and then determining the sum of the multiple third numbers corresponding to the multiple trajectory points; the third number is the number of first trajectory points corresponding to each trajectory point among the multiple trajectory points. The first feature data includes the sum of multiple third numbers.
[0016] In this context, the acquisition time of the preceding trajectory point is adjacent to the acquisition time of the trajectory point, but the acquisition time is before the acquisition time of the trajectory point. Non-adjacent trajectory points among multiple trajectory points corresponding to each trajectory point refer to trajectory points whose acquisition time is after the acquisition time of the trajectory point and whose acquisition location is not adjacent to the acquisition location of the trajectory point.
[0017] Understandably, the normal distance between two trajectory points with non-adjacent acquisition times should be greater than a preset range, which can be less than or equal to the distance the vehicle travels at normal speed within a acquisition interval. If the acquisition positions of two trajectory points with non-adjacent acquisition times fall within this preset range, it indicates that the two trajectory points may be abnormal. Furthermore, to rule out special normal situations such as longer dwell times at one or more trajectory points due to traffic jams, waiting at red lights, or other reasons that slow down the vehicle's speed, and the distance between two trajectory points with non-adjacent acquisition times not exceeding the preset range, the electronic device can, for each trajectory point, first determine if it shares the same acquisition position as the preceding trajectory point with an adjacent acquisition time. If there is a shared acquisition position, it can be determined that the trajectory point was generated due to a special normal situation and cannot be used to determine trajectory abnormalities; therefore, the electronic device can choose not to process this trajectory point.
[0018] If there are no identical acquisition locations, the electronic device can determine the number of first trajectories (i.e., the third number) from among the non-adjacent trajectory points (i.e., the non-adjacent trajectory points corresponding to the trajectory point) whose acquisition locations are not adjacent to the acquisition locations of the trajectory point and whose acquisition times are not adjacent to the acquisition locations of the trajectory point.
[0019] Since the first trajectory point is not adjacent to the acquisition location of the current trajectory point, and the acquisition time of the current trajectory point is not adjacent, the normal distance between the first trajectory point and the current trajectory point should be greater than a preset range. Therefore, a first trajectory point whose distance from the current trajectory point is less than the preset range can indicate that the driving trajectory represented by the driving trajectory data may be abnormal. Furthermore, the larger the number of first trajectories whose distance from the current trajectory point is less than the preset range (i.e., the third number), the higher the probability that the driving trajectory represented by the driving trajectory data is abnormal. Therefore, the electronic device can count the sum of multiple third numbers corresponding to multiple trajectory points, and determine whether the driving trajectory represented by the driving trajectory data is abnormal based on the sum of multiple third numbers.
[0020] In another possible implementation, the above-mentioned determination of whether the driving trajectory represented by the driving trajectory data is abnormal based on the first feature data includes: inputting the first feature data into the trajectory recognition model to obtain the recognition result of the driving trajectory.
[0021] The identification result indicates whether the driving trajectory represented by the driving trajectory data is abnormal.
[0022] This design describes an implementation process for determining whether a driving trajectory represented by driving trajectory data is abnormal based on first feature data.
[0023] In another possible implementation, the method further includes: acquiring multiple historical driving trajectory data of the vehicle and the status identifiers corresponding to the multiple historical driving trajectory data; extracting features from each historical driving trajectory data to obtain second feature data; and using the obtained second feature data and its corresponding status identifiers to train a preset network model to obtain a trajectory recognition model.
[0024] Each historical driving trajectory data point includes the acquisition location and acquisition time of multiple historical trajectory points. A status identifier indicates whether the driving trajectory represented by the corresponding historical driving trajectory data is abnormal. Secondary feature data is used to characterize historical trajectory points with abrupt changes in direction and / or abrupt changes in position among the multiple historical trajectory points.
[0025] Secondly, this application provides an apparatus for identifying abnormal trajectories. The apparatus includes modules for performing the methods described in the first aspect or any possible design of the first aspect.
[0026] Thirdly, this application provides an electronic device including a memory and a processor. The memory and processor are coupled. The memory stores computer program code, which includes computer instructions. When the processor executes the computer instructions, it causes the electronic device to perform an abnormal trajectory identification method as described in the first aspect and any possible design of the present invention.
[0027] Fourthly, this application provides a chip system applied to an abnormal trajectory identification device; the chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the abnormal trajectory identification device and send signals to the processors, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, it causes the electronic device to perform the abnormal trajectory identification method as described in the first aspect and any possible design of the present invention.
[0028] Fifthly, this application provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform the abnormal trajectory identification method as described in the first aspect and any possible design of the present application.
[0029] Sixthly, this application provides a computer program product including computer instructions that, when executed on an electronic device, cause the electronic device to perform the abnormal trajectory identification method as described in the first aspect and any possible design of the present application.
[0030] For a detailed description of aspects two through six and their various implementations in this application, please refer to the detailed description in aspect one and its various implementations; and for a detailed description of the beneficial effects of aspects two through six and their various implementations, please refer to the beneficial effect analysis in aspect one and its various implementations, which will not be repeated here.
[0031] These or other aspects of this application will become more readily apparent in the following description. Attached Figure Description
[0032] Figure 1A A schematic diagram of an abnormal driving trajectory provided for an embodiment of this application;
[0033] Figure 1B A schematic diagram of an abnormal driving trajectory provided in this application embodiment. Figure 2 ;
[0034] Figure 1C A schematic diagram of an abnormal driving trajectory provided in this application embodiment. Figure 3 ;
[0035] Figure 1D A schematic diagram of an abnormal driving trajectory provided in this application embodiment. Figure 4 ;
[0036] Figure 2 A schematic diagram of the implementation environment involved in the method for identifying abnormal trajectories provided in this application embodiment;
[0037] Figure 3 Schematic diagram of the implementation environment involved in the abnormal trajectory identification method provided in this application embodiment. Figure 2 ;
[0038] Figure 4 Schematic diagram of the implementation environment involved in the abnormal trajectory identification method provided in this application embodiment. Figure 3 ;
[0039] Figure 5 A flowchart of an abnormal trajectory identification method provided in an embodiment of this application;
[0040] Figure 6 The flowchart of an abnormal trajectory identification method provided in this application embodiment Figure 2 ;
[0041] Figure 7 This is a partial schematic diagram of a driving trajectory provided in an embodiment of this application;
[0042] Figure 8 The flowchart of an abnormal trajectory identification method provided in this application embodiment Figure 3 ;
[0043] Figure 9 This is a schematic diagram illustrating the evaluation results of multiple feature types provided in an embodiment of this application;
[0044] Figure 10 A schematic diagram of the structure of an abnormal trajectory identification device provided in an embodiment of this application;
[0045] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0046] Hereinafter, the terms "first," "second," and "third," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first," "second," or "third," etc., may explicitly or implicitly include one or more of that feature.
[0047] The rise and promotion of ride-hailing services has brought great convenience to users' travel. However, some ride-hailing services tamper with travel data to manipulate the driving trajectory, thereby increasing the mileage determined based on the false trajectory. This increases the fare calculated based on the mileage. Furthermore, there is currently no automatic way to identify false driving trajectories (also known as abnormal driving trajectories), making it impossible to solve the problem of ride-hailing services misreporting driving trajectories.
[0048] The abnormal driving trajectories of ride-hailing vehicles after being tampered with can be categorized into several types. These types include: trajectory mutation type, trajectory mutation replay type, trajectory non-mutation replay type, and return-to-starting-point type. Trajectory mutation type refers to a situation where, while traveling in the first direction, the vehicle changes direction to a second point, then changes course back to the first direction. Trajectory mutation replay type refers to a situation where the vehicle jumps to a previously visited point and then retraces the previously traveled path. Trajectory non-mutation replay type refers to a segment of the driving trajectory repeating itself multiple times. Return-to-starting-point type refers to a driving trajectory that includes not only the path from the starting point to the destination but also the path from the destination back to the starting point.
[0049] For example, such as Figure 1A The illustrated trajectory is a sudden change in direction. In this trajectory, the vehicle starts from point 101, travels a certain distance, and then continues in the first direction. Then, while traveling in the first direction, the vehicle moves towards the second direction to a trajectory point 102. From trajectory point 102, the vehicle changes direction again and travels in the first direction until it reaches the destination 103.
[0050] It can be seen that when the vehicle was traveling in the first direction, it suddenly deviated from its trajectory and began traveling in the second direction. This second direction is far from the destination 103, indicating that the vehicle's movement in this direction deviated from its normal trajectory (i.e., the trajectory in the first direction), and this section of the trajectory in the second direction may be illusory. Furthermore, this abrupt change in trajectory shows a clear, sharp angle at the point where the vehicle transitions from the first direction to the second direction.
[0051] For example, such as Figure 1B The illustrated trajectory is a replay-type driving trajectory with abrupt changes. In this trajectory, the vehicle starts from point 111, passes through point 112, point 113, and point 114, and arrives at point 115. The vehicle jumps from point 115 to a previously visited point 112, and then retraces the previously visited path from point 112, passing through points 112, 113, and 114, and arrives at point 115 again. Finally, the vehicle travels from point 115 to the destination 116.
[0052] It is evident that the vehicle's return journey from trajectory point 115 to trajectory point 112 is illogical. Both the trajectory from trajectory point 115 to 112 and the second trajectory from 112 to 115 are likely fictitious. Furthermore, this trajectory abruptly replaying type exhibits a distinct, sharp angle of change at trajectory point 115 where the vehicle turns around. The same segment of the trajectory (i.e., the trajectory passing through trajectory points 112, 113, 114, and 115 in sequence) appears repeatedly, as does the same trajectory point 112.
[0053] For example, such as Figure 1C The illustrated trajectory is a non-abrupt replay type of driving trajectory. In this trajectory, the vehicle starts from the starting point 121, passes through trajectory points 122 and 123, and reaches the destination 124. The vehicle turns around from the destination 124 back to trajectory point 123, and then travels from trajectory point 123 back to trajectory point 122. The vehicle then travels from trajectory point 122, passes through trajectory point 123, and reaches the destination 124.
[0054] It can be seen that the vehicle's journey from endpoint 124 back to trajectory point 122, and then from trajectory point 122 back to endpoint 124, is illogical. The vehicle's second and third traversal of the trajectory from trajectory point 122 to trajectory point 123 is likely spurious. While this non-abrupt replay type of trajectory does not exhibit sudden deviations from the normal trajectory, the same segment of the trajectory (i.e., the trajectory between trajectory point 122 and trajectory point 123) appears repeatedly; trajectory point 122, trajectory point 123, and endpoint 124 all appear repeatedly.
[0055] For example, such as Figure 1D The driving trajectory shown is a return-to-starting-point type. In this trajectory, the vehicle starts from the starting point 131, passes through trajectory points 132 and 133, and arrives at the destination 134. Then, the vehicle travels from the destination 134 back to the starting point 131 along the same trajectory.
[0056] It is illogical for the vehicle to travel from endpoint 134 back to starting point 131 along the same trajectory. The trajectory from endpoint 134 back to starting point 131 may be illusory. The same segment of the trajectory (i.e., the trajectory between starting point 131 and endpoint 134) appears repeatedly in this return-to-starting-point type trajectory, and starting point 131 appears repeatedly in all cases.
[0057] In summary Figure 1A , Figure 1B , Figure 1C and Figure 1D The abnormal driving trajectories shown can be seen to have at least one of the following characteristics: including a section of the driving trajectory that deviates from the normal driving trajectory (i.e., the driving trajectory close to the destination), the same section of the trajectory repeating itself, and the same trajectory point repeating itself.
[0058] Specifically, for other trajectories that deviate from the normal driving trajectory, there is a noticeable acute angle at a point where the vehicle changes direction. Therefore, this embodiment of the application can determine whether a driving trajectory includes a segment of other trajectories that deviate from the normal driving trajectory by checking for the presence of acute angles. Based on the determination result, it can then be determined whether the driving trajectory is abnormal. Regarding the recurrence of the same trajectory segment or the same trajectory point, to rule out the possibility that the recurrence of the same trajectory segment or the same trajectory point is caused by a decrease in vehicle speed due to traffic jams, waiting at red lights, etc., this embodiment of the application can determine whether a driving trajectory is abnormal by checking whether there is a recurring trajectory point that appears at intervals.
[0059] To address the problem of failing to identify abnormal driving trajectories, this application provides a method for identifying abnormal trajectories. This method extracts features from vehicle driving trajectory data to obtain first feature data. The driving trajectory data includes the acquisition locations and acquisition times of multiple trajectory points within the driving trajectory. The first feature data can characterize: trajectory points with abrupt changes in direction, and / or trajectory points with abrupt changes in position. Trajectory points with abrupt changes in direction can indicate the presence of acute angles in the driving trajectory. The presence of acute angles in the driving trajectory indicates that the driving trajectory may include a section deviating from the normal driving trajectory. Therefore, trajectory points with abrupt changes in direction can be used to determine whether the driving trajectory is abnormal. Secondly, trajectory points with abrupt changes in position can characterize situations where the distance between two trajectory points acquired at adjacent times exceeds the normal range, or where the same trajectory point appears repeatedly at different acquisition times; these all indicate that the driving trajectory is abnormal. Therefore, trajectory points with abrupt changes in position can also be used to determine whether the driving trajectory is abnormal. Thus, the identification of abnormal driving trajectories is achieved.
[0060] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0061] Please refer to Figure 2 This diagram illustrates the implementation environment of an abnormal trajectory identification method provided in this application. Figure 2 As shown, the implementation environment may include: a server 200, a terminal 210, and multiple data collection devices 220 for collecting vehicle travel data. The multiple data collection devices 220 are installed in different vehicles.
[0062] For example, each acquisition device 220 may include a GPS module, a timing module, and an input module (e.g., a touch screen). Figure 2 The GPS module, timing module, and input module in the data acquisition module 220 are not shown in the diagram. The GPS module is used to acquire the latitude and longitude of multiple trajectory points in the driving trajectory, as well as the latitude and longitude of passengers getting on and off the vehicle. The timing module is used to record the acquisition time of multiple trajectory points and the passenger getting on and off the vehicle. The input module is used to acquire driver information, vehicle information, etc., input by the driver. The driving trajectory consists of multiple trajectory points, and the acquisition positions of these trajectory points can represent the complete driving trajectory.
[0063] Server 200 can receive travel data from the data collection device 220 in each vehicle. This travel data may include: passenger boarding and alighting latitude and longitude, boarding and alighting times, travel trajectory data, driver information, and vehicle information. The travel trajectory data may include the latitude and longitude of multiple trajectory points and the data collection time. Server 200 can also determine the travel mileage based on the latitude and longitude of multiple trajectory points.
[0064] Specifically, such as Figure 3 As shown, terminal 210 can receive a first operation input by the user, which indicates a target area and a target vehicle type (e.g., ride-hailing, taxi). Then, in response to the first operation, terminal 210 can obtain travel data of vehicles belonging to the target vehicle type traveling within the target area from server 200. Terminal 210 then performs feature extraction on the travel data to obtain first feature data. Then, based on the first feature data, terminal 210 can determine whether the travel trajectory in the travel data is abnormal. If the travel trajectory is abnormal, a prompt message can be issued, which indicates that the vehicle's travel trajectory is abnormal. For example, terminal 210 can display this prompt message on a screen.
[0065] Or, such as Figure 4 As shown, in response to the first operation, terminal 210 can send target information to server 200. This target information includes the target area and target vehicle type, etc. Server 200 can obtain travel data of vehicles belonging to the target vehicle type traveling within the target area. Server 200 then performs feature extraction on this travel data to obtain first feature data. Then, server 200 can determine whether the travel trajectory in the travel data is abnormal based on the first feature data. If the travel trajectory is abnormal, it can send the aforementioned prompt information to terminal 210. Terminal 210 can issue this prompt information.
[0066] It should be noted that the first operation mentioned above may not indicate the target area. The first operation is used to indicate the target vehicle type. In response to the first operation, the terminal 210 or the server 200 can obtain the travel data of vehicles belonging to the target vehicle type.
[0067] For example, the terminal 210 in this application embodiment may be a mobile phone, tablet computer, desktop computer, laptop computer, netbook, etc., and this application embodiment does not impose any special restrictions on the specific form of the terminal 210.
[0068] It should be noted that the abnormal trajectory identification method provided in this application embodiment can be applied to the server 200, the terminal 210, or both. The server 200 and the terminal 210 can be collectively referred to as electronic devices. The executing entity of the abnormal trajectory identification method provided in this application embodiment can also be an abnormal trajectory identification device. This identification device can be an electronic device; or, the device can be an application (APP) installed on the electronic device that provides abnormal trajectory identification functionality; or, the device can be a central processing unit (CPU) in the electronic device; or, the device can be a control module in the electronic device used to execute the abnormal trajectory identification method.
[0069] The following uses an electronic device as an example to describe in detail the abnormal trajectory identification method provided in the embodiments of this application.
[0070] Please refer to Figure 5 This is a flowchart illustrating an abnormal trajectory identification method provided in an embodiment of this application. Figure 5 As shown, the method may include S501-S503.
[0071] S501, The electronic device acquires the vehicle's driving trajectory data; the driving trajectory data includes: the collection location and collection time of multiple trajectory points.
[0072] Electronic devices can acquire the driving trajectory data of any vehicle, or the driving trajectory data of vehicles belonging to the target vehicle type.
[0073] The location of the trajectory points can be their latitude and longitude. In addition to acquiring vehicle trajectory data, electronic devices can also acquire the corresponding order identifier, passenger pick-up and drop-off locations, pick-up and drop-off times, driver information, and vehicle information, etc. Vehicle information can include vehicle identifiers, such as vehicle number and license plate number.
[0074] S502, The electronic device extracts features from the driving trajectory data to obtain first feature data; the first feature data is used to characterize trajectory points with sudden changes in direction and / or sudden changes in position among multiple trajectory points.
[0075] Electronic devices can extract features from the acquisition location and acquisition time of multiple trajectory points in driving trajectory data to obtain the first feature data.
[0076] Feature extraction may include at least one of the following: calculating the distance between two trajectory points with adjacent acquisition times, calculating the distance between two trajectory points with non-adjacent acquisition times, comparing the proximity of the acquisition locations of two trajectory points with non-adjacent acquisition times, and calculating the included angle between two connected line segments in the driving trajectory represented by the driving trajectory data. Furthermore, the electronic device can determine trajectory points with abrupt changes in position based on the distance and proximity of the acquisition locations. The electronic device can determine trajectory points with abrupt changes in direction based on the included angle.
[0077] In some embodiments, S502 in the method may include Figure 6 S601 is shown.
[0078] S601. For each trajectory point among multiple trajectory points, the electronic device determines the distance between the trajectory point and its first adjacent trajectory point; then it counts the first number.
[0079] Here, the first number represents the number of trajectory points whose distance is greater than a preset distance threshold among the plurality of trajectory points. In this case, the first feature data may include this first number. This first number can characterize trajectory points with abrupt position changes among the plurality of trajectory points.
[0080] The first adjacent trajectory point can refer to one of multiple trajectory points whose acquisition time is adjacent to that of the trajectory point. The trajectory point corresponds to one or two trajectory points with adjacent acquisition times; the first adjacent trajectory point belongs to these one or two trajectory points with adjacent acquisition times.
[0081] Secondly, different trajectory points correspond to different first adjacent trajectory points. For example, the first adjacent trajectory point can be the trajectory point whose acquisition time is adjacent to the acquisition time of the current trajectory point, and whose acquisition time is after the acquisition time of the current trajectory point. Alternatively, the first adjacent trajectory point can be the trajectory point whose acquisition time is adjacent to the acquisition time of the current trajectory point, and whose acquisition time is before the acquisition time of the current trajectory point.
[0082] It should be noted that if the first adjacent trajectory point is the next trajectory point, then the last trajectory point among multiple trajectory points does not have a corresponding first adjacent trajectory point, and the electronic device can default to the distance between the last trajectory point and its corresponding first adjacent trajectory point being 0. If the first adjacent trajectory point is the previous trajectory point, then the first trajectory point among multiple trajectory points does not have a corresponding first adjacent trajectory point, and the electronic device can default to the distance between the first trajectory point and its corresponding first adjacent trajectory point being 0.
[0083] For example, taking the acquisition time of the first adjacent trajectory point as being after the acquisition time of the trajectory point, multiple trajectory points may include: trajectory point A, trajectory point B, trajectory point C, trajectory point D, etc., arranged in chronological order of acquisition time. The first adjacent trajectory point corresponding to trajectory point A is trajectory point B. The first adjacent trajectory point corresponding to trajectory point B is trajectory point C. The first adjacent trajectory point corresponding to trajectory point C is trajectory point D.
[0084] In some embodiments, the electronic device can calculate the distance between the trajectory point and the first adjacent trajectory point based on the acquisition location of the trajectory point and the acquisition location of the first adjacent trajectory point corresponding to the trajectory point.
[0085] For example, the acquisition location of each trajectory point among multiple trajectory points can be latitude and longitude, and the electronic device can calculate the distance using a distance calculation formula. This distance calculation formula may include the haversine equation or the Vincenty formula.
[0086] For example, the acquisition location of the trajectory point can include its longitude lon1 and latitude lat1. The acquisition location of the first adjacent trajectory point can include its longitude lon2 and latitude lat2. The electronic device can use the semi-versus formula to calculate the distance d between the trajectory point and the first adjacent trajectory point. haversine The formula for the semi-versus is shown in equation (1) below:
[0087]
[0088] Where r is the Earth's radius, in meters. arcsin is the arcsine function.
[0089] Specifically, the normal distance between two trajectory points with adjacent acquisition times should be within a preset distance threshold. This preset distance threshold can be greater than or equal to the distance the vehicle travels at a maximum speed within a acquisition interval. Since the maximum speed varies for different vehicles, the preset distance threshold can include multiple distance thresholds. The larger a distance threshold is, the higher the probability of an abnormal distance exceeding that threshold. For example, the duration of an acquisition interval can be several seconds (s), and multiple distance thresholds can include 500 meters (m), 1000 meters, 2000 meters, and 5000 meters. Furthermore, if the preset distance threshold can include multiple distance thresholds, the electronic device can count multiple first numbers, and these multiple first numbers correspond one-to-one with the multiple distance thresholds.
[0090] In some embodiments, S502 in the method may include Figure 6 S602 is shown.
[0091] S602. For each trajectory point among multiple trajectory points, the electronic device determines the first line segment and the second line segment corresponding to the trajectory point, as well as the included angle between the first line segment and the second line segment; then it counts the second number.
[0092] The second number represents the number of trajectory points among multiple trajectory points whose included angle is less than a preset angle threshold. In this case, the first feature data may include the second number. The second number can characterize trajectory points among multiple trajectory points whose direction changes abruptly.
[0093] The first line segment connects the trajectory point to its corresponding second adjacent trajectory point. The second line segment connects the trajectory point to its corresponding third adjacent trajectory point. The second adjacent trajectory point was acquired before the trajectory point's acquisition time, and its acquisition location is adjacent to the trajectory point's acquisition location. The third adjacent trajectory point was acquired after the trajectory point's acquisition time, and its acquisition location is adjacent to the trajectory point's acquisition location.
[0094] It should be noted that if the first trajectory point in a set of multiple trajectory points does not have a corresponding second adjacent trajectory point, and the last trajectory point does not have a corresponding third adjacent trajectory point, then the included angles corresponding to the first trajectory point and the last trajectory point can be assumed to be 180°.
[0095] For example, multiple trajectory points include: trajectory point A, trajectory point B, trajectory point C, trajectory point D, etc., arranged in chronological order of acquisition time. If the acquisition locations of trajectory points A, B, C, and D are all different, then the second adjacent trajectory point corresponding to trajectory point B is trajectory point A, and the third adjacent trajectory point corresponding to trajectory point B is trajectory point C; conversely, the second adjacent trajectory point corresponding to trajectory point C is trajectory point B, and the third adjacent trajectory point corresponding to trajectory point C is trajectory point D.
[0096] In some embodiments, the electronic device can calculate the distance between the trajectory point and its corresponding second adjacent trajectory point (i.e., the length of the first line segment), the distance between the trajectory point and its corresponding third adjacent trajectory point (i.e., the length of the second line segment), and the distance between the second adjacent trajectory point and the third adjacent trajectory point. Then, the electronic device can calculate the included angle based on the length of the first line segment, the length of the second line segment, and the distance between the second adjacent trajectory point and the third adjacent trajectory point.
[0097] It should be noted that the specific process by which the electronic device calculates the length of the first line segment, the length of the second line segment, and the distance between the second adjacent trajectory point and the third adjacent trajectory point can be found in the detailed description of the distance calculation above, and will not be repeated here in the embodiments of this application.
[0098] For example, such as Figure 7 The driving trajectory data shown represents a portion of the driving trajectory, which includes trajectory points A, B, and C arranged in chronological order of collection time. The second adjacent trajectory point to trajectory point B is trajectory point A, and the third adjacent trajectory point to trajectory point B is trajectory point C. A first line segment AB connects trajectory points A and B, and a second line segment BC connects trajectory points B and C.
[0099] It can be seen that connecting trajectory points A, B, and C forms a triangle. The three sides of this triangle are the first line segment AB, the second line segment BC, and the line segment AC connecting trajectory points A and C. Electronic devices can use the angle calculation formula based on the law of cosines to calculate the angle ∠ABC between the first line segment AB and the second line segment BC.
[0100] The angle calculation formula is shown in equation (2) below:
[0101]
[0102] Where, d AB d is the length of the first line segment AB. BC d is the length of the second line segment BC. AC It is the length of line segment AC. arccos is the arccosine function.
[0103] Since there is a noticeable acute angle at the point where the vehicle changes direction and deviates from its normal trajectory, the preset angle threshold can be an acute angle (i.e., an angle less than 90°). The preset angle threshold can include multiple angle thresholds, all of which are acute angles. For example, multiple angle thresholds could include 15°, 30°, 45°, and 60°. Furthermore, if the preset angle threshold can include multiple angle thresholds, the electronic device can count multiple second numbers, and these second numbers correspond one-to-one with the multiple angle thresholds.
[0104] In some embodiments, S502 in the method may include Figure 6 The S603 shown.
[0105] S603. For each trajectory point among multiple trajectory points, if the acquisition position of the trajectory point is different from the acquisition position of the previous trajectory point, the electronic device determines the first trajectory point whose acquisition position is within a preset range from the non-adjacent trajectory points among the multiple trajectory points; counts the third number corresponding to each trajectory point among the multiple trajectory points, and then determines the sum of the multiple third numbers corresponding to the multiple trajectory points.
[0106] For each trajectory point, the electronic device can determine whether the acquisition position of that trajectory point is different from the acquisition position of the preceding trajectory point. If they are different, the electronic device can determine the first trajectory point whose acquisition position is within a preset range from the non-adjacent trajectory points corresponding to that trajectory point. If they are the same, the electronic device can stop processing that trajectory point and continue to determine whether the acquisition position of the next trajectory point is different from the acquisition position of the preceding trajectory point.
[0107] In this context, the acquisition time of the preceding trajectory point is adjacent to the acquisition time of the current trajectory point, but the acquisition time is earlier than the acquisition time of the current trajectory point. Therefore, for the first trajectory point among multiple trajectory points, if there is no corresponding preceding trajectory point, it can be assumed that the acquisition positions of the first trajectory point and its corresponding preceding trajectory point are different.
[0108] Among multiple trajectory points, the non-adjacent trajectory points corresponding to the current trajectory point can refer to trajectory points whose acquisition time is after the acquisition time of the current trajectory point and whose acquisition location is not adjacent to the acquisition location of the current trajectory point. The third number is the number of first trajectory points corresponding to the current trajectory point. In this case, the first feature data can include the sum of the multiple third numbers. The sum of the multiple third numbers can represent trajectory points with abrupt changes in position among the multiple trajectory points.
[0109] It should be noted that the normal distance between two trajectory points whose acquisition times are not adjacent should be greater than a preset range. This preset range can be less than or equal to the distance the vehicle travels at a relatively high speed within one acquisition interval. For example, the preset range can include 0. This preset range can include multiple ranges. The smaller a range is, the higher the probability that the acquisition locations of the two trajectory points with non-adjacent acquisition times fall within this range. Secondly, if the preset range can include multiple ranges, the electronic device can calculate multiple sums, and these sums correspond one-to-one with the multiple ranges.
[0110] For example, multiple trajectory points may include: trajectory point A, trajectory point B, trajectory point C, trajectory point D, and trajectory point E arranged in chronological order of acquisition time. If trajectory point A and trajectory point B are acquired at the same location, trajectory point B, trajectory point C, and trajectory point D are acquired at different locations, and trajectory point D and trajectory point E are acquired at the same location, then it can be determined that trajectory point A and its corresponding preceding trajectory point are acquired at different locations, trajectory point B and its corresponding preceding trajectory point (i.e., trajectory point A) are acquired at the same location, trajectory point C and its corresponding preceding trajectory point (i.e., trajectory point B) are acquired at different locations, trajectory point D and its corresponding preceding trajectory point (i.e., trajectory point C) are acquired at different locations, and trajectory point E and its corresponding preceding trajectory point (i.e., trajectory point D) are acquired at the same location.
[0111] Furthermore, the electronic device can determine the corresponding non-adjacent trajectory points for trajectory points A, C, and D respectively. Specifically, the non-adjacent trajectory points corresponding to trajectory point A include trajectory points C, D, and E. Trajectory point C has no corresponding non-adjacent trajectory points. Trajectory point D has no corresponding non-adjacent trajectory points.
[0112] In some embodiments, the preset range may include specific numerical values. For each trajectory point, the electronic device can determine non-adjacent trajectory points corresponding to that trajectory point from among multiple trajectory points based on the acquisition time and acquisition location of those points. Then, the electronic device calculates the distance between the trajectory point and each corresponding non-adjacent trajectory point. Based on the calculated distances, the electronic device then determines a first trajectory point from among the non-adjacent trajectory points whose acquisition location is within the preset range.
[0113] It should be noted that the specific process by which the electronic device calculates the distance between the trajectory point and each non-adjacent trajectory point can be found in the detailed description of distance calculation described above, and will not be repeated here in the embodiments of this application.
[0114] In other embodiments, the electronic device can, for each of multiple trajectory points, if the acquisition position of a trajectory point differs from the acquisition position of the preceding trajectory point, employ a GeoHash algorithm to convert the acquisition positions of the multiple trajectory points, obtaining a GeoHash string for each trajectory point. The electronic device can also determine non-adjacent trajectory points corresponding to a given trajectory point from the multiple trajectory points based on the acquisition time and position. Then, based on the GeoHash string, the electronic device determines a first trajectory point from the non-adjacent trajectory points whose GeoHash string has the same first preset number of characters as the first preset number of characters of the trajectory point's GeoHash string.
[0115] Among them, the first trajectory point whose first preset number of digits of the GeoHash string is the same as the first preset number of digits of the GeoHash string of the trajectory point is also the first trajectory point whose distance between the collection location and the collection location of the trajectory point is within a preset range. In this case, the preset range depends on the preset number of digits.
[0116] It should be noted that for multiple trajectory points, the electronic device can perform a single step of converting the collection positions of multiple trajectory points using the GeoHash algorithm.
[0117] GeoHash is an address encoding method that encodes a latitude and longitude coordinate in two-dimensional space into a string. The longer the string, the smaller the range it represents and the more precise the location.
[0118] Understandably, the GeoHash algorithm encodes the latitude and longitude of the trajectory point in two-dimensional space into a GeoHash string, which represents the location of the trajectory point. The more identical bits two trajectory points share in their GeoHash strings, the smaller the distance between them. In other words, the number of identical bits in the GeoHash strings of two trajectory points indicates the distance between them. Therefore, the first trajectory point whose GeoHash string shares the same first preset number of bits as the trajectory point's GeoHash string is also a trajectory point whose distance is within a preset range.
[0119] For example, taking the latitude and longitude coordinates of a trajectory point as (39.923201, 116.390705) as an example, we can illustrate the process of converting the latitude and longitude of the trajectory point using the Geohash algorithm.
[0120] (1) The electronic device can first convert the latitude and longitude of the trajectory point into binary. Specifically, the latitude range is (-90, 90), and the midpoint of (-90, 90) is 0. Since the latitude of the trajectory point 39.923201 is greater than 0, a 1 is obtained first; the midpoint of (0, 90) is 45, and the latitude 39.923201 is less than 45; therefore, a 0 is obtained; by calculating in this way, the binary representation of the latitude 39.923201 can be obtained. Similarly, the binary representation of the longitude 116.390705 can be obtained.
[0121] (2) The electronic device can further merge the binary representations of latitude and longitude. Among them, longitude is in even positions and latitude is in odd positions. The electronic device can obtain the merged binary number of the trajectory point as 11100 11001 11100 0001100111 10110.
[0122] (3) Electronic devices can use Base32 encoding to encode the merged binary number. Base32 encoding refers to using 32 strings: 0-9 and bz (excluding a, i, l, o). Specifically, the electronic device can first convert the merged binary number into a decimal number; then, based on the strings corresponding to these 32 strings, generate the string corresponding to the decimal number. For example, the electronic device converts the above merged binary number into a decimal number, which is 28 25 28 37 22; then, by searching the strings corresponding to these 32 strings, the string corresponding to the first six digits of the decimal number can be obtained as wtw37q.
[0123] The GeoHash string can be an eight-character string, with a preset length of eight characters or less. The preset range is related to this preset length; the larger the preset length, the smaller the preset range.
[0124] For example, if the preset number of digits includes seven, then the first seven digits of the GeoHash string of the first trajectory point are the same as the first seven digits of the GeoHash string of the trajectory point. In this case, the distance between the collection location of the first trajectory point and the collection location of the trajectory point is within a first range, which is equal to the maximum range represented by the seven-digit GeoHash string, approximately 76m.
[0125] For example, if the preset number of bits includes eight, then the first eight bits of the GeoHash string of the first trajectory point are the same as the first eight bits of the GeoHash string of the trajectory point. In this case, the distance between the collection location of the first trajectory point and the collection location of the trajectory point is within a second range, which is equal to the maximum range represented by the eight-bit GeoHash string, approximately 19m.
[0126] It is known that if two trajectory points have seven identical characters in their GeoHash strings, the distance between the two trajectory points is within 76m. If two trajectory points have eight identical characters, the distance between them is within 19m. If two trajectory points with non-adjacent acquisition times and locations are within 76m or 19m, it indicates that these trajectory points are abnormal. Therefore, the electronic device can identify the first trajectory point (i.e., the abnormal trajectory point among abnormal ones) with the same first seven characters in its GeoHash string, and / or the first trajectory point (i.e., the abnormal trajectory point among abnormal ones) with the same first eight characters in its GeoHash string, from among the non-adjacent trajectory points corresponding to each trajectory point.
[0127] For example, the electronic device can perform the following steps for each of multiple trajectory points: determine the distance between the trajectory point and its corresponding first adjacent trajectory point; determine the first line segment and the second line segment corresponding to the trajectory point, as well as the angle between the first line segment and the second line segment; and use the GeoHash algorithm to convert the acquisition location of the trajectory point to obtain the GeoHash string of the trajectory point. The electronic device can then obtain the distances, angles, and GeoHash strings of multiple trajectory points in the driving trajectory, as shown in Table 1 below.
[0128] Table 1
[0129] Order_id longitude latitude distance included angle 7-character string 8-bit string 10 120.002495 30.347282 0.000000 180.00 wtmkdsx wtmkdsx1 10 120.002495 30.347282 9.780455 180.00 wtmkdsx wtmkdsx1 10 120.002510 30.347195 37.637242 176.39 wtmkdsx wtmkdsx1 10 120.002592 30.346864 34.284254 179.55 wtmkdsr wtmkdsrp 10 120.002664 30.346562 24.558232 143.35 wtmkdsr wtmkdsrm … … … … … … …
[0130] The order identifier (Order_id) corresponding to the driving trajectory data is 10. In Table 1, the first and second consecutively collected trajectory points have the same latitude and longitude, indicating they are the same trajectory point. This trajectory point was collected consecutively because the vehicle stopped at that point.
[0131] Continuing with multiple distance thresholds including 500m, 1000m, 2000m, and 5000m, and multiple angle thresholds including 15°, 30°, 45°, and 60°, and the first trajectory points including the first trajectory points with the same first seven characters of the GeoHash string and the first trajectory points with the same first eight characters of the GeoHash string, the first feature data can be divided into 10 feature types, as shown in Table 2 below.
[0132] Table 2
[0133]
[0134]
[0135] Then, the electronic device can statistically analyze the data of the 10 feature types shown in Table 2 to obtain the first feature data shown in Table 3 below.
[0136] Table 3
[0137] Order_id d500 d1000 d2000 d5000 a60 a45 a30 a15 hash7 hash8 10 1.0 1.0 1.0 NaN 1.0 1.0 9.0 1.0 0 0
[0138] NaN indicates that the data is an outlier. Outliers can include null values and characters other than numbers. Other characters can include letters, symbols, etc.
[0139] For example, suppose the multiple trajectory points in the driving trajectory represented by the driving trajectory data include: 5 trajectory points whose distances to their respective first adjacent trajectory points are all greater than 500m, 6 trajectory points whose distances to their respective first adjacent trajectory points are all greater than 1000m, 7 trajectory points whose distances to their respective first adjacent trajectory points are all greater than 2000m, and 7 trajectory points whose distances to their respective first adjacent trajectory points are all greater than 5000m. Accordingly, the first feature data may include: d500 = 5, d1000 = 6, d2000 = 7, d5000 = 7. Wherein, the 6 trajectory points with distances greater than 1000m include the 5 trajectory points with distances greater than 500m; the 7 trajectory points with distances greater than 2000m include the 6 trajectory points with distances greater than 1000m; and the 7 trajectory points with distances greater than 5000m include the 7 trajectory points with distances greater than 2000m.
[0140] Secondly, these multiple trajectory points can also include: 4 trajectory points all satisfying that the angle between their corresponding first and second line segments is less than 60°; 3 trajectory points all satisfying that the angle between their corresponding first and second line segments is less than 45°; 2 trajectory points all satisfying that the angle between their corresponding first and second line segments is less than 30°; and 0 trajectory points all satisfying that the angle between their corresponding first and second line segments is less than 15°. Correspondingly, the first feature data can also include: a15 = 0, a30 = 2, a45 = 3, a60 = 4. Among these, the 2 trajectory points with an angle less than 30° include the trajectory points with an angle less than 15°; the 3 trajectory points with an angle less than 45° include the 2 trajectory points with an angle less than 30°; and the 4 trajectory points with an angle less than 60° include the 3 trajectory points with an angle less than 45°.
[0141] Furthermore, these multiple trajectory points can also include: the number of first trajectory points with the same first seven characters in their GeoHash strings corresponding to one trajectory point is 2, and the number of first trajectory points with the same first seven characters in their GeoHash strings corresponding to one trajectory point is 3. Accordingly, the first feature data can also include: hash7 = 2 + 3 = 5.
[0142] These multiple trajectory points can also include: the number of first trajectory points with the same first eight characters in their GeoHash strings corresponding to one trajectory point is 1, and the number of first trajectory points with the same first eight characters in their GeoHash strings corresponding to one trajectory point is 2. Accordingly, the first feature data can also include: hash8 = 1 + 2 = 3.
[0143] Among them, the first trajectory points whose GeoHash strings are the same for the same trajectory point include the first trajectory points whose GeoHash strings are the same for the same trajectory point.
[0144] S503. The electronic device determines whether the driving trajectory represented by the driving trajectory data is abnormal based on the first feature data.
[0145] The first feature data may include numerical values of multiple feature types.
[0146] In some embodiments, the electronic device can determine the magnitude of the values of multiple feature types in the first feature data to determine whether the driving trajectory represented by the driving trajectory data is abnormal.
[0147] For example, the electronic device can acquire feature thresholds corresponding to different feature types; then, the electronic device can determine whether the value of each feature type in the first feature data exceeds the corresponding feature threshold. If the values of a first number of feature types in the first feature data exceed the corresponding feature thresholds, and the first number is greater than or equal to a preset number, the electronic device can confirm that the driving trajectory represented by the driving trajectory data is abnormal.
[0148] The preset number can be equal to or less than the total number of feature types included in the first feature data. This preset number, and the feature thresholds corresponding to different feature types, can be determined by analyzing the second feature data corresponding to at least one historical driving trajectory data with an abnormal driving trajectory. The second feature data corresponding to the at least one historical driving trajectory data is obtained by extracting features from each of the at least one historical driving trajectory data.
[0149] For example, the feature threshold corresponding to each feature type can be the minimum or average value of the feature type in the second feature data corresponding to the at least one historical driving trajectory data.
[0150] For example, the preset number can be the minimum or average of at least one second number corresponding to the at least one historical driving trajectory data. In the second feature data corresponding to each historical driving trajectory data with an abnormal driving trajectory, the values of the second number of feature types exceed the corresponding feature threshold.
[0151] In some embodiments, the electronic device may first preprocess the first feature data to obtain preprocessed first feature data. The electronic device then inputs the preprocessed first feature data into the trajectory recognition model to obtain the recognition result of the driving trajectory represented by the driving trajectory data.
[0152] The preprocessing includes at least one of the following: outlier replacement, feature filtering, and normalization. Outliers may include null values and characters other than numbers. The normalization may be standardization or normalization. The recognition result characterizes whether the driving trajectory represented by the driving trajectory data is abnormal. The trajectory recognition model is used to identify whether the driving trajectory represented by the driving trajectory data is abnormal based on the preprocessed first feature data.
[0153] Understandably, to avoid errors in the recognition results caused by outliers in the first feature data, outliers in the first feature data can be replaced in advance.
[0154] Secondly, the first feature data can include data of multiple feature types. Therefore, the first feature data may include data of a first feature type and / or data of a second feature type. The influence of the first feature type far exceeds that of the other feature types in the first feature data. This means that the first feature type directly determines the recognition result, leading to a biased and inaccurate recognition result based solely on the first feature type data. Conversely, the influence of the second feature type is far less than that of the other feature types in the first feature data. Therefore, the second feature data has virtually no effect on determining the recognition result. Thus, electronic devices can perform feature filtering on the first feature data to filter out the first feature type data that leads to inaccurate recognition results, as well as the second feature type data that has no effect on determining the recognition result.
[0155] Furthermore, electronic devices can standardize or normalize data of different feature types within the first feature data, transforming them into the same range (e.g., 0–1). This eliminates differences in properties, dimensions, and orders of magnitude between different feature types, converting them into a dimensionless relative value. Since data of different feature types are all at the same order of magnitude, it facilitates comprehensive analysis and comparison of data of different feature types, leading to an accurate identification result.
[0156] In summary, preprocessing the first feature data can improve the accuracy of determining whether a driving trajectory is abnormal.
[0157] Furthermore, the electronic device can first train and save the trajectory recognition model. Then, it can use the trajectory recognition model to identify the driving trajectory represented by the driving trajectory data.
[0158] Specifically, such as Figure 8 As shown, the method for identifying abnormal trajectories may further include S801-S804. Correspondingly, S503 in this method may include S805-S806.
[0159] S801, The electronic device acquires multiple historical driving trajectory data of the vehicle, as well as the status identifiers corresponding to the multiple historical driving trajectory data; wherein, each historical driving trajectory data includes: the collection location and collection time of multiple historical trajectory points; the status identifier is used to indicate whether the driving trajectory represented by its corresponding historical driving trajectory data is abnormal.
[0160] The electronic device can acquire multiple historical travel data sets for vehicles belonging to the target vehicle type within a preset time period. Each historical travel data set includes historical driving trajectory data. The preset time period can be one month, one quarter, etc. The preset time period can be as indicated by the first operation mentioned above.
[0161] It should be noted that details of historical travel data can be found in the above-described specific introduction to travel data, and will not be repeated here in the embodiments of this application.
[0162] In some embodiments, the driving trajectory represented by each historical driving trajectory data can be manually identified to determine the status identifier corresponding to that historical driving trajectory data. Alternatively, the electronic device can determine the driving mileage based on the driving trajectory represented by each historical driving trajectory data, and then determine the status identifier corresponding to that historical driving trajectory data based on the driving mileage.
[0163] For example, a status flag value of 0 indicates that the corresponding historical driving trajectory data represents a normal driving trajectory. A status flag value of 1 indicates that the corresponding historical driving trajectory data represents an abnormal driving trajectory.
[0164] S802, the electronic device extracts features from each historical driving trajectory data to obtain second feature data; the second feature data is used to characterize historical trajectory points with sudden changes in direction and / or sudden changes in position among multiple historical trajectory points.
[0165] Electronic devices can obtain secondary feature data from multiple historical driving trajectory data.
[0166] It should be noted that the specific process by which the electronic device extracts features from each historical driving trajectory data to obtain the second feature data can be found in the detailed description of the electronic device extracting features from driving trajectory data to obtain the first feature data, which will not be repeated here in the embodiments of this application.
[0167] S803, The electronic device preprocesses the obtained second feature data to obtain preprocessed second feature data.
[0168] The electronic device preprocesses the second feature data from multiple historical driving trajectory data to obtain preprocessed second feature data. This preprocessing may include outlier replacement, feature filtering, and standardization. The standardization may be normalization or standardization.
[0169] It should be noted that the outliers mentioned here can be found in the detailed introduction of outliers above, and will not be repeated here in the embodiments of this application.
[0170] In some embodiments, the electronic device can replace outliers in the obtained second feature data with zeros to obtain replaced second feature data. Then, the electronic device performs feature filtering on the replaced second feature data to obtain filtered second feature data. Finally, the electronic device can standardize or normalize the filtered second feature data to obtain preprocessed second feature data.
[0171] The second feature data can include data of multiple feature types, and therefore the replaced second feature data also includes data of multiple feature types. The electronic device can use a random forest algorithm to evaluate the feature importance of the replaced second feature data, obtaining evaluation values for each of the multiple feature types. Then, the electronic device can determine at least one first feature type based on the evaluation values for each feature type. The electronic device then filters the data in the replaced second feature data that belongs to at least one first feature type to obtain filtered second feature data.
[0172] Specifically, the evaluation value corresponding to the first feature type is greater than the evaluation value of the second feature type (excluding the feature type to be filtered) among multiple feature types, or the evaluation value corresponding to the first feature type is less than the evaluation value of the second feature type. In other words, the electronic device can filter out the data of the first feature type with excessively large or small evaluation values in the replaced second feature data to ensure that the evaluation values of the second feature type are evenly distributed in the filtered second feature data.
[0173] For example, taking the second feature data as including the above 10 feature types as an example, such as Figure 9 As shown, the electronic device uses the random forest algorithm to evaluate the feature importance of multiple replaced second feature data, obtaining evaluation values for each of the 10 feature types. The electronic device can determine that the evaluation values of features d5000 and hash8 are too small, and therefore determines that features d5000 and hash8 belong to the first feature type.
[0174] In some embodiments, the electronic device can use a standardization formula to standardize the filtered second feature data to obtain preprocessed second feature data. The standardization formula is shown in equation (3) below:
[0175] x standardization =(x-μ) / σ (3)
[0176] Where x is a data point of the same feature type in the filtered second feature data, x standardization σ is the standardized x. μ is the mean of all data of the same feature type in the second feature data, and σ is the variance of all data of the same feature type in the second feature data.
[0177] In some embodiments, the electronic device can use a normalization formula to normalize the filtered second feature data to obtain preprocessed second feature data. The normalization formula is shown in equation (4) below:
[0178] x normalization =(x-min) / (max-min) (4)
[0179] Where, x normalization This is the normalized x. min is the minimum value of all data of the same feature type in the second feature data, and max is the maximum value of all data of the same feature type in the second feature data.
[0180] Understandably, electronic devices, through standardization or normalization, can transform data of different feature types in the second feature data into the same range (e.g., 0 to 1), eliminating differences in properties, dimensions, and orders of magnitude between different feature types of data, and converting them into a dimensionless relative value. Since data of different feature types are all at the same order of magnitude, it facilitates comprehensive analysis and comparison of data of different feature types.
[0181] S804. The electronic device uses the preprocessed second feature data and its corresponding status identifier to train the preset network model and obtain the trajectory recognition model.
[0182] The electronic device can use the preprocessed second feature data as input and the corresponding state identifier as output. Then, the electronic device uses the input and output samples to train a preset network model to obtain a trajectory recognition model.
[0183] In some embodiments, the electronic device can divide the preprocessed second feature data into training samples and test samples. Then, the electronic device can use the training samples and their corresponding state identifiers to train a preset network model, obtaining a trained network model. The electronic device then uses the test samples and their corresponding state identifiers to test the trained network model, determining that the trained network model that meets the preset training conditions is the trajectory recognition model.
[0184] If the trained network model does not meet the preset training conditions, the electronic device can continue to train the trained network model until a trained network model that meets the preset training conditions is obtained.
[0185] For example, the electronic device can divide the preprocessed second feature data into training samples and test samples according to a certain ratio. For instance, the ratio of the number of training samples to the number of test samples is 7:3.
[0186] In some embodiments, the electronic device can input test samples into the trained network model to obtain the recognition results of the test samples. Then, the electronic device determines an indicator value based on the state identifier corresponding to the test sample and the recognition result of the test sample. The electronic device then determines whether the trained network model meets the preset training conditions based on the indicator value and a preset indicator threshold.
[0187] The metric value can include at least one of the following: hit rate, recall rate, and F1 score. The higher the hit rate, recall rate, and F1 score, the better the performance of the trajectory recognition model.
[0188] For example, the electronic device can determine a first value, a second value, and a third value based on the status identifier corresponding to the test sample and the recognition result of the test sample. The first value is equal to the number of samples with a normal driving trajectory that are identified as having an abnormal driving trajectory, i.e., the number of incorrectly identified normal driving trajectory prediction samples. The second value is equal to the number of samples with a normal driving trajectory that are identified as having a normal driving trajectory, i.e., the number of incorrectly identified abnormal driving trajectory prediction samples. The third value is equal to the number of samples with an abnormal driving trajectory that are identified as having an abnormal driving trajectory, i.e., the number of correctly identified abnormal driving trajectory prediction samples.
[0189] Then, the electronic device can divide the third value by the sum of the first and third values to obtain the hit rate. The electronic device can divide the third value by the sum of the second and third values to obtain the recall rate. The electronic device uses the hit rate and recall rate to calculate the F1 score.
[0190] For example, the electronic device can acquire 616 historical driving trajectory data points with normal driving trajectories and 367 historical driving trajectory data points with abnormal driving trajectories. The electronic device performs feature extraction and preprocessing on each historical driving trajectory data point, obtaining 616 preprocessed second feature data points and 367 preprocessed second feature data points. The status flag corresponding to the 616 preprocessed second feature data points is 0, and the status flag corresponding to the 367 preprocessed second feature data points is 1. Assuming the test sample includes these 616 and 367 preprocessed second feature data points, the electronic device inputs the trained network model into the test sample to obtain the recognition result of the test sample. As shown in Table 4 below, the recognition results of these 616 preprocessed second feature data points include: 578 preprocessed second feature data points are identified as normal, and 38 preprocessed second feature data points are identified as abnormal. The identification results of these 367 preprocessed second feature data include: 17 preprocessed second feature data were identified as normal, and 350 preprocessed second feature data were identified as abnormal.
[0191] Table 4
[0192]
[0193]
[0194] S805, The electronic device preprocesses the first feature data to obtain preprocessed first feature data.
[0195] It should be noted that the specific information regarding the preprocessing in S805 can be found in the detailed description of the preprocessing in S803 described above. Similarly, the specific process by which the electronic device preprocesses the first feature data can also be found in the detailed description of the electronic device preprocessing the second feature data in S803 described above; these details will not be repeated here in the embodiments of this application.
[0196] Furthermore, the preprocessing in S805 may include standardization or normalization. If the preprocessing in S805 includes standardization, the electronic device may standardize the filtered first feature data using the above formula (3). That is, the electronic device standardizes the filtered first feature data using the above mean μ and the above variance σ.
[0197] If the preprocessing in S805 includes normalization, the electronic device can normalize the filtered first feature data using the above formula (4). That is, the electronic device normalizes the filtered first feature data using the above minimum value min and the above maximum value max.
[0198] S806 The electronic device inputs the preprocessed first feature data into the trajectory recognition model to obtain the recognition result of the driving trajectory.
[0199] The trajectory recognition model was trained in S804.
[0200] It should be noted that electronic devices can also perform the aforementioned preprocessing process through a trajectory recognition model. That is, the electronic device can directly use the second feature data and its corresponding status identifier to train a preset network model to obtain a trajectory recognition model. This trajectory recognition model is used to preprocess the first feature data and then identify whether the driving trajectory is abnormal based on the preprocessed first feature data. Furthermore, the electronic device can directly input the first feature data into this trajectory recognition model to obtain the recognition result of the driving trajectory.
[0201] In this embodiment, after determining that the driving trajectory data represents an anomaly, the electronic device can also count the number of abnormal driving trajectories for the driver to whom the driving trajectory data belongs. If the total number of abnormal driving trajectories is greater than or equal to a preset number, it indicates that the driver has exhibited abnormal driving trajectories frequently and requires close monitoring. Furthermore, the electronic device can issue a prompt message to alert the driver to receive close attention.
[0202] Specifically, the driving trajectory data also includes driver information. When the electronic device determines that a driving trajectory is abnormal, it can obtain the driver information corresponding to the driving trajectory data. The electronic device then counts the number of abnormal driving trajectories for the same driver (e.g., the driver indicated by the driver information) within a preset time period based on the driver information. Then, if the number of abnormal driving trajectories is greater than or equal to a preset number, the electronic device can issue a prompt message. This prompt message indicates that the driving trajectory of the driver indicated by the driver information is abnormal.
[0203] Electronic devices can display the prompt information on a screen or play it via voice, etc.
[0204] The preset number of attempts and the preset duration are related. The longer the preset duration, the more preset attempts are allowed. Both the preset duration and the preset number of attempts can be indicated by the first operation mentioned above.
[0205] The notification information may include the specific details of the driver's abnormal travel data within a preset time period, the number of abnormal travel data points, etc.
[0206] Understandably, to rule out the possibility that a driver's one or more abnormal driving trajectories are accidental, a preset number of abnormal driving trajectories can be set within a preset time period. If a driver's abnormal driving trajectories exceed the preset number within a preset time period, it can be confirmed that the driver intentionally tampered with the driving trajectory, and the electronic device can issue a warning message.
[0207] It should be noted that, in addition to counting abnormal driving trajectories from the perspective of the driver, electronic devices can also count abnormal driving trajectories from the perspective of the vehicle. For the process of counting abnormal driving trajectories from the perspective of the vehicle, please refer to the detailed description of counting abnormal driving trajectories from the perspective of the driver; this will not be repeated here in the embodiments of this application.
[0208] The foregoing primarily describes the solutions provided by the embodiments of this application from a methodological perspective. To achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0209] This application also provides an abnormal trajectory identification device. For example... Figure 10 The diagram shown is a structural schematic of an abnormal trajectory identification device 1000 provided in an embodiment of this application. The identification device 1000 may include: a data acquisition module 1001, a feature extraction module 1002, and an anomaly judgment module 1003.
[0210] The data acquisition module 1001 is used to acquire vehicle trajectory data, which includes the acquisition locations and acquisition times of multiple trajectory points. The feature extraction module 1002 is used to extract features from the trajectory data to obtain first feature data, which characterizes trajectory points with abrupt changes in direction and / or abrupt changes in position among the multiple trajectory points. The anomaly judgment module 1003 is used to determine whether the trajectory represented by the trajectory data is abnormal based on the first feature data.
[0211] In one possible implementation, the first feature data is used to characterize trajectory points with abrupt positional changes among multiple trajectory points. The feature extraction module 1002 is specifically used to: for each trajectory point among the multiple trajectory points, determine the distance between the trajectory point and its first adjacent trajectory point; and count the first number.
[0212] Wherein, the first adjacent trajectory point refers to a trajectory point whose acquisition time is adjacent to that of the trajectory point among multiple trajectory points; different trajectory points correspond to different first adjacent trajectory points; the first number is the number of trajectory points among multiple trajectory points whose distance is greater than a preset distance threshold; the first feature data includes the first number;
[0213] In another possible implementation, the first feature data is used to characterize trajectory points with abrupt changes in direction among multiple trajectory points. The feature extraction module 1002 is specifically used to: for each trajectory point among multiple trajectory points, determine the first line segment and the second line segment corresponding to the trajectory point, as well as the angle between the first line segment and the second line segment; and count the second number.
[0214] The first line segment connects the trajectory point and the second adjacent trajectory point; the second line segment connects the trajectory point and the third adjacent trajectory point; the second adjacent trajectory point was acquired before the trajectory point was acquired, and its acquisition position is adjacent to the trajectory point's acquisition position; the third adjacent trajectory point was acquired after the trajectory point was acquired, and its acquisition position is adjacent to the trajectory point's acquisition position; the second number is the number of trajectory points among multiple trajectory points whose included angle is less than a preset angle threshold; the first feature data includes the second number.
[0215] In another possible implementation, the first feature data is used to characterize trajectory points with abrupt position changes among multiple trajectory points. The feature extraction module 1002 is specifically used for: for each trajectory point among multiple trajectory points, if the acquisition position of the trajectory point is different from the acquisition position of the previous trajectory point, then determining a first trajectory point whose acquisition position is within a preset range from the non-adjacent trajectory points among the multiple trajectory points; and calculating the third number corresponding to each trajectory point among the multiple trajectory points, and determining the sum of the multiple third numbers corresponding to the multiple trajectory points.
[0216] Among them, the acquisition time of the previous trajectory point is adjacent to the acquisition time of the trajectory point, and the acquisition time is before the acquisition time of the trajectory point; non-adjacent trajectory points refer to trajectory points whose acquisition time is after the acquisition time of the trajectory point and whose acquisition position is not adjacent to the acquisition position of the trajectory point; the third number is the number of first trajectory points corresponding to each trajectory point among the multiple trajectory points; the first feature data includes the sum of multiple third numbers.
[0217] In another possible implementation, the anomaly detection module 1003 is specifically used to: input the first feature data into the trajectory recognition model to obtain the recognition result of the driving trajectory; wherein, the recognition result indicates whether the driving trajectory represented by the driving trajectory data is abnormal.
[0218] In another possible implementation, the identification device 1000 further includes a training module 1004.
[0219] The data acquisition module 1001 is further used to acquire multiple historical driving trajectory data of the vehicle, and the status identifier corresponding to each historical driving trajectory data in the multiple historical driving trajectory data; wherein, each historical driving trajectory data in the multiple historical driving trajectory data includes: the collection location and collection time of multiple historical trajectory points; the status identifier is used to indicate whether the driving trajectory represented by the corresponding historical driving trajectory data is abnormal. The feature extraction module 1002 is further used to extract features from each historical driving trajectory data to obtain second feature data; the second feature data is used to represent historical trajectory points with abrupt changes in direction and / or abrupt changes in position among the multiple historical trajectory points. The training module 1004 is used to train a preset network model using the obtained second feature data and its corresponding status identifier to obtain a trajectory recognition model.
[0220] Of course, the abnormal trajectory identification device 1000 provided in this application embodiment includes, but is not limited to, the above-described modules.
[0221] Another embodiment of this application also provides an electronic device. For example... Figure 11 As shown, the electronic device 1100 includes a memory 1101 and a processor 1102; the memory 1101 and the processor 1102 are coupled; the memory 1101 is used to store computer program code, which includes computer instructions. When the processor 1102 executes the computer instructions, the electronic device 1100 performs each step of the method flow shown in the above method embodiment.
[0222] In actual implementation, the data acquisition module 1001, feature extraction module 1002, anomaly detection module 1003, and training module 1004 can be composed of... Figure 11 The processor 1102 shown calls the computer program code in memory 1101 to implement this. The specific execution process can be found in the description of the abnormal trajectory identification method section above, and will not be repeated here.
[0223] Another embodiment of this application provides a computer-readable storage medium storing computer instructions that, when executed on an electronic device, cause the electronic device to perform each step of the method flow shown in the above method embodiment.
[0224] Another embodiment of this application provides a chip system applied to an electronic device. The chip system includes one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines. The interface circuits are used to receive signals from the electronic device's memory and send the signals to the processors, the signals including computer instructions stored in the memory. When the processor of the electronic device executes the computer instructions, the electronic device performs each step of the method flow shown in the above method embodiments.
[0225] In another embodiment of this application, a computer program product is also provided, which includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the various steps of the method flow shown in the above method embodiments.
[0226] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, implementation can be, in whole or in part, in the form of a computer program product. This computer program product includes one or more computer instructions. When these computer instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device containing one or more servers, data centers, etc., that can be integrated with the medium. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs).
[0227] The above description is merely a specific embodiment of this application. Any variations or substitutions conceived by those skilled in the art based on the specific embodiments provided in this application should be covered within the protection scope of this application.
Claims
1. A method of identifying an abnormal trajectory, characterized by, The method includes: Acquire vehicle driving trajectory data; the driving trajectory data includes: the collection location and collection time of multiple trajectory points; Feature extraction is performed on the driving trajectory data to obtain first feature data; the first feature data is used to characterize trajectory points with abrupt position changes; the trajectory points with abrupt position changes represent trajectory points where the acquisition position repeatedly appears at different acquisition times; wherein, the feature extraction of the driving trajectory data to obtain the first feature data includes: for each trajectory point among the plurality of trajectory points, if the acquisition position of the trajectory point is different from the acquisition position of the previous trajectory point, then a first trajectory point whose acquisition position is within a preset range from the non-adjacent trajectory points among the plurality of trajectory points is determined; wherein, the acquisition time of the previous trajectory point is adjacent to the acquisition time of the trajectory point, and the acquisition time is before the acquisition time of the trajectory point; the non-adjacent trajectory point refers to a trajectory point among the plurality of trajectory points whose acquisition time is after the acquisition time of the trajectory point, and whose acquisition position is not adjacent to the acquisition position of the trajectory point; counting the third number corresponding to each trajectory point among the plurality of trajectory points, and determining the sum of the plurality of the third numbers corresponding to the plurality of trajectory points; wherein, the third number is the number of first trajectory points corresponding to each trajectory point among the plurality of trajectory points; the first feature data includes the sum of the plurality of the third numbers; Based on the first feature data, determine whether the driving trajectory represented by the driving trajectory data is abnormal.
2. The method of claim 1, wherein, The trajectory point with a sudden change in position also refers to the trajectory point whose distance from the trajectory point adjacent to its acquisition time is greater than a preset distance threshold; The step of extracting features from the driving trajectory data to obtain the first feature data further includes: For each of the plurality of trajectory points, the distance between the trajectory point and the first adjacent trajectory point is determined; wherein, the first adjacent trajectory point refers to a trajectory point whose acquisition time is adjacent to that of the trajectory point; different trajectory points correspond to different first adjacent trajectory points; The first number is counted; wherein, the first number is the number of trajectory points whose distance is greater than a preset distance threshold among the plurality of trajectory points; the first feature data includes the first number.
3. The method of claim 1, wherein, The first feature data is also used to characterize the trajectory points with a sudden change in direction among the plurality of trajectory points; the trajectory points with a sudden change in direction represent the trajectory points whose driving direction has changed and whose included angle between the trajectory segments before and after the change is an acute angle. The step of extracting features from the driving trajectory data to obtain the first feature data further includes: For each of the plurality of trajectory points, a first line segment and a second line segment corresponding to the trajectory point, as well as the included angle between the first line segment and the second line segment, are determined; wherein, the first line segment connects the trajectory point and a second adjacent trajectory point; the second line segment connects the trajectory point and a third adjacent trajectory point; the acquisition time of the second adjacent trajectory point is before the acquisition time of the trajectory point, and the acquisition position is adjacent to the acquisition position of the trajectory point; the acquisition time of the third adjacent trajectory point is after the acquisition time of the trajectory point, and the acquisition position is adjacent to the acquisition position of the trajectory point. The second number is counted; wherein, the second number is the number of trajectory points among the plurality of trajectory points whose included angle is less than a preset angle threshold; the first feature data includes the second number.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining whether the driving trajectory represented by the driving trajectory data is abnormal based on the first feature data includes: The first feature data is input into the trajectory recognition model to obtain the recognition result of the driving trajectory; wherein, the recognition result indicates whether the driving trajectory represented by the driving trajectory data is abnormal.
5. The method of claim 4, wherein, The method further includes: The system acquires multiple historical driving trajectory data of the vehicle, as well as a status identifier corresponding to each historical driving trajectory data. Each historical driving trajectory data includes the collection location and collection time of multiple historical trajectory points. The status identifier is used to indicate whether the driving trajectory represented by its corresponding historical driving trajectory data is abnormal. Feature extraction is performed on each historical driving trajectory data to obtain second feature data; the second feature data is used to characterize historical trajectory points with sudden changes in direction and / or sudden changes in position among the multiple historical trajectory points; The obtained second feature data and its corresponding state identifier are used to train a preset network model to obtain the trajectory recognition model.
6. An abnormal trajectory identification device characterized by comprising: The identification device includes: The data acquisition module is used to acquire the vehicle's driving trajectory data; the driving trajectory data includes: the collection location and collection time of multiple trajectory points; A feature extraction module is used to extract features from the driving trajectory data to obtain first feature data. The first feature data is used to characterize trajectory points with abrupt position changes. The trajectory points with abrupt position changes represent trajectory points where the acquisition position repeatedly appears at different acquisition times. The step of extracting features from the driving trajectory data to obtain the first feature data includes: for each trajectory point among the plurality of trajectory points, if the acquisition position of the trajectory point is different from the acquisition position of the previous trajectory point, then determining a first trajectory point from the non-adjacent trajectory points among the plurality of trajectory points whose acquisition position is within a preset range from the acquisition position of the trajectory point; wherein the acquisition time of the previous trajectory point is adjacent to the acquisition time of the trajectory point, and the acquisition time is before the acquisition time of the trajectory point; the non-adjacent trajectory point refers to a trajectory point among the plurality of trajectory points whose acquisition time is after the acquisition time of the trajectory point, and whose acquisition position is not adjacent to the acquisition position of the trajectory point; counting the third number corresponding to each trajectory point among the plurality of trajectory points, and determining the sum of the plurality of the third numbers corresponding to the plurality of trajectory points; wherein the third number is the number of first trajectory points corresponding to each trajectory point among the plurality of trajectory points; the first feature data includes the sum of the plurality of the third numbers. The anomaly detection module is used to determine whether the driving trajectory represented by the driving trajectory data is abnormal based on the first feature data.
7. The identification device according to claim 6, characterized in that, The trajectory point with a sudden change in position also refers to a trajectory point whose distance to trajectory points adjacent to its acquisition time is greater than a preset distance threshold; the feature extraction module is further specifically used for: determining the distance between the trajectory point and the first adjacent trajectory point for each of the plurality of trajectory points; and counting the first number; Wherein, the first adjacent trajectory point refers to a trajectory point whose acquisition time is adjacent to that of the trajectory point among the plurality of trajectory points; different trajectory points correspond to different first adjacent trajectory points; the first number is the number of trajectory points among the plurality of trajectory points whose distance is greater than a preset distance threshold; the first feature data includes the first number; The first feature data is also used to characterize the trajectory points with a sudden change in direction among the plurality of trajectory points; the trajectory points with a sudden change in direction represent the trajectory points whose driving direction has changed and whose included angle between the trajectory segments before and after the change is an acute angle. The feature extraction module is further specifically used for: for each trajectory point among the plurality of trajectory points, determining the first line segment and the second line segment corresponding to the trajectory point, as well as the included angle between the first line segment and the second line segment; and calculating a second number; Wherein, the first line segment connects the trajectory point and the second adjacent trajectory point; the second line segment connects the trajectory point and the third adjacent trajectory point; the acquisition time of the second adjacent trajectory point is before the acquisition time of the trajectory point, and the acquisition position is adjacent to the acquisition position of the trajectory point; the acquisition time of the third adjacent trajectory point is after the acquisition time of the trajectory point, and the acquisition position is adjacent to the acquisition position of the trajectory point; the second number is the number of trajectory points among the plurality of trajectory points whose included angle is less than a preset angle threshold; the first feature data includes the second number; The anomaly detection module is specifically used for: The first feature data is input into the trajectory recognition model to obtain the recognition result of the driving trajectory; wherein, the recognition result indicates whether the driving trajectory represented by the driving trajectory data is abnormal; The identification device further includes: a training module; The data acquisition module is further configured to acquire multiple historical driving trajectory data of the vehicle, and a status identifier corresponding to each historical driving trajectory data in the multiple historical driving trajectory data; wherein, each historical driving trajectory data in the multiple historical driving trajectory data includes: the collection location and collection time of multiple historical trajectory points; the status identifier is used to indicate whether the driving trajectory represented by its corresponding historical driving trajectory data is abnormal; The feature extraction module is further configured to extract features from each historical driving trajectory data to obtain second feature data; the second feature data is used to characterize historical trajectory points with abrupt changes in direction and / or abrupt changes in position among the plurality of historical trajectory points; The training module is used to train a preset network model using the obtained second feature data and its corresponding state identifier to obtain the trajectory recognition model.
8. An electronic device, comprising: The electronic device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program code, the computer program code including computer instructions; When the processor executes the computer instructions, the electronic device performs the abnormal trajectory identification method as described in any one of claims 1-5.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on an electronic device, cause the electronic device to perform the method for identifying abnormal trajectories as described in any one of claims 1-5.
Citation Information
Patent Citations
Track viewing method and device
CN109118610A
Detection method and device of outliers in driving track
CN110109165A
Road association method and equipment for interest point collection
CN111475591A
Track processing method and device, equipment and storage medium
CN111784728A
Data recovery method and device
CN112948361A