An intelligent traffic prediction and scheduling method based on user behavior data

By constructing a generative adversarial learning model to learn users' subjective preference features and generate personalized cost values, the problem of heterogeneity of user preferences and context dependence in intelligent transportation systems is solved, and accurate path planning and recommendation are achieved.

CN120853383BActive Publication Date: 2026-04-21南京忠设智能科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
南京忠设智能科技有限公司
Filing Date
2025-07-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing intelligent transportation systems are inadequate in addressing users' personalized preferences and contextual dependencies, resulting in a gap between recommendations and user expectations, and failing to achieve truly "user-centric" intelligent scheduling.

Method used

By acquiring users' actual driving trajectories, a generative adversarial learning model is constructed to train the generator and discriminator, learn users' subjective preference features, generate personalized cost values, and combine them with a path search algorithm to plan driving routes that conform to users' subjective preferences.

Benefits of technology

It achieves a deep understanding and intelligent response to user needs, provides accurate and personalized driving route recommendations, and dynamically adjusts recommendation strategies to cope with differences in preferences under different scenarios, thereby improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120853383B_ABST
    Figure CN120853383B_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent traffic prediction and scheduling method based on user behavior data, comprising: acquiring the user's actual driving trajectory and matching it to a digital road network; extracting expert trajectory data containing state-action sequences and contextual features; constructing a generative adversarial learning model and using the expert trajectory data for adversarial training, wherein the generator learns to imitate the user's driving behavior, and the discriminator learns to distinguish between the real user trajectory and the trajectory simulated by the generator; using the output of the discriminator after training convergence, assigning a personalized cost value of the user's subjective preference to each state-action pair in the digital road network; based on the constructed personalized cost network, using the A* path search algorithm to plan an optimal personalized driving route for the user; this invention, through inverse reinforcement learning, can automatically learn the user's inherent preferences from the user's behavior, and the planned route is more in line with the user's true intention, improving user satisfaction and system adoption rate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of user behavior and intelligent traffic technology, and in particular to an intelligent traffic prediction and scheduling method based on user behavior data. Background Technology

[0002] The core objective of route planning technology in Intelligent Transportation Systems (ITS) is to provide users with optimized travel solutions. Initially, route planning was based on classic graph theory algorithms, such as Dijkstra's algorithm and its A* variants. These algorithms solved the basic pathfinding problem by searching for the path with the lowest static cost (such as fixed distance or legal travel time) within a digital road network. With the integration of real-time data technologies, route planning has entered a dynamic optimization phase. This allows ITS to integrate real-time traffic information and use dynamically changing estimated travel time as the core cost, thereby planning routes that effectively avoid congestion and significantly improving travel efficiency.

[0003] However, despite significant progress in the accuracy and dynamism of objective cost prediction, existing technologies still have limitations in addressing the complex and ever-changing personalized needs of the real world, often resulting in a gap between intelligent transportation system recommendations and user expectations. Specifically, these shortcomings are mainly reflected in the following points: First, existing technologies are generally based on the homogeneous assumption of "rational individuals," and the weighted combination cost function they employ is essentially a "one-size-fits-all" approach, unable to effectively address the high heterogeneity of user preferences. Second, many key user preferences are subjective and difficult to explicitly quantify. For unstructured preferences such as "driving comfort" (e.g., avoiding frequent starts and stops, sharp turns), "road environment experience" (e.g., scenery along the way, feeling of road openness), or "psychological safety" (e.g., avoiding narrow roads at night, complex interchanges), defining and measuring them with simple mathematical weights is not only far-fetched but also inevitably leads to distorted results. Third, user preferences are not static but strongly context-dependent. The same user's preference combinations and priorities will change significantly during weekday commutes, weekend leisure trips, or inclement weather. Existing technical solutions, due to the static nature of their cost functions, generally lack the ability to dynamically adapt to different scenarios. These inherent defects often lead to a gap between user experience and system recommendations, manifesting as users frequently deviating from navigation routes. Ultimately, the "optimal" recommendation of the intelligent transportation system becomes a suboptimal choice in reality, failing to achieve truly "user-centric" intelligent scheduling. Summary of the Invention

[0004] The purpose of this section is to outline some aspects of embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0005] In view of the aforementioned existing problems, this invention is proposed. Therefore, this invention provides an intelligent traffic prediction and scheduling method based on user behavior data to solve the problems mentioned in the background section.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: an intelligent traffic prediction and scheduling method based on user behavior data, comprising:

[0007] Obtain the user's actual driving trajectory and match the driving trajectory to the digital road network;

[0008] Construct and train a generative adversarial imitation learning model, the model including a generator that generates a driving strategy based on the current state, and a discriminator that distinguishes state-action pairs derived from the user's actual driving trajectory and the generator;

[0009] Through adversarial training between the generator and the discriminator, the output of the discriminator is made to reflect the user's subjective preference features;

[0010] Based on the output of the discriminator in the trained model, a personalized cost value is generated for each state-action pair in the digital road network.

[0011] Based on the generated personalized cost value, a path search algorithm is used to plan a driving route that conforms to the user's subjective preferences.

[0012] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the process of acquiring the user's actual driving trajectory and matching the driving trajectory to the digital road network further includes:

[0013] Feature vectors are extracted for road segments in the digital road network. The feature vectors include objective physical features and user subjective preference features.

[0014] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the user subjective preference features include at least:

[0015] One or more of the following: traffic flow index calculated based on historical speed data, driving comfort index calculated based on historical driving behavior data, and environmental pleasantness index calculated based on geographic information system data.

[0016] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, wherein: when training the generative adversarial learning model, a policy entropy regularization term is introduced into the objective function of the training.

[0017] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the personalized cost value is inversely proportional to the probability value of the discriminator's output of the state-action pair.

[0018] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, before constructing the generative adversarial learning model, cluster analysis is performed on the driving trajectory data of multiple users to divide the users into user groups with different preference characteristics.

[0019] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the model training is performed independently for each user group to generate a model that represents the subjective preference characteristics of each user group.

[0020] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, it further includes:

[0021] The model of the subjective preference characteristics of the user group to which the current user belongs is used as the initial subjective preference characteristic model for that user;

[0022] The initial subjective preference feature model is then fine-tuned using the user's personal driving trajectory data to generate an individualized subjective preference feature model for that user.

[0023] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the path search algorithm is Algorithm A, and the actual path cost of Algorithm A is the sum of the personalized cost values ​​of each road segment along the route.

[0024] As a preferred embodiment of the intelligent traffic prediction and scheduling method based on user behavior data described in this invention, the process of obtaining the user's actual driving trajectory further includes: labeling the user's actual driving trajectory with contextual information.

[0025] The contextual information is used as part of the input to the generator and the discriminator to learn the user's subjective preference features in different scenarios.

[0026] Compared with existing technologies, the beneficial effects of the invention are:

[0027] 1. This invention employs inverse reinforcement learning, no longer pre-defining what is "optimal". Instead, it treats the user's actual driving behavior as an expert demonstration and reverse-engineers a reward function that can accurately reflect the user's intrinsic and implicit preferences. This transforms the core basis of route planning from general objective indicators to highly personalized subjective preferences, providing truly "tailored" routes for different types of users.

[0028] 2. By considering multi-dimensional preference features, these complex and unstructured preferences are implicitly learned into the discriminator through a generative adversarial imitation learning model, avoiding the subjectivity and inaccuracy of manually setting weights. In addition, by introducing contextual information, the model learns and distinguishes the differences in user preferences in different scenarios such as commuting, leisure, and inclement weather, thereby dynamically adjusting the recommendation strategy and achieving a deep understanding and intelligent response to user needs.

[0029] 3. Simultaneously, a user clustering approach is adopted to first train a basic model with common preferences for different user groups. For a specific user, the model of their group is used as prior knowledge for initialization, and then a small amount of their personal data is used for rapid fine-tuning. This not only provides reasonable initial recommendations for new users, but also accelerates the training speed and accuracy of individualized models. While ensuring the ability to be applied at scale, it achieves refined services for each user. Attached Figure Description

[0030] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0031] Figure 1 This is a flowchart illustrating the overall process of an intelligent traffic prediction and scheduling method based on user behavior data, as described in one embodiment of the present invention. Detailed Implementation

[0032] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0033] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0034] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.

[0035] This invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of this invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not adhering to the usual scale. Furthermore, the schematic diagrams are merely examples and should not be construed as limiting the scope of protection of this invention. In actual fabrication, the three-dimensional spatial dimensions of length, width, and depth should be included.

[0036] Furthermore, in the description of this invention, it should be noted that the terms "upper," "lower," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are used solely for the convenience of describing the invention and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In addition, the terms "first," "second," or "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0037] Unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" in this invention should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; similarly, they can refer to mechanical connections, electrical connections, or direct connections, or indirect connections through an intermediate medium, or internal connections between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0038] Example 1

[0039] Reference Figure 1 This is the first embodiment of the present invention, which provides an intelligent traffic prediction and scheduling method based on user behavior data, including:

[0040] S1. Obtain the user's actual driving trajectory and match the driving trajectory to the digital road network;

[0041] Furthermore, the user's raw driving trajectory data is collected through sensors built into the user terminal (e.g., GPS, IMU inertial measurement unit, etc. in smartphones or in-vehicle navigation units);

[0042] Specifically, during the process of collecting the user's original driving trajectory, it is performed at a preset frequency (e.g., 1Hz) to ensure that the density of trajectory points is sufficient to restore driving details. The data structure of each sampled trajectory point is a tuple, which includes at least: {timestamp, longitude, latitude, instantaneous speed, heading angle}.

[0043] In addition, triaxial acceleration data can be collected to provide raw input data for calculating driving comfort;

[0044] Furthermore, after acquiring the raw driving trajectory data, preprocessing operations are performed to improve data quality. These preprocessing operations are as follows:

[0045] Kalman filters are used to smooth the GPS coordinate sequence (i.e., timestamp, longitude, and latitude in the tuple) to correct positioning drift and signal loss caused by tall buildings, tunnels, etc., thereby generating a driving trajectory that is closer to the real physical path.

[0046] Detect and remove trajectory points whose speed or acceleration values ​​far exceed physical possibilities (e.g., instantaneous speeds exceeding 300 km / h);

[0047] By analyzing whether the displacement of continuous trajectory points within a certain time window (e.g., 120 seconds) is less than a distance threshold (e.g., 50 meters), the user's stopping points (e.g., waiting at a red light, temporary parking) can be identified and marked.

[0048] Furthermore, the preprocessed raw driving trajectory data is matched into a high-precision digital road network;

[0049] Preferably, the matching process uses a map matching algorithm based on a hidden Markov model, because it can comprehensively consider observation probability and transition probability to obtain the globally optimal matching path.

[0050] Specifically, all candidate road segments in the digital road network are represented as a state space; the preprocessed GPS trajectory point sequence is represented as an observation sequence; the probability that a GPS observation point p belongs to a candidate road segment r is defined as the transmission probability, which is calculated based on the perpendicular distance from the point to the road segment and the angle between the observation point's heading angle and the road segment's direction. The closer the distance and the smaller the angle, the higher the probability. Specifically, this calculation can be modeled using a Gaussian distribution; simultaneously, a transmission probability is defined from road segment r... i Drive to section r j The probability is expressed as the transition probability, which is calculated based on the topological connectivity of the digital road network and the ratio of the actual travel distance between two trajectory points to the shortest connection distance on the digital road network. Where r i With r jIf the road segments are not connected, the transition probability is 0. At this point, all the parameters in the Hidden Markov Model are defined. We only need to solve the Hidden Markov Model using the Viterbi algorithm to find the sequence of road segments with the highest probability. This sequence is the user's expert trajectory, which consists of tuples of {road segment ID, entry time, exit time}.

[0051] Furthermore, a rich and high-dimensional feature vector F(r) is constructed for each road segment r in the digital road network. This feature vector is composed of two parts: objective physical features and user subjective preference features.

[0052] Specifically, objective physical characteristics are extracted directly from the static database of the digital road network, including but not limited to: road grade: represented by one-hot encoding (e.g., [1,0,0] for expressways, [0,1,0] for arterial roads); number of lanes: normalized values; speed limit: normalized values; road surface curvature: the reciprocal of the average radius of curvature of the road segment, representing the degree of curvature; gradient: the average gradient of the road segment; intersection density: the number of intersections per unit length of the road segment; number of traffic lights: the total number of traffic lights on the road segment.

[0053] Specifically, user subjective preference characteristics are the quantitative modeling of implicit factors that influence user decisions, including but not limited to: one or more combinations of the following: a smoothness index calculated based on historical speed data, a driving comfort index calculated based on historical driving behavior data, and an environmental pleasantness index calculated based on geographic information system data.

[0054] Specifically, for road segment r and a specific time period t (such as weekday morning rush hour), all data passing through that road segment are filtered from historical trajectory data, and the traffic flow index is obtained by calculating the average speed and speed standard deviation of these data:

[0055] I flow =(μ v / V limit )×(1-σ v / μ v )

[0056] Among them, I flow Represented as a fluency index, μ v V represents the average speed from historical speed data. limit This represents the speed limit for that road segment, σ. v This is expressed as the standard deviation of historical speed data;

[0057] Specifically, "uncomfortable events" are defined using acceleration data from historical trajectories, such as longitudinal acceleration |a x |>2.5m / s 2 (Rapid acceleration / deceleration) or lateral acceleration |ay |>3.0m / s 2 (Sharp turn), and calculate the average number N of "uncomfortable events" that occurred within a unit kilometer (i.e., within 1 kilometer) on all historical trajectories. uncomf The driving comfort index is obtained as follows:

[0058] I comfort =exp(-k×N) uncomf )

[0059] Among them, I comfort This is represented as the driving comfort index; k is the adjustment coefficient, which takes a value of [0,1] and is used to fine-tune the average number of "uncomfortable events";

[0060] Specifically, using spatial analysis tools in a Geographic Information System (GIS), a buffer zone (e.g., 50 meters on each side) is created for road segment r. Within this buffer zone, the area proportion of different land use types is calculated, such as the proportion of green space and water area. Simultaneously, using Points of Interest (POI) data, the number N of "active" POIs (e.g., parks, scenic spots, cafes) within the buffer zone is counted. pos The number N of "negative" POIs (such as waste treatment plants, industrial plants) neg The environmental livability index was obtained as follows:

[0061]

[0062] Among them, I env Represented as the environmental pleasantness index, ω1 and ω2 are N pos and N neg Weighting coefficients, Area i Let ω represent the area percentage of the i-th land use type, and correspondingly, ω i For Area i The weighting coefficients; in this formula, the sum of all weighting coefficients is always 1;

[0063] It should be noted that the weighting coefficients in this formula are determined by expert scoring, regression analysis, or the default equalization method.

[0064] In addition, the context information of the situation in which each expert trajectory occurred is associated with the context information of the event, and this context information is encoded into a vector.

[0065] Specifically, the contextual information includes the time context, weather context, and travel purpose. The time context is extracted from the timestamp, and the weather context is obtained by calling a third-party weather API to retrieve historical weather data (such as sunny, rainy, snowy, and foggy) based on the time and geographical location of the trajectory. The travel purpose is inferred through an initial simple classifier. For example, if the trajectory's start / end point is near the user's marked "home" and "work" and the time is a weekday, it is marked as "commuting"; if the end point is a shopping mall or park, it is marked as "shopping / leisure".

[0066] It should be noted that each piece of data obtained through the above steps includes: an expert trajectory (segment sequence), a comprehensive feature vector of each segment, and a context vector of the entire expert trajectory.

[0067] S2. Construct and train a generative adversarial imitation learning model, which includes a generator that generates a driving strategy based on the current state, and a discriminator that distinguishes between state-action pairs derived from the user's actual driving trajectory and the generator.

[0068] It should be noted that, in order to mimic the user's actual driving choices and implicitly learn a reward function that can represent the user's subjective preferences, this invention adopts the Generative Adversarial Imitation Learning (GAIL) framework.

[0069] Specifically, in the digital road network environment, the path selection problem is formalized as a Markov decision process, and the parameters required for the model are defined, namely, state, action, and state-action pairs.

[0070] Specifically, the state is defined as the feature vector of the road segment where the vehicle is currently located, i.e., the multi-dimensional feature vector F(r); the action is defined as selecting the next adjacent road segment to enter at the end of the current road segment (intersection). Correspondingly, the action space is the set of all possible next road segments; the state-action pair represents that a certain action was performed in a certain state.

[0071] Furthermore, the generative adversarial imitation learning model consists of two deep neural networks: a generator G and a discriminator D;

[0072] It should be noted that the generator functions as an "apprentice" intelligent agent, learning the user's driving strategy; the discriminator functions as a "referee," distinguishing whether a state-action pair comes from a real user (expert) or from the generator itself.

[0073] Preferably, the generator uses a multilayer perceptron (MLP) network, including an input layer, a hidden layer and an output layer. The output layer uses the Softmax activation function to ensure that the sum of the probabilities of all actions is 1. The hidden layer contains two fully connected layers with 256 neurons each, and uses the ReLU activation function to introduce non-linearity. Furthermore, a Dropout layer can be selectively added after each hidden layer to prevent overfitting.

[0074] Specifically, the input layer of the multilayer perceptron network receives the current state s (i.e., the multi-dimensional feature vector F(r)) and the context information vector, enabling the generator's decision-making to perceive context changes. The hidden layer then concatenates the state s and the context information vector, passing the concatenated result to the output layer. The output layer outputs a probability distribution π. θ (a|s,C) represents the probability of choosing each possible action a given the current state s and the context information vector C, where θ is the built-in parameter of the generator network;

[0075] It should be noted that, like the generator, the discriminator uses a multilayer perceptron network. The hidden layer contains two fully connected layers, each with 128 neurons, employing the ReLU activation function to introduce non-linearity. The output layer uses a single neuron with the Sigmoid activation function. Its processing differs slightly from the generator's. Specifically, the input layer of the multilayer perceptron receives the current state-action pair (s, a) and the contextual information vector. The hidden layer then concatenates this state-action pair (s, a) and the contextual information vector, passing the concatenation result to the output layer. The output layer outputs a single scalar value. The scalar value, between (0, 1), represents the probability that the discriminator considers the state-action pair (s, a) to originate from the expert trajectory. These are the built-in parameters of the discriminator network;

[0076] In addition, in order to solve the cold start problem for new users and improve model training efficiency, this invention adopts a two-stage training strategy of "pre-training of user groups + fine-tuning of individual users".

[0077] Specifically, in the first stage, before building the model, cluster analysis is first performed on the users' historical driving trajectory data to calculate the mean vector of their preference characteristics for each user (e.g., the average smoothness, comfort, and environmental pleasantness index of their frequently traveled routes). Using clustering algorithms such as K-Means or DBSCAN, all users are divided into several user groups with similar preference characteristics (e.g., "efficiency-first", "comfort-experience", "scenic exploration"). Then, for each user group, using the expert trajectory data of all users in the group, a generative adversarial imitation learning model is trained independently once, so that a group model (including a pre-trained generator and discriminator) that can represent the common preferences of the group is trained for each group.

[0078] Specifically, in the second stage, when a new user needs personalized recommendations, they are first assigned to the nearest user group. Then, the parameters of the generator and discriminator pre-trained in the model of that group are used as the user's initial subjective preference feature model. Subsequently, the user's personal driving trajectory data (even if the amount of data is small) is used to perform adversarial training on the initial model. In this way, the model can be fine-tuned from a good starting point and achieve rapid convergence, generating an individualized subjective preference feature model that accurately reflects the unique preferences of the new user.

[0079] S3. Through adversarial training between the generator and the discriminator, the output of the discriminator reflects the user's subjective preference characteristics;

[0080] It should be noted that, whether it is group training or individual user fine-tuning, the core is adversarial training between the generator and the discriminator. The specific iterative process is as follows:

[0081] S301, Use the current generator strategy π θ (a|s,C), simulated driving in a digital road network environment to generate a batch of "apprentice" trajectories τ G ={(s0,a0),(s1,a1),...,(s i-1 ,a i-1 )}, i=1;

[0082] S302. Label the state-action pairs (i.e., the expert trajectories processed in step S1) as 1 (real), and label the state-action pairs sampled by the generator as 0 (fake). Then use this labeled data to train the discriminator. Minimize the binary cross-entropy loss function

[0083]

[0084] in, The goal of training is to make the discriminator predict the probabilities of state-action pairs for the output. As close to 1 as possible during model training, when hour, The value of this term approaches 0 (i.e., reaches its minimum value); The goal of training is to increase the probability of the discriminator responding to the generator's fabricated data output. As close to 0 as possible, when hour, The value of this term also approaches 0; τ E Represented as expert trajectory, p E Represented as expert strategy, τ G Represented as the generator trajectory, π θ Represented as a generator strategy;

[0085] S303, Parameters of the fixed discriminator The generator's parameters θ are updated. The generator's goal is to maximize its ability to "fool" the discriminator. In GAIL, the discriminator's output is used as a reward signal, where the reward r(s,a) for a state-action pair (s,a) is defined as... The higher the reward, the more the discriminator considers the behavior to be expert behavior. Subsequently, a policy gradient algorithm (such as TRPO or PPO) is used to update the generator policy π. θ This allows the generator strategy to achieve higher cumulative rewards;

[0086] Preferably, to enhance the exploratory and robust nature of the strategy and to prevent it from converging prematurely to a suboptimal solution, a policy entropy regularization term is introduced into the generator's objective function. In this case, the generator's optimization objective becomes:

[0087]

[0088] Where J(θ) is the objective function that the generator needs to maximize during training. Represented as a standard reinforcement learning objective, namely maximizing the cumulative expected reward, in this invention, the reward r(s) t ,a t The discriminant is not directly given by the environment, but is indirectly defined by the output of the discriminator (e.g., Therefore, maximizing this term is equivalent to learning a strategy that can "deceive" the discriminator to the greatest extent possible, that is, generating a trajectory that the discriminator will think is expert behavior; Represented as the policy entropy regularization term, where the entropy of the generator policy is... By measuring the randomness or uncertainty of the generator policy, adding entropy to the objective function can encourage the generator to explore more diverse actions rather than prematurely converging to a deterministic, but potentially suboptimal, policy, which helps improve the stability of training and the robustness of the final policy.

[0089] Specifically, the convergence condition of the model is the maximum number of "apprentice" trajectories;

[0090] It should be noted that by alternately executing S302 and S303, the generator's strategy π θ It will get closer and closer to the expert's strategy, and the discriminator will become better and better at distinguishing subtle differences. Eventually, as the model training iteratively converges, the discriminator itself becomes an implicit reward function, and its output value directly reflects how much a certain behavior a in a certain state s conforms to the user's subjective preference characteristics.

[0091] S4. Based on the output of the discriminator in the trained model, generate a personalized cost value for each state-action pair in the digital road network;

[0092] It should be noted that, since traditional path planning algorithms (such as Dijkstra or A*) generally find the optimal path by minimizing the total cost of the path, in order to enable the algorithm to plan a path that conforms to the user's subjective preferences, this invention maps the path selection with "high preference" to "low cost value".

[0093] Specifically, the cost of personalization is defined as being inversely proportional to the probability value output by the discriminator;

[0094] Preferably, this inverse relationship is achieved through a logarithmic function. Since the logarithmic function has good numerical stability and discriminative power, the personalized cost value calculation under the context information vector for any state-action pair (s, a) in the digital road network (i.e., from the current road segment (state s) to an adjacent road segment (action a)) can be expressed as:

[0095]

[0096] Where Cost(s,a,C) represents the final generated personalized cost value, which is the weight of the edge in the path search algorithm; in the personalized cost value, when When this condition is met, it indicates that the discriminator is certain that (s,a,C) represents typical user behavior, meaning the degree of preference is extremely high. Therefore, Cost→0 means that the cost of choosing a option that aligns with user preferences approaches zero; when When this occurs, it means the discriminator considers (s,a,C) to be inconsistent with the user's style, i.e., the degree of preference is extremely low. Therefore, Cost → +∞; this means that choices that violate user preferences will be subject to an extremely high and punitive passage cost; ε is a very small positive number, such as 1e-9. Its existence is for the robustness consideration of engineering implementation. Since in rare cases, the output of the discriminator may be extremely close to or even equal to 0, directly taking the logarithm will lead to a mathematical error of log(0) (negative infinity), causing computational overflow. Adding ε can ensure that the parameter of the logarithm is always greater than zero, thereby avoiding program crashes and ensuring the stable operation of the algorithm;

[0097] It should be noted that this mapping relationship is not only inversely proportional, but also non-linear, which can effectively widen the cost gap between options with different levels of preference, enabling the path search algorithm to more clearly distinguish between advantages and disadvantages.

[0098] Furthermore, to make the algorithm easier to understand, the above processing steps are simplified as follows:

[0099] When route planning is needed for users, instead of pre-calculating the cost of all edges in the entire digital road network, a "real-time query" approach is used. That is, during the exploration of the digital road network, whenever the route search algorithm needs to evaluate the travel cost from the current road segment (state s) to an adjacent road segment (action a), the following operations are performed:

[0100] Extract the multidimensional feature vector F(r) of the current state s;

[0101] Obtain the current user's real-time context information C;

[0102] The input (s, a, C) is fed into the user's pre-trained individualized discriminator. middle;

[0103] Obtain the output probability of the discriminator

[0104] Calculate the personalized cost value Cost(s,a,C);

[0105] This personalized cost value is then returned to the pathfinding algorithm.

[0106] It should be noted that through this step, the present invention can dynamically and instantly transform a static, objective physical road network into a personalized cost network tailored for a specific user in a specific scenario.

[0107] S5. Based on the generated personalized cost value, a path search algorithm is used to plan a driving route that conforms to the user's subjective preferences.

[0108] Specifically, based on the personalized cost network of the conversion, an efficient graph search is performed to find the globally optimal path from the starting point O to the ending point D, that is, the path with the lowest cumulative personalized cost.

[0109] Preferably, the present invention employs the A* (A-star) algorithm because it greatly reduces unnecessary search space and improves planning speed by introducing heuristic information while ensuring the optimal solution;

[0110] It should be noted that the core of the A* algorithm lies in its evaluation function: f(n) = g(n) + h(n);

[0111] Specifically, in the scenario of this invention, a node n represents an intersection or road segment endpoint in the digital road network; g(n) represents the actual path cost, which is the actual cumulative cost of the known path from the starting point O to the current node n, that is, the sum of the personalized cost values ​​of each road segment along the way.

[0112] Specifically, if the path from O to n is a sequence of road segments (r1, r2, ..., r... i The corresponding state-action sequence is (s0, a1), (s1, a2), ..., (s...). i-1 ,a i ),but:

[0113]

[0114] Where k represents the road segments contained in the path from the starting point O to the current node n;

[0115] It should be noted that each Cost item in the formula is obtained through an immediate query in step S4. Therefore, g(n) no longer measures physical distance or time, but rather measures the degree to which a path violates user preferences. The smaller g(n) is, the more "smooth" the path is.

[0116] Specifically, h(n) represents the heuristic cost, which is the estimated cost of the future path from the current node n to the destination D. In order to ensure that the A* algorithm can find the optimal solution, h(n) must be acceptable, that is, its estimated cost can never be greater than the actual minimum cost.

[0117] Preferably, the heuristic cost can be designed as follows:

[0118]

[0119] Where E_D(n,D) represents the straight-line geographical distance between the computation node n and the endpoint D, and V avg C represents a global or regional average expected speed used to convert distance into estimated time. mpsThis is represented as an estimated "minimum unit time preference cost," which can be set to a global, very small normal number, or by sampling on the training data to find the minimum of all Cost values; h(n) designed in this way estimates the cost of completing the remaining journey under the "ideal" (perfectly matching preferences, cost close to 0) condition, thus ensuring its adoptability;

[0120] Furthermore, to make the algorithm easier to understand, the above processing steps are simplified as follows:

[0121] Create an Open List and a Closed List, and put the starting point O into the Open List;

[0122] The following operations are performed repeatedly until the open list is empty or the endpoint is found:

[0123] Take the node n with the smallest f(n) value from the open list and move it to the closed list;

[0124] If n is the destination D, then the path has been found, and the complete path can be constructed by tracing back the parent node;

[0125] Otherwise, for each neighbor node m of n:

[0126] If m is in the close list, ignore it;

[0127] Calculate the personalization cost Cost(n,m,C) from n to m;

[0128] Calculate the value of g(m) for the new path from n to m: g(m) * = g(n) + Cost(n,m,C);

[0129] If m is not in the open list, or g(m) * If the value is less than m recorded in the open list, then update the parent node of m to n, and update g(m) = g(m). * Calculate h(m) and update f(m) = g(m) + h(m). If only m is not in the open list, then add it.

[0130] When the algorithm ends, it outputs the path from the starting point O to the ending point D, which is a chain of parent node pointers.

[0131] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0132] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0133] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0135] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0136] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for intelligent traffic prediction and scheduling based on user behavior data, characterized in that, include: Obtain the user's actual driving trajectory and match the driving trajectory to the digital road network; The process of obtaining the user's actual driving trajectory and matching the driving trajectory to the digital road network also includes: Extract feature vectors for road segments in the digital road network, the feature vectors including objective physical features and user subjective preference features; The user's subjective preference features include: Traffic flow index calculated based on historical speed data, driving comfort index calculated based on historical driving behavior data, and environmental pleasantness index calculated based on geographic information system data; For road segment r and a specific time period t, all data passing through this road segment are filtered from historical trajectory data, and the traffic flow index is obtained by calculating the average speed and speed standard deviation of these data: in, This is represented by the smoothness index. This represents the average speed based on historical speed data. This represents the speed limit for that road segment. This is expressed as the standard deviation of historical speed data; Using acceleration data from historical tracks, uncomfortable events are defined, and the average number of uncomfortable events occurring per unit kilometer on road segment r across all historical tracks is calculated. The driving comfort index is obtained as follows: in, This is represented as the driving comfort index; k is the adjustment coefficient, with a value of [0,1], used to fine-tune the average number of uncomfortable events; Using spatial analysis tools from a Geographic Information System (GIS), a buffer zone is created for road segment r. Within this buffer zone, the area proportion of different land use types is calculated. Simultaneously, using point-of-interest (POI) data, the number of active POIs within the buffer zone is counted. and the number of negative POIs The environmental livability index was obtained as follows: in, This is expressed as the environmental pleasantness index. and They are respectively and The weighting coefficients, This represents the area percentage of the i-th land use type. for Weighting coefficients; Construct and train a generative adversarial imitation learning model, the model including a generator that generates a driving strategy based on the current state, and a discriminator that distinguishes between state-action pairs derived from the user's actual driving trajectory and the generator; Through adversarial training between the generator and the discriminator, the output of the discriminator is made to reflect the user's subjective preference features; Based on the output of the discriminator in the trained model, a personalized cost value is generated for each state-action pair in the digital road network. Based on the generated personalized cost value, a path search algorithm is used to plan a driving route that conforms to the user's subjective preferences. The process of obtaining the user's actual driving trajectory also includes: annotating the user's actual driving trajectory with contextual information; The contextual information is used as part of the input to the generator and the discriminator to learn the user's subjective preference features in different scenarios. The contextual information includes the time context, weather context, and travel purpose.

2. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 1, characterized in that, When training the generative adversarial imitation learning model, a policy entropy regularization term is introduced into the training objective function.

3. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 1, characterized in that, The personalized cost value is inversely proportional to the probability value of the discriminator's output for the state-action pair.

4. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 1, characterized in that, Before constructing the generative adversarial imitation learning model, cluster analysis is performed on the driving trajectory data of multiple users to divide users into user groups with different preference characteristics.

5. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 1, characterized in that, The model training is conducted independently for each user group, generating a model that represents the subjective preference characteristics of each user group.

6. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 5, characterized in that, Also includes: The model of the subjective preference characteristics of the user group to which the current user belongs is used as the initial subjective preference characteristic model for that user; The initial subjective preference feature model is then fine-tuned using the user's personal driving trajectory data to generate an individualized subjective preference feature model for that user.

7. The intelligent traffic prediction and scheduling method based on user behavior data as described in claim 1, characterized in that, The path search algorithm is as follows: Algorithm, and the The actual path cost of the algorithm is the sum of the personalized cost values ​​of each segment along the route.

Citation Information

Patent Citations

  • Reinforced learning path planning method based on generative adversarial user model

    CN115249072A

  • Truck path selection analysis method based on inverse reinforcement learning

    CN117455330A