A driver intentional detour determination method based on dynamic programming
By using a dynamic programming algorithm that segments the driver's route and calculates the degree of detour, the problem of accurately determining whether the driver deliberately takes a detour is solved, intelligent identification and rewards and punishments for the driver's behavior are achieved, and the quality of online car-hailing services is improved.
Patent Information
- Application Number
- CN202210325732.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2042-03-30
AI Technical Summary
Existing technology makes it difficult to accurately distinguish whether a driver is taking a detour intentionally, resulting in higher prices paid by passengers under a reasonable pricing model, and may mistakenly judge that a driver is taking a detour intentionally when no detour is intentional.
A dynamic programming algorithm is used to segment the driver's route, calculate the detour degree of each route, and use the detour degree threshold and preset coefficient to determine whether the driver deliberately took a detour, combined with the actual mileage and estimated route distance.
It can accurately identify whether the driver is deliberately taking a detour and identify the specific detour section, thereby improving the fairness of pricing and service quality.
Smart Images

Figure CN115080674B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of online car-hailing, in particular to a driver intentional detour determination method based on dynamic programming. BACKGROUND
[0002] In the field of online car-hailing and taxi, a metering pricing mode or a mode of pricing by time and mileage in the background of a travel platform is generally adopted. The advantage of this mode is that the time and mileage paid by the driver can be reasonably priced, but it may lead to a detour problem, that is, the driver increases the mileage from the starting point to the destination by walking more, so as to increase the price paid by the passenger.
[0003] The determination of detour is relatively simple, and the deviation of the estimated route mileage of the journey and the actual driving mileage of the driver can be compared to determine. However, sometimes the driver only walks the wrong route due to unfamiliarity with the road, traffic control, temporary road construction, etc., and the deviation from the estimated route mileage does not exist subjectively, and the existing technology determines the detour that does not exist subjectively as intentional detour, which is unfair. Therefore, it is necessary to provide a driver intentional detour determination method based on dynamic programming, which aims to solve the above problems. SUMMARY
[0004] In view of the deficiencies of the prior art, the purpose of the present application is to provide a driver intentional detour determination method based on dynamic programming to solve the problems in the background art.
[0005] The present application is implemented as follows: a driver intentional detour determination method based on dynamic programming, the method comprising the following steps:
[0006] randomly segmenting the actual driving route of the driver to obtain the actual driving mileage of each segment and the estimated distance of the path from the starting point to the final destination of each segment;
[0007] calculating the detour degree of each path according to the actual driving mileage of each segment and the estimated distance of the path from the starting point to the final destination of each segment;
[0008] determining whether the driver intentionally detours according to the detour degree of each path.
[0009] As a further scheme of the present application: the step of randomly segmenting the actual driving route of the driver specifically comprises:
[0010] marking the total actual driving mileage of the driver from the starting point to the final destination as k;
[0011] adopting a random division manner to divide the trajectory of the total actual driving mileage into m segments, marking the starting point as n1 and the final destination as n m+1 , then n2, n3…n mFor the nodes passed by the driver, P(1) is the actual driving distance from n1 to n2, P(2) is the actual driving distance from n2 to n3, P(m) is the actual driving distance from n m to n m+1 , P(x) and m need to meet the following conditions simultaneously: x < m, x is a positive integer; Wherein, a is a division coefficient, and β is a preset minimum distance factor; if the actual total driving distance is less than β, the distance between the start point and the end point is too short, and the detour judgment is not performed.
[0012] As a further scheme of the present application, the step of adopting the random division manner specifically comprises the following steps:
[0013] Marking the current remaining distance as t, and the total distance of the divided segments as u, t+u=k;
[0014] Determining t, if t meets the formula , then P(m)=t, the segment is the last distance, the number of segments is determined, the value of m is obtained, and the division is ended.
[0015] If t does not meet the formula , a random number θ is generated, so that and u+θ≤k, if e=k-u-θ<β, θ+e is the distance of the segment, P(x)=k-u, at this time, m=x, the division is ended; if e=k-u-θ≥β, θ is the distance of the segment, P(x)=θ; x is sequentially incremented, and the path division process of the previous step is repeated until the division is ended.
[0016] As a further scheme of the present application, the estimated distance of the path from the start point to the final end point of each segment is the distance estimated according to time priority, and the estimated distance of the path of each segment is denoted as Q(x).
[0017] As a further scheme of the present application, a dynamic programming algorithm is adopted to calculate the detour degree F(x) of each path, Wherein, 1≤x≤m.
[0018] As a further scheme of the present application, the step of determining whether the driver intentionally detours according to the detour degree of each path specifically comprises the following steps:
[0019] When F(x)>r, the xth path is determined as a detour, and r is a preset detour threshold factor;
[0020] When the number of the path segments determined as detours is greater than or equal to ∈, it is determined that the driver intentionally detours, and ∈ is a preset coefficient.
[0021] Compared with the prior art, the present application has the beneficial effects that:
[0022] The present application solves the problem of determining whether the driver intentionally detours, the method segments the route driven by the driver, adopts a dynamic programming algorithm to calculate the detour degree of each segment, if there are multiple detours, the driver belongs to intentional detour, compared with the prior art, not only can identify whether detour, but also can identify whether the driver intentionally detours, and find out the detour road section. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 A flowchart of a driver intentional detour determination method based on dynamic programming.
[0024] Figure 2 A schematic diagram of a driving route divided into 6 segments. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0026] The specific implementation of the present application is described in detail below in combination with specific embodiments.
[0027] As shown in Figure 1 and Figure 2 , the present application embodiment provides a driver intentional detour determination method based on dynamic programming, the method comprises the following steps:
[0028] S100, randomly segmenting the actual driving route of the driver, obtaining the actual driving distance of each segment and the path estimated distance from the starting point to the final end point of each segment, the path estimated distance from the starting point to the final end point of each segment is the distance estimated according to time priority, the path estimated distance of each segment is represented by Q(x), specifically:
[0029] Marking the total actual driving distance of the driver from the starting point to the final end point as k;
[0030] Using random division, the trajectory of the total actual driving distance is divided into m segments, marking the starting point as n1 and the final end point as n m+1 , then n2, n3…n m are the nodes passed by the driver, marking P(1) as the actual driving distance from n1 to n2, P(2) as the actual driving distance from n2 to n3, and so on, P(m) as the actual driving distance from n m to n m+1 , P(x) and m need to meet the following conditions at the same time: x<m; x is a positive integer, wherein a is a division coefficient, and b is a preset minimum mileage factor, and if the actual total mileage is less than b, then the end point distance is too short and no detour judgment is made.
[0031] When the path is specifically divided, the current remaining mileage is marked as t, the total divided mileage is marked as u, t+u=k, and x=1 is started.
[0032] t is judged, and if t satisfies the formula P(m)=t, the last segment of the mileage is determined, the number of segments is determined, the value of m is obtained, and the division is ended.
[0033] If t does not satisfy the formula A random number theta is generated, so that And u+theta<=k, if e=k-u-theta<beta, theta+e is the division mileage of the segment, P(x)=k-u, m=x at this time, and the division is ended. If e=k-u-theta>=beta, theta is the division mileage of the segment, P(x)=theta, x is sequentially incremented, and the path division process of the above step is repeated until the division is ended.
[0034] S200, the detour degree of each path is calculated according to the actual driving mileage of each segment and the path estimation distance from the starting point to the final end point. The dynamic programming algorithm is used to calculate the detour degree F(x) of each path. Taking a schematic diagram of dividing the driving route into 6 segments as an example, the solid line in the diagram is the actual walking path of the driver, and the dotted line is the estimated path. The detour degree F(6) of the 6th segment is calculated first, that is, F(6)=max(1,P(6) / Q(6)), then F(5)=max(2,2*(P(5)+P(6)) / Q(5))-F(6), and so on. The dynamic programming formula of the xth segment is as follows:
[0035] 1<=x<=m.
[0036] S300, whether the driver intentionally detours is judged according to the detour degree of each path. When F(x)>r, the xth path is determined to be a detour, r is a preset detour threshold factor, and when the number of path segments determined to be a detour is greater than or equal to e, it is determined that the driver intentionally detours, and e is a preset coefficient.
[0037] Compared with the prior art, the beneficial effects of the present application are as follows:
[0038] The application provides a driver intentional detour judgment method based on dynamic programming, which solves the problem of judging whether the driver intentionally detours or not.
[0039] In conclusion, the application can solve the problem of judging whether the driver intentionally detours or not, and the detour degree is calculated by using the dynamic programming algorithm, so that the driver's intention can be intelligently identified, the driver's behavior can be rewarded or punished, and the service quality of the travel industry can be improved.
[0040] The above only describes the preferred embodiments of the application in detail, and does not limit the application, and any modification, equivalent replacement and improvement within the spirit and principle of the application should be included in the protection scope of the application.
[0041] It should be understood that although each step in the flowchart of each embodiment of the application is displayed in sequence according to the arrow, these steps are not necessarily executed in sequence according to the arrow. Unless otherwise stated herein, the execution of these steps has no strict sequence limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in each embodiment can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.
[0042] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer readable storage medium, and when the program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, storage, databases, or other media in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0043] Other embodiments of the present disclosure will be apparent to those skilled in the art with the disclosure in the specification and the examples. The present application is intended to cover any variations, uses, or adaptive changes of the present disclosure that follow the general principles of the present disclosure and include common knowledge or conventional technical means in the art that are not disclosed by the present disclosure. The specification and examples are only considered as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A method for determining whether a driver intentionally takes a detour based on dynamic programming, characterized in that: The method comprises the following steps: The driver's actual driving route is randomly divided into segments to obtain the actual driving mileage of each segment and the estimated distance from the starting point to the final destination of each segment; Calculate the detour of each route segment based on the actual mileage of each segment and the estimated distance from the starting point to the final destination of each segment; Determine whether the driver deliberately took a detour based on the detour degree of each route; The step of randomly segmenting the driver's actual driving route specifically includes: Mark the driver's actual total mileage from the starting point to the final destination as k; The actual total mileage trajectory is divided into m segments by random division, with the starting point being n1 and the final end point being n. m+1 , then n2, n3…n m is the node that the driver passes along the way, P(1) is the actual mileage from n1 to n2, P(2) is the actual mileage from n2 to n3, and P(m) is n m to n m+1 The actual mileage, P(x) and m must satisfy the following conditions at the same time: x is a positive integer; Where α is the division coefficient, and β is the preset minimum mileage factor. If the actual total mileage is less than β, the starting and ending distances are too short and no detour is determined. The steps of adopting the random division method specifically include: Mark the current remaining mileage as t and the total divided mileage as u, then t+u=k; Determine t, if t satisfies the formula Then P(m) = t, and this section is the last mileage. Determine the number of segments, get the value of m, and the division is complete. If t does not satisfy the formula Generate a random number θ such that And u + θ ≤ k, if e = ku - θ < β, θ + e is used as the mileage of this segment, then P(x) = ku, at this time m = x, and the division is complete; if e = ku - θ ≥ β, θ is used as the mileage of this segment, then P(x) = θ; x increases successively, and the path division process of the previous step is repeated until the division is completed; The estimated distance from the starting point to the final destination of each segment is the distance estimated by time priority, and the estimated distance of each segment is represented by Q(x); The dynamic programming algorithm is used to calculate the detour F(x) of each path. Where, 1≤x≤m; The step of determining whether the driver intentionally took a detour based on the detour degree of each route specifically includes: When F(x)>r, the xth segment of the path is determined to be a detour, and r is the preset detour threshold factor; When the number of detour path segments is determined to be ≥∈, it is determined that the driver deliberately took a detour, and ∈ is a preset coefficient.
Citation Information
Patent Citations
Circuit detection model train method and device, and circuit detection method and device
CN109033966A
Automatic drive planning method, device and system
WO2020107991A1