An algorithm and device for estimating online car-hailing fare
By using a recurrent neural network to build a dynamic pricing model in the online ride-hailing fee estimate algorithm, combining a variety of real-time data and user expectations, the calibration predicted price was generated, and the problem of inaccurate estimates in the existing technology was solved, and the problem of inaccurate estimates was achieved. Higher estimate accuracy and user satisfaction.
Patent Information
- Application Number
- CN202410052554.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-12
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-01-12
AI Technical Summary
The existing online ride-hailing fee estimate algorithm has failed to effectively combine various real-time data such as supply and demand relationships, road conditions, and weather to dynamically adjust prices, and cannot provide more comprehensive inputs to improve the accuracy of estimates.
The dynamic pricing model is constructed using recurrent neural network (RNN), combining traffic data, weather information, city activity data and historical order data, generate predicted price formulas, and adjust them through time and seasonal factors, combining users' waiting time expectation data and network Car-hailing service data, generate predicted price calibration index, and conduct cost calibration prediction.
It realizes dynamic adjustment of prices based on various real-time data such as supply and demand relationships, road conditions, weather, etc., allowing users to have a certain choice of itinerary fees, and improving the accuracy of fee estimates and user satisfaction.
Smart Images

Figure CN117934098B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network prediction technology, and in particular to an algorithm and device for estimating online car-hailing fares. Background Art
[0002] Online ride-hailing platforms match passengers and drivers by coordinating the supply and demand of ride-hailing services. Drivers can freely choose to receive bookings and complete offline transportation services. After the ride is completed, passengers usually pay the fare through a third-party payment platform on their mobile phones, and the drivers receive corresponding commissions from the online ride-hailing platforms. The existing online ride-hailing fare estimation algorithm does not involve the service of screening online ride-hailing vehicles that meet the requirements based on user needs;
[0003] In the prior art, an algorithm and device for estimating online car-hailing fares based on shard storage to achieve real-time retrieval is provided with publication number CN114219153A, wherein the method includes: a database forms an architecture of multiple data shards, and the data shards have corresponding data shard numbers; obtaining an online car-hailing fare estimation instruction, and performing fare estimation based on the online car-hailing order data and fare estimation rules to obtain estimated fare data; generating an estimated fare code corresponding to the estimated fare data, and calculating the data shard number to be written based on the estimated fare code; routing to the corresponding data shard based on the data shard number, and writing the estimated fare data to the data shard; obtaining an online car-hailing fare retrieval instruction, and calculating the corresponding data shard number based on the estimated fare code; routing to the corresponding data shard, and returning the query result after the estimated fare data is queried. By adopting the shard storage method, the online car-hailing platform can provide real-time retrieval while storing a large amount of estimated fare data.
[0004] The shortcomings are as follows: the patent with publication number CN114219153A can provide real-time retrieval while storing a large amount of estimated cost data, but it is only a single estimated cost model. How to dynamically adjust the price according to the supply and demand relationship, road conditions, weather and other real-time data, allowing users to have a certain right to choose or vote on the travel cost, and finally combining traffic data, weather forecasts, urban activities and other multi-source data to provide more comprehensive input for the estimation algorithm, and improve the accuracy of the estimation is the direction that needs to be improved at present;
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention
[0006] The purpose of the present invention is to provide an algorithm and device for estimating online car-hailing fares to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] An algorithm for estimating the cost of online car-hailing, the specific steps include:
[0009] Step 1: Collect traffic data T of the area where the taxi passenger is located d 、Weather Information d 、Urban activity data E d and historical order data H d ;
[0010] Step 2: Obtain the collected data and perform data cleaning and data fusion in turn to ensure the accuracy and consistency of the data;
[0011] Step 3: Select the recurrent neural network RNN to build a dynamic pricing model to process time series data, generate the predicted price formula P, and capture and predict price changes;
[0012] Step 4: Obtain the dynamic pricing model constructed by the recurrent neural network RNN, add time and seasonal factors, and adjust the prediction price formula P to improve the cost estimation accuracy of the prediction price formula P;
[0013] Step 5: Obtain data R of several online taxi services that can be accepted within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ;
[0014] Step 6: Obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to make fee calibration forecasts.
[0015] A device for estimating the cost of online car-hailing, the device being used to execute the algorithm for estimating the cost, comprising:
[0016] Multi-source data integration module: collects traffic data T of the area where the taxi passengers are located d 、Weather Information d 、Urban activity data E d and historical order data H d ;
[0017] Data processing module: obtains collected data and performs data cleaning and data fusion in sequence to ensure data accuracy and consistency;
[0018] Dynamic pricing model building module: Select recurrent neural network RNN to build a dynamic pricing model to process time series data, generate a prediction price formula P, and capture and predict price changes;
[0019] Adjustment module: obtains the dynamic pricing model constructed by the recurrent neural network RNN, adds time and seasonal factors, and adjusts the prediction price formula P to improve the cost estimation accuracy of the prediction price formula P;
[0020] Calibration index generation module: obtain data R of several online car-hailing services that can be accepted within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ;
[0021] Real-time pricing and feedback adjustment module: obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to make fee calibration forecasts.
[0022] Compared with the prior art, the invention has the following advantages: by collecting the traffic data T of the area where the taxi passenger is located, d 、Weather Information d 、Urban activity data E d and historical order data H d Then, we construct a price prediction formula P based on the recurrent neural network RNN, add time and seasonal factors, adjust the price prediction formula P, and obtain data R of several online car-hailing services that can be accepted within the user's taxi range. d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i , obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i And user feedback data, to calibrate the cost forecast, can dynamically adjust the price according to the supply and demand relationship, road conditions, weather and other real-time data, allowing users to have certain choices or voting rights on the travel cost, and finally combine traffic data, weather forecasts, urban activities and other multi-source data to provide more comprehensive input for the estimation algorithm and improve the accuracy of the estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the algorithm flow of the present invention;
[0024] Figure 2 It is a flow chart of the device of the present invention. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0026] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0027] See also Figure 1 and Figure 2 , the present invention provides a technical solution:
[0028] Embodiment 1:
[0029] An algorithm for estimating the cost of online car-hailing, the specific steps include:
[0030] Step 1: Collect traffic data T of the area where the taxi passenger is located d 、Weather Information d 、Urban activity data E d and historical order data H d ;
[0031] Step 2: Obtain the collected data and perform data cleaning and data fusion in turn to ensure the accuracy and consistency of the data;
[0032] Step 3: Select the recurrent neural network RNN to build a dynamic pricing model to process time series data, generate the predicted price formula P, and capture and predict price changes;
[0033] Step 4: Obtain the dynamic pricing model constructed by the recurrent neural network RNN, add time and seasonal factors, and adjust the prediction price formula P to improve the cost estimation accuracy of the prediction price formula P;
[0034] Step 5: Obtain data R of several online taxi services that can be accepted within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ;
[0035] Step 6: Obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to make fee calibration forecasts.
[0036] Embodiment 2:
[0037] Further explanation based on the first embodiment, the traffic data T of the area where the taxi passenger user is located is collected. d 、Weather Information d 、Urban activity data E d and historical order data H d include,
[0038] Define traffic data requirements: real-time traffic flow (F), number of accidents (A), road construction information (C);
[0039] Use APIs to collect traffic flow F, number of accidents A, and road construction information C, and normalize and format the (F, A, C) data. The range is limited to 1 to 9, and traffic flow F, number of accidents A, and road construction information C are divided into elementary (1, 2, 3), medium (4, 5, 6), and high (7, 8, 9) levels. The three values in each level represent the degree of influence. The larger the value, the more congested the corresponding traffic flow F, the more serious the number of accidents A, and the greater the impact of construction information C on road conditions.
[0040] Specific;
[0041] Number of traffic accidents A:
[0042] The number of traffic accidents can be quantified based on the severity of the accident and the degree of impact on traffic flow;
[0043] Elementary (1, 2, 3): Minor accidents, such as collisions, with little impact on traffic flow.
[0044] Moderate (4, 5, 6): Moderate accidents, such as single-vehicle accidents or small-scale multi-vehicle collisions, have some impact on traffic flow.
[0045] Advanced (7, 8, 9): Major accidents, such as large-scale multi-vehicle pileups or accidents with casualties, seriously affecting traffic flow.
[0046] Road construction information C:
[0047] Construction information can be quantified based on the degree and scope of the construction's impact on traffic.
[0048] Elementary (1, 2, 3): Small-scale construction, such as single lane repairs, with little impact on traffic flow.
[0049] Medium (4, 5, 6): Medium-scale construction, such as multi-lane construction or bridge repairs, will have some impact on traffic flow.
[0050] Advanced (7, 8, 9): Large-scale construction, such as road closures or major construction projects, has a serious impact on traffic flow.
[0051] Define weather information requirements: temperature (T), humidity (H), precipitation (P);
[0052] Real-time weather data, such as temperature T, humidity H, and precipitation P, are obtained through the public API of the Meteorological Bureau, and the (T, H, P) data is normalized and formatted, with a narrow range of 1 to 9; and the temperature T, humidity H, and precipitation P are divided into elementary (1, 2, 3), medium (4, 5, 6), and high (7, 8, 9) levels, and the three values in each level, the larger the value, the higher the impact on the online car-hailing fare, indicating that the corresponding temperature T is the body comfortable temperature (between 20 and 25 degrees Celsius), the medium tolerance of cold or high temperature (about 10 to 15 degrees Celsius, about 30 to 35 degrees Celsius), and the high tolerance of cold or high temperature (about 0 degrees Celsius or slightly lower, above 35 degrees Celsius); and the larger the corresponding values of humidity H and precipitation P, the more obvious the impact on the online car-hailing fare;
[0053] Defining city activity information requirements: Activity type E t 、Estimated flow of people E p 、Activity Location E l ;
[0054] Event Type E that works with event organizers or collects information about upcoming large events through public APIs t 、Estimated flow of people E p 、Activity Location E l , and (E t , E p , E l ) data is normalized and formatted; and activity type E t 、Estimated flow of people E p 、Activity Location E l According to the degree, it is divided into elementary (1, 2, 3), medium (4, 5, 6) and advanced (7, 8, 9), and the three values in each level represent the degree of influence. The larger the value, the greater the impact.
[0055] Specific;
[0056] Activity Type E t It can be quantified based on the size of the event and the traffic it is likely to generate;
[0057] Elementary (1, 2, 3): Small-scale events, such as community events or small performances, that attract less traffic.
[0058] Medium (4, 5, 6): Medium-sized events, such as municipal celebrations or large exhibitions, will attract a medium-sized flow of people.
[0059] Advanced (7, 8, 9): Large-scale events, such as international festivals or major music festivals, attract large crowds.
[0060] Event Location E l It can be quantified based on the location’s accessibility and density of people;
[0061] Elementary (1, 2, 3): A location with good access and relatively low traffic, such as a suburban park or community center.
[0062] Medium (4, 5, 6): Locations with average traffic conditions and medium flow of people, such as a small square in the city center or a medium-sized exhibition hall.
[0063] Advanced (7, 8, 9): Locations with heavy traffic and crowds, such as a large stadium or a main square in a city center.
[0064] Define historical order data requirements: Order time O t 、Location l 、Price p ;
[0065] Extract historical order records from own database, including time O t 、Location l 、Price p , and (O t , O l , O p ) The data is normalized and formatted;
[0066] And (F, A, C), (T, H, P), (E t , E p , E l )、(O t , O l , O p ) is normalized to 3, which means that the corresponding data are all 1 in the elementary level, and 1 represents a low degree of impact or no impact on the cost of online car-hailing.
[0067] Embodiment three:
[0068] Further illustrating on the basis of the second embodiment, the data cleaning and data fusion of the collected data in sequence include:
[0069] a. Data cleaning:
[0070] Specific operations: Use Pandas data processing tools to clean data;
[0071] Format uniformity: Ensure that the date and time formats of all data sets are consistent;
[0072] Missing value processing: fill or delete missing data;
[0073] Outlier identification: Identify and handle unreasonable data points, such as prices or traffic volumes that are outside the normal range;
[0074] Data quality assessment: Regularly assess data quality to ensure data accuracy;
[0075] Specific operations:
[0076] Unified format: Ensure that all data sets have consistent formats, such as the time format is YYYY-MM-DDHH:MM;
[0077] Missing value processing: fill in with mean, median or previous and next values;
[0078] Outlier identification and processing: Use box plots or standard deviation methods to identify outliers;
[0079] For outliers (X), the formula X=median(X)±1.5×IQR(X) is used to handle them.
[0080] Where, X: the observation value in the data set;
[0081] median(X): the median of X, which is the value in the middle after the data set is sorted in ascending order;
[0082] IQR(X): Interquartile Range of X, which is the difference between the upper quartile (Q3) and the lower quartile (Q1) of the data set, representing the middle 50% range of the data set;
[0083] 1.5: is a constant and a common threshold for determining outliers;
[0084] According to this formula, outliers in a data set are defined as values below Q1-1.5*IQR or above Q3+1.5*IQR. This definition is based on the concept of a box plot, where the box represents the interquartile range and outliers are points outside the box.
[0085] b. Data fusion:
[0086] Specific operations: Use SQL in database technology to integrate data from different sources;
[0087] Data model construction: Establish a unified data model to integrate all data sources;
[0088] Data indexing: Setting indexes for data to facilitate quick query and analysis;
[0089] Data synchronization: ensure that all data sources are updated in real time to maintain the timeliness of the data;
[0090] Multi-source data integration is the core of dynamic pricing. It can provide comprehensive and real-time data support and is the basis for accurate price prediction.
[0091] The diversity and real-time nature of data collection ensures that the dynamic pricing system can respond to the latest market and environmental conditions.
[0092] Embodiment 4:
[0093] Further explanation based on the third embodiment, the selection of recurrent neural network RNN to construct a dynamic pricing model to process time series data includes:
[0094] a. Determine the RNN architecture:
[0095] Input layer: corresponds to the feature (T d ,W d ,E d ,H d );
[0096] Hidden layer: multiple RNN units are set to process sequence data;
[0097] Output layer: Generates the predicted price formula P;
[0098] Initialization parameters: Initialize network weight W and bias b;
[0099] Coding implementation: Implement the RNN model using a programming language such as Python and a machine learning library such as TensorFlow or PyTorch;
[0100] b. Construct features based on different data sources,
[0101] Specific steps:
[0102] Standardization of data preprocessing: d ,W d ,E d ,H d) are normalized to be on the same scale;
[0103] Feature construction: combining different data sources, such as traffic data T d 、Weather Information d 、Urban activity data E d and historical order data H d ;
[0104] c. Use historical order data and real-time data to train the model and find the best network parameters and structure;
[0105] Specific steps:
[0106] Dataset division: divided into training set, validation set and test set;
[0107] Choose a loss function: Use mean squared error (MSE):
[0108]
[0109] Select optimization algorithm: use Adam optimizer for parameter optimization;
[0110] The predicted price formula is:
[0111]
[0112] The function of real-time traffic conditions is:
[0113] f(T d )=ln(1+e F+A+C )
[0114] The function of weather information is:
[0115]
[0116] The function for urban activity data is:
[0117]
[0118] The function of historical order data is:
[0119]
[0120] α, β, γ, δ: weight coefficients of each part; K is the normalization coefficient;
[0121] P: predicted price;
[0122] T d : Traffic data, where T d =t 1 ,t 2 ,…,tn And t i represents the traffic status at the i-th time point;
[0123] W d : Weather information, where W d =w 1 ,w 2 ,…,w n , and w i Indicates the weather conditions at the i-th time point;
[0124] E d : Urban activity data, where E d =e 1 ,e 2 ,…,e n , and e i represents the urban activities at the i-th time point;
[0125] H d : Historical order data, where H d =h 1 ,h 2 ,…,h m , and h i Represents the i-th historical order data;
[0126] W and b are the weight and bias of the RNN model respectively;
[0127] N is the number of activities considered;
[0128] dx: is the integral variable.
[0129] Embodiment five:
[0130] Further illustrating on the basis of the fourth embodiment, the acquisition of the recurrent neural network RNN to construct a dynamic pricing model and the addition of time and seasonal factors include:
[0131] Assume that f is a function that combines a multi-layer neural network and time series analysis, including the following f 1 、f 2 、f 3 and f 4 content:
[0132] f=s1×f 1 (T d )+s2×f 2 (W d )+s3×f 3 (E d )+s4×f 4 (H d )
[0133] f can be divided into several sub-functions, each of which processes a different type of data:
[0134] f 1 (T d ): Processing real-time traffic data, using time series analysis and traffic pattern recognition;
[0135]
[0136] f 2 (W d ): Process weather information data, combining the influence of meteorological models and historical weather data;
[0137]
[0138] f 3 (E d ): Analyze the impact of urban activities on demand, using event detection and classification algorithms;
[0139]
[0140] f 4 (H d ): Analyze historical order data and use statistical methods and historical trend forecasts;
[0141]
[0142] (W, b): An RNN structure that integrates the outputs of the first four functions and uses weights W and bias b to make the final price prediction;
[0143] Consider timing and seasonality:
[0144] Function h that introduces time T and seasonality S factors 1 and h 2 , to take into account the impact of price changes over time and seasons;
[0145] h 1 (T): Analyze the impact of time (such as time of day, day of the week, etc.) on prices;
[0146] h 2 (S): Consider the impact of seasonal factors (such as summer, winter, holidays, etc.) on prices;
[0147]
[0148] In this formula:
[0149] h 1 (T) Analyze the time of day T hour and day of the week T weekdayImpact on price, where λ is the time period weight coefficient;
[0150] h 2 (S) Consider seasonal factors, including temperature S temp and holidays date The impact on prices, where (ξ,θ) is the temperature impact coefficient, η is the holiday weight coefficient, and χ holiday is a holiday indicator function, which takes the value of 1 if the day is a holiday, otherwise it takes the value of 0;
[0151] The final cost prediction formula is:
[0152] P′=RNN(f 1 '(T d ,W d ,E d ),f 2 '(W d ,T d ,E d ),f 3 '(E d ,T d ,W d ),f 4 (H d ),h 1 (T),h 2 (S); W, b)
[0153] The experimental table is as follows:
[0154]
[0155] Table 1
[0156] In this table, for traffic data (T d ), including traffic volume, bus frequency, traffic accident number; weather information (W d ) including temperature, humidity, rainfall; urban activity data (E d ) including activity type, expected traffic, and activity location; historical order data (H d ) includes the prices of goods or services at different time points; time data (T) is the date and time, and the time is divided into two major categories: day shift and night shift of online ride-hailing; seasonal data (S) can be spring, summer, autumn, winter or a specific solar term, and mn represents the historical price data under the current influencing factors.
[0157] Embodiment six:
[0158] Further explanation based on the fifth embodiment, the acquisition of several online car-hailing service data R that can be accepted within the user's taxi-hailing range d , and the user's waiting time expectation data W e, based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i include,
[0159] 1. Data collection, definition of online car-hailing service data R d :
[0160] Including vehicle location, number of available vehicles, current vehicle status (idle, reserved, in progress), historical order frequency, and the amount of bonus to encourage orders; using a weighted model to represent R d :
[0161] R d =w 1 ×L′+w 2 ×N+w 3 ×S+w 4 ×F+w 5 ×B
[0162] Parameter explanation, L′: geographic coordinates of the vehicle location; N: number of available vehicles around the user; S: vehicle status (numerical representation, idle = 1, booked = 2, traveling = 3); F: historical order frequency; B: amount of price increase bonus (the bonus amount is set to within 50% of the predicted price formula P, and the price increase feedback sensitivity MGd is set according to the acceptance intention of different online car-hailing drivers for the price increase amount). In order to encourage drivers to accept orders, the additional fee is provided during peak demand periods;
[0163] B=p×R×MGd
[0164] in:
[0165] B: The amount of orders encouraged by the price increase red envelope;
[0166] p: predicted price, i.e. the basic trip cost without any surcharge or discount;
[0167] R: markup ratio, here set to R≤0.5, indicating that the markup will not exceed 50% of the predicted price;
[0168] MGd: Price increase feedback sensitivity, a coefficient between 0 and 1, indicating the driver's reaction to the price increase. The larger the value, the higher the probability that the driver will accept the order.
[0169] (w 1 ,w 2 ,w 3 ,w 4 ,w 5 ): is a weight parameter used to balance the importance of different factors;
[0170]
[0171] Vehicle position w 1 : Measures the distance between the user and the online car-hailing vehicle. The larger the value, the closer the vehicle is to the user, which may be more attractive to the user.
[0172] The number of available vehicles w 2 : Reflects the number of online ride-hailing vehicles available for orders around the user. The larger the number, the larger the value, the wider the user's choice range, and the faster the service response may be;
[0173] Current vehicle status w 3 : Indicates the current status of the online car-hailing vehicle. Different statuses may affect the vehicle's availability and order-taking capabilities;
[0174] Historical order frequency w 4 : Refers to the frequency of orders received by the vehicle in the past, reflecting its reliability and service quality. The higher the frequency, the larger the value, which means a better service experience;
[0175] The amount of the bonus to encourage orders is w 5 : Measure the impact of price increase strategies on drivers’ willingness to accept orders. The higher the price increase, the more likely it is that drivers will be more motivated to accept orders.
[0176] Obtain data in real time through the API interface of the online ride-hailing platform;
[0177] User waiting time expectation data W e Definition: The maximum waiting time Tmax expected by the user;
[0178] Collection method: The expected waiting time entered by the user when booking;
[0179] 2. Forecast price calibration index C i The calculation formula is:
[0180]
[0181] Among them, C i : Forecast price calibration index;
[0182] The number of online-hailing vehicles that have been screened for service intention among a number of available online-hailing vehicles near the user's location;
[0183] W e : User's expectation of waiting time;
[0184] α″ and β″: adjustment factors used to balance the impact of two factors, determined by historical data analysis; calculation steps
[0185] Step 1: Obtain the number of available online ride-hailing vehicles N near the user's location in real time, and filter the user's taxi needs based on the number of available online ride-hailing vehicles N. 1 ,w 3 ,w 4 ,w 5 The weight of w is used to score. 1 ,w 3 ,w 4 ,w 5 The total score is 10, which generates the number of online ride-hailing vehicles after service intention screening
[0186] Step 2: Record the user's waiting time expectation W e ;
[0187] Step 3: Calculate the predicted price calibration index C using the above formula i .
[0188] Embodiment seven:
[0189] Further explanation based on Example 6, the adjusted forecast price formula is obtained and combined with the real-time collected data and the forecast price calibration index C i , making price predictions includes,
[0190] a. Real-time data collection: Real-time monitoring of traffic data (T d )、Weather Information(W d ), urban activity data (E d ) and historical order data (H d );
[0191] b. Data preprocessing: Process the collected data in real time to ensure that the format is consistent and suitable for input model;
[0192] c. Price prediction: Use the adjusted prediction price formula to make real-time price predictions:
[0193] P′=RNN(f 1 '(T d ,W d ,E d ),f 2 '(W d ,T d ,E d ),f 3 '(E d ,T d ,W d ),f 4 (H d ),h 1 (T),h 2 (S); W, b)
[0194] d. User feedback collection: Collect user feedback on price acceptance and user expectations for online ride-hailing service data and waiting time through the application;
[0195] Specific steps:
[0196] Feedback interface design: Design a simple and intuitive price feedback interface in the application;
[0197] Collect user feedback: record the user's acceptance of the predicted price formula P as feedback data (Feedback), and obtain the user's demand value for online car-hailing service data and waiting time expectation data;
[0198] e. Model adjustment: fine-tune the model based on user feedback;
[0199] The formula is:
[0200]
[0201] P adjusted : the adjusted price; P′ is the adjusted predicted price; Feedback: the accepted price of user feedback; α′ is the learning rate, which determines the speed and amplitude of the adjustment; R d : Online car-hailing service data; C i : Forecast price calibration index; W e : User waiting time expectation data; σ: adjustment factor; 0.02≤σ≤0.78;
[0202] When the user's waiting time expectation data and the online car-hailing service data demand, or both of them have higher requirements, the corresponding C i The larger the value, the greater the adjusted price P adjusted Compared with the predicted original price, the price is increased to meet the diverse needs of users. On the contrary, when the user has no additional intention for the vehicle location, waiting time, price increase red envelope, vehicle status, and order frequency, the corresponding adjusted price P adjusted will be less than or equal to the adjusted predicted price P′;
[0203] The real-time feedback mechanism can ensure that the model continues to learn and adapt to market changes, improving pricing accuracy and user satisfaction.
[0204] A device for estimating the cost of online car-hailing, the device being used to execute the algorithm for estimating the cost, comprising:
[0205] Multi-source data integration module: collects traffic data T of the area where the taxi passengers are located d 、Weather Information d 、Urban activity data E dand historical order data H d ;
[0206] Data processing module: obtains collected data and performs data cleaning and data fusion in sequence to ensure data accuracy and consistency;
[0207] Dynamic pricing model building module: Select recurrent neural network RNN to build a dynamic pricing model to process time series data, generate a prediction price formula P, and capture and predict price changes;
[0208] Adjustment module: obtains the dynamic pricing model constructed by the recurrent neural network RNN, adds time and seasonal factors, and adjusts the prediction price formula P to improve the cost estimation accuracy of the prediction price formula P;
[0209] Calibration index generation module: obtain data R of several online car-hailing services that can be accepted within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ;
[0210] Real-time pricing and feedback adjustment module: obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to make fee calibration forecasts.
[0211] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0212] The specific values of δ, ε, etc. in the formula are generally determined by those skilled in the art according to actual conditions. The essence of the formula of the present application is to perform comprehensive analysis by weighted summation. Those skilled in the art collect multiple groups of sample data and set corresponding preset proportional coefficients for each group of sample data; substitute the preset proportional coefficients and the collected sample data into the formula, and any four formulas constitute a set of four-variable linear equations. The calculated coefficients are screened and averaged to obtain the values of δ, ε, etc.;
[0213] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by computer software, electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraints of the technical solution.
[0214] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0215] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. An algorithm for estimating the cost of online car-hailing, characterized in that: The specific steps include: Step 1: Collect traffic data T of the area where the taxi passenger is located d 、Weather Information d 、Urban activity data E d and historical order data H d And form a data set with timestamp; Step 2: Obtain the collected data and perform data cleaning and data fusion in turn to ensure the accuracy and consistency of the data; Step 3: Select the recurrent neural network RNN to build a dynamic pricing model to process time series data, generate the predicted price formula P, and capture and predict price changes; Step 4: Obtain the dynamic pricing model constructed by the recurrent neural network RNN, add time and seasonal factors, adjust the predicted price formula P, and obtain the adjusted predicted price P′; Step 5: Obtain data R of several online taxi services that can accept orders within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ; Data collection, defining online ride-hailing service data R d , the online car-hailing service data R d It includes vehicle location, number of available vehicles, current vehicle status, historical order frequency, and the amount of bonus to encourage orders. The vehicle status includes idle, booked, and in progress. A weighted model is used to represent R d , the formula based on is: R d =w1×L′+w2×N+w3×S+w4×F+w5×B Where L′ represents the geographic coordinates of the vehicle’s location; N represents the number of available vehicles around the user; S represents the vehicle’s status, expressed numerically as: idle = 1, booked = 2, and in progress = 3; F represents the historical order frequency; B represents the amount of the bonus incentive; w1, w2, w3, w4, and w5 are all weight parameters, w1+w2+w3+w4+w5=1; Forecast Price Calibration Index C i The calculation formula is: Among them, C i represents the forecast price calibration index; W represents the number of online-hailing vehicles available near the user's location, after the service intention is screened by weights w1, w3, w4, and w5. e is the user's waiting time expectation, α″ and β″ represent adjustment factors; Step 6: Obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to calibrate the cost forecast; the adjusted price formula is expressed as: P adjusted : adjusted price; P′ is the adjusted predicted price; Feedback: the accepted price of user feedback; α′: learning rate, which determines the speed and amplitude of adjustment; R d : Online car-hailing service data; C i : Forecast price calibration index; W e : User waiting time expectation data; σ: adjustment factor; 0.02≤σ≤0.78; When the user's waiting time expectation data and the online car-hailing service data demand, or both of them have higher requirements, the corresponding C i The larger the value, the greater the adjusted price P adjusted The adjusted predicted price is increased to meet the diverse needs of users. On the contrary, when users have no additional intentions for vehicle location, waiting time, price increase red envelope, vehicle status, and order frequency, the corresponding adjusted price P adjusted Will be less than or equal to the adjusted predicted price P′.
2. The algorithm for estimating the cost of online car-hailing according to claim 1, characterized in that: The traffic data T of the area where the taxi passenger user is located is collected d Including quantifiable real-time traffic flow F, number of accidents A, and road construction information C. Use APIs to collect traffic flow F, number of accidents A, and road construction information C, and normalize and format the data represented by F, A, and C, and limit the range to 1 to 9; The weather information W d Including temperature T, humidity H and precipitation P, and normalizing and formatting the representative data of T, H, and P, and limiting the range to 1 to 9; The urban activity data E d Includes quantifiable activity types E t 、Estimated flow of people E p and event location E l , and for E t , E p , E l The representative data is normalized and formatted, and the range is limited to 1 to 9; The historical order data H d Including order time t 、Location l and price p ; and t , O l , O p Represents data to be normalized and formatted.
3. The algorithm for estimating the cost of online car-hailing according to claim 1, characterized in that: The collected data is cleaned and fused in turn, including: a. Data cleaning: Specific operations: Use Pandas data processing tools to clean data; Format uniformity: Ensure that the date and time formats of the data sets are consistent; Missing value processing: fill or delete missing data; Outlier identification: Identify and handle unreasonable data points; Data quality assessment: Regularly assess data quality to ensure data accuracy; b. Data fusion: Specific operations: Use SQL in database technology to integrate data from different sources; Data model construction: Establish a unified data model to integrate all data sources; Data indexing: Setting indexes for data to facilitate quick query and analysis; Data synchronization: Ensure that all data sources are updated in real time to maintain the timeliness of the data.
4. The algorithm for estimating the cost of online car-hailing according to claim 3 is characterized by: A recurrent neural network (RNN) is selected to build a dynamic pricing model to process time series data and generate a predicted price formula P. The specific logic includes: a. Determine the RNN architecture, the architecture comprising: Input layer: corresponds to the feature (T d ,W d ,E d ,H d ); Hidden layer: multiple RNN units are set to process sequence data; Output layer: Generates the predicted price formula P; Initialization parameters: Initialize network weight W and bias b; Coding implementation: Implement the RNN model using programming languages and machine learning libraries; b. Construct features based on different data sources. The specific steps include: Standardization of data preprocessing: d ,W d ,E d ,H d ) are normalized to be on the same scale; Feature construction: combining different data sources, such as traffic data T d 、Weather Information d 、Urban activity data E d and historical order data H d ; c. Use historical order data and real-time data to train the model and find the best network parameters and structure; The predicted price formula is: The function of real-time traffic conditions is: The function of weather information is: The function for urban activity data is: The function of historical order data is: α, β, γ, δ are weight coefficients of each part; K is the normalization coefficient, where: P: predicted price; T d : Traffic data, where T d =t1,t2,…,t n , and t i represents the traffic status at the i-th time point; W d : Weather information, where W d =w1,w2,…,w n , and w i Indicates the weather conditions at the i-th time point; E d : Urban activity data, where E d =e1,e2,…,e n , and e i represents the urban activities at the i-th time point; H d : Historical order data, where H d =h1,h2,…,h m , and h i′ Represents the i′th historical order data; W and b are the weight and bias of the RNN model respectively; dx is the integral variable.
5. The algorithm for estimating the cost of online car-hailing according to claim 4, characterized in that: The recurrent neural network RNN is obtained to build a dynamic pricing model, and time and seasonal factors are added. The specific logic includes: f is a function that combines a multi-layer neural network with time series analysis and includes multiple submodules for processing different types of data, including the following: f=s1×f1(T d )+s2×f2(W d )+s3×f3(E d )+s4×f4(H d ) Where s1, s2, s3 and s4 are f1(T d )、f2(W d )、f3(E d ) and f4(H d ) corresponding weights, each weight value is based on the corresponding T d , W d 、E d and H d Adjust the impact of the predicted price. The greater the impact, the higher the weight ratio, and s1+s2+s3+s4=1; f1(T d )): Processing real-time traffic data, using time series analysis and traffic pattern recognition, the formula is as follows: where λ i is the parameter of time series analysis, T di is the traffic data at the i-th time point; f2(W d ): Process weather information data, combine the influence of meteorological models and historical weather data, and the formula is as follows: Where φ(w) is the function of weather’s impact on price, obtained through analysis based on historical data; f3(E d ): Analyze the impact of urban activities on demand, using event detection and classification algorithms, the formula is as follows: where μ j is the event impact coefficient, E dj is the data of the jth event, and m is the total number of events; f4(H d ): Analyze historical order data and use statistical methods and historical trend prediction. The formula is as follows: Where L is the total number of historical order quantities at each time point, H dk is the historical order data at the kth time point; Consider timing and seasonality: Introduce functions h1 and h2 of time T and seasonality S factors to consider the impact of price changes over time and seasons; h1(T): Analysis time, including the impact of time of day and day of the week on prices; h2(S): Consider seasonal factors, including the impact of summer, winter, and holidays on prices; In this formula: h1(T) analyzes the time period of the day T hour and day of the week T weekday Impact on price, where λ is the time period weight coefficient; h2(S) takes into account seasonal factors, including temperature S temp and holidays date The impact on prices, where (ξ,θ) is the temperature impact coefficient, η is the holiday weight coefficient, and χ holiday is a holiday indicator function, which takes the value of 1 if the day is a holiday, otherwise it takes the value of 0; According to the recurrent neural network RNN, the adjusted predicted price is marked as P′.
6. The algorithm for estimating the cost of online car-hailing according to claim 5, characterized in that: Get the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i And user feedback data, to calibrate the cost forecast, including: a. Real-time data collection: real-time monitoring of traffic data T d 、Weather Information d 、Urban activity data E d and historical order data H d ; b. Data preprocessing: Process the collected data in real time to ensure that the format is consistent and suitable for input model; c. Price prediction: Use the adjusted prediction price formula for real-time price prediction. The adjusted prediction price formula P′ is: P′=RNN(f1′(T d ,W d ,E d ),f2′(W d ,T d ,E d ),f3'(E d ,T d ,W d ),f4(H d ),h1(T),h2(S);W,b) d. User feedback collection: Collect user feedback on price acceptance and user expectations for online ride-hailing service data and waiting time through the application; Specific steps: Collect user feedback: record the user's acceptance of the predicted price as feedback data, and obtain the user's demand value for online car-hailing service data and waiting time expectation data; e. Model adjustment: Fine-tune the model based on user feedback.
7. A device for estimating online car-hailing fare, characterized by: The device is used to execute the algorithm for estimating the cost of online car-hailing according to any one of claims 1 to 6, including: Multi-source data integration module: collects traffic data T of the area where the taxi passengers are located d 、Weather Information d 、Urban activity data E d and historical order data H d ; Data processing module: obtains collected data and performs data cleaning and data fusion in sequence to ensure data accuracy and consistency; Dynamic pricing model building module: Select recurrent neural network RNN to build a dynamic pricing model to process time series data, generate a prediction price formula P, and capture and predict price changes; Adjustment module: obtains the dynamic pricing model constructed by the recurrent neural network RNN, adds time and seasonal factors, and adjusts the prediction price formula P to improve the cost estimation accuracy of the prediction price formula P; Calibration index generation module: obtain data R of several online car-hailing services that can be accepted within the user's taxi range d , and the user's waiting time expectation data W e , based on online car-hailing service data R d and the expected waiting time W e Generate the predicted price calibration index C i ; Real-time pricing and feedback adjustment module: obtain the adjusted forecast price formula and combine it with the real-time collected data and forecast price calibration index C i and user feedback data to make fee calibration forecasts.
Citation Information
Patent Citations
Online car-hailing fee estimation algorithm and device for realizing real-time retrieval based on fragmented storage
CN114219153A
Riding recommendation system for reducing online car-hailing expenses by dynamic price prediction
CN107844853A
Cost estimation method and device, electronic equipment and storage medium
CN114820014A