Discriminatory pricing identification method and device based on price pattern clustering learning

By preprocessing the order data and using the multi-head self-attention layer and the feedforward neural network layer to generate coding sequences, comparing the real price and predicted price, the problem of high cost and low applicability of discriminatory pricing identification methods in the prior art is solved. A method of efficient identification of discriminatory pricing has been realized.

CN118885942BActive Publication Date: 2024-12-06INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411357043.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-06
Estimated Expiration
2044-09-27

AI Technical Summary

Technical Problem

The existing discriminatory pricing identification method based on price model clustering learning is costly and has low applicability, making it difficult to effectively identify discriminatory pricing behaviors in large-scale and high-dimensional datasets.

Method used

By obtaining order data containing category data, time data and numerical data, preprocessing and randomly dividing it into non-discriminatory pricing subsets and discriminatory pricing subsets, inputting them into the non-discriminatory pricing converter and discriminatory pricing converter models, respectively. , the coding sequence is generated using the multi-head self-attention layer and the feedforward neural network layer to compare the real price with the predicted price to identify discriminatory pricing.

Benefits of technology

Real-time and accurate identification of discriminatory pricing behaviors is achieved, reducing calculation costs, and improving the applicability and efficiency of the method.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885942B_ABST
    Figure CN118885942B_ABST
Patent Text Reader

Abstract

The present invention provides a discriminatory pricing identification method and device based on price pattern clustering learning, which is applied to the field of artificial intelligence. The method includes: obtaining order data containing discriminatory pricing scenarios; preprocessing category data, time data and numerical data respectively to obtain order data sets; inputting a non-discriminatory pricing subset into a non-discriminatory encoder to obtain a non-discriminatory coding sequence; inputting a discriminatory pricing subset into a discriminatory encoder to obtain a discriminatory coding sequence; inputting the non-discriminatory coding sequence and the discriminatory coding sequence into a non-discriminatory pricing decoder and a discriminatory pricing decoder respectively to obtain a non-discriminatory predicted price and a discriminatory predicted price; comparing the actual price based on the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively to obtain a pricing identification result indicating that the actual price is non-discriminatory pricing or discriminatory pricing. The present invention can accurately identify discriminatory pricing behavior in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a discriminatory pricing identification method and device based on price pattern clustering learning. Background Art

[0002] In the field of mobile travel, platforms often personalize prices based on users' travel habits, time, location and other multi-dimensional information, resulting in inconsistent charges for the same service to different users. At this time, corresponding discriminatory pricing (such as "big data killing old customers") identification algorithms are needed for supervision.

[0003] In the current research on discriminatory pricing identification based on price pattern clustering learning, discriminatory pricing behavior can be converted into anomaly (pricing) detection tasks. Anomaly detection is regarded as one of the important applications of data mining. It is used to detect and process anomalies or outliers; however, the main disadvantage of density-based anomaly detection algorithms is that they are computationally expensive because they need to calculate the pairwise distances between each data. They are not suitable for large-scale and high-dimensional data sets. In addition, statistical-based anomaly detection algorithms require the specification of anomaly ratios, while the ratio of discriminatory pricing order quantities cannot be obtained in actual application scenarios.

[0004] It can be seen that the discriminatory pricing identification method in the relevant technology has technical problems of high cost and low applicability. Summary of the invention

[0005] The present invention provides a discriminatory pricing identification method and device based on price pattern clustering learning, so as to solve the defects of high cost and low applicability of the discriminatory pricing identification method in the prior art, and realize accurate identification of discriminatory pricing behavior in real time.

[0006] The present invention provides a discriminatory pricing identification method based on price pattern clustering learning, comprising the following steps. Obtain order data in a discriminatory pricing scenario, wherein the order data includes at least category data, time data and numerical data; preprocess the category data, the time data and the numerical data respectively to obtain an order data set, and randomly divide the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; input the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder; input the discriminatory pricing subset into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory coding sequence output by the discriminatory encoder; input the non-discriminatory coding sequence and the discriminatory coding sequence into a non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and a discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; compare the actual price of the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively to obtain a pricing recognition result of the order data, wherein the pricing recognition result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0007] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, the category data, the time data and the numerical data are preprocessed respectively to obtain an order data set, including: one-hot encoding the category data to obtain category features of the order data; sine-cosine encoding the time data to obtain time features of the order data; standardizing the numerical data to obtain numerical features of the order data; and constructing an order data set based on the category features, the time features and the numerical features.

[0008] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, the non-discriminatory pricing subset is input into the non-discriminatory encoder of the non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder, including: inputting the feature vectors of multiple dimensions in the order data set into the multi-head self-attention layer of the non-discriminatory pricing converter regression model to obtain a non-discriminatory weighted sum matrix output by the multi-head self-attention layer; inputting the non-discriminatory weighted sum matrix into the feedforward neural network layer of the non-discriminatory pricing converter regression model to obtain a transformed feature vector matrix output by the feedforward neural network layer, and using the transformed feature vector matrix as a non-discriminatory coding sequence.

[0009] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, the discriminatory pricing subset is input into the discriminatory encoder of the discriminatory pricing converter regression model to obtain the discriminatory coding sequence output by the discriminatory encoder, including: inputting the feature vectors of multiple dimensions in the order data set into the multi-head self-attention layer of the discriminatory pricing converter regression model to obtain the discriminatory weighted sum matrix output by the multi-head self-attention layer; inputting the discriminatory weighted sum matrix into the discriminatory feedforward neural network layer of the discriminatory pricing converter regression model to obtain the transformed feature vector matrix output by the discriminatory feedforward neural network layer, and using the transformed feature vector matrix as the discriminatory coding sequence.

[0010] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, before obtaining order data containing discriminatory pricing scenarios, the method further includes: obtaining a non-discriminatory order sample data set and a discriminatory order sample data set in the discriminatory pricing scenario; inputting the non-discriminatory order sample data set into a preset non-discriminatory pricing converter regression model to obtain a non-discriminatory sample predicted price output by the preset non-discriminatory pricing converter regression model; inputting the discriminatory order sample data set into a preset discriminatory pricing converter regression model to obtain a discriminatory sample predicted price output by the preset discriminatory pricing converter regression model; determining a non-discriminatory error between the non-discriminatory sample predicted price and the actual price of the order sample, and the discriminatory sample predicted price; The discriminatory error between the predicted price and the actual price of the order sample; when the non-discriminatory error is smaller than the discriminatory error, the predicted price of the non-discriminatory sample is used as the discriminatory pricing sample, and the predicted price of the discriminatory sample is used as the non-discriminatory pricing sample; when the discriminatory error is smaller than the non-discriminatory error, the predicted price of the discriminatory sample is used as the discriminatory pricing sample, and the predicted price of the non-discriminatory sample is used as the non-discriminatory pricing sample; based on the non-discriminatory pricing samples, the preset non-discriminatory pricing converter regression model is trained to obtain a pre-trained non-discriminatory pricing converter regression model; based on the discriminatory pricing samples, the preset discriminatory pricing converter regression model is trained to obtain a pre-trained discriminatory pricing converter regression model.

[0011] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, before determining the non-discriminatory error between the non-discriminatory sample predicted price and the actual price of the order sample, and the discriminatory error between the discriminatory sample predicted price and the actual price of the order sample, the method also includes: when the non-discriminatory sample predicted price is greater than the discriminatory sample predicted price, eliminating the non-discriminatory sample predicted price.

[0012] The present invention also provides a discriminatory pricing identification device based on price pattern clustering learning, comprising the following modules: an acquisition module, used to acquire order data in a discriminatory pricing scenario, wherein the order data at least includes category data, time data and numerical data; a preprocessing module, used to preprocess the category data, the time data and the numerical data respectively to obtain an order data set, and randomly divide the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; a non-discriminatory encoder module, used to input the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder; a discriminatory encoder module, used to input the discriminatory pricing subset into A discriminatory encoder of a discriminatory pricing converter regression model is used to obtain a discriminatory coding sequence output by the discriminatory encoder; an output module is used to input the non-discriminatory coding sequence and the discriminatory coding sequence into a non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and a discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; an identification module is used to compare the actual price of the order data with the non-discriminatory predicted price and the discriminatory predicted price, respectively, to obtain a pricing identification result of the order data, wherein the pricing identification result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0013] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the discriminatory pricing identification method based on price pattern clustering learning as described in any one of the above is implemented.

[0014] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described discriminatory pricing identification methods based on price pattern clustering learning.

[0015] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned discriminatory pricing identification methods based on price pattern clustering learning.

[0016] The discriminatory pricing identification method and device based on price pattern clustering learning provided by the present invention obtain order data including category data, time data and numerical data in a discriminatory pricing scenario, and pre-process the category data, time data and numerical data of the order data respectively, thereby being able to perform corresponding pre-processing on different data types to obtain an order data set; the order data set is respectively input into a non-discriminatory pricing converter regression model and a discriminatory pricing converter regression model to obtain a non-discriminatory predicted price for non-discriminatory pricing and a discriminatory predicted price for discriminatory pricing respectively, and then the actual price based on the order data is compared with the non-discriminatory predicted price and the discriminatory predicted price respectively to identify in real time whether the actual price of the order data is discriminatory pricing; thereby solving the technical problem of high cost and low applicability of the discriminatory pricing identification method based on price pattern clustering learning in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced one by one below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 It is a flow chart of the discriminatory pricing identification method based on price pattern clustering learning provided by the present invention.

[0019] Figure 2 It is a schematic diagram of the flow of preprocessing order data information provided by the present invention.

[0020] Figure 3 It is a training flow chart of the non-discriminatory / discriminatory pricing converter regression model provided by the present invention.

[0021] Figure 4 It is a structural diagram of the dual-model system provided by the present invention for performing discriminatory pricing detection through pattern learning.

[0022] Figure 5 It is a structural schematic diagram of a discriminatory pricing identification device based on price pattern clustering learning provided by the present invention.

[0023] Figure 6 It is a schematic diagram of the physical structure of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] In the era of big data, the monopolistic behavior of the platform economy has shown more secretive, complex and innovative characteristics, which makes it more difficult to determine whether there is a monopoly, and the specific impact of monopolistic behavior is difficult to accurately quantify. Therefore, the development and application of accurate, objective and practical monitoring methods have become a key prerequisite for preventing and combating platform monopolistic behavior. In the field of mobile travel, platforms often personalize prices based on multi-dimensional information such as users' travel habits, time, and location, resulting in inconsistent charges for the same service to different users. At this time, a corresponding discriminatory pricing identification algorithm is needed for supervision.

[0026] In the current research on discriminatory pricing identification, discriminatory pricing behavior can be converted into anomaly detection tasks. Anomaly detection is regarded as one of the important applications of data mining, which is used to detect and process anomalies or outliers. Anomalies are usually considered to be data points that are significantly different from the rest of the data points. Anomaly detection algorithms mainly include those based on statistics, density, distance, and clustering.

[0027] In the related art, the intuitive idea of ​​the statistical-based method is that anomalies are located in low-probability areas, while normal data instances are located in high-probability areas. This anomaly detection algorithm is one of the earliest proposed methods for anomaly detection. The process of this anomaly detection algorithm is to first fit a statistical model to a given data set, and then perform some statistical tests on the test data to determine whether the test data belongs to the statistical model. If the test data belongs to the statistical model, it is regarded as a normal instance, otherwise it is regarded as an anomaly.

[0028] However, statistical model-based anomaly detection algorithm methods are only applicable to univariate data. Therefore, the computational cost is very high when dealing with multidimensional data sets. The important weakness of histogram-based methods is that they cannot capture anomalies that depend on multiple features. Kernel-based algorithms are computationally very expensive and sensitive to parameters.

[0029] In the related art, density-based methods identify anomalies based on the density of data points in a given area. Data points that are usually significantly lower or higher in density than the surrounding data points are considered to be outliers. The most commonly used algorithms include the local outlier factor detection algorithm (LOF), the outlier factor anomaly detection algorithm based on connectivity (COF), the subdivision algorithm for triangular mesh models (LoOP, Local Outlier Probabilities), and the anomaly detection algorithm based on local deviation from the mean (LOCI, Local Correlation Integral). LOF is a widely used anomaly detection algorithm that makes judgments based on the density of data points relative to their k-nearest neighbors. The COF anomaly detection algorithm is similar to LOF, but COF uses a different density calculation mechanism. LoOP uses a more powerful local density estimator. LOCI proposes a measurement method called multi-granularity deviation factor, which is also a variant of LOF.

[0030] However, the main disadvantage of density-based anomaly detection algorithms is that they are computationally expensive since they require computing pairwise distances. They are not applicable to large-scale and high-dimensional datasets. Moreover, such methods are sensitive to parameters such as the number of nearest neighbors (k).

[0031] In the related art, the basic idea of ​​the distance-based method is that the distance between the abnormal data point and its nearest neighbor is far. In the distance-based method, the anomaly score of the data point is calculated as the sum of the distances between the data point and its k nearest neighbors. Classic distance-based anomaly detection algorithms include k-nearest neighbors (k-NN), kth-nearest neighbor-based algorithm (kth-NN), RBRP (an approximate nearest neighbor algorithm), and angle-based anomaly detection (ABOD). The core idea of ​​k-NN is that the distance between the abnormal data point and its k nearest neighbors is far, and the distance between the data instance and its k nearest neighbors is used as the metric score of the anomaly. Later, kth-NN was introduced, which uses the distance between the data point and its kth nearest neighbor to represent the anomaly score, thereby overcoming the shortcomings of k-NN. In RBRP, instead of using the nearest neighbor, the approximate nearest neighbor is used, which makes RBRP run faster than k-NN and kth-NN. The core process of ABOD’s anomaly score calculation is that, for each data point, the weighted variance of the angles between all other data points is considered as an anomaly factor.

[0032] However, distance-based anomaly detection algorithms usually need to calculate the distance between each data point and all other points or at least a portion of the points. When the data set is large, this calculation may become very time-consuming, resulting in a significant increase in the time complexity of the algorithm. Especially in high-dimensional space, the overhead of distance calculation will be further increased.

[0033] In the related art, the basic idea of ​​clustering-based methods is that each point in the data set is either part of a cluster or an outlier. The Outlier Finding Process (OFP) is a two-stage clustering process for detecting outliers. In the non-discriminatory stage, a modified k-means clustering algorithm is used. Then, in the subsequent stage, a minimum spanning tree (MST) is constructed, in which spanning trees with fewer nodes are considered outliers.

[0034] However, the performance of clustering-based anomaly detection algorithms is heavily dependent on the clustering algorithm, and they have high time complexity and are sensitive to parameters. This type of anomaly detection algorithm uses binary scores and therefore cannot distinguish between strong and weak anomalies, while other types of anomaly detection algorithms (such as distance, density, and isolation) can distinguish between strong and weak anomalies.

[0035] The embodiments of the present invention aim to solve the problem of building an adaptive unsupervised learning model to identify different price patterns in the context of unknown pricing strategies, so as to deploy the model based on the above model, thereby providing a scientific and systematic decision support tool for regulators to ensure market fairness and recognition efficiency.

[0036] Optionally, the discriminatory pricing identification method based on price pattern clustering learning of the embodiment of the present application can be executed by a server, or by a terminal device, or jointly by a server and a terminal device, taking the example of the discriminatory pricing identification method based on price pattern clustering learning in the present embodiment being executed by a server.

[0037] Figure 1 is a flow chart of the discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, such as Figure 1 As shown, the above method includes the following steps.

[0038] Step 101, obtaining order data in a discriminatory pricing scenario, wherein the order data at least includes category data, time data, and numerical data.

[0039] In an embodiment of the present invention, order data in a discriminatory pricing scenario is obtained, wherein discriminatory pricing is to specify different prices for different users for the same product or the same category of services, that is, the discriminatory pricing scenario can be understood as a "big data killing old customers" scenario.

[0040] For example, discriminatory pricing behavior (differential pricing behavior) can be the use of big data technology to collect and analyze users' personal information, consumption habits and other data, thereby implementing different pricing strategies for different users on the same product or service.

[0041] It should be noted that, in an embodiment of the present invention, the order data obtained in a discriminatory pricing scenario is not only the actual price data of the order, but at least includes the category data, time data and numerical data of the order data, so as to facilitate the subsequent determination of the category characteristics, time characteristics and numerical characteristics of the order data.

[0042] Step 102 , preprocessing is performed on the category data, time data, and numerical data to obtain an order data set, and the order data set is randomly divided into a non-discriminatory pricing subset and a discriminatory pricing subset.

[0043] In the embodiment of the present invention, since the data types of the category data, the time data and the numerical data are different, different preprocessing is performed on the above data respectively.

[0044] For example, one-hot encoding is performed on categorical data to convert categorical features into numerical features so that the model can understand the data. Sin-cosine encoding is performed on time data to map time points onto the unit circle to maintain the continuity and periodicity of time information. This not only retains the unique information of time features, but also helps the model use this information to predict pricing. Standardization preprocessing is performed on numerical data. Standardization of numerical data helps the model converge faster.

[0045] After the preprocessing process is completed, the obtained order data set is randomly divided to obtain two random sub-order data sets as a non-discriminatory pricing subset and a discriminatory pricing subset respectively.

[0046] Through the embodiments of the present invention, different preprocessing methods are adopted to process the category data, time data and numerical data of the order data set respectively, so that the data features of multiple dimensions of the order data can be fully obtained to facilitate subsequent model training or model application.

[0047] Step 103, input the non-discriminatory pricing subset to the non-discriminatory encoder of the non-discriminatory pricing transformer regression model to obtain a non-discriminatory encoding sequence output by the non-discriminatory encoder.

[0048] Step 104, input the discriminatory pricing subset into the discriminatory encoder of the discriminatory pricing converter regression model to obtain the discriminatory coding sequence output by the discriminatory encoder.

[0049] In an embodiment of the present invention, the non-discriminatory pricing subset and the discriminatory pricing subset initially randomly divided are simultaneously input into the non-discriminatory encoder of the non-discriminatory pricing converter regression model and the discriminatory encoder of the discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder and a discriminatory coding sequence output by the discriminatory encoder.

[0050] Among them, the non-discriminatory encoder and the discriminatory encoder can be Transformer encoder layers, and each encoder layer mainly consists of two parts: a multi-head self-attention mechanism (MHA, Multi-Head Attention) and a feed-forward neural network (FFN, Feed Forward).

[0051] The multi-head self-attention mechanism is used to allow the model to capture different information of the input sequence in different subspaces, thereby improving the expressiveness of the model. Specifically, each token in the input sequence is first converted into a set of query, key, and value vectors. These vectors are then divided into multiple groups, each corresponding to a "head", and each head independently performs self-attention calculations on the input sequence.

[0052] The feedforward neural network mainly consists of two linear transformations (fully connected layers) and a nonlinear activation function, which is used to perform further nonlinear transformation and feature extraction on the input data.

[0053] Step 105, input the non-discriminatory coding sequence and the discriminatory coding sequence into the non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and the discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain the non-discriminatory predicted price output by the non-discriminatory pricing decoder and the discriminatory predicted price output by the discriminatory pricing decoder.

[0054] It should be noted that the non-discriminatory pricing converter regression model and the discriminatory pricing converter regression model in the embodiment of the present invention are retrained.

[0055] Among them, the non-discriminatory pricing converter regression model is trained based on the non-discriminatory pricing order data set to learn the pricing model of normal orders, and then the output non-discriminatory predicted price is non-discriminatory pricing; the discriminatory pricing converter regression model is trained based on the discriminatory pricing (premium pricing) order data set to learn the pricing model of abnormal orders, and then the output discriminatory predicted price is discriminatory pricing.

[0056] Step 106, comparing the actual price based on the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively, to obtain a pricing recognition result of the order data, wherein the pricing recognition result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0057] In an embodiment of the present invention, the non-discriminatory predicted price is output by a non-discriminatory pricing model (non-discriminatory pricing converter regression model), and the non-discriminatory predicted price is used as non-discriminatory pricing; the discriminatory predicted price is output based on a trained discriminatory pricing model (discriminatory pricing converter regression model), and the discriminatory predicted price is used as an abnormal price (premium price).

[0058] The actual price of the order data is compared with the non-discriminatory predicted price (predicted normal price) and the discriminatory predicted price (predicted abnormal price) respectively, and then a pricing identification result is obtained to indicate whether the actual price of the order data is non-discriminatory pricing or discriminatory pricing.

[0059] Through the above steps of the embodiment of the present invention, order data in a discriminatory pricing scenario is obtained, wherein the order data includes at least category data, time data and numerical data; the category data, time data and numerical data are preprocessed respectively to obtain an order data set, and the order data set is randomly divided into a non-discriminatory pricing subset and a discriminatory pricing subset; the non-discriminatory pricing subset is input into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder; the discriminatory pricing subset is input into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory coding sequence output by the discriminatory encoder; the non-discriminatory coding sequence and the discriminatory coding sequence are respectively input into a non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and a discriminatory pricing decoder of the discriminatory pricing converter regression model to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; the real price based on the order data is compared with the non-discriminatory predicted price and the discriminatory predicted price respectively to obtain a pricing recognition result of the order data, wherein the pricing recognition result is used to indicate whether the real price is non-discriminatory pricing or discriminatory pricing; whether the real price of the order data is discriminatory pricing is recognized in real time; thereby solving the technical problem that the discriminatory pricing recognition method in the related art has high cost and low applicability.

[0060] refer to Figure 2 , Figure 2 It is a flow chart of preprocessing order data information provided by the present invention, which specifically includes the following steps.

[0061] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, category data, time data and numerical data are preprocessed respectively to obtain two randomly divided order data sets, including:

[0062] Step 201, perform one-hot encoding on the category data to obtain the category features of the order data.

[0063] Step 202, perform sine and cosine encoding on the time data to obtain the time characteristics of the order data.

[0064] Step 203, standardize the numerical data to obtain numerical features of the order data.

[0065] Step 204: construct an order data set based on the category feature, time feature, and value feature.

[0066] In an embodiment of the present invention, the order data information containing discriminatory pricing is preprocessed, and the detailed process is as follows.

[0067] One-hot encoding is used for categorical data because most algorithm models are numerically based when calculating, while categorical data is usually non-numerical (such as "business car", "express train", etc.). One-hot encoding can convert categorical features into numerical features, allowing the model to understand the data.

[0068] In an embodiment of the present invention, one-hot encoding (also known as unique hot encoding) is a method for converting categorical data into numerical data so that machine learning algorithms can process these data. In machine learning and deep learning, most algorithms expect the input data to be numerical because numerical data can be processed more directly through mathematical operations and statistical methods.

[0069] One-hot encoding can assign a unique binary vector to each category. The length of this vector is equal to the total number of categories. Each position of the vector corresponds to a category. Only the position representing the current category is 1, and the rest of the positions are 0. In this way, each category can be converted into a numerical vector of fixed length.

[0070] For time features, the embodiment of the present invention adopts sine-cosine coding. Time features are periodic, such as the time when passengers get on the bus (time of day, day of week, etc.). Sin-cosine coding can capture this periodicity and maintain the continuity and periodicity of time information by mapping time points onto the unit circle. This not only retains the unique information of time features, but also helps the model use this information to predict pricing. Specifically, the sine-cosine transform can be expressed by the following formulas (1) to (2):

[0071] (1)

[0072] (2)

[0073] in, Represents a time value, represents a period of time (e.g., hours of the day, days of the week), represents the sine function, Represents the cosine function.

[0074] For numerical data, embodiments of the present invention use standardized preprocessing, also known as Z-score standardization. It involves rescaling the distribution of features to have a distribution with a mean of 0 and a standard deviation of 1, so that it conforms to the standard normal distribution. Standardization of numerical data helps the model converge faster because it ensures that all features are at the same magnitude, avoiding certain features from excessively affecting the results during model training. This process can be expressed by the following mathematical formula:

[0075] (3)

[0076] in, represents the normalized data points, represents the original data point (i.e., the input value), represents the mean value of the data set, Represents the standard deviation of the data set.

[0077] Through the embodiments of the present invention, different preprocessing methods are adopted for different data features, so that each order data in the obtained order data set has characteristics of multiple dimensions (category characteristics, time characteristics and numerical characteristics), so as to facilitate subsequent pricing prediction through the model.

[0078] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, a non-discriminatory pricing subset is input into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder, including:

[0079] Input the feature vectors of multiple dimensions in the order dataset into the multi-head self-attention layer of the non-discriminatory pricing transformer regression model to obtain the non-discriminatory weighted sum matrix output by the multi-head self-attention layer;

[0080] The non-discriminatory weighted sum matrix is ​​input into the feed-forward neural network layer of the non-discriminatory pricing transformer regression model to obtain the transformed feature vector matrix output by the feed-forward neural network layer, and the transformed feature vector matrix is ​​used as the non-discriminatory coding sequence.

[0081] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, a discriminatory pricing subset is input into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory coding sequence output by the discriminatory encoder, including:

[0082] Input the feature vectors of multiple dimensions in the order data set into the multi-head self-attention layer of the discriminative pricing transformer regression model to obtain the discriminative weighted sum matrix output by the multi-head self-attention layer;

[0083] The discrimination weighted sum matrix is ​​input into the discrimination feedforward neural network layer of the discriminatory pricing transformer regression model to obtain the transformed feature vector matrix output by the discrimination feedforward neural network layer, and the transformed feature vector matrix is ​​used as the discrimination coding sequence.

[0084] In the embodiment of the present invention, both the non-discriminatory encoder and the discriminatory encoder are encoder layers of the Transformer.

[0085] In this embodiment of the present invention, a price prediction model based on Transformer is constructed to learn the pricing model. It is assumed that the order data (including the order data in the discriminatory pricing scenario) has N-dimensional features (for example, the above-mentioned category features, time features, and numerical features). For each order data It can be expressed as ,in, Represents order data The characteristic vector of Indicates dimensional feature space.

[0086] The feature vector Input to the Transformer encoder layer. Each encoder layer mainly consists of two parts: a multi-head self-attention mechanism and a feedforward neural network.

[0087] For the above multi-head self-attention mechanism, its operation can be expressed by the following formulas (4) to (6):

[0088] (4)

[0089] Among them, formula (4) is used to express the final output of the multi-head attention mechanism, which calculates attention on multiple "heads" in parallel (i.e. arrive ), each head processes the input query independently ( ) matrix, key ( ) matrix and value ( ) matrix. It then concatenates the outputs of all heads into one large matrix and passes it through an additional linear transformation (by the weight matrix definition) to get the final output.

[0090] (5)

[0091] Among them, formula (5) is used to determine the output of a single head in the multi-head attention mechanism. For each , the query ( ) matrix, key ( ) matrix and value ( ) matrices are transformed by their respective linear transformations (by the query weight matrix , key weight matrix and the value weight matrix Definition) is mapped into different subspaces. Then, the scaled dot product attention mechanism is applied on this subspace to calculate the head ( ) output.

[0092] (6)

[0093] Among them, formula (6) defines the calculation process of the scaled dot product attention mechanism, which is the attention calculation method used by each head in the multi-head attention mechanism. First, it calculates the query ( ) and key ( ) and divided by (in, The scaling operation helps prevent the dot product from becoming too large when the dimension is high, which can cause the gradient to vanish or explode. Then, apply The function converts the scaled dot product results into attention weights, which represent the attention weights for each value ( )’s input elements. Finally, it uses these attention weights to evaluate the value ( ) are weighted summed to obtain the final attention output.

[0094] For the above feedforward neural network, its operation can be expressed by the following formula (7):

[0095] (7)

[0096] in, represents the output of the feedforward neural network, represents the input value (which can be the output of the multi-head self-attention mechanism), and represents the weight of the network layer, and They represent the bias terms respectively.

[0097] In the embodiment of the present invention, input After the first linear transformation layer, .here, is the weight matrix of the first linear transformation layer, is the corresponding bias vector. The result of this step is a linear combination output. Next, the linear output of the previous step is activated by the ReLU (Rectified Linear Unit) function, that is The ReLU function sets all negative values ​​to 0 and leaves all positive values ​​unchanged. This step introduces nonlinearity, allowing the network to learn complex patterns. Finally, the output of the ReLU activation function passes through a second linear transformation layer, .here, is the weight matrix of the second linear transformation layer, is the corresponding bias vector. The result of this step is the output of the entire feedforward neural network.

[0098] Finally, the output of the Transformer encoder layer will pass through one or more fully connected layers to predict the order price. represents the final predicted order price, then the operation of the output layer can be expressed as the following formula (8):

[0099] (8)

[0100] in, is the last layer output from the Transformer encoder, is a feed-forward neural network at the output layer, designed to map to a real value, the predicted order price.

[0101] For the regression tasks of the non-discriminatory pricing converter regression model and the discriminatory pricing converter regression model, the mean square error (MSE) can be used as the loss function. For details, please refer to the following formula (9):

[0102] (9)

[0103] in, represents the loss function, Indicates The real price of samples (order data), N represents the number of samples, represents the predicted price of the model (either the non-discriminatory pricing transformer regression model or the discriminatory pricing transformer regression model).

[0104] It should be noted that the multi-head self-attention mechanism (layer) and the feedforward neural network (layer) of the non-discriminatory encoder (discriminatory encoder) are surrounded by residual connection and layer normalization to enhance the stability and efficiency of training. Among them, the residual connection is used for gradient propagation and avoiding degradation problems in deep networks, and layer normalization is used to accelerate training and improve model performance.

[0105] refer to Figure 3 , Figure 3 It is a training flow chart of the non-discriminatory / discriminatory pricing converter regression model provided by the present invention, which specifically includes the following steps.

[0106] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, before obtaining order data containing discriminatory pricing scenarios, the method further includes:

[0107] Step 301: Obtain a non-discriminatory order sample data set and a discriminatory order sample data set in a discriminatory pricing scenario.

[0108] Step 302, input the non-discriminatory order sample data set into a preset non-discriminatory pricing converter regression model to obtain the non-discriminatory sample predicted price output by the preset non-discriminatory pricing converter regression model.

[0109] Step 303, input the discriminatory order sample data set into the preset discriminatory pricing converter regression model to obtain the discriminatory sample predicted price output by the preset discriminatory pricing converter regression model.

[0110] Step 304, determining the non-discriminatory error between the predicted price of the non-discriminatory sample and the actual price of the order sample, and the discriminatory error between the predicted price of the discriminatory sample and the actual price of the order sample.

[0111] Step 305, when the non-discriminatory error is smaller than the discriminatory error, the predicted price of the non-discriminatory sample is used as the discriminatory pricing sample, and the predicted price of the discriminatory sample is used as the non-discriminatory pricing sample.

[0112] Step 306, when the discrimination error is smaller than the non-discrimination error, the predicted price of the discrimination sample is used as the discrimination pricing sample, and the predicted price of the non-discrimination sample is used as the non-discrimination pricing sample.

[0113] Step 307: Train a preset non-discriminatory pricing converter regression model based on the non-discriminatory pricing samples to obtain a pre-trained non-discriminatory pricing converter regression model.

[0114] Step 308: Train the preset discriminatory pricing converter regression model based on the discriminatory pricing samples to obtain a pre-trained discriminatory pricing converter regression model.

[0115] refer to Figure 4 , Figure 4It is a structural diagram of the dual-model system provided by the present invention for detecting discriminatory pricing through pattern learning, which includes input (order data under the discriminatory pricing scenario), a non-discriminatory pricing converter regression model and a discriminatory pricing converter regression model, and output (Order Cluster); based on the output result, a model cross iteration (Model CrossIteration) is performed between the non-discriminatory pricing converter regression model and the discriminatory pricing converter regression model.

[0116] The non-discriminatory pricing converter regression model includes: Input features (can be achieved through convolutional layers), Transformer Encoder (non-discriminatory encoder), non-discriminatory pricing decoder (Decoder), The output features of the multilayer perceptron (MLP) and the price query module ( ). The discriminatory pricing converter regression model includes: Input features (can be achieved through convolutional layers), Transformer Encoder (discriminatory encoder), discriminatory pricing decoder (Decoder), The output features of the multilayer perceptron (MLP) and the price query module ( ).

[0117] In the first round of training, the order data is preprocessed and randomly divided into two data sets. One of the data sets is selected and randomly divided into two data sets, which are respectively passed into the non-discriminatory pricing Transformer regression model and the discriminatory pricing Transformer regression model, which are denoted as and If you use represents the final predicted order price, then the price predicted by the normal model is expressed as , the price predicted by the anomaly model is expressed as .

[0118] The actual price data of the order is recorded as ,Compare and , Which of the two is closer? If it is closer to If the order data is closer, the order data is marked as abnormal data. Greater than , then remove the data to ensure Forecast price below Predict prices.

[0119] Train a new non-discriminatory pricing model using data labeled as non-discriminatory pricing (non-discriminatory pricing transformer regression model) , the data marked as discriminatory pricing is used to train a new discriminatory pricing model (discriminatory pricing converter regression model) . Then another new data set is input and ,get and Then take the same process as the previous steps, iterate in a loop, and finally and To learn the corresponding pricing model, you only need to input data into the two models when testing the model. distance , The closer one will be marked as the corresponding type of data to complete the classification. The performance indicator of the model is reflected by F1-score.

[0120] Among them, F1-score is a commonly used evaluation indicator in classification problems, especially on unbalanced datasets, which can provide a more comprehensive model performance evaluation than simple accuracy. F1-score is the harmonic mean of precision and recall.

[0121] According to a discriminatory pricing identification method based on price pattern clustering learning provided by the present invention, before determining the non-discriminatory error between the predicted price of the non-discriminatory sample and the actual price of the order sample, and the discriminatory error between the predicted price of the discriminatory sample and the actual price of the order sample, the method further includes:

[0122] When the predicted price of the non-discriminatory sample is greater than the predicted price of the discriminatory sample, the predicted price of the non-discriminatory sample is eliminated.

[0123] In the embodiment of the present invention, the real price data of the order is recorded as ,Compare and (non-discriminatory sample prediction price), (Prediction price of discriminatory samples) Which of the two is closer? If it is closer to If the order data is closer, the order data is marked as abnormal data. Greater than , then remove the data to ensure Forecast price below Predict prices.

[0124] Through the above embodiments provided by the present invention, the designed unsupervised price learning model based on model iteration successfully adaptively learns different price patterns from complex consumption data, and outperforms other unsupervised learning methods under various abnormal proportions.

[0125] Since the data of price discrimination is a small sample and cannot be separated from the non-price discrimination data by a hyperplane, it is difficult to directly establish a model for feature representation learning and reasoning recognition of price discrimination. Therefore, we propose a price discrimination data recognition framework based on attention and dual model learning to address the limited price discrimination data constraints, and build a price prediction model based on Transformer to achieve real-time big data price discrimination behavior recognition.

[0126] The discriminatory pricing identification device based on price pattern clustering learning provided by the present invention is described below. The discriminatory pricing identification device based on price pattern clustering learning described below and the discriminatory pricing identification method based on price pattern clustering learning described above can be referenced to each other.

[0127] refer to Figure 5 , Figure 5 It is a structural diagram of the discriminatory pricing identification device based on price pattern clustering learning provided by the present invention, which includes: an acquisition module 501, a preprocessing module 502, a non-discriminatory encoder module 503, a discriminatory encoder module 503, an output module 505, and a recognition module 506.

[0128] The acquisition module 501 is used to acquire order data in a discriminatory pricing scenario, wherein the order data at least includes category data, time data, and value data.

[0129] The preprocessing module 502 is used to preprocess the category data, time data and numerical data respectively to obtain an order data set, and randomly divide the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset.

[0130] The non-discriminatory encoder module 503 is used to input the non-discriminatory pricing subset into the non-discriminatory encoder of the non-discriminatory pricing converter regression model to obtain a non-discriminatory encoding sequence output by the non-discriminatory encoder.

[0131] The discriminatory encoder module 504 is used to input the discriminatory pricing subset into the discriminatory encoder of the discriminatory pricing converter regression model to obtain the discriminatory coding sequence output by the discriminatory encoder.

[0132] The output module 505 is used to input the non-discriminatory coding sequence and the discriminatory coding sequence into the non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and the discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain the non-discriminatory predicted price output by the non-discriminatory pricing decoder and the discriminatory predicted price output by the discriminatory pricing decoder.

[0133] The identification module 506 is used to compare the actual price of the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively, to obtain a pricing identification result of the order data, wherein the pricing identification result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0134] Specifically, the above-mentioned discriminatory pricing identification device based on price pattern clustering learning provided by the present invention can implement all the method steps implemented by the above-mentioned discriminatory pricing identification method embodiment based on price pattern clustering learning, and can achieve the same technical effect. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.

[0135] refer to Figure 6 , Figure 6 is a schematic diagram of the physical structure of the electronic device provided by the present invention, such as Figure 6 As shown, the electronic device may include: a processor (processor) 610 , a communication interface (Communications Interface) 620 , a memory (memory) 630 and a communication bus 640 , wherein the processor 610 , the communication interface 620 , and the memory 630 communicate with each other through the communication bus 640 . The processor 610 can call the logic instructions in the memory 630 to execute a discriminatory pricing identification method based on price pattern clustering learning, the method comprising: obtaining order data containing a discriminatory pricing scenario, wherein the order data at least includes category data, time data and numerical data; preprocessing the category data, time data and numerical data respectively to obtain an order data set, and randomly dividing the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; inputting the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory coding sequence output by the non-discriminatory encoder; inputting the discriminatory pricing subset into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory coding sequence output by the discriminatory encoder; inputting the non-discriminatory coding sequence and the discriminatory coding sequence into a non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and a discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; comparing the actual price based on the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively, to obtain a pricing identification result of the order data, wherein the pricing identification result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0136] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0137] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the discriminatory pricing identification method based on price pattern clustering learning provided by the above methods, and the method includes: obtaining order data containing discriminatory pricing scenarios, wherein the order data at least includes category data, time data and numerical data; preprocessing the category data, time data and numerical data respectively to obtain an order data set, and randomly dividing the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; inputting the non-discriminatory pricing subset into the non-discriminatory pricing transformer regression model; A discriminatory encoder is used to obtain a non-discriminatory coding sequence output by a non-discriminatory encoder; the discriminatory pricing subset is input into the discriminatory encoder of the discriminatory pricing converter regression model to obtain a discriminatory coding sequence output by the discriminatory encoder; the non-discriminatory coding sequence and the discriminatory coding sequence are respectively input into the non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and the discriminatory pricing decoder of the discriminatory pricing converter regression model to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; the actual price based on the order data is compared with the non-discriminatory predicted price and the discriminatory predicted price respectively to obtain a pricing recognition result of the order data, wherein the pricing recognition result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0138] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the discriminatory pricing identification method based on price pattern clustering learning provided by the above methods, the method comprising: obtaining order data containing discriminatory pricing scenarios, wherein the order data at least includes category data, time data and numerical data; preprocessing the category data, time data and numerical data respectively to obtain an order data set, and randomly dividing the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; inputting the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory encoder The discriminatory pricing subset is input into the discriminatory encoder of the discriminatory pricing converter regression model to obtain the discriminatory coding sequence output by the discriminatory encoder; the non-discriminatory coding sequence and the discriminatory coding sequence are respectively input into the non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and the discriminatory pricing decoder of the discriminatory pricing converter regression model to obtain the non-discriminatory predicted price output by the non-discriminatory pricing decoder and the discriminatory predicted price output by the discriminatory pricing decoder; the actual price based on the order data is compared with the non-discriminatory predicted price and the discriminatory predicted price to obtain the pricing recognition result of the order data, wherein the pricing recognition result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing.

[0139] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0140] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0141] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A discriminatory pricing identification method based on price pattern clustering learning, characterized in that: include: Acquire order data in a discriminatory pricing scenario, wherein the order data at least includes category data, time data, and value data; Preprocessing the category data, the time data, and the numerical data respectively to obtain an order data set, and randomly dividing the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; Inputting the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing transformer regression model to obtain a non-discriminatory encoding sequence output by the non-discriminatory encoder; Inputting the discriminatory pricing subset into a discriminatory encoder of a discriminatory pricing transformer regression model to obtain a discriminatory encoding sequence output by the discriminatory encoder; Input the non-discriminatory coding sequence and the discriminatory coding sequence into the non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and the discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain the non-discriminatory predicted price output by the non-discriminatory pricing decoder and the discriminatory predicted price output by the discriminatory pricing decoder; Comparing the actual price of the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively, to obtain a pricing identification result of the order data, wherein the pricing identification result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing; The non-discriminatory pricing transformer regression model includes: a first input feature, a first Transformer encoder, a first Transformer decoder, a first output feature, a first multi-layer perceptron, and a first price query module; The discriminatory pricing transformer regression model includes: a second input feature, a second Transformer encoder, a second Transformer decoder, a second output feature, a second multilayer perceptron and a second price query module.

2. The discriminatory pricing identification method based on price pattern clustering learning according to claim 1 is characterized in that: The preprocessing of the category data, the time data and the numerical data to obtain an order data set includes: Performing one-hot encoding on the category data to obtain category features of the order data; Performing sine and cosine encoding on the time data to obtain the time characteristics of the order data; Performing standardization processing on the numerical data to obtain numerical features of the order data; An order data set is constructed based on the category feature, the time feature, and the numerical feature.

3. The discriminatory pricing identification method based on price pattern clustering learning according to claim 1, characterized in that: The step of inputting the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing converter regression model to obtain a non-discriminatory encoding sequence output by the non-discriminatory encoder comprises: Input the feature vectors of multiple dimensions in the order data set into the multi-head self-attention layer of the non-discriminatory pricing converter regression model to obtain a non-discriminatory weighted sum matrix output by the multi-head self-attention layer; The non-discriminatory weighted sum matrix is ​​input into the feed-forward neural network layer of the non-discriminatory pricing converter regression model to obtain the transformed feature vector matrix output by the feed-forward neural network layer, and the transformed feature vector matrix is ​​used as a non-discriminatory coding sequence.

4. The discriminatory pricing identification method based on price pattern clustering learning according to claim 1, characterized in that: The step of inputting the discriminatory pricing subset into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory encoding sequence output by the discriminatory encoder comprises: Input the feature vectors of multiple dimensions in the order data set into the multi-head self-attention layer of the discriminatory pricing transformer regression model to obtain the discriminatory weighted sum matrix output by the multi-head self-attention layer; The discriminatory weighted sum matrix is ​​input into the discriminatory feedforward neural network layer of the discriminatory pricing converter regression model to obtain the transformed eigenvector matrix output by the discriminatory feedforward neural network layer, and the transformed eigenvector matrix is ​​used as a discriminatory coding sequence.

5. The discriminatory pricing identification method based on price pattern clustering learning according to claim 1, characterized in that: Before obtaining order data in a discriminatory pricing scenario, the method further includes: Obtain a non-discriminatory order sample data set and a discriminatory order sample data set under a discriminatory pricing scenario; Inputting the non-discriminatory order sample data set into a preset non-discriminatory pricing converter regression model to obtain a non-discriminatory sample predicted price output by the preset non-discriminatory pricing converter regression model; Inputting the discriminatory order sample data set into a preset discriminatory pricing converter regression model to obtain the discriminatory sample predicted price output by the preset discriminatory pricing converter regression model; Determine the non-discriminatory error between the predicted price of the non-discriminatory sample and the actual price of the order sample, and the discriminatory error between the predicted price of the discriminatory sample and the actual price of the order sample; When the non-discriminatory error is smaller than the discriminatory error, taking the predicted price of the non-discriminatory sample as the discriminatory pricing sample, and taking the predicted price of the discriminatory sample as the non-discriminatory pricing sample; When the discrimination error is smaller than the non-discrimination error, the predicted price of the discrimination sample is used as the discrimination pricing sample, and the predicted price of the non-discrimination sample is used as the non-discrimination pricing sample; Training the preset non-discriminatory pricing converter regression model based on the non-discriminatory pricing samples to obtain a pre-trained non-discriminatory pricing converter regression model; The preset discriminatory pricing converter regression model is trained based on the discriminatory pricing samples to obtain a pre-trained discriminatory pricing converter regression model.

6. The discriminatory pricing identification method based on price pattern clustering learning according to claim 5, characterized in that: Before determining the non-discriminatory error between the non-discriminatory sample predicted price and the actual price of the order sample, and the discriminatory error between the discriminatory sample predicted price and the actual price of the order sample, the method further includes: When the predicted price of the non-discriminatory sample is greater than the predicted price of the discriminatory sample, the predicted price of the non-discriminatory sample is eliminated.

7. A discriminatory pricing identification device based on price pattern clustering learning, characterized in that: include: An acquisition module, used to acquire order data in a discriminatory pricing scenario, wherein the order data at least includes category data, time data, and value data; A preprocessing module, configured to preprocess the category data, the time data, and the numerical data respectively to obtain an order data set, and randomly divide the order data set into a non-discriminatory pricing subset and a discriminatory pricing subset; A non-discriminatory encoder module, configured to input the non-discriminatory pricing subset into a non-discriminatory encoder of a non-discriminatory pricing transformer regression model to obtain a non-discriminatory encoding sequence output by the non-discriminatory encoder; A discriminatory encoder module, used for inputting the discriminatory pricing subset into a discriminatory encoder of a discriminatory pricing converter regression model to obtain a discriminatory encoding sequence output by the discriminatory encoder; An output module, used to input the non-discriminatory coding sequence and the discriminatory coding sequence into a non-discriminatory pricing decoder of the non-discriminatory pricing converter regression model and a discriminatory pricing decoder of the discriminatory pricing converter regression model, respectively, to obtain a non-discriminatory predicted price output by the non-discriminatory pricing decoder and a discriminatory predicted price output by the discriminatory pricing decoder; an identification module, configured to compare the actual price of the order data with the non-discriminatory predicted price and the discriminatory predicted price respectively, to obtain a pricing identification result of the order data, wherein the pricing identification result is used to indicate whether the actual price is non-discriminatory pricing or discriminatory pricing; The non-discriminatory pricing transformer regression model includes: a first input feature, a first Transformer encoder, a first Transformer decoder, a first output feature, a first multi-layer perceptron, and a first price query module; The discriminatory pricing transformer regression model includes: a second input feature, a second Transformer encoder, a second Transformer decoder, a second output feature, a second multilayer perceptron and a second price query module.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the discriminatory pricing identification method based on price pattern clustering learning as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the discriminatory pricing identification method based on price pattern clustering learning as described in any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the discriminatory pricing identification method based on price pattern clustering learning as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • High-speed railway dynamic pricing method based on passenger travel behavior analysis

    CN113763044A

  • Shop lease pricing method based on space-time representation learning model

    CN113869990A