A transaction data processing method, device, equipment and storage medium
Patent Information
- Application Number
- CN202211461946.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2042-11-21
AI Technical Summary
[0003]然而,对于复杂模型来说,使用门槛较高,前期模型训练的工作量较大,部署时间长
[0061]可选地,所述处理模块具体用于:
Smart Images

Figure CN115713416B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data analysis technology, and in particular to a transaction data processing method, apparatus, device, and storage medium. Background Technology
[0002] Data analysis and mining techniques, at their core, involve quantifying the needs of business scenarios based on massive amounts of data. In this quantification process, scoring models are often used to rate the objects being evaluated. For example, personalized recommendation systems use scoring models to rate applications or shops and then recommend applications or shops based on these ratings. Mainstream scoring models include complex models such as XGBoost and GBDT.
[0003] However, for complex models, the barrier to entry is high, the initial training workload is large, and the deployment time is long. Summary of the Invention
[0004] This application provides a transaction data processing method, apparatus, device, and storage medium to reduce the workload of early model training, lower the threshold for model use, and shorten model deployment time.
[0005] On one hand, embodiments of this application provide a transaction data processing method, including:
[0006] Obtain the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period;
[0007] For each feature dimension, a feature score value is determined based on the feature scoring model corresponding to the feature dimension and the transaction characteristics of the feature dimension. The feature scoring model is obtained through data fitting.
[0008] Based on the feature score values of the at least one feature dimension, a preliminary evaluation score is obtained for the object to be evaluated;
[0009] Based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated, the comprehensive evaluation score of the object to be evaluated in the current period is obtained.
[0010] In this embodiment, a feature scoring model corresponding to each feature dimension is obtained through data fitting. Compared with complex models, this reduces the workload of early model training, lowers the threshold for model use, and shortens the model deployment time. Secondly, by employing a feature scoring model, feature score values for each feature dimension are determined based on the transaction characteristics of that dimension. Then, horizontally, based on the feature score values of at least one feature dimension, a preliminary evaluation score for the object to be evaluated is obtained. Finally, vertically, based on the preliminary evaluation score and the historical evaluation scores of the object to be evaluated, a comprehensive evaluation score for the object to be evaluated in the current period is obtained, thereby improving the accuracy of the scoring.
[0011] Optionally, the feature scoring model is obtained through data fitting, including:
[0012] For each feature dimension, obtain the original transaction data of multiple sample objects in that feature dimension;
[0013] Abnormal transaction data is removed from the original transaction data to obtain candidate transaction data;
[0014] The candidate transaction data is binned to obtain sample feature data for the feature dimension;
[0015] Data fitting is performed on the sample feature data based on the aforementioned feature dimension to obtain the feature scoring model corresponding to the aforementioned feature dimension.
[0016] In this embodiment, outlier removal is performed on the acquired raw transaction data to obtain candidate transaction data, resulting in more accurate data for model training and thus improving the training effect. Secondly, binning the candidate transaction data shortens the data processing cycle, thereby improving the efficiency of model training.
[0017] Optionally, the step of removing abnormal transaction data from the original transaction data to obtain candidate transaction data includes:
[0018] The original transaction data is divided, and based on the division results, the first quantile and the last quantile are obtained from the original transaction data;
[0019] Based on the first quantile and the last quantile, the filtering threshold of the original transaction data is determined;
[0020] Abnormal transaction data exceeding the filtering threshold in the original transaction data is removed to obtain candidate transaction data.
[0021] In this embodiment, the original transaction data is divided into several parts by drawing on the concept of quantiles. Then, a screening threshold is calculated based on the division results. Abnormal transaction data is identified by the screening threshold, thereby providing high-quality data for model training.
[0022] Optionally, the step of binning the candidate transaction data to obtain sample feature data for the feature dimension includes:
[0023] The candidate transaction data is divided into multiple interval segments of sub-transaction data;
[0024] For each interval, the center value of the interval is used as the transaction representation value of the sub-transaction data of the interval; and, based on the sub-transaction data within the interval and the sub-transaction data within the historical intervals preceding the interval, the cumulative sample size corresponding to the interval is calculated.
[0025] The transaction representation values of the sub-transaction data corresponding to each of the multiple interval segments, and the cumulative sample counts corresponding to each of the multiple interval segments, are mapped to a preset numerical range to obtain the sample feature data of the feature dimension.
[0026] In this embodiment, the computational load is reduced by using the center value of each interval to represent that interval. By mapping the transaction representation value and the corresponding cumulative sample size to a preset interval, i.e., by mapping the candidate transaction data to a frame through the cumulative distribution function, the efficiency of subsequent data fitting is improved.
[0027] Optionally, the step of performing data fitting based on the sample feature data of the feature dimension to obtain the feature scoring model corresponding to the feature dimension includes:
[0028] By fitting the mapped multiple transaction representation values and the mapped multiple cumulative sample counts, a feature scoring model corresponding to the feature dimension is obtained.
[0029] In this embodiment, after mapping candidate transaction data to a framework using a cumulative distribution function, the multiple transaction representation values and the number of multiple cumulative samples after mapping are fitted to obtain the feature scoring model corresponding to the feature dimension. This makes the model have strong generalization ability, simple calculation, and high development and deployment timeliness, which can meet most basic feature quantification work and improve efficiency.
[0030] Optionally, obtaining the preliminary evaluation score of the object to be evaluated based on the feature score values of the at least one feature dimension includes:
[0031] For a given feature dimension, the feature score of that feature dimension is used as the initial evaluation score of the object to be evaluated.
[0032] For multiple feature dimensions, the feature score values of the multiple feature dimensions are weighted and summed to obtain the preliminary evaluation score of the object to be evaluated.
[0033] In this embodiment of the application, different feature dimensions have different impacts on the transaction level. By performing a horizontal weighted summation of the feature scores of multiple feature dimensions, a preliminary evaluation score can be obtained, which can effectively improve the accuracy of the score.
[0034] Optionally, obtaining the comprehensive evaluation score of the object to be evaluated in the current period based on the preliminary evaluation score and the historical evaluation scores of the object to be evaluated includes:
[0035] Obtain the historical evaluation scores of the object to be evaluated over at least one past period;
[0036] The preliminary evaluation score of the object to be evaluated and the historical evaluation scores within at least one past period are weighted and summed to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0037] In this embodiment, the comprehensive evaluation score of the object to be evaluated is obtained by longitudinally weighting and summing the evaluation scores of the current period and the historical period. This avoids the problem of inaccurate comprehensive evaluation scores due to the special nature of time and improves the accuracy of the scoring.
[0038] On one hand, embodiments of this application provide a transaction data processing apparatus, the apparatus comprising:
[0039] The acquisition module is used to acquire the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period;
[0040] The determination module is used to determine the feature score value of each feature dimension based on the feature scoring model corresponding to the feature dimension and the transaction characteristics of the feature dimension. The feature scoring model is obtained through data fitting.
[0041] The processing module is also used to obtain a preliminary evaluation score of the object to be evaluated based on the feature score value of the at least one feature dimension;
[0042] The processing module is also used to obtain the comprehensive evaluation score of the object to be evaluated in the current period based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated.
[0043] Optionally, the processing module is further configured to:
[0044] For each feature dimension, obtain the original transaction data of multiple sample objects in that feature dimension;
[0045] Abnormal transaction data is removed from the original transaction data to obtain candidate transaction data;
[0046] The candidate transaction data is binned to obtain sample feature data for the feature dimension;
[0047] Data fitting is performed on the sample feature data based on the aforementioned feature dimension to obtain the feature scoring model corresponding to the aforementioned feature dimension.
[0048] Optionally, the processing module is specifically used for:
[0049] The original transaction data is divided, and based on the division results, the first quantile and the last quantile are obtained from the original transaction data;
[0050] Based on the first quantile and the last quantile, the filtering threshold of the original transaction data is determined;
[0051] Abnormal transaction data exceeding the filtering threshold in the original transaction data is removed to obtain candidate transaction data.
[0052] Optionally, the processing module is specifically used for:
[0053] The candidate transaction data is divided into multiple interval segments of sub-transaction data;
[0054] For each interval, the center value of the interval is used as the transaction representation value of the sub-transaction data of the interval; and, based on the sub-transaction data within the interval and the sub-transaction data within the historical intervals preceding the interval, the cumulative sample size corresponding to the interval is calculated.
[0055] The transaction representation values of the sub-transaction data corresponding to each of the multiple interval segments, and the cumulative sample counts corresponding to each of the multiple interval segments, are mapped to a preset numerical range to obtain the sample feature data of the feature dimension.
[0056] Optionally, the processing module is specifically used for:
[0057] By fitting the mapped multiple transaction representation values and the mapped multiple cumulative sample counts, a feature scoring model corresponding to the feature dimension is obtained.
[0058] Optionally, the processing module is specifically used for:
[0059] For a given feature dimension, the feature score of that feature dimension is used as the initial evaluation score of the object to be evaluated.
[0060] For multiple feature dimensions, the feature score values of the multiple feature dimensions are weighted and summed to obtain the preliminary evaluation score of the object to be evaluated.
[0061] Optionally, the processing module is specifically used for:
[0062] Obtain the historical evaluation scores of the object to be evaluated over at least one past period;
[0063] The preliminary evaluation score of the object to be evaluated and the historical evaluation scores within at least one past period are weighted and summed to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0064] In this embodiment, a feature scoring model corresponding to each feature dimension is obtained through data fitting. Compared with complex models, this reduces the workload of early model training, lowers the threshold for model use, and shortens the model deployment time. Secondly, by employing a feature scoring model, feature score values for each feature dimension are determined based on the transaction characteristics of that dimension. Then, horizontally, based on the feature score values of at least one feature dimension, a preliminary evaluation score for the object to be evaluated is obtained. Finally, vertically, based on the preliminary evaluation score and the historical evaluation scores of the object to be evaluated, a comprehensive evaluation score for the object to be evaluated in the current period is obtained, thereby improving the accuracy of the scoring. Attached Figure Description
[0065] Figure 1 A system architecture diagram provided for an embodiment of this application;
[0066] Figure 2 An illustration of a transaction data processing method provided in this application embodiment. Figure 1 ;
[0067] Figure 3 A schematic diagram illustrating a method for obtaining a scoring model provided in an embodiment of this application;
[0068] Figure 4 A schematic diagram illustrating a method for obtaining candidate transaction data provided in an embodiment of this application;
[0069] Figure 5 A schematic diagram illustrating a bin-splitting method provided in an embodiment of this application;
[0070] Figure 6 An illustration of a transaction data processing method provided in this application embodiment. Figure 2 ;
[0071] Figure 7 This is a schematic diagram of the structure of a transaction data processing device provided in an embodiment of this application;
[0072] Figure 8This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0073] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0074] refer to Figure 1 This is a system architecture diagram applicable to the embodiments of this application. The system includes at least a terminal device 101 and a server 102.
[0075] Among them, terminal device 101 can be a mini-program application, web application, or client application, etc. Server 102 is the backend server for business applications. Server 102 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0076] Terminal device 101 collects transaction characteristics of the object to be evaluated in at least one feature dimension within the current period and sends these characteristics to server 102. Server 102 scores the object to be evaluated based on the transaction characteristics in at least one feature dimension to obtain a comprehensive evaluation score for the object to be evaluated in the current period.
[0077] based on Figure 1 The system architecture diagram in this application illustrates a transaction data processing method. Figure 2 As shown, the process of this method is executed by a computer device, which can be... Figure 1 The terminal device 101 and / or server 102 shown include the following steps:
[0078] Step 201: Obtain the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period.
[0079] Specifically, the feature dimensions can be: transaction amount, number of transaction days, transaction frequency, etc., and a period can be a week, a month, or a year.
[0080] For example, if Zhang San made 35 transactions over 5 days in a month, with a total spending of 100,000 yuan, then the transaction characteristics of Zhang San in the three feature dimensions are: transaction amount (100,000 yuan), transaction frequency (35 transactions), and number of transaction days.
[0081] Step 202: For each feature dimension, based on the feature scoring model corresponding to the feature dimension and the transaction characteristics of the feature dimension, determine the feature score value of the feature dimension. The feature scoring model is obtained through data fitting.
[0082] Specifically, each feature dimension has its corresponding feature scoring model, such as a corresponding transaction amount scoring model. The transaction features of each feature dimension are input into the corresponding feature scoring model to obtain the feature score value for each feature dimension.
[0083] For example, inputting the transaction amount (100,000 yuan) into the transaction amount scoring model will yield the feature score value of Zhang San in the feature dimension of transaction amount within one month.
[0084] Step 203: Based on the feature score of at least one feature dimension, obtain the preliminary evaluation score of the object to be evaluated.
[0085] In some embodiments, for one feature dimension, the feature score of that feature dimension is used as the initial evaluation score of the object to be evaluated. For multiple feature dimensions, the feature scores of multiple feature dimensions are weighted and summed to obtain the initial evaluation score of the object to be evaluated, as shown in formula (1):
[0086]
[0087] Among them, w i S represents the weight of feature dimension i. i S represents the feature score value of feature dimension i. L This is the initial assessment score for the object to be evaluated.
[0088] For example, if the only feature dimension in evaluating Zhang San's consumption level is the amount of consumption, then the feature score corresponding to Zhang San's transaction amount will be used as Zhang San's initial evaluation score.
[0089] If the evaluation of Zhang San's consumption level includes three characteristic dimensions: transaction amount, number of transaction days, and transaction frequency, then the weighted sum of the characteristic scores corresponding to each of the transaction amount, number of transaction days, and transaction frequency will yield Zhang San's preliminary evaluation score.
[0090] In this embodiment of the application, different feature dimensions have different impacts on the transaction level. By performing a horizontal weighted summation of the feature scores of multiple feature dimensions, a preliminary evaluation score can be obtained, which can effectively improve the accuracy of the score.
[0091] Step 204: Based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated, obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0092] In this embodiment, a feature scoring model corresponding to each feature dimension is obtained through data fitting. Compared with complex models, this reduces the workload of early model training, lowers the threshold for model use, and shortens the model deployment time. Secondly, by employing a feature scoring model, feature score values for each feature dimension are determined based on the transaction characteristics of that dimension. Then, horizontally, based on the feature score values of at least one feature dimension, a preliminary evaluation score for the object to be evaluated is obtained. Finally, vertically, based on the preliminary evaluation score and the historical evaluation scores of the object to be evaluated, a comprehensive evaluation score for the object to be evaluated in the current period is obtained, thereby improving the accuracy of the scoring.
[0093] In some embodiments, the historical evaluation scores of the object to be evaluated over at least one past period are obtained. The preliminary evaluation score of the object to be evaluated and the historical evaluation scores over at least one past period are weighted and summed to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0094] Specifically, the historical evaluation score of the object to be evaluated refers to the comprehensive evaluation score of the object within a historical period. The comprehensive evaluation score of the object in the current period is obtained by weighted summing of the preliminary evaluation score and the historical evaluation scores from at least one past period, as shown in formula (2):
[0095]
[0096] Among them, S his The comprehensive evaluation score of the object to be evaluated in the current period represents the historical evaluation score from the j-th period to date, α represents the reference value, and n represents the maximum number of periods to be traced back.
[0097] For example, if the evaluation of Zhang San's consumption level involves three feature dimensions: transaction amount, number of transaction days, and transaction frequency, and the feature scores corresponding to these three feature dimensions are 8, 6, and 9 respectively, and the weights corresponding to these three feature dimensions are 0.6, 0.3, and 0.1 respectively, then the preliminary evaluation score of Zhang San can be calculated using the above formula (1) as 8*0.6+6*0.3+9*0.1=7.5.
[0098] If Zhang San's historical evaluation score in the previous month was 6.3 and α = 0.6, then according to the above formula (2), Zhang San's comprehensive evaluation score in this month can be obtained as 6.012.
[0099] In this embodiment, the comprehensive evaluation score of the object to be evaluated is obtained by longitudinally weighting and summing the evaluation scores of the current period and the historical period. This avoids the problem of inaccurate comprehensive evaluation scores due to the special nature of time and improves the accuracy of the scoring.
[0100] Optionally, embodiments of this application employ at least the following methods to obtain a feature scoring model through data fitting, such as... Figure 3 As shown, it includes the following steps:
[0101] Step 301: For each feature dimension, obtain the original transaction data of multiple sample objects in the feature dimension.
[0102] For the feature dimension of transaction amount, the obtained raw transaction data is raw transaction amount data; for the feature dimension of transaction days, the obtained raw transaction data is raw transaction days data; and for the feature dimension of transaction frequency, the obtained raw transaction data is raw transaction frequency data.
[0103] Step 302: Remove abnormal transaction data from the original transaction data to obtain candidate transaction data.
[0104] Specifically, since the original transaction data may contain dirty data, outliers, etc., it is necessary to filter the original transaction data to obtain the filtered candidate transaction data.
[0105] For example, after obtaining 100 original transaction data, there are 10 outliers. Removing these 10 outliers will yield 90 candidate transaction data.
[0106] Step 303: Perform binning on the candidate transaction data to obtain sample feature data of the feature dimension.
[0107] Specifically, if the range of values corresponding to the candidate transaction data is large, binning is used to divide the candidate transaction data into several equal parts, and then each part of the data is randomly sampled. Of course, in this embodiment, the candidate transaction data can also be directly used for subsequent data fitting, and this application does not specifically limit this.
[0108] Step 304: Perform data fitting based on the sample feature data of the feature dimension to obtain the feature scoring model corresponding to the feature dimension.
[0109] Specifically, after removing and binning the original training data, the data of that feature dimension is fitted based on the sample feature data of different feature dimensions, thereby obtaining the feature scoring model of that feature dimension.
[0110] For example, after removing and binning the original data for the transaction amount feature dimension, the data is fitted to the consumption amount feature dimension to obtain a feature scoring model for the transaction amount.
[0111] In this embodiment, outlier removal is performed on the acquired raw transaction data to obtain candidate transaction data, resulting in more accurate data for model training and thus improving the training effect. Secondly, binning the candidate transaction data shortens the data processing cycle, thereby improving the efficiency of model training.
[0112] Optionally, in the embodiments of this application, the method for removing the original data is as follows: Figure 4 As shown, it includes the following steps:
[0113] Step 401: Divide the original transaction data and, based on the division results, obtain the first quantile and the last quantile from the original transaction data.
[0114] Specifically, the transaction values in the original transaction data are sorted in descending or ascending order, and then the original transaction data is divided into multiple parts according to the idea of multiple equal parts, including four parts, ten parts, etc.
[0115] Step 402: Determine the screening threshold for the original transaction data based on the first quantile and the last quantile.
[0116] For example, after sorting the transaction values from smallest to largest, the original transaction data is divided into ten equal parts, and then the first quantile P is obtained from the original transaction data. 0.1 and the last quantile P 0.9 Based on the first and last quantiles, the screening threshold for the original transaction data is determined as shown in the following formula (3):
[0117] V max =P 0.9 +α(P 0.9 -P 0.1 )…… (3)
[0118] Wherein, the reference value for parameter α is 0.5, P 0.1 Let P be the value of the first quantile. 0.9 V is the value of the last quantile. max This is the threshold for filtering the raw transaction data.
[0119] Step 403: Remove abnormal transaction data from the original transaction data that exceeds the screening threshold to obtain candidate transaction data.
[0120] Specifically, when the value in the original data exceeds V max If the value is out of the question, it is removed as an outlier, and the original transaction data that is retained becomes the candidate transaction data.
[0121] In this embodiment, the original transaction data is divided into several parts by drawing on the concept of quantiles. Then, a screening threshold is calculated based on the division results. Abnormal transaction data is identified by the screening threshold, thereby providing high-quality data for model training.
[0122] Optionally, in the embodiments of this application, candidate transaction data is binned using at least the following methods, such as... Figure 5 As shown, the specific steps include:
[0123] Step 501: Divide the candidate transaction data into multiple interval segments of sub-transaction data.
[0124] Specifically, when the numerical range of the candidate transaction data is large, in order to ensure the speed of model training, binning is used to divide the candidate transaction data into several equal parts, and then each part of the data is randomly sampled to map continuous values to the corresponding intervals. This can make the cumulative distribution function distribution smoother and improve the subsequent fitting efficiency.
[0125] Step 502: For each interval, take the center value of the interval as the transaction representation value of the sub-transaction data of the interval; and, based on the sub-transaction data within the interval and the sub-transaction data within the historical intervals preceding the interval, count the cumulative number of samples corresponding to the interval.
[0126] Taking transaction amount as an example, if the transaction amount in the candidate transaction data ranges from 0 to 1 million, then the candidate transaction data is divided into 10 sub-transaction data intervals. Interval 1 corresponds to 0-100,000, interval 2 to 0-200,000, ..., and interval 10 to 0-1 million. Referring to Table 1, the center value of interval 1, 50,000, is used as the transaction representation value for interval 1, ..., and the center value of interval 10, 950,000, is used as the transaction representation value for interval 10.
[0127] If there are 10 users whose transaction amount is between 0 and 100,000, then the sample size for interval 1 is 10. If there are 5 users whose transaction amount is between 100,000 and 200,000, then the sample size for interval 2 is 5. The cumulative sample size for interval 2 is the sum of the sample sizes for interval 1 and interval 2, which is 15. And so on, we can obtain the sample size and cumulative sample size for each interval as shown in Table 1 below.
[0128] Table 1
[0129]
[0130] Step 503: Map the transaction representation values of the sub-transaction data corresponding to each of the multiple intervals, as well as the cumulative sample counts corresponding to each of the multiple intervals, to a preset numerical range to obtain sample feature data of the feature dimension.
[0131] Specifically, the transaction representation values of the sub-transaction data corresponding to each of the multiple interval segments are mapped to the preset numerical interval 0-1, as shown in formula (3):
[0132]
[0133] Among them, X k Let X be the center value corresponding to the k-th interval segment. med It is the center value of the last interval segment.
[0134] The cumulative sample counts corresponding to each of the multiple intervals are normalized, as shown in formula (3):
[0135]
[0136] Among them, Y l Let m be the cumulative number of samples corresponding to the l-th interval segment, and m be the number of interval segments.
[0137] In practical applications, this embodiment uses the histogram function histogram_numeric built into the Structured Query Language (SQL) to obtain the corresponding binning results: histogram_numeric(col,b), where col is the corresponding feature dimension and b is the expected number of intervals after processing, which can be 1000.
[0138] For example, according to the above formula (3), the transaction amounts in Table 1 are mapped to the interval [0,1], as shown in Table 2:
[0139] Table 2
[0140]
[0141] Based on the above formula (4), the cumulative sample count in Table 1 is mapped to the interval [0,1], as shown in Table 3:
[0142] Table 3
[0143]
[0144] After the mapping process described above is completed, the mapped transaction representation values and the mapped cumulative sample counts are fitted to obtain the feature scoring model corresponding to the feature dimension.
[0145] Specifically, a fitting is performed based on the Cumulative Distribution Function (CDF) to fit the mapped transaction representation value and the cumulative sample size. Transaction values exceeding the screening threshold Vmax are directly assigned the maximum value of 1, while those less than the screening threshold Vmax are... max The latter is the common CDF distribution.
[0146] Specifically, the CDF distribution can be fitted using the power function shown in formula (5):
[0147] f = ab * e -cx+d +e*x…… (5)
[0148] Where f represents the cumulative number of samples after mapping, x represents the transaction representation value after mapping, and a, b, c, d, and e represent the parameters to be fitted. It should be noted that this application can also use a cubic function or a linear function to fit the CDF distribution. The Python function `curve_fit` is used, which by default employs the nonlinear least squares method to quickly obtain the value of `ae`.
[0149] The final feature scoring model is shown in formula (6):
[0150]
[0151] Where M is the rating scaling factor, which is generally a multiple of 10. For example, if M = 100, the final rating range is [0, 100]. Alternatively, if only simple grading is required, the rating values can be rounded down to the nearest integer, and only the integer grades can be retained. S1 is the feature evaluation score.
[0152] In this embodiment, the computational load is reduced by using the center value of each interval to represent that interval. By mapping the transaction representation value and the corresponding cumulative sample size to a preset interval, i.e., by mapping the candidate transaction data to a frame through the cumulative distribution function, the efficiency of subsequent data fitting is improved.
[0153] To better explain the embodiments of this application, a flowchart of a transaction data processing method provided by the embodiments of this application is described below with reference to a specific implementation scenario. The flow of this method can be... Figure 1 The terminal device 101 and server 102 shown here work together to perform the following steps, such as... Figure 6 As shown:
[0154] The process begins with a terminal device acquiring raw transaction data and sending it to a server. The server removes outliers to obtain candidate transaction data. When the range of values for the candidate transaction data is large, binning is used to divide the data into multiple intervals. The center value of each interval is selected as the transaction representation value, which is then mapped to the [0,1] interval. Simultaneously, the cumulative sample count corresponding to each transaction representation value is also mapped to the [0,1] interval to obtain sample feature data. A cumulative distribution function is then fitted to the sample feature data to obtain a single-dimensional feature scoring model. Multiple single-dimensional feature scoring models can be obtained using the same method.
[0155] In the actual evaluation process, the transaction characteristics of the object to be evaluated across multiple feature dimensions are obtained. Then, the transaction characteristics of each feature dimension are input into the corresponding single-dimensional feature scoring model to obtain the feature score value for that feature dimension. The feature scores from multiple feature dimensions are then horizontally combined (weighted summation) to obtain the preliminary evaluation score of the object to be evaluated. Finally, the preliminary evaluation score of the object to be evaluated is vertically combined (weighted summation) with historical evaluation scores from at least one past period to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0156] Based on the same technical concept, this application provides a transaction data processing device 700, applied to the cloud side, such as... Figure 7 As shown, the device includes:
[0157] The acquisition module 701 is used to acquire the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period;
[0158] The determining module 702 is used to determine the feature score value of each feature dimension based on the feature scoring model corresponding to the feature dimension and the transaction features of the feature dimension.
[0159] The processing module 703 is further configured to obtain a preliminary evaluation score of the object to be evaluated based on the feature score value of the at least one feature dimension;
[0160] The processing module 703 is further configured to obtain the comprehensive evaluation score of the object to be evaluated in the current period based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated.
[0161] Optionally, the processing module 703 is further configured to:
[0162] For each feature dimension, obtain the original transaction data of multiple sample objects in that feature dimension;
[0163] Abnormal transaction data is removed from the original transaction data to obtain candidate transaction data;
[0164] The candidate transaction data is binned to obtain sample feature data for the feature dimension;
[0165] Data fitting is performed on the sample feature data based on the aforementioned feature dimension to obtain the feature scoring model corresponding to the aforementioned feature dimension.
[0166] Optionally, the processing module 703 is specifically used for:
[0167] The original transaction data is divided, and based on the division results, the first quantile and the last quantile are obtained from the original transaction data;
[0168] Based on the first quantile and the last quantile, the filtering threshold of the original transaction data is determined;
[0169] Abnormal transaction data exceeding the filtering threshold in the original transaction data is removed to obtain candidate transaction data.
[0170] Optionally, the processing module 703 is specifically used for:
[0171] The candidate transaction data is divided into multiple interval segments of sub-transaction data;
[0172] For each interval, the center value of the interval is used as the transaction representation value of the sub-transaction data of the interval; and, based on the sub-transaction data within the interval and the sub-transaction data within the historical intervals preceding the interval, the cumulative sample size corresponding to the interval is calculated.
[0173] The transaction representation values of the sub-transaction data corresponding to each of the multiple interval segments, and the cumulative sample counts corresponding to each of the multiple interval segments, are mapped to a preset numerical range to obtain the sample feature data of the feature dimension.
[0174] Optionally, the processing module 703 is specifically used for:
[0175] By fitting the mapped multiple transaction representation values and the mapped multiple cumulative sample counts, a feature scoring model corresponding to the feature dimension is obtained.
[0176] Optionally, the processing module 703 is specifically used for:
[0177] For a given feature dimension, the feature score of that feature dimension is used as the initial evaluation score of the object to be evaluated.
[0178] For multiple feature dimensions, the feature score values of the multiple feature dimensions are weighted and summed to obtain the preliminary evaluation score of the object to be evaluated.
[0179] Optionally, the processing module 703 is specifically used for:
[0180] Obtain the historical evaluation scores of the object to be evaluated over at least one past period;
[0181] The preliminary evaluation score of the object to be evaluated and the historical evaluation scores within at least one past period are weighted and summed to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
[0182] Based on the same technical concept, embodiments of this application provide a computer device, which may be a server, such as... Figure 8 The embodiment includes at least one processor 801 and a memory 802 connected to the at least one processor. The specific connection medium between the processor 801 and the memory 802 is not limited in this embodiment. Figure 8 Taking the connection between processor 801 and memory 802 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.
[0183] In this embodiment of the application, the memory 802 stores instructions that can be executed by at least one processor 801. By executing the instructions stored in the memory 802, at least one processor 801 can perform the steps included in the above-described transaction data processing method.
[0184] The processor 801 is the control center of the computer device. It can connect to various parts of the computer device using various interfaces and lines, and processes transaction data by running or executing instructions stored in the memory 802 and calling data stored in the memory 802. Optionally, the processor 801 may include one or more processing units. The processor 801 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 801. In some embodiments, the processor 801 and the memory 802 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0185] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0186] Memory 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 802 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 802 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 802 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0187] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the above-described transaction data processing method.
[0188] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0189] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0190] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0191] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0192] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing transaction data, characterized in that, include: Obtain the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period; For each feature dimension, a feature score value is determined based on the feature scoring model corresponding to the feature dimension and the transaction characteristics of the feature dimension. The feature scoring model is obtained through data fitting. Based on the feature score values of the at least one feature dimension, a preliminary evaluation score is obtained for the object to be evaluated; Based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated, the comprehensive evaluation score of the object to be evaluated in the current period is obtained; The feature scoring model is obtained through data fitting and includes: For each feature dimension, obtain the original transaction data of multiple sample objects in that feature dimension; The original transaction data is divided, and based on the division results, the first quantile and the last quantile are obtained from the original transaction data; based on the first quantile and the last quantile, a screening threshold for the original transaction data is determined; abnormal transaction data in the original transaction data that exceeds the screening threshold is removed to obtain candidate transaction data; wherein, according to the formula... Determine the screening threshold for the raw transaction data. ; The value of the last quantile. The value of the first quantile. For reference only; The candidate transaction data is binned to obtain sample feature data for the feature dimension; Data fitting is performed on the sample feature data based on the aforementioned feature dimension to obtain the feature scoring model corresponding to the aforementioned feature dimension.
2. The method according to claim 1, characterized in that, The step of binning the candidate transaction data to obtain sample feature data for the feature dimension includes: The candidate transaction data is divided into multiple interval segments of sub-transaction data; For each interval, the center value of the interval is used as the transaction representation value of the sub-transaction data of the interval; and, based on the sub-transaction data within the interval and the sub-transaction data within the historical intervals preceding the interval, the cumulative sample size corresponding to the interval is calculated. The transaction representation values of the sub-transaction data corresponding to each of the multiple interval segments, and the cumulative sample counts corresponding to each of the multiple interval segments, are mapped to a preset numerical range to obtain the sample feature data of the feature dimension.
3. The method according to claim 2, characterized in that, The step of fitting sample feature data based on the feature dimension to obtain the feature scoring model corresponding to the feature dimension includes: By fitting the mapped multiple transaction representation values and the mapped multiple cumulative sample counts, a feature scoring model corresponding to the feature dimension is obtained.
4. The method according to claim 1, characterized in that, The process of obtaining a preliminary evaluation score for the object to be evaluated based on the feature score values of at least one feature dimension includes: For a given feature dimension, the feature score of that feature dimension is used as the initial evaluation score of the object to be evaluated. For multiple feature dimensions, the feature score values of the multiple feature dimensions are weighted and summed to obtain the preliminary evaluation score of the object to be evaluated.
5. The method according to any one of claims 1 to 4, characterized in that, The process of obtaining the comprehensive evaluation score of the object to be evaluated in the current period based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated includes: Obtain the historical evaluation scores of the object to be evaluated over at least one past period; The preliminary evaluation score of the object to be evaluated and the historical evaluation scores within at least one past period are weighted and summed to obtain the comprehensive evaluation score of the object to be evaluated in the current period.
6. A transaction data processing apparatus, characterized in that, include: The acquisition module is used to acquire the transaction characteristics of the object to be evaluated in at least one feature dimension within the current period; The determination module is used to determine the feature score value of each feature dimension based on the feature scoring model corresponding to the feature dimension and the transaction features of the feature dimension. The processing module is used to obtain a preliminary evaluation score of the object to be evaluated based on the feature score value of the at least one feature dimension; The processing module is also used to obtain the comprehensive evaluation score of the object to be evaluated in the current period based on the preliminary evaluation score and the historical evaluation score of the object to be evaluated. The processing module is also used for: For each feature dimension, obtain the original transaction data of multiple sample objects in that feature dimension; The original transaction data is divided, and based on the division results, the first quantile and the last quantile are obtained from the original transaction data; based on the first quantile and the last quantile, a screening threshold for the original transaction data is determined; abnormal transaction data in the original transaction data that exceeds the screening threshold is removed to obtain candidate transaction data; wherein, according to the formula... Determine the screening threshold for the raw transaction data. ; The value of the last quantile. The value of the first quantile. For reference only; The candidate transaction data is binned to obtain sample feature data for the feature dimension; Data fitting is performed on the sample feature data based on the aforementioned feature dimension to obtain the feature scoring model corresponding to the aforementioned feature dimension.
7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Transaction evaluation method, device and terminal
CN111369301A
Data evaluation method and device, electronic equipment and storage medium
CN114444831A