Price elasticity estimation method and system based on double-machine learning and monotonicity constraint neural network
By employing dual machine learning and monotonic constraint neural networks, the problems of inaccurate causal inference and insufficient monotonic constraints in price elasticity forecasting are solved, achieving accuracy and stability in price elasticity forecasting results and supporting the optimization of intelligent pricing strategies in industries such as ride-hailing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YUNXING ONLINE SOFTWARE DEV CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-10
AI Technical Summary
Existing technologies for price elasticity prediction suffer from inaccurate causal inference, weak monotonicity constraints, and unstable training processes, making it difficult to effectively separate confounding variables and apply dynamic constraints.
A dual machine learning framework is adopted, in which the first neural network and the second neural network respectively fit the impact of confounding variables on the order conversion rate and the pricing multiplier, calculate the residuals and construct a monotonic constrained neural network, and use the logarithmic weight parameterization method to constrain the network weights to ensure that the price elasticity prediction results conform to the law of demand.
It achieves strict guarantees of the accuracy and monotonicity constraints of causal inference, and the output price elasticity coefficient is consistent with business understanding, supporting refined operation and maximizing business value.
Smart Images

Figure CN122367518A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of data processing and artificial intelligence technology, specifically to a method and system for predicting price elasticity based on dual machine learning and monotonic constrained neural networks, applicable to intelligent pricing and revenue management scenarios in industries such as ride-hailing, e-commerce, retail, aviation, and hotels. Background Technology
[0002] With the rapid development of big data and artificial intelligence technologies, price elasticity prediction has become one of the core technologies in enterprise intelligent pricing systems. Price elasticity reflects the sensitivity of demand to price changes, and accurate price elasticity estimation can help enterprises optimize pricing strategies, enhance market competitiveness, and maximize profits. Currently, price elasticity prediction technology is widely used in dynamic pricing scenarios in industries such as e-commerce, ride-hailing, aviation, and hotels, becoming an important support for refined enterprise operations.
[0003] From a technical implementation perspective, price elasticity estimation is essentially a causal inference problem, aiming to identify the pure causal effect of price changes on quantity demanded from observed data. However, in real-world business, quantity demanded is affected not only by price but also by a variety of confounding variables such as promotional activities, seasonality, advertising, and market competition. These confounding variables influence both price setting and user demand; failure to effectively separate them will lead to biased price elasticity estimates that fail to reflect the true causal relationship.
[0004] Furthermore, the law of demand in economics states that, all other things being equal, there should be a negative correlation between the price of a good and the quantity demanded. This fundamental law requires the introduction of monotonicity constraints into price elasticity prediction models to ensure that the model output aligns with business understanding. However, traditional machine learning models (such as linear regression, random forests, and gradient boosting decision trees) are designed to be domain-agnostic and lack the ability to model prior business knowledge. They are prone to learning erroneous relationships that violate the law of demand when the data contains noise or confounding variables, such as the anomalous conclusion that "the higher the price, the greater the demand."
[0005] The most similar prior art solution to this invention is a monotonicity constraint modeling method based on the Gradient Boosting Decision Tree (GBDT) framework, with representative tools including XGBoost and LightGBM. This approach forces a decreasing relationship between the pricing multiplier feature and the completion conversion rate by setting monotonicity parameters (such as monotony_constraints) during model training. Its basic implementation steps include: data preparation, feature engineering, model training and constraint checking, and price elasticity calculation. During model training, the algorithm checks whether each decision tree split violates the monotonicity constraint; if it does, the split is rejected, thus ensuring the monotonicity of the model output to a certain extent.
[0006] However, this existing technology still has the following obvious limitations:
[0007] The handling of confounding variables is crude: Existing methods only treat confounding variables as ordinary features input into the model, without performing structured separation from the perspective of causal inference. This makes it difficult to eliminate the interference of confounding variables on the relationship between price and demand, resulting in biased causal inference results.
[0008] Insufficient granularity of monotonicity constraints: Monotonicity constraints based on decision trees can only provide coarse-grained guarantees at the overall level, making it difficult to handle local violations in deep nonlinear relationships and unable to achieve fine-grained constraints layer by layer and weight by weight.
[0009] The constraint mechanism lacks dynamic adaptability: the constraint strength remains constant throughout the training process and cannot be dynamically adjusted according to the model's learning progress and violation trends. This can easily lead to excessively strong constraints in the early stages of training, affecting the fitting ability, or insufficient constraints in the later stages of training, which cannot guarantee convergence.
[0010] Lack of rigorous mathematical guarantees: Existing methods do not provide mathematical proofs of the propagation and preservation of monotonicity in complex network structures, and the reliability of constraints depends on empirical parameter tuning, which is difficult to meet the needs of high-reliability business scenarios.
[0011] In summary, existing technologies for price elasticity prediction still suffer from problems such as inaccurate causal inference, weak monotonicity constraints, and unstable training processes. There is an urgent need for an intelligent pricing method that can mathematically guarantee monotonicity, effectively separate confounding variables, and possess dynamic constraint adjustment capabilities. Summary of the Invention
[0012] To address this, this application provides a price elasticity prediction method and system based on dual machine learning and monotonic constraint neural networks, which helps to solve the problems of inaccurate causal inference, imprecise monotonic constraints, and unstable training process in existing technologies for price elasticity prediction.
[0013] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a price elasticity prediction method based on dual machine learning and monotonic constrained neural networks, including: Acquire target data and construct a structured dataset using the target data; wherein, the structured dataset includes: promiscuous variable data, including external factors affecting pricing and demand; processing variable data, representing pricing multipliers; and outcome variables, representing order completion conversion rates; Using the confounding variable data as input, a preset first neural network and a second neural network are trained respectively. The first neural network is used to obtain a completion conversion rate prediction function, and the second neural network is used to obtain a pricing multiplier prediction function. The completion conversion rate prediction function is used to predict a baseline value of the completion conversion rate based on the confounding variable data. The pricing multiplier prediction function is used to predict a baseline value of the pricing multiplier based on the confounding variable data. Using the order completion conversion rate prediction function and the pricing multiple prediction function, calculate the order completion conversion rate residual and the pricing multiple residual; wherein, the order completion conversion rate residual represents the order completion conversion rate fluctuation after removing the influence of the confounding variable data, and the pricing multiple residual represents the pricing multiple adjustment range after removing the influence of the confounding variable data; A monotonic constraint neural network is constructed, with the pricing multiplier residual as input and the order completion conversion rate residual as output. The logarithmic weight parameterization method is used to constrain the network weights to obtain the trained monotonic constraint function. Based on the trained monotonic constraint function, the price elasticity coefficients for ride-hailing services under different operating scenarios are output.
[0014] Secondly, this application provides a system for price elasticity prediction based on a monotonicity constraint function, applied to any of the above-described price elasticity prediction methods based on dual machine learning and monotonicity constraint neural networks, the system comprising: The data acquisition module is used to acquire target data and construct a structured dataset using the target data; wherein, the structured dataset includes: mixed variable data, including external factors affecting pricing and demand; processing variable data, representing the pricing multiplier; and result variables, representing the order completion conversion rate; The first processing module is used to train a preset first neural network and a second neural network respectively using the mixed variable data as input, and to obtain a completion conversion rate prediction function using the first neural network and a pricing multiple prediction function using the second neural network; wherein, the completion conversion rate prediction function is used to predict a benchmark value of the completion conversion rate based on the mixed variable data; and the pricing multiple prediction function is used to predict a benchmark value of the pricing multiple based on the mixed variable data. The second processing module is used to calculate the order completion rate residual and the pricing multiple residual using the order completion rate prediction function and the pricing multiple prediction function; wherein, the order completion rate residual represents the order completion rate fluctuation after removing the influence of the confounding variable data, and the pricing multiple residual represents the pricing multiple adjustment range after removing the influence of the confounding variable data; The third processing module is used to construct a monotonic constraint neural network. It takes the pricing multiplier residual as input and the order completion conversion rate residual as output, and uses the logarithmic weight parameterization method to constrain the network weights to obtain the trained monotonic constraint function. The fourth processing module is used to output the price elasticity coefficients for different operating scenarios of ride-hailing services based on the trained monotonicity constraint function.
[0015] The application employs the above technical solution and has at least the following beneficial effects: 1. Strictly guarantee monotonicity mathematically to ensure that the predicted results conform to the law of demand. This application constrains the weights of a monotonicity-constrained neural network using a logarithmic weight parameterization method. Leveraging the mathematical property that the exponential function is always greater than zero, it theoretically and rigorously guarantees the monotonically decreasing nature of the network output with respect to the pricing multiplier input. Compared to the coarse-grained monotonicity constraints based on decision trees in existing technologies, this application achieves refined monotonicity control weight by weight and layer by layer. This ensures that the price elasticity prediction results conform to the business demand law that "prices rise and demand falls," completely avoiding erroneous relationships learned by the model due to data noise or confounding variables, thus providing a reliable technical guarantee for pricing decisions.
[0016] 2. Employing a dual machine learning framework to separate confounding variables improves the accuracy of causal inference. This application uses a first neural network and a second neural network to fit the impact of confounding variables on order completion rate and pricing multiplier, respectively, and calculates the order completion rate residual and pricing multiplier residual. This process isolates the combined influence of external confounding variables such as weather, traffic, and holidays, obtaining an unbiased, purely causal relationship between pricing multiplier and order completion rate. Compared to existing technologies that simply add confounding variables as ordinary features to the model, this application, starting from a structured framework for causal inference, effectively solves the problem of causal inference errors caused by improper separation of confounding variables, ensuring that the calculated price elasticity coefficient truly reflects users' price sensitivity.
[0017] 3. Combining residual calculation with monotonicity constraints enables unbiased elastic estimation. This application, after removing the influence of confounding variables, constructs a monotonic constraint neural network with pricing multiple residual as input and order completion conversion rate residual as output, organically integrating causal inference with monotonic constraints. First, residual calculation eliminates the interference of external factors, and then monotonic constraints ensure that the relationship conforms to business rules. The synergistic effect of these two methods ensures that the final output price elasticity coefficient not only eliminates the interference of confounding variables but also strictly follows the law of demand, solving the problem of elasticity coefficient distortion caused by confounding variable interference and lack of constraints in traditional methods.
[0018] 4. Enhance business explainability to support intelligent pricing decisions. The price elasticity coefficient output by this application fully aligns with business perception principles and can be directly used to guide intelligent pricing strategies under different ride-hailing operating scenarios. It supports refined elasticity analysis across multiple dimensions, including time periods and weather conditions. Compared to existing technologies whose outputs may contradict business intuition and lack interpretability, this application provides reliable decision support for pricing strategy optimization, promotion design, and demand forecasting, contributing to refined operations and maximizing business value.
[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram illustrating a price elasticity prediction method based on dual machine learning and monotonic constrained neural networks, according to an exemplary embodiment. Figure 2 This is a schematic flowchart illustrating an implementation process method for predicting price elasticity based on a monotonicity constraint function, according to an exemplary embodiment. Figure 3 This is a schematic diagram illustrating the system composition for price elasticity prediction based on a monotonic constraint function, according to an exemplary embodiment. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be described in detail below. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] Please see Figure 1 , Figure 1 This is a schematic flowchart illustrating a price elasticity prediction method based on dual machine learning and monotonic constrained neural networks according to an exemplary embodiment. The method includes: S201. Obtain target data and construct a structured dataset using the target data; wherein, the structured dataset includes: promiscuous variable data, including external factors affecting pricing and demand; processing variable data, representing pricing multipliers; and outcome variables, representing order completion conversion rates; S202. Using the mixed variable data as input, train a preset first neural network and a second neural network respectively to obtain the order completion rate prediction function output by the first neural network and the pricing multiple prediction function output by the second neural network; wherein, the order completion rate prediction function is used to predict the order completion rate benchmark value determined by the mixed variable data; the pricing multiple prediction function is used to predict the pricing multiple benchmark value determined by the mixed variable data; S203. Using the order completion conversion rate prediction function and the pricing multiple prediction function, calculate the order completion conversion rate residual and the pricing multiple residual; wherein, the order completion conversion rate residual represents the order completion conversion rate fluctuation after removing the influence of the confounding variable data, and the pricing multiple residual represents the pricing multiple adjustment range after removing the influence of the confounding variable data; S204. Construct a monotonic constrained neural network, using the pricing multiplier residual as input and the order completion conversion rate residual as output, and employing a logarithmic weight parameterization method to constrain the network weights. Obtain the monotonic constraint function after training; S205. Based on the trained monotonic constraint function, output the price elasticity coefficient for different operating scenarios of ride-hailing services.
[0024] For specific implementation details, please refer to [link / reference]. Figure 2 Step S201 specifically involves first collecting raw data from ride-hailing platforms, including raw order data (order time, trip distance, actual payment price, order status), raw capacity data (number of drivers online, vehicle distribution density, driver acceptance rate), and external raw data (weather conditions, traffic congestion index, public transportation operation status, and information on large-scale events). Then, feature engineering is performed on the collected raw data to extract spatiotemporal features (constructing refined spatiotemporal grid features, including 10-minute spatiotemporal granularity), supply and demand features (real-time calculation of dynamic indicators such as supply-demand ratio, capacity density, and demand heatmap), and competitive features (analyzing the pricing strategies and market share of other platforms).
[0025] It should be noted that feature engineering processing is performed on the collected raw data, specifically including: Spatiotemporal feature extraction: The operating area is divided into spatial grids according to preset dimensions, and refined spatiotemporal grid features are constructed with preset time intervals (such as 10 minutes) as time granularity to characterize the supply and demand status and order distribution patterns under different spatiotemporal units.
[0026] Supply and demand feature extraction: Real-time calculation of dynamic supply and demand indicators, including: supply-demand ratio, which is the ratio of demand orders to available capacity in the current period; capacity density, which is the number of online drivers or vehicles per unit area; and demand heat value, which is the number of orders initiated by passengers per unit area. These indicators are used to quantify the supply and demand tension in each spatiotemporal unit.
[0027] Competitive Feature Extraction: Obtain pricing multipliers and market share data of competing platforms, calculate characteristics such as the relative pricing level of competitors, price change trends of competitors, and market share of competitors, and use them to characterize the impact of market competition on pricing strategies.
[0028] Finally, a structured dataset is constructed, which includes three types of variables: confounding variable data W, including external factors affecting pricing and demand such as weather conditions, traffic congestion index, holiday types, information on large-scale events, real-time supply-demand ratio, capacity density, demand heat value, competitor platform pricing multipliers, and competitor platform market share; processing variable data T, representing dynamic pricing multipliers (such as 1.0x, 1.2x, 1.5x, etc.); and outcome variable Y, representing the order completion conversion rate.
[0029] It should be noted that step S201 is the data preparation stage for the entire price elasticity prediction method. This involves collecting order data, capacity data, and external environmental data from ride-hailing platforms and performing refined feature engineering to construct a structured dataset encompassing spatiotemporal, supply-demand, and competitive features. The benefits of this step are as follows: by fusing multi-source data and constructing refined spatiotemporal grid features, it can comprehensively characterize the complex influencing factors of ride-hailing operation scenarios; by calculating dynamic supply-demand indicators such as supply-demand ratio, capacity density, and demand heat value in real time, it transforms abstract supply-demand relationships into quantifiable numerical features; by introducing competitive features such as pricing multiples and market share of competing platforms, it enables the model to perceive the market competition landscape; and finally, it normalizes the features into three categories: confounding variables W, processing variables T, and outcome variables Y, providing a standardized data foundation for subsequent causal inference using a dual machine learning framework and ensuring that confounding variables can be effectively separated.
[0030] As described in step S2, the order completion conversion rate prediction function is used to predict the order completion conversion rate baseline value determined by the confounding variable data, that is, the expected order completion conversion rate under given external conditions after excluding the influence of price; the pricing multiple prediction function is used to predict the pricing multiple baseline value determined by the confounding variable data, that is, the reasonable pricing multiple that the platform usually sets under given external conditions.
[0031] Specifically, the first neural network uses a deep neural network construction function g(W), taking the profanity variable W as input and outputting a predicted order conversion rate. Specifically, the first neural network includes an input layer, multiple sequentially connected hidden layers, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses the Sigmoid activation function. In a preferred embodiment, the network structure is as follows: the input layer receives the profanity variable W, is sequentially connected to a 128-neuron hidden layer, a 64-neuron hidden layer, a 32-neuron hidden layer, and finally connected to a 1-neuron output layer.
[0032] Specifically, the function g(W) is constructed as follows: First, discrete features (such as weather and holidays) in the mixed variable data are one-hot encoded to obtain discrete feature vectors. Continuous features (such as traffic congestion index and time periods) in the mixed variable data are then min-max normalized to obtain continuous feature vectors. The discrete and continuous feature vectors are concatenated to obtain a fixed-dimensional numerical feature vector, which serves as the input to the first neural network. This numerical feature vector is then propagated forward through each hidden layer and the output layer, undergoing ReLU activation for nonlinear transformation. Finally, Sigmoid activation is used to obtain the predicted completion rate value between 0 and 1, thus achieving a nonlinear mapping from the mixed variable W to the completion rate.
[0033] The binary cross-entropy loss function is used, with the actual order completion status (0 for incomplete orders, 1 for completed orders) and the predicted order completion conversion rate as inputs to calculate the loss value. The formula is as follows: (1) in, This indicates the actual order completion status. These are predicted values.
[0034] Backpropagation is performed based on the loss value, and gradient descent is used with the Adam optimizer to update the weights and bias parameters of each layer of the network. After training, the weights and bias parameters of each layer of the network are fixed to form a unique nonlinear mapping function g(W). By inputting any confounding variable W, the predicted conversion rate can be directly output.
[0035] To improve the model's generalization ability and training stability, the training process of the first neural network also employs the following optimization strategies: (1) A cross-fitting strategy is adopted, dividing the structured dataset into 5 subsets with consistent data distribution. In each round of training, 4 subsets are selected as the training set and 1 subset is selected as the validation set. The 5 rounds of independent training are completed in turn, and the network parameters are fitted separately in each round. After training, the average of the model parameters in the 5 rounds of training is taken as the optimal parameters of the network. This strategy completely avoids data leakage across time from the perspective of data partitioning and training process. At the same time, the risk of model overfitting is reduced by multiple rounds of training, ensuring the model's generalization ability in high-frequency and dynamic time-series data environment.
[0036] (2) The time window sliding verification strategy is adopted. Considering the time sequence characteristics of the ride-hailing business, a time sliding window of 7 days is used. The training set (first 6 days) and the verification set (last 1 day) are divided according to the time sequence. The model verification is completed by sliding window by window to avoid prediction bias caused by disrupting the time sequence.
[0037] (3) Add an L2 regularization term to the loss function to prevent overfitting, and stop training when the loss on the validation set does not decrease for 10 consecutive epochs.
[0038] For the second neural network, a deep neural network is used to construct the function h(W), which takes the confounding variable W as input and outputs the predicted pricing multiple. Specifically, the second neural network includes an input layer, multiple sequentially connected hidden layers, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses a linear activation function to ensure numerical stability.
[0039] In a preferred embodiment, the network structure is as follows: the input layer receives a promiscuous variable W, which is then connected to a 128-neuron hidden layer, a 64-neuron hidden layer, a 32-neuron hidden layer, and finally to a 1-neuron output layer.
[0040] The function h(W) is constructed as follows: First, discrete features in the mixed variable data are one-hot encoded, and continuous features are min-max normalized and concatenated into a fixed-dimensional numerical feature vector, which serves as the input to the second neural network. Then, this numerical feature vector is forward-propagated through each hidden layer and the output layer, and the predicted value of the reasonable pricing multiple is obtained after ReLU (hidden layer) and linear activation (output layer).
[0041] A loss function is constructed, comprising a mean squared error term and a price reasonableness constraint term. The mean squared error term measures the deviation between the predicted and actual pricing multiples, ensuring prediction accuracy. The price reasonableness constraint term penalizes predicted values that exceed a preset pricing multiple range (e.g., 1.0 to 3.0 times), ensuring the output conforms to business reasonableness. Using this loss function, the actual and predicted pricing multiples are input to calculate the loss value. Backpropagation is performed based on the loss value, and gradient descent using the Adam optimizer is employed to update the weights and bias parameters of each layer of the network. After training, the weights and bias parameters of each layer of the network are fixed, forming a unique nonlinear mapping function h(W). Inputting any confounding variable W directly outputs the predicted reasonable pricing multiple.
[0042] To improve the model's generalization ability and training stability, the training process of the second neural network also employs the following optimization strategies: (1) Using a cross-fitting strategy, the structured dataset is divided into 5 subsets with consistent data distribution. One subset is selected as the validation set and the other subsets are selected as the training set for multiple rounds of independent training. The average of the model parameters obtained from each round of training is taken as the optimal parameters of the network.
[0043] (2) The time window sliding validation strategy is adopted, the training set and the validation set are divided according to the time sequence, and the model validation is completed by sliding the window one by one.
[0044] (3) Gradient pruning is performed on the predicted pricing multiple during the training process to force the predicted pricing multiple to converge to the preset pricing multiple range (such as 1.0 to 3.0 times), further ensuring the business rationality of the output results.
[0045] It should be noted that in step S202, using confounding variable data as input, the first neural network is trained to obtain the order completion rate prediction function g(W), and the second neural network is trained to obtain the pricing multiplier prediction function h(W). The beneficial effects of this step are: leveraging the powerful nonlinear fitting capability of deep neural networks to accurately capture the complex influence of confounding variables such as weather, traffic, and holidays on the order completion rate and pricing multiplier; avoiding data leakage and improving model generalization ability through cross-fitting and time window sliding validation strategies; preventing overfitting through L2 regularization and early stopping mechanisms; and ultimately forming fixed mapping functions g(W) and h(W), which can accurately predict the benchmark values of the order completion rate and pricing multiplier determined by the external environment for any input confounding variables, providing accurate benchmark predictions for subsequent residual calculations.
[0046] As described in step S203, the order completion conversion rate residual is expressed as... =Yg(W), which represents the fluctuation of unbiased order conversion rate after removing the influence of external factors such as weather, traffic, and holidays; The pricing multiple residual is expressed as =Th(W), representing the unbiased adjustment range of the pricing multiplier after removing the influence of external conditions. By calculating the residuals, the combined effects of confounding variables on the order completion rate and pricing multiplier can be removed, thus obtaining the unbiased causal relationship between pricing multiplier and order completion rate.
[0047] It should be noted that Y represents the outcome variable, namely the actual observed order completion conversion rate. Specifically, Y is the true order completion conversion rate calculated from historical order data collected from the ride-hailing platform, reflecting the actual order completion conversion situation under the combined influence of the confounding variable W and the processing variable T.
[0048] It should be noted that T represents the processing variable, i.e., the actual pricing multiplier used. Specifically, T is the actual pricing multiplier obtained from order data collected from the ride-hailing platform, reflecting the actual price adjustment range set by the platform under the influence of the confounding variable W.
[0049] In the ride-hailing scenario, this embodiment also incorporates special handling: in extreme supply and demand situations (such as heavy rain), boundary constraints are applied to the residual calculation; and different weights are assigned to the residuals based on the business importance at different times.
[0050] It should be noted that residual calculation effectively removes the combined influence of confounding variables such as weather, traffic, and holidays on order completion conversion rate and pricing multiplier, obtaining an unbiased relationship between pricing multiplier and order completion conversion rate after removing external environmental interference. The original observation data is transformed into orthogonalized residuals that reflect pure causal effects, solving the problem of causal inference errors caused by simply treating confounding variables as ordinary features in traditional methods. At the same time, considering the special characteristics of the ride-hailing scenario, boundary constraints are applied under extreme supply and demand conditions, and different weights are assigned to the residuals according to the importance of business in different time periods, so that subsequent monotonicity constraint fitting can be based on a pure causal relationship that is suitable for the business scenario.
[0051] As described in step S204, the monotonic constraint neural network is specifically designed for ride-hailing pricing scenarios to ensure that the price elasticity prediction strictly conforms to business understanding: when the pricing multiplier increases, the order completion conversion rate decreases, and when the pricing multiplier decreases, the order completion conversion rate increases.
[0052] Regarding logarithmic weight parameterization: The weights of the monotonic constrained neural network are parameterized using a logarithmic weighting method, where W = -exp(θ), and θ is a trainable parameter. Since exp(θ) is always greater than 0, W = -exp(θ) is always less than 0, mathematically guaranteeing the monotonically decreasing nature of the network output with respect to the pricing multiplier input. A multiplier benchmark correction is incorporated during parameterization to ensure the network outputs zero when the pricing multiplier residual is zero, thus ensuring benchmark alignment of the model.
[0053] Regarding monotonicity verification: During the training of the monotonicity-constrained neural network, test sequences containing multiple adjacent pricing multiple residuals (e.g., 1.0x, 1.1x, 1.2x…2.0x) are generated to verify whether the corresponding predicted order completion rate residual strictly decreases as the pricing multiple residual increases, and does not increase. Monotonicity-specific verification is performed for preset pricing multiple nodes (e.g., commonly used price adjustment multiples such as 1.2x, 1.5x, 1.8x), ensuring that the predicted order completion rate residual at these key nodes decreases as the pricing multiple residual increases. Simultaneously, differentiated monotonicity verification thresholds are set according to business scenarios: lower verification thresholds are set for peak periods and special business scenarios (e.g., severe weather, large-scale events) to improve the strictness of monotonicity verification in these scenarios.
[0054] Regarding violation calculation: A multi-dimensional violation quantification system is constructed to accurately evaluate the effect of constraints. Specifically, this includes: (1) Local violation degree: Calculated using the following formula, with a focus on monitoring the monotonicity between adjacent price multiples: (2) in, Indicates the degree of local violation; m represents the number of discrete pricing multiple points that actually occurred in the historical data; This represents the residual of the i-th pricing multiple; This represents the (i+1)th pricing multiple residual; The residual of the pricing multiple is At that time, the residual of the order completion rate predicted by the model; The residual of the pricing multiple is At that time, the residual of the order completion rate predicted by the model. This is an indicator function. When the condition inside the parentheses is true, I = 1; when the condition is false, I = 0.
[0055] (2) Global violation: The following formula is used to calculate and evaluate the monotonicity guarantee within the entire pricing multiple range.
[0056] (3) in, Indicates the degree of local violation; n represents the total number of points in the equally spaced dense test sequence; This represents the j-th pricing multiple residual value in the test sequence; This represents the (j+1)th pricing multiple residual value in the test sequence; the sequence covers commonly used pricing multiple ranges with fixed intervals; the denominator n 1. Implement normalization processing.
[0058] (3) Weighted violation degree: The violation is statistically weighted according to the preset weight of different pricing multiples. The preset pricing multiple nodes (such as 1.2 times, 1.5 times, etc.) are given higher weights to obtain the weighted violation degree, which is calculated using the following formula.
[0059] (4) in, Indicates the degree of local violation; p represents the number of key pricing multiple node pairs; This represents the preset weight of the k-th ratio pair, satisfying... Furthermore, higher weight is given to high-frequency price adjustment nodes.
[0061] (4) Total violation: The local violation, global violation, and weighted violation are summed according to their respective preset weights to obtain the total violation. In a preferred embodiment, the weight coefficients are set to 0.4, 0.3, and 0.3, respectively. Right now (5) This embodiment also employs a three-stage dynamic constraint strength adjustment strategy, intelligently adjusting constraint parameters based on the training progress and violation trends. Specifically, it includes: (1) Initial exploration phase (training progress 0-30%): Set the constraint strength λ=λ0×(0.5+τ), where λ0 is the preset initial constraint strength and τ is the current training progress (the value range is 0 to 30%). This allows the model to fully explore the complex supply and demand environment of ride-hailing and focuses on learning the basic multiplier-completion conversion rate relationship pattern.
[0062] (2) Mid-term adjustment phase (training progress 30%-70%): Obtain the violation trend ΔV of the current phase, and dynamically adjust the constraint strength according to the violation trend ΔV: if ΔV>0 (indicating an increasing violation trend), then set λ=λ0×2.0; otherwise, set λ=λ0×1.0. The violation trend ΔV is used to characterize the direction of change in the degree of monotonic violation. This phase pays special attention to the constraint effect during peak hours of ride-hailing and special scenarios.
[0063] (3) Late convergence phase (training progress 70%-100%): Obtain the total violation V_total for the current phase, and adjust the constraint strength based on the comparison between the total violation V_total and the preset threshold ε: if V_total>ε, then set λ=λ0×3.0; otherwise, set λ=λ0×1.0. This phase ensures convergence through strong constraints, guaranteeing that the final model meets the business supply and demand relationship in all ride-hailing operation scenarios.
[0064] It should be noted that by parameterizing the logarithmic weights, the monotonically decreasing nature of the network output with respect to the pricing multiple input is mathematically rigorously guaranteed, ensuring that the model conforms to the law of demand. By generating test price sequences and performing specific monotonicity verification for preset pricing multiple nodes, fine-grained monitoring of monotonicity is achieved. A multi-dimensional quantification system of local violation, global violation, and weighted violation is constructed to accurately evaluate the constraint effect. A three-stage dynamic constraint adjustment strategy intelligently adjusts the constraint strength based on training progress and violation trends. This approach allows the model to fully explore in the initial stage, dynamically adjusts the constraint based on violation trends in the middle stage, and strengthens the constraint in the later stage to ensure convergence, balancing the model's learning ability with the strictness of the constraints, significantly improving training stability and convergence accuracy.
[0065] As described in step S205, after training, the monotonicity constraint function strictly satisfies the monotonically decreasing relationship between the pricing multiplier residual and the order completion conversion rate residual. Based on this function, the price elasticity coefficient is calculated using a numerical differentiation method.
[0066] Specifically, this embodiment, based on the trained monotonicity constraint function, supports multi-dimensional price elasticity analysis under different operating scenarios for ride-hailing services. Specifically, in terms of time-of-day dimensions, this method can calculate the price elasticity coefficients for morning peak, off-peak, evening peak, and late-night periods. For example, price sensitivity is high during the morning peak, with an elasticity coefficient of approximately -2.1; during the off-peak, sensitivity is moderate, with an elasticity coefficient of approximately -1.3; during the evening peak, sensitivity is high, with an elasticity coefficient of approximately -1.8; and during late-night periods, sensitivity is low, with an elasticity coefficient of approximately -0.9, thus providing a quantitative basis for differentiated pricing strategies for different time periods. In terms of weather dimensions, this method can analyze changes in price sensitivity under different weather conditions. For example, using sunny days as a baseline, demand increases and price tolerance improves during light rain, resulting in a decrease in the elasticity coefficient of approximately 20%; during heavy rain or storms, rigid demand is evident, resulting in a decrease in the elasticity coefficient of approximately 40%; and during snowy days, users are least sensitive to prices, with a decrease in the elasticity coefficient of approximately 60%. In addition, this method supports real-time data input and can dynamically update the elasticity coefficient at a 5-minute granularity, enabling instant price adjustment decisions and providing ride-hailing platforms with refined and dynamic pricing support.
[0067] This embodiment provides a system for predicting price elasticity based on a monotonic constraint function, applied to the methods described in the above embodiments. For example... Figure 3 As shown, the system includes: The data acquisition module 10 is used to acquire target data and construct a structured dataset using the target data. The structured dataset includes: confounding variable data, including external factors affecting pricing and demand; processing variable data, representing pricing multipliers; and outcome variables, representing order completion conversion rates.
[0068] The first processing module 20 is used to train a preset first neural network and a second neural network using mixed variable data as input, respectively, to obtain a completion conversion rate prediction function output by the first neural network and a pricing multiple prediction function output by the second neural network. The completion conversion rate prediction function is used to predict the baseline value of the completion conversion rate determined by the mixed variable data; the pricing multiple prediction function is used to predict the baseline value of the pricing multiple determined by the mixed variable data.
[0069] The second processing module 30 is used to calculate the order completion rate residual and the pricing multiple residual using the order completion rate prediction function and the pricing multiple prediction function. The order completion rate residual represents the fluctuation in the order completion rate after removing the influence of confounding variables, and the pricing multiple residual represents the adjustment range of the pricing multiple after removing the influence of confounding variables.
[0070] The third processing module 40 is used to construct a monotonic constraint neural network. It takes the pricing multiplier residual as input and the order completion conversion rate residual as output, and uses the logarithmic weight parameterization method to constrain the network weights to obtain the trained monotonic constraint function.
[0071] The fourth processing module 50 is used to output the price elasticity coefficient of ride-hailing under different operating scenarios based on the trained monotonicity constraint function.
[0072] The specific implementation methods of each module of the system are described in the above embodiments, and will not be repeated here.
[0073] Furthermore, this application provides a computer-readable storage medium storing computer instructions for causing a computer to perform the steps of any of the methods described above. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), etc.; the storage medium may also include combinations of the above types of memory.
[0074] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0075] It should be noted that in the description of this application, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this application, unless otherwise stated, "multiple" or "more" means at least two.
[0076] It should be understood that when an element is referred to as "fixed to" or "set on" another element, it may be directly on the other element or may have an intervening element present at the same time; when an element is referred to as "connected to" another element, it may be directly connected to the other element or may have an intervening element present at the same time. In addition, the term "connected" as used herein may include wireless connections; the word "and / or" as used includes any unit and all combinations of one or more of the associated listed items.
[0077] Any process or method description in the flowchart or otherwise herein can be understood as: representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the function involved, as should be understood by those skilled in the art to which embodiments of this application pertain.
[0078] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0079] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0080] Furthermore, the functional units in the various embodiments of this application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0081] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0082] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0083] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A price elasticity prediction method based on dual machine learning and monotonic constrained neural networks, characterized in that, The method includes: Acquire target data and construct a structured dataset using the target data; wherein, the structured dataset includes: promiscuous variable data, including external factors affecting pricing and demand; processing variable data, representing pricing multipliers; and outcome variables, representing order completion conversion rates; Using the confounding variable data as input, a preset first neural network and a second neural network are trained respectively. The first neural network is used to obtain a completion conversion rate prediction function, and the second neural network is used to obtain a pricing multiplier prediction function. The completion conversion rate prediction function is used to predict a baseline value of the completion conversion rate based on the confounding variable data. The pricing multiplier prediction function is used to predict a baseline value of the pricing multiplier based on the confounding variable data. Using the order completion conversion rate prediction function and the pricing multiple prediction function, calculate the order completion conversion rate residual and the pricing multiple residual; wherein, the order completion conversion rate residual represents the order completion conversion rate fluctuation after removing the influence of the confounding variable data, and the pricing multiple residual represents the pricing multiple adjustment range after removing the influence of the confounding variable data; A monotonic constraint neural network is constructed, with the pricing multiplier residual as input and the order completion conversion rate residual as output. The logarithmic weight parameterization method is used to constrain the network weights to obtain the trained monotonic constraint function. Based on the trained monotonic constraint function, the price elasticity coefficients for ride-hailing services under different operating scenarios are output.
2. The method according to claim 1, characterized in that, The mixed variable data is used as input, and a preset first neural network is trained accordingly. The first neural network is then used to obtain a completion conversion rate prediction function, including: The discrete features in the mixed variable data are one-hot encoded to obtain discrete feature vectors; the continuous features in the mixed variable data are normalized to obtain continuous feature vectors; the discrete feature vectors and the continuous feature vectors are concatenated to obtain numerical feature vectors of fixed dimensions, which are used as inputs to the first neural network. The numerical feature vector is sequentially propagated through each hidden layer and output layer of the first neural network to obtain the predicted order conversion rate. The loss value is calculated by using binary cross-entropy as the loss function and taking the actual order completion status and the predicted order completion conversion rate as inputs. Backpropagation is performed based on the loss value, and gradient descent is performed using an optimizer to update the weights and bias parameters of each layer of the network. After training, the weights and bias parameters of each layer of the network are fixed to obtain the order conversion rate prediction function; The first neural network includes an input layer, multiple hidden layers connected in sequence, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses the Sigmoid activation function.
3. The method according to claim 2, characterized in that, The training process of the completion conversion rate prediction function also includes: A cross-fitting strategy is adopted to divide the structured dataset into multiple subsets with consistent data distribution. One subset is selected in turn as the validation set and the remaining subsets are selected as the training set for multiple rounds of independent training. The average of the model parameters obtained from each round of training is taken as the optimal parameters of the network. And / or, adopt a time window sliding validation strategy, divide the training set and validation set according to the time sequence, and complete the model validation by sliding window by window; And / or, add an L2 regularization term to the loss function to prevent overfitting, and stop training when the loss on the validation set does not decrease for a preset number of consecutive iterations.
4. The method according to claim 1, characterized in that, Using confounding variable data as input, a pre-defined second neural network is trained, and the pricing multiple prediction function is obtained using the second neural network, including: The discrete features in the mixed variable data are one-hot encoded, the continuous features are normalized, and the data are concatenated into a fixed-dimensional numerical feature vector, which is used as the input of the second neural network. The numerical feature vector is sequentially propagated through each hidden layer and the output layer to obtain the predicted pricing multiple. A loss function is constructed, which includes a mean squared error term and a price reasonableness constraint term. The mean squared error term is used to measure the deviation between the predicted price multiple and the actual price multiple. The price reasonableness constraint term is used to penalize the predicted value that exceeds the preset price multiple range. Using the loss function, the loss value is calculated with the actual pricing multiple and the predicted pricing multiple as inputs; Backpropagation is performed based on the loss value, and gradient descent is performed using an optimizer to update the weights and bias parameters of each layer of the network. After training, the weights and bias parameters of each layer of the network are fixed to obtain the pricing multiple prediction function; The second neural network includes an input layer, multiple hidden layers connected in sequence, and an output layer. The hidden layers use the ReLU activation function, and the output layer uses a linear activation function.
5. The method according to claim 4, characterized in that, The training process of the second neural network also includes: A cross-fitting strategy is adopted to divide the structured dataset into multiple subsets with consistent data distribution. One subset is selected in turn as the validation set and the remaining subsets are selected as the training set for multiple rounds of independent training. The average of the model parameters obtained from each round of training is taken as the optimal parameters of the network. And / or, adopt a time window sliding validation strategy, divide the training set and validation set according to the time sequence, and complete the model validation by sliding window by window; And / or, during the training process, gradient pruning is performed on the predicted pricing multiple to force the predicted pricing multiple to converge to a preset pricing multiple range.
6. The method according to claim 1, characterized in that, The monotonic constraint neural network is constructed by using the pricing multiplier residual as input and the order completion conversion rate residual as output. A logarithmic weight parameterization method is used to constrain the network weights, resulting in a trained monotonic constraint function, including: The weights of the monotonic constrained neural network are parameterized using a logarithmic weighting method, with W = -exp(θ), where θ is a trainable parameter. A multiplier benchmark correction is added during the parameterization process so that the network outputs zero when the pricing multiplier residual is zero. During the training process of the monotonicity-constrained neural network, a preset test price sequence is generated to verify whether the corresponding predicted order completion rate residual decreases as the pricing multiplier residual increases, and whether there is no increasing situation. Monotonicity verification is performed for one or more preset pricing multiplier nodes. The local violation degree, the global violation degree, and the weighted violation degree are calculated to obtain the total violation degree. The local violation degree is used to monitor the monotonicity between adjacent price multiples. The global violation degree is used to evaluate the monotonicity guarantee within the entire pricing multiple range. The weighted violation degree is weighted according to the preset weights of different pricing multiples.
7. The method according to claim 6, characterized in that, Also includes: The training process is divided into an initial exploration phase, a mid-term adjustment phase, and a late convergence phase based on the training progress. In the initial exploration phase, the constraint strength is set to λ = λ0 × (0.5 + τ), where λ0 is the preset initial constraint strength, τ is the current training progress, and the value of τ ranges from 0 to 30%. During the intermediate adjustment phase, the violation trend ΔV of the current phase is obtained, and the constraint strength λ is dynamically adjusted based on the violation trend ΔV. If ΔV>0, then set λ=λ0×2.0; Otherwise, λ is set to λ0 × 1.0; where the violation trend ΔV is used to characterize the direction of change in the degree of monotonicity violation; In the late convergence phase, the total violation V_total of the current phase is obtained, and the constraint strength λ is adjusted according to the comparison result of the total violation V_total and the preset threshold ε: if V_total>ε, then λ=λ0×3.0 is set. Otherwise, set λ = λ0 × 1.
0.
8. The method according to claim 1, characterized in that, During the training process of the monotonicity-constrained neural network, a preset test price sequence is generated to verify whether the corresponding predicted order completion rate residual decreases as the pricing multiplier residual increases, and whether it increases. Monotonicity verification is then performed for one or more preset pricing multiplier nodes, including: During the training process of the monotonicity-constrained neural network, a test sequence containing multiple adjacent pricing multiple residuals is generated to verify whether the corresponding predicted order completion rate residual strictly decreases as the pricing multiple residual increases. Monotonicity-specific verification was performed on preset pricing multiple nodes to ensure that the predicted order completion rate residual at the preset pricing multiple nodes decreases as the pricing multiple residual increases. Lower monotonicity verification thresholds are set for peak periods and special business scenarios to improve the strictness of monotonicity verification during these periods and scenarios.
9. The method according to claim 7, characterized in that, The calculation of the weighted violation degree of local violation degree and global violation degree, combined to obtain the total violation degree, includes: The local violation degree is calculated using a pre-defined formula, which is: (1) in, Indicates the degree of local violation; m represents the number of discrete pricing multiple points that actually occurred in the historical data; This represents the residual of the i-th pricing multiple; This represents the (i+1)th pricing multiple residual; The residual of the pricing multiple is At that time, the residual of the order completion rate predicted by the model; The residual of the pricing multiple is At that time, the residual of the order completion rate predicted by the model; This is an indicator function; when the condition inside the parentheses is true, I = 1; when the condition is false, I = 0. The monotonicity guarantee is assessed across the entire pricing multiple range to obtain the global violation rate. Violations are weighted and statistically analyzed based on preset weights for different pricing multiples, with higher weights assigned to preset pricing multiple nodes to obtain a weighted violation rate. The local violation, global violation, and weighted violation are summed according to their respective preset weights to obtain the total violation.
10. A price elasticity prediction system based on dual machine learning and monotonicity-constrained neural networks, applied to the price elasticity prediction method based on dual machine learning and monotonicity-constrained neural networks as described in any one of claims 1-9, characterized in that, The system includes: The data acquisition module is used to acquire target data and construct a structured dataset using the target data; wherein, the structured dataset includes: mixed variable data, including external factors affecting pricing and demand; processing variable data, representing the pricing multiplier; and result variables, representing the order completion conversion rate; A first processing module is used to train a preset first neural network and a second neural network respectively, using the confounding variable data as input. The first neural network is used to obtain a completion conversion rate prediction function, and the second neural network is used to obtain a pricing multiplier prediction function. The completion conversion rate prediction function is used to predict a baseline value for the completion conversion rate based on the confounding variable data; the pricing multiplier prediction function is used to predict a baseline value for the pricing multiplier based on the confounding variable data. A second processing module is used to calculate the completion conversion rate residual and the pricing multiplier residual using the completion conversion rate prediction function and the pricing multiplier prediction function. The completion conversion rate residual represents the fluctuation in the completion conversion rate after removing the influence of the confounding variable data, and the pricing multiplier residual represents the adjustment range of the pricing multiplier after removing the influence of the confounding variable data. The third processing module is used to construct a monotonic constraint neural network. It takes the pricing multiplier residual as input and the order completion conversion rate residual as output, and uses the logarithmic weight parameterization method to constrain the network weights to obtain the trained monotonic constraint function. The fourth processing module is used to output the price elasticity coefficients for different operating scenarios of ride-hailing services based on the trained monotonicity constraint function.