Logistics vehicle route anomaly detection method based on edge calculation

Through the dynamic road curvature calculation model and the improved DTW algorithm, combined with the sliding offset and local straight line fitting method, the detection accuracy problems and edge device computing pressure problems in complex road sections are solved, and low-latency logistics vehicle route anomaly detection is achieved.

CN120687841APending Publication Date: 2025-09-23ANHUI SYMBIOSIS PUBLIC SERVICE SUPPLY CHAIN TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510730495.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-23

AI Technical Summary

Technical Problem

Existing technologies cannot balance detection accuracy and computing pressure on edge devices on complex curves or mountainous roads, resulting in false alarms and waste of computing resources.

Method used

A dynamic road curvature calculation model is adopted, combined with the sliding offset calculation model and the local straight line fitting method on straight sections, and the DTW algorithm is improved on curved sections. The detection algorithm is optimized through the curvature perception factor, and the offset tolerance and detection strategy are dynamically adjusted.

Benefits of technology

It achieves a balance between detection accuracy and edge device computing resources in different road sections, reduces false alarm rate and computational complexity, and improves real-time processing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120687841A_ABST
    Figure CN120687841A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of vehicle track detection, and particularly relates to a logistics vehicle route anomaly detection method based on edge calculation, which comprises the following steps: S1, introducing a dynamic road curvature calculation model, and carrying out track offset detection at an edge end; based on a detection result, different road section forms are dynamically adapted, and different monitoring standards are adopted in straight road sections and curved road sections; performing offset detection on a straight road section by adopting the step S2, and performing offset detection on a curved road section by adopting the step S3; s2, introducing a sliding offset calculation model and a local straight line fitting method on the straight line section to calculate a vertical distance for detecting track offset; and S3, improving a DTW algorithm by adding a curvature sensing factor on the curved road section, and detecting track offset. According to the invention, the applicable detection model is dynamically switched according to the real-time driving environment, and the accuracy and adaptability of the detection result are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of vehicle trajectory detection, and specifically relates to a logistics vehicle route anomaly detection method based on edge computing. Background Art

[0002] Edge computing technology has been applied to real-time location monitoring and anomaly detection for logistics vehicles. This technology combines edge computing, IoT technology, and real-time data processing. It aims to rapidly analyze and process vehicle location information through edge devices, enabling real-time detection of issues such as vehicle position deviations and route anomalies, thereby improving monitoring capabilities for vehicle status during transportation.

[0003] However, traditional systems typically use a single offset criterion, which can easily lead to false alarms on complex curves or mountainous roads. More accurate detection standards are needed for different road types. Conventional multi-criteria detection techniques, however, increase computational complexity and introduce redundant calculations, placing increased pressure on edge devices. This conflicts with the high processing power requirements of edge computing. Summary of the Invention

[0004] The purpose of the present invention is to provide a logistics vehicle route anomaly detection method based on edge computing, which is used to solve the technical problem that the existing technology cannot take into account both detection accuracy and less computing pressure on edge devices in complex curves or mountainous sections.

[0005] The method for detecting anomalies in logistics vehicle routes based on edge computing includes the following steps:

[0006] S1. A dynamic road curvature calculation model is introduced to detect trajectory deviation at the edge.

[0007] Based on the detection results, the system dynamically adapts to different road section shapes and uses different monitoring standards for straight sections and curved sections. Straight sections use step S2 for offset detection, while curved sections use step S3 for offset detection.

[0008] S2. On straight sections, a sliding offset calculation model and a local line fitting method are introduced to calculate the vertical distance for detecting trajectory offset;

[0009] S3. On curved roads, the DTW algorithm is improved by adding a curvature perception factor to detect trajectory deviation.

[0010] Preferably, in step S1, a dynamic road curvature calculation model is used to calculate the curvature of the road through the curvature radius R and the curvature K, and the tolerance is dynamically adjusted in combination with different curvature values; the offset warning is dynamically adjusted in combination with the curvature, and different trajectory offset tolerances are defined according to the road curvature value. If the current offset exceeds the trajectory offset tolerance, a warning is triggered.

[0011] Preferably, in step S1, the trajectory deviation tolerance adopts the dynamically calculated tolerance δ 容忍 , the calculation formula is:

[0012]

[0013] Among them, C is an adjustable parameter, which is used to balance the influence of curvature radius R on tolerance;

[0014] The curvature is calculated using the following formula:

[0015]

[0016] Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for the curvature radius is:

[0017]

[0018] Here, K represents the curvature.

[0019] Preferably, in step S1, the specific setting of parameter C is set to different values ​​based on the different types of roads passed. The road types include 1) expressways, 2) national roads and provincial roads, 3) ordinary urban roads, and 4) mountain roads and sharp bends. The value of parameter C decreases in order based on the order of road types, and the range of the offset also decreases in order.

[0020] Preferably, in step S2, the vertical distance from the vehicle's current position P(t) to the nearest planned trajectory point Q(t) is calculated as:

[0021]

[0022] Among them, (x0, y0) is the current position of the vehicle, corresponding to P(t); (x1, y1) and (x2, y2) are the two points closest to P(t) on the planned route L, d 偏移 is the vertical offset between the vehicle trajectory and the planned route.

[0023] Preferably, in step S2, a sliding offset calculation model is introduced to calculate whether the sliding offset exceeds the threshold value according to N consecutive offset calculations. smooth The calculation formula is as follows:

[0024]

[0025] Among them, the number N ranges from 5 to 7, d(ti) represents the offset at the ti-th moment before the current moment, the current moment is the t-th moment, i∈[0,N-1], if the offset exceeds the threshold δ of the straight section for N consecutive times 直线 , triggering an offset warning.

[0026] Preferably, in step S2, a local straight line y=ax+b is obtained by performing a least squares fit using a segment of historical trajectory points through a local straight line fitting method to represent the vehicle movement trend in a short period of time, and the local straight line fitting parameters a and b are calculated as follows:

[0027]

[0028] Among them, N is the number of historical trajectory points used for fitting, (xi,yi) is the coordinate of the historical trajectory point; next calculate the vertical distance d from the current point to the fitting line 偏移 :

[0029]

[0030] Among them, a and b are the current point (x p ,y p ) corresponds to the fitting straight line parameters of the local trajectory, the current point (x p ,y p ) indicates the current vehicle position.

[0031] Preferably, in step S3, the planned trajectory P = {p1, p2, ..., p N}, actual trajectory A={a1,a2,…,a M}, local curvature K at high curvature i The calculation formula is:

[0032]

[0033] Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for curvature-weighted distance is:

[0034] d′(p i ,α j )=(1+ακ i )·d(p i ,α j ), where α is a weight factor used to enhance the matching weight of high curvature areas; the curvature weighted distance is d'(p i ,a j); Improved cumulative distance matrix algorithm:

[0035] D(i,j)=d′(p i ,a j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}, where d(p i ,a j ) is p i to a j The Euclidean distance, D() represents the cumulative distance matrix, and D(i,j) is the cumulative distance at the current moment (i,j).

[0036] The advantages of the present invention are: designing a low-latency detection mechanism that can operate independently of edge computing and quickly respond to trajectory deviations. At the same time, corresponding detection strategies are formulated for different types of roads and sections (such as straight sections and curved sections), and the applicable detection model is dynamically switched according to the real-time driving environment to ensure the accuracy and adaptability of the detection results.

[0037] We optimized the detection algorithms for straight and curved sections of relevant edges. For straight sections, we introduced a sliding offset calculation model to avoid jitter misjudgments caused by a single trajectory point, thus minimizing false positives. We also introduced a local line fitting method to further reduce edge computing complexity. The combination of these two technologies balances detection accuracy with minimal computational pressure on edge devices. For curved roads, we improved the DTW algorithm by adding factors such as curvature perception, reducing redundant computations and reducing the computational pressure on edge devices, thereby improving real-time processing capabilities. DETAILED DESCRIPTION

[0038] Figure 1 This is a basic flow chart of a logistics vehicle route anomaly detection method based on edge computing in the present invention. DETAILED DESCRIPTION

[0039] The specific implementation methods of the present invention will be further explained in detail below through descriptions of embodiments in conjunction with the accompanying drawings to help those skilled in the art have a more complete, accurate and in-depth understanding of the inventive concept and technical solutions of the present invention.

[0040] like Figure 1 As shown, the present invention provides a logistics vehicle route anomaly detection method based on edge computing, which includes the following steps.

[0041] S1. A dynamic road curvature calculation model is introduced to perform trajectory deviation detection at the edge.

[0042] In this step, the radius of curvature of the road is calculated to detect trajectory deviation at the edge. Based on the detection results, this method dynamically adapts to different road section configurations, using different monitoring standards for straight and curved sections. Straight sections use step S2 for deviation detection, while curved sections use step S3 for deviation detection. This allows the method to automatically adjust the deviation tolerance when switching between straight and curved sections, reducing the possibility of false alarms.

[0043] Specifically, this step uses a dynamic road curvature calculation model to calculate the curvature of the road through the curvature radius R and curvature K, and dynamically adjusts the tolerance based on different curvature values ​​to avoid false alarms. i (x i ,y i ), the curvature of the corresponding trajectory can be calculated by the following formula:

[0044]

[0045] Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for the curvature radius is:

[0046]

[0047] The larger R is, the straighter the road is (close to no curvature); the smaller R is, the more curved the road is (sharp bend).

[0048] Based on the above curvature radius R and curvature K, we have:

[0049] Straight line section: R→∞, K→0;

[0050] Curved road section: R is smaller and K is larger;

[0051] This method can be combined with curvature to dynamically adjust the deviation warning. According to the road curvature value, different trajectory deviation tolerances are defined. The calculation formula is:

[0052]

[0053] C is an adjustable parameter, typically expressed in m·km, that balances the impact of the curvature radius R on tolerance. If C is too small, the alarm may be too strict on straight sections, leading to false alarms. If C is too large, the alarm may be too relaxed on curves, reducing the sensitivity of deviation detection.

[0054] So we have:

[0055] Straight line segment (R→∞): δ 容忍 Maximum, allowing larger offset d 偏移(e.g. 5-10m);

[0056] Sharp bend (smaller R): δ 容忍 Become smaller and strictly control the offset d 偏移 (e.g. 2-3m);

[0057] If the current offset d 偏移 Exceeding the dynamically calculated tolerance δ 容忍 , that is, d 偏移 >δ 容忍 An early warning is triggered.

[0058] In addition, in this embodiment, the specific setting of parameter C can also be set to different values ​​based on the different types of roads passed. The corresponding relationship between the specific setting of parameter C and different road types is shown in Table 1.

[0059] Table 1: Correspondence between parameter C and different road types

[0060] Road Type Parameter C value offset Expressway (straight section) C≈3000 Allow 5-10m offset National and provincial highways (fewer bends) C≈2000 Allow 3-6m offset Ordinary urban roads (with many bends) C≈1000 Allow 2-4m offset Mountain roads & sharp bends C≈500 Allow 1-3m offset

[0061] S2. On straight sections, a sliding offset calculation model and a local straight line fitting method are introduced to calculate the vertical distance for detecting trajectory deviation.

[0062] On straight sections, this step uses vertical distance to detect track deviation. However, this method has some limitations on edge devices and needs to be improved to improve robustness and detection accuracy, avoid misjudgments caused by jitter in a single track point, and reduce edge computing complexity. The specific steps are as follows.

[0063] On a straight road, the curvature K≈0. When the vehicle is driving normally, it should drive along the center line of the planned route. The shortest vertical distance method is used to determine whether the vehicle deviates. P(t) represents the current position of the vehicle, and L represents the planned route. L consists of a series of trajectory points, which can be expressed as L={Q1,Q2,…,Q n The vertical distance from the vehicle’s current position P(t) to the nearest planned trajectory point Q(t) is calculated as:

[0064]

[0065] Among them, (x0, y0) is the current position of the vehicle, corresponding to P(t); (x1, y1) and (x2, y2) are the two points closest to P(t) on the planned route L, d 偏移 is the vertical offset between the vehicle trajectory and the planned route.

[0066] In order to reduce the false alarms caused by GPS fluctuations, this step introduces a sliding offset calculation model, using an improved algorithm to calculate the sliding offset at N consecutive moments, and determines whether to trigger an alarm based on whether the N consecutive offset calculations exceed the threshold. smooth The calculation formula is as follows:

[0067]

[0068] Among them, the number N ranges from 5 to 7, d(ti) represents the offset at the ti-th moment before the current moment, the current moment is the t-th moment, i∈[0,N-1], if N consecutive offsets (i.e., sliding offset dsmooth) exceed the threshold δ of the straight section 直线 , triggering an offset warning. The introduction of a sliding offset calculation model can avoid false alarms to a certain extent.

[0069] Furthermore, considering that traditional methods directly calculate the vertical distance from the current point to the planned path, projection calculations are required each time, resulting in high computational complexity and a challenge for edge computing. This step uses a local line fitting method, performing a least squares fit on a segment of historical trajectory points to obtain a local line representing the vehicle's movement trend over a short period of time. The vertical distance from the current point to the fitted line is then calculated, rather than the distance to the planned path directly. This method is more suitable for edge devices with linear roads and limited computing power.

[0070] Specifically, for a series of historical trajectory points (x i ,y i ), this step uses the least squares method to fit a local straight line y = ax + b, and the number of historical trajectory points is N (for example, N = 5). First, calculate the local straight line fitting parameters a and b, and the calculation formula is as follows:

[0071]

[0072]

[0073] Wherein, N is the number of historical trajectory points used for fitting (for example, N=5), and (xi,yi) is the coordinate of the historical trajectory point.

[0074] Next, calculate the vertical distance from the current point to the fitted line. p ,y p ) to the vertical distance d from the line y = ax + b 偏移 The calculation formula is as follows:

[0075]

[0076] Among them, a and b are the current point (xp ,y p ) corresponds to the fitting straight line parameters of the local trajectory, the current point (x p ,y p ) represents the current vehicle position, and the calculated vertical distance d 偏移 is the shortest distance from the current point to the corresponding local trajectory line. The improved method fits a line once every N frames (corresponding to the number of historical trajectory points fitted), reducing the number of calculations and the computational complexity from O(N) to O(1), further reducing the complexity of edge computing. The above two improvements work together to achieve good results on straight sections, taking into account both detection accuracy and low computational complexity, meeting the real-time requirements of edge computing devices.

[0077] S3. On curved roads, the DTW algorithm is improved by adding a curvature perception factor to detect trajectory deviation.

[0078] For offset detection on curved road sections, the road curvature is large, and the trajectory of the vehicle should bend along the route when it is driving normally. Therefore, this step uses the DTW (Dynamic Time Warping) algorithm. Although this can handle the problem of timing alignment, it is computationally intensive and resource intensive when used on the edge. DTW requires a complete trajectory for comparison, making it difficult to perform streaming calculations and unsuitable for low-latency anomaly detection tasks. To address this, this method improves the DTW calculation process, adds a curvature perception factor to this step, and adopts a local curvature control matching strategy. This reduces redundant calculations, improves matching accuracy at sharp bends, avoids DTW misjudgment of offsets on bends, and improves the real-time performance of edge computing in curved road section scenarios.

[0079] Specifically, when the curvature is high, the DTW algorithm is used but the weighted matching of important points is performed. For two trajectories P and A: the planned trajectory P = {p1, p2, ..., p N}, actual trajectory A={a1,a2,…,a M The cumulative distance matrix algorithm for standard DTW calculation is:

[0080] D(i,j)=d(p i ,a j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}, where d(p i ,a j ) is p i to a j The Euclidean distance, D() represents the cumulative distance matrix, and D(i,j) is the cumulative distance at the current moment (i,j).

[0081] Local curvature K i The calculation formula is:

[0082]

[0083] Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for curvature-weighted distance is:

[0084] d′(p i ,a j )=(1+ακ i )d(p i ,a j ),

[0085] Among them, α is the weight factor (i.e., curvature perception factor), which is used to enhance the matching weight of high curvature areas; the curvature weighted distance is d'(p i ,a j ).

[0086] In the standard DTW calculation, the cumulative distance matrix algorithm uses d'(p i ,a j ) instead of d(p i ,a j ), then there is an improved cumulative distance matrix algorithm:

[0087] D(i,j)=d′(p i ,a j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}, which can achieve stricter matching at sharp bends and reduce misalignment. The improved method reduces redundant calculations, reduces the computing pressure of edge devices, improves the matching accuracy at sharp bends, and avoids DTW misjudgment and offset in bends.

[0088] The present invention is described above by way of example based on the accompanying drawings. It is obvious that the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the inventive concept and technical solution of the present invention, or the inventive concept and technical solution are directly applied to other occasions without improvement, they are all within the scope of protection of the present invention.

Claims

1. A logistics vehicle route anomaly detection method based on edge computing, characterized by: The following steps are involved: S1. A dynamic road curvature calculation model is introduced to detect trajectory deviation at the edge. Based on the detection results, the system dynamically adapts to different road section shapes and uses different monitoring standards for straight sections and curved sections. Straight sections use step S2 for offset detection, while curved sections use step S3 for offset detection. S2. On straight sections, a sliding offset calculation model and a local line fitting method are introduced to calculate the vertical distance for detecting trajectory offset; S3. On curved roads, the DTW algorithm is improved by adding a curvature perception factor to detect trajectory deviation.

2. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 1, characterized in that: In step S1, a dynamic road curvature calculation model is used to calculate the curvature of the road through the curvature radius R and the curvature K, and the tolerance is dynamically adjusted in combination with different curvature values. The offset warning is dynamically adjusted in combination with the curvature, and different trajectory offset tolerances are defined according to the road curvature value. If the current offset exceeds the trajectory offset tolerance, an alert is triggered.

3. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 2, characterized in that: In step S1, the trajectory deviation tolerance adopts the dynamically calculated tolerance δ 容忍 , the calculation formula is: Among them, C is an adjustable parameter, which is used to balance the influence of curvature radius R on tolerance; The curvature is calculated using the following formula: Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for the curvature radius is: Here, K represents the curvature.

4. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 2, characterized in that: In step S1, the specific setting of parameter C is set to different values ​​based on the different types of roads passed. The road types include 1) expressways, 2) national highways and provincial highways, 3) ordinary urban roads, and 4) mountain roads and sharp bends. The value of parameter C decreases in order based on the order of road types, and the range of the offset also decreases in order.

5. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 1, characterized in that: In step S2, the vertical distance from the vehicle's current position P(t) to the nearest planned trajectory point Q(t) is calculated as: Among them, (x0, y0) is the current position of the vehicle, corresponding to P(t); (x1, y1) and (x2, y2) are the two points closest to P(t) on the planned route L, d 偏移 is the vertical offset between the vehicle trajectory and the planned route.

6. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 5, characterized in that: In step S2, a sliding offset calculation model is introduced to calculate whether the sliding offset exceeds the threshold value based on the N consecutive offset calculations. smooth The calculation formula is as follows: Among them, the number N ranges from 5 to 7, d(ti) represents the offset at the ti-th moment before the current moment, the current moment is the t-th moment, i∈[0,N-1], if the offset exceeds the threshold δ of the straight section for N consecutive times 直线 , triggering an offset warning.

7. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 5, characterized in that: In step S2, a local straight line is fitted using a least squares fit of a segment of historical trajectory points to obtain a local straight line y = ax + b to represent the vehicle's movement trend in a short period of time. The local straight line fitting parameters a and b are calculated as follows: Among them, N is the number of historical trajectory points used for fitting, (xi,yi) is the coordinate of the historical trajectory point; next calculate the vertical distance d from the current point to the fitting line 偏移 : Among them, a and b are the current point (x p ,y p ) corresponds to the fitting straight line parameters of the local trajectory, the current point (x p ,y p ) indicates the current vehicle position.

8. The method for detecting anomalies in logistics vehicle routes based on edge computing according to claim 1, characterized in that: In step S3, the planned trajectory P = {p1, p2, ..., p N }, actual trajectory A={a1,a2,…,a M }, local curvature K at high curvature i The calculation formula is: Among them, x', y' is the first-order derivative of the trajectory coordinates, indicating the direction of velocity; x", y" is the second-order derivative of the trajectory coordinates, indicating the direction of acceleration; and the calculation formula for curvature-weighted distance is: d′(p i ,a j )=(1+ac i )·d(p i ,a j ), Among them, α is the weight factor, which is used to enhance the matching weight of the high curvature area; the curvature weighted distance is d'(p i ,a j ); Improved cumulative distance matrix algorithm: D(i,j)=d′(p i ,α j )+min{D(i-1,j),D(i,j-1),D(i-1,j-1)}, Among them, d(p i ,a j ) is p i to a j The Euclidean distance, D() represents the cumulative distance matrix, and D(i,j) is the cumulative distance at the current moment (i,j).