Vehicle sharing method and device, electronic equipment and storage medium
By integrating user, vehicle and environmental data, a multi-objective function is constructed to optimize the unmanned vehicle carpooling solution, solving the problem of neglecting vehicle utilization and user satisfaction in the existing technology, and achieving a more comprehensive carpooling solution.
Patent Information
- Application Number
- CN202510010042.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-03
- Publication Date
- 2025-04-18
AI Technical Summary
The existing unmanned vehicle carpooling technology often aims at the shortest path as its only goal, neglecting vehicle utilization and user satisfaction, and failing to take into account both user experience and vehicle utilization.
By obtaining the user data, current vehicle data and current environmental data of the carpooling user, extracting and integrating spatial characteristics and time series characteristics, an objective function with the minimum total vehicle driving distance, the minimum user waiting time, the highest user satisfaction, and the highest vehicle utilization rate is constructed, and the solution is made under constraints to generate a vehicle carpooling solution.
It realizes that when generating a carpooling plan, it takes into account the total vehicle driving distance, user waiting time, user satisfaction and vehicle utilization rate, and improves the comprehensiveness and practicality of the carpooling plan.
Smart Images

Figure CN119850394A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of public transportation services, and in particular to a vehicle carpooling method, device, electronic equipment and storage medium. Background Art
[0002] With the acceleration of urbanization and the improvement of environmental awareness, unmanned vehicle carpooling services are gaining more and more attention. The current unmanned vehicle carpooling technology is mainly based on simple location matching and path planning algorithms. In the demand matching stage, travel demand-transportation service matching is carried out according to individual travel demand and vehicle location; in the path planning stage, according to the starting and ending points of the travel customers, factors such as travel time and travel distance are considered to design low-cost routes, guide vehicles to travel in complex urban traffic environments, and improve travel comfort. However, this carpooling method still has limitations. Most systems often take the shortest path as the only goal, ignoring factors such as vehicle utilization and user satisfaction. When generating carpooling plans, it is impossible to take into account both user experience and vehicle utilization. Summary of the invention
[0003] The present invention provides a vehicle carpooling method, device, electronic device and storage medium to solve the technical problem that the current carpooling method often takes the shortest path as the only goal, ignores factors such as vehicle utilization and user satisfaction, and fails to take into account both user experience and vehicle utilization when generating a carpooling plan.
[0004] In order to solve the above technical problems, an embodiment of the present invention provides a vehicle carpooling method, comprising:
[0005] Obtaining user data, current vehicle data and current environmental data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions;
[0006] Extracting spatial features and time series features of the user data, current vehicle data, and current environment data, and performing feature fusion on all spatial features and time series features to obtain fused data features after feature fusion;
[0007] According to the fused data features, an objective function for vehicle carpooling and corresponding constraints are constructed with the goals of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction, and maximizing the vehicle utilization rate;
[0008] Under the constraints of the constraints, the objective function is solved to generate a corresponding vehicle carpooling solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
[0009] As a preferred solution, before constructing the objective function of vehicle carpooling and the corresponding constraints, it also includes:
[0010] Obtain the vehicle's historical order data, historical weather data, and weather forecast data for a preset time period in the future;
[0011] Inputting the historical order information, historical weather data and weather forecast data into a preset vehicle demand prediction model, so that the vehicle demand prediction model predicts and outputs the vehicle demand in each area within a preset time period in the future according to the historical order information, historical weather data and weather forecast data;
[0012] According to the vehicle demand in each area within a preset time period in the future, a corresponding vehicle distribution scheduling plan is generated, and then the vehicle distribution in each area is scheduled according to the vehicle distribution scheduling plan.
[0013] As a preferred solution, the method generates a corresponding vehicle distribution scheduling plan according to the vehicle demand of each area in a preset time period in the future, and then schedules the distribution of vehicles in each area according to the vehicle distribution scheduling plan, including:
[0014] According to the vehicle demand in each area within the preset time period in the future, the current vehicle data and the current environmental data, the corresponding vehicle distribution scheduling objective function and the corresponding vehicle distribution scheduling constraints are constructed with the goal of maximizing the vehicle supply and demand matching, minimizing the scheduling cost, minimizing the service response time and maximizing the energy efficiency;
[0015] Under the constraints of the vehicle distribution scheduling constraints, the vehicle distribution scheduling objective function is solved to obtain the corresponding vehicle distribution scheduling plan when the vehicle supply and demand matching degree is maximized, the scheduling cost is lowest, the service response time is shortest and the energy efficiency is highest. Then, the vehicle distribution in each area is scheduled according to the vehicle distribution scheduling plan.
[0016] As a preferred solution, under the constraints of the constraints, the objective function is solved to generate a corresponding vehicle carpooling solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest, including:
[0017] Under the constraints of the constraints, solving the objective function to generate an initial solution that satisfies the constraints;
[0018] Obtaining a preset initial temperature and cooling coefficient, performing a neighborhood search according to the initial temperature and cooling coefficient to generate a new solution, and calculating an objective function value corresponding to the new solution;
[0019] It is determined whether to accept the new solution according to the objective function value and the preset Metropolis criterion. If accepted, a corresponding carpooling scheme is generated according to the new solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest. Otherwise, a corresponding carpooling scheme is generated according to the initial solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest.
[0020] As a preferred solution, after generating a corresponding vehicle carpooling solution with the minimum total vehicle travel distance, the minimum user waiting time, the highest user satisfaction and the highest vehicle utilization rate, it also includes:
[0021] Define the corresponding state space, action space and reward function based on the current vehicle data, vehicle demand in each area within a preset time period in the future, and the vehicle pooling plan;
[0022] The vehicle carpooling scheme is optimized according to the state space, action space, reward function and a preset DQN network.
[0023] As a preferred solution, after optimizing the vehicle carpooling solution, the following is further included:
[0024] Acquire real-time operation data of the vehicle; wherein the real-time operation data includes: real-time vehicle speed, real-time vehicle location and order completion rate;
[0025] Extracting corresponding vehicle speed features, vehicle position features, and order completion rate features from the real-time operation data;
[0026] Vehicle speed anomaly detection is performed according to the vehicle speed characteristics, position anomaly detection is performed according to the vehicle position characteristics, and order completion rate anomaly detection is performed according to the order completion rate characteristics to obtain corresponding vehicle anomaly detection results, and vehicle anomaly classification is performed according to the vehicle anomaly detection results to obtain corresponding vehicle anomaly types; wherein the vehicle anomaly types include: vehicle failure, traffic congestion, system error, abnormal driving behavior, and communication failure.
[0027] As a preferred solution, after classifying the vehicle abnormality according to the vehicle abnormality detection result to obtain the corresponding vehicle abnormality type, the method further includes:
[0028] A corresponding vehicle abnormality report is generated according to the vehicle abnormality detection result and the vehicle abnormality type, and a corresponding vehicle abnormality handling measure is matched according to the vehicle abnormality type, and then the vehicle abnormality is handled according to the vehicle abnormality handling measure.
[0029] Based on the above embodiment, another embodiment of the present invention provides a vehicle carpooling device, including: a data acquisition module, a feature extraction and fusion module, an objective function construction module and a vehicle carpooling plan generation module;
[0030] The data acquisition module is used to acquire user data, current vehicle data and current environmental data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions;
[0031] The feature extraction and fusion module is used to extract the spatial features and time series features of the user data, the current vehicle data and the current environment data, and perform feature fusion on all the spatial features and time series features to obtain fused data features after feature fusion;
[0032] The objective function construction module is used to construct the objective function of vehicle carpooling and the corresponding constraint conditions according to the fused data characteristics, with the goals of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction and maximizing the vehicle utilization rate;
[0033] The vehicle carpooling scheme generating module is used to solve the objective function under the constraints of the constraints, and generate a corresponding vehicle carpooling scheme when the total vehicle driving distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
[0034] Based on the above embodiments, another embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the vehicle carpooling method described in the above invention embodiments is implemented.
[0035] Based on the above embodiments, another embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the vehicle carpooling method described in the above invention embodiment.
[0036] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0037] The present invention provides a vehicle carpooling method, which obtains user data, current vehicle data and current environmental data of a carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions; spatial features and time series features of the user data, current vehicle data and current environmental data are extracted, and all spatial features and time series features are subjected to feature fusion to obtain fused data features after feature fusion; according to the fused data features, with the minimum total vehicle travel distance, the minimum user waiting time, the maximum user satisfaction and the maximum vehicle utilization rate as the goals, an objective function of vehicle carpooling and corresponding constraint conditions are constructed; under the constraints of the constraint conditions, the objective function is solved to generate a corresponding vehicle carpooling plan when the total vehicle travel distance is minimum, the user waiting time is minimum, the user satisfaction is maximum and the vehicle utilization rate is maximum.
[0038] The present invention takes the minimum total vehicle travel distance, the minimum user waiting time, the highest user satisfaction and the highest vehicle utilization rate as the goals, constructs an objective function for vehicle carpooling, and solves the objective function to obtain a corresponding vehicle carpooling plan when the total vehicle travel distance is minimum, the user waiting time is minimum, the user satisfaction is highest and the vehicle utilization rate is highest; when generating a vehicle carpooling plan, the present invention fully considers multiple factors such as the total vehicle travel distance, the user waiting time, the user satisfaction and the vehicle utilization rate, rather than just taking the shortest path, that is, the shortest vehicle travel distance as the only goal; by comprehensively considering the user waiting time, the user satisfaction and the vehicle utilization rate, the generated carpooling plan can be made to better meet user needs and can also improve the vehicle utilization rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of a vehicle carpooling method provided by one embodiment of the present invention;
[0040] Figure 2 It is a structural schematic diagram of a vehicle carpooling device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which this application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit this application; the terms "including" and "having" in the specification and claims of this application and the above-mentioned figure descriptions and any variations thereof are intended to cover non-exclusive inclusions.
[0043] In the description of the embodiments of the present application, the technical terms "first", "second", etc. are only used to distinguish different objects, and cannot be understood as indicating or implying relative importance or implicitly indicating the number, specific order or primary and secondary relationship of the indicated technical features. In the description of the embodiments of the present application, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0044] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0045] In the description of the embodiments of the present application, the term "and / or" is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0046] In the description of the embodiments of the present application, the term "multiple" refers to more than two (including two). Similarly, "multiple groups" refers to more than two groups (including two groups), and "multiple pieces" refers to more than two pieces (including two pieces).
[0047] In the description of the embodiments of the present application, unless otherwise clearly specified and limited, technical terms such as "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the internal connection of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the embodiments of the present application can be understood according to the specific circumstances.
[0048] Embodiment 1
[0049] Please refer to Figure 1, is a flow chart of a vehicle carpooling method provided by an embodiment of the present invention, comprising the following specific steps:
[0050] S1. Obtain user data, current vehicle data and current environment data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environment data includes: current traffic conditions and weather conditions;
[0051] Specifically, the vehicle carpooling method proposed by the present invention comprises the following steps:
[0052] 1. Data collection and preprocessing:
[0053] (1) User data collection: collect user location, destination, departure time and other information in real time through mobile applications. (2) Vehicle data collection: collect vehicle location, speed, power, seat status and other information through on-board sensors. (3) Environmental data collection: obtain real-time traffic conditions, weather information, etc. from traffic management systems and meteorological departments. (4) Data cleaning: remove outliers and redundant data. Specific methods include: using the Z-score method to identify and remove outliers, and using sliding window median filtering to remove noise. (5) Data standardization: convert data from different sources into a unified format. Use the Min-Max normalization method: X_norm = (X-X_min) / (X_max-X_min). (6) Data storage: store the processed data in a distributed database.
[0054] S2, extracting the spatial features and time series features of the user data, current vehicle data and current environment data, and performing feature fusion on all the spatial features and time series features to obtain fused data features after feature fusion;
[0055] 2. Multi-dimensional data fusion:
[0056] (1) Input layer: receives data from different sources. (2) Feature extraction layer: uses convolutional neural network (CNN) to extract spatial features and recurrent neural network (RNN) to extract time series features. (3) Feature fusion layer: uses attention mechanism to perform weighted fusion of different features. The attention weight is calculated as follows: α_i = softmax(v^T tanh(W_h h_i+W_x x_i+b)); where h_i is the hidden state, x_i is the input feature, W_h, W_x, v and b are learnable parameters. (4) Output layer: generates a unified data representation. The model is trained using the Adam optimizer, with a learning rate of 0.001, a batch size of 64, and 100 training rounds. The loss function uses the mean square error (MSE): L = 1 / nΣ(y_pred-y_true)^2.
[0057] S3. Based on the fused data features, an objective function for vehicle carpooling and corresponding constraints are constructed with the goal of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction, and maximizing the vehicle utilization rate;
[0058] Preferably, before constructing the objective function of vehicle carpooling and the corresponding constraints, it also includes: obtaining the vehicle's historical order data, historical weather data and weather forecast data for a future preset time period; inputting the historical order information, historical weather data and weather forecast data into a preset vehicle demand prediction model, so that the vehicle demand prediction model predicts and outputs the vehicle demand in each area within a future preset time period based on the historical order information, historical weather data and weather forecast data; generating a corresponding vehicle distribution scheduling plan based on the vehicle demand in each area within the future preset time period, and then scheduling the vehicle distribution in each area according to the vehicle distribution scheduling plan.
[0059] Preferably, the method generates a corresponding vehicle distribution scheduling plan based on the vehicle demand in each area within a preset time period in the future, and then schedules the vehicle distribution in each area according to the vehicle distribution scheduling plan, including: constructing a corresponding vehicle distribution scheduling objective function and corresponding vehicle distribution scheduling constraints based on the vehicle demand in each area within a preset time period in the future, current vehicle data and current environmental data, with the goals of maximizing vehicle supply and demand matching, minimizing scheduling costs, minimizing service response time and maximizing energy efficiency; solving the vehicle distribution scheduling objective function under the constraints of the vehicle distribution scheduling constraints to obtain the corresponding vehicle distribution scheduling plan when the vehicle supply and demand matching is maximized, the scheduling cost is minimized, the service response time is short and the energy efficiency is highest, and then scheduling the vehicle distribution in each area according to the vehicle distribution scheduling plan.
[0060] 3. Demand forecast:
[0061] Based on historical data and real-time fusion data, we use time series analysis methods and machine learning algorithms to predict future carpooling demand. By analyzing historical data, we can predict the user demand for taxis in the future. For example, we can predict how many users in a certain area may need a car from 8 to 9 am tomorrow. We can deploy vehicles to high-demand areas in advance, arrange vehicle charging time reasonably, optimize pricing strategies, and improve user experience. The specific prediction methods are as follows:
[0062] 1.ARIMA model (suitable for short-term forecasting):
[0063] from statsmodels.tsa.arima.model import ARIMA
[0064] #Assume that historical_data is the order volume data for the past 24 hours
[0065] model=ARIMA(historical_data,order=(1,1,1))#order=(p,d,q)
[0066] results = model.fit()
[0067] forecast = results.forecast (steps = 12) # predict the next 12 hours
[0068] Working principle: p: consider the values of the previous p time points; d: perform d differences on the data to make it stable; q: consider the previous q prediction errors
[0069] 2.LSTM neural network (suitable for complex patterns):
[0070]
[0071] 3. Multi-model fusion in practical applications:
[0072]
[0073] S4. Under the constraints of the constraints, the objective function is solved to generate a corresponding vehicle carpooling solution when the total vehicle driving distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
[0074] Preferably, the objective function is solved under the constraint of the constraint condition to generate a corresponding carpooling scheme when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest, including: solving the objective function under the constraint condition to generate an initial solution that satisfies the constraint condition; obtaining a preset initial temperature and cooling coefficient, performing a neighborhood search according to the initial temperature and cooling coefficient to generate a new solution, and calculating the objective function value corresponding to the new solution; judging whether to accept the new solution according to the objective function value and a preset Metropolis criterion, and if accepted, generating a corresponding carpooling scheme when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest according to the new solution; otherwise, generating a corresponding carpooling scheme when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest according to the initial solution.
[0075] 4. Intelligent planning algorithm:
[0076] Based on multi-objective optimization theory, combined with simulated annealing algorithm and local search algorithm, the initial carpooling plan is generated. Multiple objective functions are considered, including total driving distance, passenger waiting time, passenger satisfaction and vehicle utilization, and constraint checking is used to ensure that all constraints are met. The specific steps are as follows:
[0077] (1) Initial solution generation: Use the greedy algorithm to generate the initial carpooling plan. (2) Simulated annealing: Set the initial temperature T = 100 and the cooling coefficient α = 0.95. (3) Neighborhood search: Use the 2-opt algorithm for local optimization. (4) Objective function evaluation: Calculate the weighted sum of total driving distance, passenger waiting time, satisfaction and vehicle utilization. Objective function: F = w1*D+w2*W+w3*S+w4*U; where D is the total driving distance, W is the passenger waiting time, S is the satisfaction, U is the vehicle utilization, and w1~w4 are weight coefficients. (5) Solution update: Decide whether to accept the new solution based on the Metropolis criterion. Acceptance probability: P = exp((F_new-F_old) / T). (6) Temperature update: T = T*α. (7) Termination judgment: Stop when T<0.01 or there is no improvement after 50 consecutive iterations.
[0078] Objective function and constraints:
[0079] 1. Objective function:
[0080] F=w1*D+w2*W+w3*S+w4*U
[0081] Where: D: total travel distance (minimized), W: passenger waiting time (minimized), S: passenger satisfaction (maximized, converted to negative values during calculation to minimize uniformly), U: vehicle utilization (maximized, converted to negative values during calculation to minimize uniformly)
[0082] 2. Core constraints:
[0083] Vehicle capacity constraints:
[0084]
[0085]
[0086] Time window constraints:
[0087]
[0088] Driving distance constraints
[0089] #The total driving distance of the vehicle cannot exceed the maximum limit
[0090] for vehicle in vehicles:
[0091] vehicle.total_distance<=MAX_DISTANCE
[0092] Quality of Service Constraints
[0093]
[0094] Solution algorithm implementation:
[0095] 1. Greedy algorithm generates initial solution:
[0096]
[0097]
[0098] 2. Simulated annealing main loop:
[0099]
[0100]
[0101] 3. Local search (2-opt) implementation:
[0102]
[0103]
[0104] 4. Constraint check:
[0105]
[0106]
[0107] 5. Objective function calculation:
[0108]
[0109] Preferably, after generating the corresponding carpooling plan when the total vehicle driving distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest, it also includes: defining the corresponding state space, action space, and reward function according to the current vehicle data, the vehicle demand in each area within a preset time period in the future, and the carpooling plan; optimizing the vehicle carpooling plan according to the state space, action space, reward function, and a preset DQN network.
[0110] 5. Reinforcement Learning Adaptive Scheduling:
[0111] Use the deep Q network (DQN) to implement adaptive scheduling, define the state space, action space, and reward function, and optimize the scheduling strategy through experience replay and target network update. The specific steps are as follows:
[0112] (1) State space: including current time, vehicle distribution, demand forecast, etc., with a dimension of 100. (2) Action space: including vehicle reallocation, cruise route selection, etc., discretized into 20 actions. (3) Reward function: R = 0.5*(number of completed orders) - 0.3*(idle mileage) + 0.1*(user satisfaction) - 0.1*(average waiting time). (4) Q network structure: input layer (100) -> fully connected layer (64) -> ReLU -> fully connected layer (32) -> ReLU -> output layer (20). (5) Experience replay buffer: capacity is 10,000, batch size is 32. (6) Target network: Updated every 100 steps, Q value update formula: Q(s,a) = Q(s,a) + α[r + γmax Q(s',a') - Q(s,a)]; where α is the learning rate, γ is the discount factor, s is the current state, a is the current action, r is the immediate reward, and s' is the next state. The training uses the ε-greedy strategy, the initial value of ε is 1, and it decays to 0.01 at a rate of 0.995. The discount factor γ is set to 0.99.
[0113] The optimization process and specific implementation of the scheduling strategy:
[0114] 1. Scheduling strategy optimization process:
[0115] 1. DQN network architecture implementation:
[0116]
[0117]
[0118] 2. Experience replay buffer implementation:
[0119]
[0120] 3. State space construction:
[0121]
[0122]
[0123] 4. Action space definition:
[0124]
[0125]
[0126] 5. Reward calculation:
[0127]
[0128]
[0129] 2. Training and optimization of scheduling strategies: 1. Training main loop:
[0130]
[0131]
[0132] 2. Optimization model:
[0133]
[0134]
[0135] 3. Specific scheduling strategy:
[0136] After training is completed, the scheduling strategy mainly includes the following aspects: 1. Order allocation strategy:
[0137]
[0138] 2. Supply and demand forecast and balance:
[0139]
[0140] 3. Dynamic pricing strategy:
[0141]
[0142]
[0143] This scheduling strategy is continuously optimized through deep reinforcement learning, and can adaptively make scheduling decisions based on real-time status, balance supply and demand, and improve system efficiency.
[0144] Preferably, after optimizing the vehicle carpooling scheme, it also includes: acquiring real-time operation data of the vehicle; wherein the real-time operation data includes: real-time vehicle speed, real-time vehicle position and order completion rate; extracting corresponding vehicle speed characteristics, vehicle position characteristics and order completion rate characteristics from the real-time operation data; performing vehicle speed anomaly detection according to the vehicle speed characteristics, performing position anomaly detection according to the vehicle position characteristics, performing order completion rate anomaly detection according to the order completion rate characteristics, and obtaining corresponding vehicle anomaly detection results; and performing vehicle anomaly classification according to the vehicle anomaly detection results to obtain corresponding vehicle anomaly types; wherein the vehicle anomaly types include: vehicle failure, traffic congestion, system error, abnormal driving behavior and communication failure.
[0145] Preferably, after classifying the vehicle abnormality according to the vehicle abnormality detection result and obtaining the corresponding vehicle abnormality type, it also includes: generating a corresponding vehicle abnormality report according to the vehicle abnormality detection result and the vehicle abnormality type, and matching the corresponding vehicle abnormality handling measures according to the vehicle abnormality type, and then performing vehicle abnormality handling according to the vehicle abnormality handling measures.
[0146] 6. Anomaly detection and processing:
[0147] Use anomaly detection algorithms to monitor the system operation status in real time, design emergency plans, and formulate corresponding processing strategies for different types of abnormal situations. The specific steps are as follows:
[0148] (1) Data collection: Real-time collection of system operation data, including vehicle speed, location, order completion rate, etc. (2) Feature extraction: Extract key features, such as abnormal vehicle speed, sudden change in order completion rate, etc. Feature vector X = [x1, x2, ..., xn], where xi represents different features. (3) Anomaly detection: Use the Isolation Forest algorithm and set the contamination rate to 0.1. Anomaly score calculation formula: s(x,n) = 2^(-E(h(x)) / c(n)); where E(h(x)) is the average path length of sample x and c(n) is the average path length of the tree. (4) Anomaly classification: The detected anomalies are classified into categories such as vehicle failure, traffic congestion, and system error. Support vector machine (SVM) is used for multi-category classification. This anomaly detection and classification system can accurately identify anomalies in various types of operation data, accurately classify anomalies, provide detailed anomaly reports, and give processing suggestions. In this way, various anomalies in system operation can be discovered and processed in a timely manner to ensure service quality and operational efficiency. (5) Emergency plan triggering: Initiate the corresponding processing strategy according to the exception category. For example: Vehicle failure: Immediately stop accepting orders and notify the nearest backup vehicle to take over; Traffic congestion: Adjust the route in real time. (6) Result feedback: Feedback the processing results to the system for continuous optimization. Update the success rate and efficiency indicators of the exception handling strategy.
[0149] 7. User Interface and Feedback:
[0150] Develop a mobile application to provide users with real-time order status, estimated time of arrival, etc., and collect user feedback and factor it into system optimization considerations. The mobile application user interface includes the following key features:
[0151] (1) Real-time map display: Uses Amap API to display user location, nearby vehicles, and estimated route. Map updates every 5 seconds. (2) Order status tracking: Updates order status and estimated time of arrival in real time. Uses progress bar to visually display trip progress. (3) Carpooling preferences: (4) Real-time chat function: Provides instant messaging with drivers and other passengers, supporting text and voice messages. (5) Emergency help button: One-click alarm function, directly connected to customer service center and emergency service. (6) Evaluation and feedback system: After the trip, users can rate and comment on service quality, vehicle condition, driver performance, etc.
[0152] It can be seen that the present invention provides a vehicle carpooling method, through which multi-source information such as user data, vehicle data, and environmental data can be integrated, thereby improving the accuracy and comprehensiveness of carpooling matching. An intelligent planning algorithm based on simulated annealing has been developed, which can adjust routes and scheduling plans in real time to adapt to dynamic traffic environments. Reinforcement learning technology has been introduced to implement adaptive scheduling strategies, and the system can continuously optimize decisions through continuous learning. A deep learning model is adopted, combined with historical data and external factors, to improve the accuracy of prediction of future ride demand. A personalized recommendation system based on user preferences has been developed, which takes into account user experience while improving system efficiency. An anomaly detection mechanism based on machine learning has been designed, and a corresponding emergency plan has been formulated to improve the security and reliability of the system. An intelligent user interface integrating functions such as voice recognition and real-time chat has been developed to enhance the user interaction experience. Microservice architecture and cloud computing technology have been adopted to improve the scalability and performance of the system.
[0153] Embodiment 2
[0154] Please refer to Figure 2 , is a schematic diagram of the structure of a vehicle carpooling device provided by an embodiment of the present invention, the device comprising: a data acquisition module, a feature extraction and fusion module, an objective function construction module and a vehicle carpooling plan generation module;
[0155] The data acquisition module is used to acquire user data, current vehicle data and current environmental data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions;
[0156] The feature extraction and fusion module is used to extract the spatial features and time series features of the user data, the current vehicle data and the current environment data, and perform feature fusion on all the spatial features and time series features to obtain fused data features after feature fusion;
[0157] The objective function construction module is used to construct the objective function of vehicle carpooling and the corresponding constraint conditions according to the fused data characteristics, with the goals of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction and maximizing the vehicle utilization rate;
[0158] The vehicle carpooling scheme generating module is used to solve the objective function under the constraints of the constraints, and generate a corresponding vehicle carpooling scheme when the total vehicle driving distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
[0159] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.
[0160] Those skilled in the art can clearly understand that for the sake of convenience and brevity, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0161] Embodiment 3
[0162] Accordingly, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the vehicle carpooling method described in the above-mentioned embodiment of the invention when executing the computer program.
[0163] The electronic device may be a computing device such as a desktop computer, a notebook, a palm computer, a cloud server, etc. The device may include, but is not limited to, a processor and a memory.
[0164] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the device, and various interfaces and lines are used to connect various parts of the entire device.
[0165] Embodiment 4
[0166] Accordingly, an embodiment of the present invention provides a storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the storage medium is located is controlled to execute the vehicle carpooling method described in the above embodiment of the invention.
[0167] The memory can be used to store the computer program, and the processor realizes various functions of the device by running or executing the computer program stored in the memory and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0168] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by the processor, the steps of each method embodiment described above can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0169] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A vehicle carpooling method, characterized in that: include: Obtaining user data, current vehicle data and current environmental data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions; Extracting spatial features and time series features of the user data, current vehicle data, and current environment data, and performing feature fusion on all spatial features and time series features to obtain fused data features after feature fusion; According to the fused data features, an objective function for vehicle carpooling and corresponding constraints are constructed with the goals of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction, and maximizing the vehicle utilization rate; Under the constraints of the constraints, the objective function is solved to generate a corresponding vehicle carpooling solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
2. The vehicle carpooling method according to claim 1, characterized in that: Before constructing the objective function of vehicle carpooling and the corresponding constraints, it also includes: Obtain the vehicle's historical order data, historical weather data, and weather forecast data for a preset time period in the future; Inputting the historical order information, historical weather data and weather forecast data into a preset vehicle demand prediction model, so that the vehicle demand prediction model predicts and outputs the vehicle demand in each area within a preset time period in the future according to the historical order information, historical weather data and weather forecast data; According to the vehicle demand in each area within a preset time period in the future, a corresponding vehicle distribution scheduling plan is generated, and then the vehicle distribution in each area is scheduled according to the vehicle distribution scheduling plan.
3. The vehicle carpooling method according to claim 2, characterized in that: The generating of a corresponding vehicle distribution scheduling plan according to the vehicle demand of each area in a preset time period in the future, and then scheduling the distribution of vehicles in each area according to the vehicle distribution scheduling plan, includes: According to the vehicle demand in each area within the preset time period in the future, the current vehicle data and the current environmental data, the corresponding vehicle distribution scheduling objective function and the corresponding vehicle distribution scheduling constraints are constructed with the goal of maximizing the vehicle supply and demand matching, minimizing the scheduling cost, minimizing the service response time and maximizing the energy efficiency; Under the constraints of the vehicle distribution scheduling constraints, the vehicle distribution scheduling objective function is solved to obtain the corresponding vehicle distribution scheduling plan when the vehicle supply and demand matching degree is maximized, the scheduling cost is lowest, the service response time is shortest and the energy efficiency is highest. Then, the vehicle distribution in each area is scheduled according to the vehicle distribution scheduling plan.
4. The vehicle carpooling method according to claim 1, characterized in that: Under the constraints of the constraints, solving the objective function to generate a corresponding vehicle carpooling solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized, includes: Under the constraints of the constraints, solving the objective function to generate an initial solution that satisfies the constraints; Obtaining a preset initial temperature and cooling coefficient, performing a neighborhood search according to the initial temperature and cooling coefficient to generate a new solution, and calculating an objective function value corresponding to the new solution; It is determined whether to accept the new solution according to the objective function value and the preset Metropolis criterion. If accepted, a corresponding carpooling scheme is generated according to the new solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest. Otherwise, a corresponding carpooling scheme is generated according to the initial solution when the total vehicle travel distance is minimized, the user waiting time is minimized, the user satisfaction is highest, and the vehicle utilization rate is highest.
5. The vehicle carpooling method according to claim 2, characterized in that: After generating the corresponding vehicle carpooling plan with the minimum total vehicle travel distance, the minimum user waiting time, the highest user satisfaction and the highest vehicle utilization rate, it also includes: Define the corresponding state space, action space and reward function based on the current vehicle data, vehicle demand in each area within a preset time period in the future, and the vehicle pooling plan; The vehicle carpooling scheme is optimized according to the state space, action space, reward function and a preset DQN network.
6. The vehicle carpooling method according to claim 5, characterized in that: After optimizing the vehicle carpooling scheme, the method further includes: Acquire real-time operation data of the vehicle; wherein the real-time operation data includes: real-time vehicle speed, real-time vehicle location and order completion rate; Extracting corresponding vehicle speed features, vehicle position features, and order completion rate features from the real-time operation data; Vehicle speed anomaly detection is performed according to the vehicle speed characteristics, position anomaly detection is performed according to the vehicle position characteristics, and order completion rate anomaly detection is performed according to the order completion rate characteristics to obtain corresponding vehicle anomaly detection results, and vehicle anomaly classification is performed according to the vehicle anomaly detection results to obtain corresponding vehicle anomaly types; wherein the vehicle anomaly types include: vehicle failure, traffic congestion, system error, abnormal driving behavior, and communication failure.
7. The vehicle carpooling method according to claim 6, characterized in that: After classifying the vehicle abnormality according to the vehicle abnormality detection result to obtain the corresponding vehicle abnormality type, the method further includes: A corresponding vehicle abnormality report is generated according to the vehicle abnormality detection result and the vehicle abnormality type, and a corresponding vehicle abnormality handling measure is matched according to the vehicle abnormality type, and then the vehicle abnormality is handled according to the vehicle abnormality handling measure.
8. A vehicle carpooling device, characterized in that: include: Data acquisition module, feature extraction and fusion module, objective function construction module and vehicle pooling solution generation module; The data acquisition module is used to acquire user data, current vehicle data and current environmental data of the carpooling user; wherein the user data includes: user location, carpooling destination and departure time; the current vehicle data includes: current vehicle location, vehicle speed, vehicle power and vehicle seat status; the current environmental data includes: current traffic conditions and weather conditions; The feature extraction and fusion module is used to extract the spatial features and time series features of the user data, the current vehicle data and the current environment data, and perform feature fusion on all the spatial features and time series features to obtain fused data features after feature fusion; The objective function construction module is used to construct the objective function of vehicle carpooling and the corresponding constraint conditions according to the fused data characteristics, with the goals of minimizing the total vehicle travel distance, minimizing the user waiting time, maximizing the user satisfaction and maximizing the vehicle utilization rate; The vehicle carpooling scheme generating module is used to solve the objective function under the constraints of the constraints, and generate a corresponding vehicle carpooling scheme when the total vehicle driving distance is minimized, the user waiting time is minimized, the user satisfaction is maximized, and the vehicle utilization rate is maximized.
9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the vehicle carpooling method according to any one of claims 1 to 7 when executing the computer program.
10. A storage medium, characterized in that: The storage medium includes a stored computer program, wherein when the computer program is executed, the device where the storage medium is located is controlled to execute the vehicle carpooling method according to any one of claims 1 to 7.