Transaction data processing method and device, storage medium and electronic equipment

By adopting the combination method of data bucket transformation, soft allocation transformation and table lookup embedding processing in transaction data processing, the problems of long-tail distribution and outliers in transaction table-type data processing are solved, and high-quality feature processing and transaction task processing effects are achieved.

CN119669555APending Publication Date: 2025-03-21CHONGQING ANT CONSUMER FINANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411581755.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-06
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

When the prior art processes transaction tabular data of a large number of complex features, it is difficult to effectively deal with long-tail distributions and outliers, resulting in poor feature processing effects.

Method used

Through data bucket transformation and soft allocation transformation combined with table lookup embedding processing, the bucket boundaries are dynamically adjusted to generate high-quality preprocessed data for transaction table-type data.

Benefits of technology

Adaptive adjustment of data distribution is realized, long-tail distribution and outliers are effectively dealt with, the disadvantages of the direct binning method are overcome, feature quality is improved, and transaction task processing is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119669555A_ABST
    Figure CN119669555A_ABST
Patent Text Reader

Abstract

The invention discloses a transaction data processing method and device, a storage medium and electronic equipment, and the method comprises the steps: obtaining transaction table type data for a transaction task processing model, carrying out the data bucket conversion processing of the transaction table type data, obtaining a transaction data bucket value vector, and storing the transaction data bucket value vector in a database; carrying out soft distribution conversion processing on the transaction data bucket numeric vector to obtain a transaction data soft distribution probability, and carrying out table look-up embedding processing on the data bucket based on the transaction data soft distribution probability to obtain a data bucket embedding vector; and performing integration based on the data bucket embedding vector and the transaction data soft distribution probability to obtain transaction preprocessing data for the transaction table type data, and inputting the transaction preprocessing data into a transaction task processing model for transaction processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a transaction data processing method, device, storage medium and electronic device. Background Art

[0002] In various application scenarios in the real world, transaction data is widely present in fields such as finance, e-commerce, and supply chain management. These transaction data are usually artificially constructed numerical feature data, which belong to the table type, also known as transaction table data. Transaction table data usually records user behavior, transaction records, inventory information, etc., and can reflect the dynamic changes of transaction activities. The processing and analysis of transaction table data is crucial to support user transaction services, especially in user transaction services such as risk control, user profiling, and personalized recommendations. It is often necessary to extract and analyze complex features in transaction table data.

[0003] There are many challenges in feature processing of transactional table data, especially when the data volume is huge and the feature distribution is complex. Usually, in order to conduct effective analysis and transaction task processing, transactional table data needs to be converted into features suitable for machine learning models. For example, in a risk control system, the risk of a user may be assessed based on the transaction frequency and transaction amount trends over a certain period of time. In a recommendation system, features are also generated based on the user's historical purchase records and browsing habits to achieve personalized recommendations. Most of these features based on transactional table data show the characteristics of time series and accumulation, so feature engineering of transactional table data is required before the transaction task processing model is processed. Summary of the invention

[0004] This specification provides a transaction data processing method, device, storage medium and electronic device, and the technical solution is as follows:

[0005] In a first aspect, this specification provides a transaction data processing method, the method comprising:

[0006] Get transaction table data for transaction task processing model;

[0007] Performing data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and performing soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element being allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element being allocated to a data bucket;

[0008] Based on the soft assignment probability of the transaction data, the data bucket is subjected to table lookup embedding processing to obtain a data bucket embedding vector, and based on the data bucket embedding vector and the soft assignment probability of the transaction data, transaction pre-processing data for the transaction table data is obtained by synthesis;

[0009] The transaction pre-processing data is input into the transaction task processing model for transaction processing.

[0010] In a second aspect, this specification provides a transaction data processing device, the device comprising:

[0011] A data acquisition module is used to acquire transaction table data for the transaction task processing model;

[0012] A preprocessing module, used to perform data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and perform soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element being allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element being allocated to a data bucket;

[0013] The preprocessing module is further used to perform table lookup embedding processing on the data bucket based on the soft allocation probability of the transaction data to obtain a data bucket embedding vector, and to obtain transaction preprocessing data for the transaction table data based on the data bucket embedding vector and the soft allocation probability of the transaction data;

[0014] The transaction processing module is used to input the transaction pre-processing data into the transaction task processing model for transaction processing.

[0015] In a third aspect, the present specification provides a computer storage medium, wherein the computer storage medium stores at least one instruction, wherein the instruction is suitable for being loaded by a processor and executing the method steps of one or more embodiments of the present specification.

[0016] In a fourth aspect, the present specification provides a computer program product, wherein the computer program product stores at least one instruction, wherein the instruction is suitable for being loaded by a processor and executing the method steps of one or more embodiments of the present specification.

[0017] In a fifth aspect, the present specification provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps of one or more embodiments of the present specification.

[0018] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least:

[0019] In one or more embodiments of the present specification, the service platform performs data bucketing transformation processing on the transaction table data for the transaction task processing model to obtain a transaction data bucketing numerical vector, performs soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, performs table lookup embedding processing on the data bucket based on the transaction data soft allocation probability to obtain a data bucket embedding vector, and obtains transaction pre-processing data for the transaction table data based on a comprehensive analysis of the data bucket embedding vector and the transaction data soft allocation probability. By combining data bucketing transformation and soft allocation transformation with table lookup embedding processing, bucket boundaries are adaptively adjusted for data distribution, which can effectively cope with long-tail distribution and outliers of transaction table data, overcome the disadvantages of direct binning methods in complex distributions, avoid the limitation of poor effect when directly performing transaction data processing on data binning operations, and obtain transaction pre-processing data with excellent data feature quality, thereby ensuring the effect of transaction task processing. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 It is a scenario diagram of a transaction data processing system provided in this specification;

[0022] Figure 2 It is a flowchart of a transaction data processing method provided in this specification;

[0023] Figure 3 It is a flowchart of a function solution process provided in this manual;

[0024] Figure 4 It is a flowchart of a soft allocation conversion provided in this specification;

[0025] Figure 5 It is a schematic diagram of a random disturbance process provided in this manual;

[0026] Figure 6 It is a training flow diagram of a data preprocessing network provided in this specification;

[0027] Figure 7 It is a schematic diagram of a data preprocessing scenario provided in this manual;

[0028] Figure 8 This is a structural diagram of a transaction data processing device provided in this specification.

[0029] Fig. 9 It is a structural schematic diagram of an electronic device provided in this manual. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in this specification to clearly and completely describe the technical solutions in this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0031] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood in specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0032] In the related art, these numerical features of transaction table data are usually suitable for tree models, while the data quality of transaction task processing models built based on deep learning models is not high, because when processing numerical features, tree models only consider the relative size of the values, and do not care about the specific values ​​of the features, while neural networks pay attention to the specific numerical size of the features and are particularly sensitive to outliers. However, deep learning models have greater advantages and potential than tree models. For example, in multimodal and multi-transaction task learning, deep learning models can combine more other modal data to improve the recognition effect, so before inputting transaction table data into the transaction task processing model, binning operations will be performed. The binning operation puts the transaction table data into buckets in an "equal frequency" or "equal width" manner. However, simply inputting the features after the binning operation into the deep learning model sometimes cannot achieve the effect of surpassing the tree model. This is because the feature distribution of real transaction data is strange and there are many features with extremely right-skewed distributions. The ordinary equal frequency or equal width binning operation method cannot achieve better results on these data distributions. Based on this, the use of binning operations for transaction data processing in the related art is not effective and has certain limitations.

[0033] The present specification is described in detail below with reference to specific embodiments.

[0034] See also Figure 1 , is a scenario diagram of a transaction data processing system provided in this specification. Figure 1 As shown, the transaction data processing system may include at least a client cluster and a service platform 100 .

[0035] The client cluster may include at least one client, such as Figure 1 As shown, it specifically includes client 1 corresponding to user 1, client 2 corresponding to user 2, ..., client n corresponding to user n, where n is an integer greater than 0.

[0036] Each client in the client cluster may be an electronic device with communication function, including but not limited to: wearable device, handheld device, personal computer, tablet computer, vehicle-mounted device, smart phone, computing device or other processing device connected to wireless modem, etc. Electronic devices may be called different names in different networks, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, electronic device, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), electronic device in 5G network or future evolution network, etc.

[0037] The service platform 100 can be a separate server device, such as a rack-mounted, blade, tower, or cabinet-mounted server device, or a workstation, mainframe computer, or other hardware device with strong computing power; it can also be a server cluster composed of multiple servers, and the servers in the service cluster can be composed in a symmetrical manner, wherein each server has equivalent functions and status in the transaction link, and each server can provide services to the outside independently, and the independent service can be understood as not requiring the assistance of other servers.

[0038] In one or more embodiments of the present specification, the service platform 100 may establish a communication connection with at least one client in the client cluster, and complete data interaction during the transaction data processing process based on the communication connection, such as online transaction data interaction. For example, the service platform 100 may implement transaction task processing for the client based on the model obtained by the transaction data processing method of the present specification;

[0039] It should be noted that the service platform 100 and at least one client in the client cluster establish a communication connection through a network for interactive communication, wherein the network can be a wireless network or a wired network, the wireless network includes but is not limited to a cellular network, a wireless local area network, an infrared network or a Bluetooth network, and the wired network includes but is not limited to Ethernet, a universal serial bus (USB) or a controller local area network. In one or more embodiments of the specification, technologies and / or formats including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. are used to represent data (such as a target compressed package) exchanged through a network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec), etc. can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above data communication technologies.

[0040] The transaction data processing system embodiment provided in this specification and the transaction data processing method in one or more embodiments belong to the same concept. The execution subject corresponding to the transaction data processing method involved in one or more embodiments of the specification can be the above-mentioned service platform 100; the execution subject corresponding to the transaction data processing method involved in one or more embodiments of the specification can also be the electronic device corresponding to the client, which is determined based on the actual application environment. The embodiment of the transaction data processing system and its implementation process can be detailed in the following method embodiment, which will not be repeated here.

[0041] based on Figure 1 The scenario diagram is shown, and the transaction data processing method provided by one or more embodiments of this specification is introduced in detail below.

[0042] See also Figure 2 , is a flowchart of a transaction data processing method for one or more embodiments of this specification, which can be implemented by a computer program and can be run on a transaction data processing device based on the von Neumann architecture. The computer program can be integrated into an application or run as an independent tool application. The transaction data processing device can be a service platform.

[0043] Specifically, the transaction data processing method includes:

[0044] S102: Acquire transaction table data for the transaction task processing model;

[0045] The transaction task processing model is a transaction task processing model that is obtained by modeling the transaction task processing of the platform transaction service using complex, massive, high-dimensional data information. The transaction task processing model can perform credit scoring on the users of the transaction service, perform behavioral risk control on the users of the transaction service, and make personalized recommendations for the users of the transaction service, etc.

[0046] It should be noted that the transaction task processing model involved in this specification can be developed and customized based on the actual platform transaction service, and is not specifically limited here.

[0047] Schematically, the transaction table data required for the transaction task is extracted from the data source. Before entering the transaction task processing model for transaction task processing, the transaction data is preprocessed. In addition, in order to avoid the shortcomings of traditional equal-frequency or equal-width binning methods in dealing with long-tail distributions and abnormally large values, this manual specifically proposes a transaction data processing method, which introduces a re-parameterized soft allocation technique to dynamically process the numerical features in the tabular data, thereby realizing a binning operation that automatically adapts to the data distribution.

[0048] Transaction table data often includes various transaction records and has a large number of numerical features, such as user purchase history, transaction details, behavior logs, etc.

[0049] S104: performing data bucketing transformation processing on the transaction table data to obtain transaction data bucketing value vectors, and performing soft allocation transformation processing on the transaction data bucketing value vectors to obtain transaction data soft allocation probabilities.

[0050] The transaction data bucket numerical vector represents the unnormalized prediction value of the transaction data element assigned to the data bucket, and the transaction data soft assignment probability represents the normalized probability value of the transaction data element assigned to the data bucket;

[0051] Data bucketing transformation is to transform the continuous numerical features in transaction table data into buckets. Bucketing transformation means that the transaction data elements (numeric data) in transaction table data are pre-estimated and divided into different data buckets (intervals) according to certain bucketing rules (such as equal frequency, equal width or adaptive binning). The original scores or original weights are also called (unnormalized) prediction values. These unnormalized prediction values ​​may be positive or negative, and of different sizes. The collection of unnormalized prediction values ​​of all data buckets constitutes the transaction data bucket value vector.

[0052] It should be noted that the data bucketing transformation does not directly bucket the transaction table data to obtain a hard-sampled transaction data bucket vector. Usually, the value corresponding to the selected data bucket determined in the transaction data bucket vector after data bucketing is 1, and the values ​​corresponding to the remaining unselected data buckets are 0. The above data bucketing transformation is to pre-estimate the (unnormalized) predicted values ​​divided into different data buckets (intervals) according to a certain bucketing rule, that is, each data bucket has a predicted value, and the values ​​corresponding to at least two data buckets are not 0.

[0053] The sum of the unnormalized predicted values ​​of the transaction data elements in the transaction data bucket value vector over all data buckets is not 1. For example, assuming that the transaction data bucket value vector is logits of logarithmic type, the transaction data bucket value vector can be represented as a logits vector, logits = [z 1 ,z 2 ,z 3 ,…,zi…,z N], where zi is the unnormalized prediction value (such as prediction score) corresponding to the ith data bucket. In some embodiments, S104 is performed by a data preprocessing network preconfigured for the transaction task processing model. zi is a real number that has not been normalized, representing the "raw score" or "confidence" of each category (i.e., data bucket) calculated by the data preprocessing network according to the transaction data elements in the forward propagation. For example, if the neural network outputs logits as [1.5, 0.2, -0.8], this means that the first category has the highest score, but it has not yet been converted into an actual probability. These unnormalized prediction values ​​are different from probabilities. Unnormalized prediction values ​​can be positive, negative, or zero, and can be any real value. A positive value indicates that the data preprocessing network believes that the transaction data element belongs to the category (i.e., data bucket) with a high probability, and a negative value indicates a low probability. The larger the value, the more the model "tends" to the category (i.e., data bucket). The sum of the unnormalized prediction values ​​on all data buckets is not necessarily 1.

[0054] In a feasible implementation manner, the data bucketing transformation process is performed on the transaction table data to obtain the transaction data bucketing value vector, which can be performed in the following manner:

[0055] The transaction table data is processed by using a preset bucket transformation function to obtain a transaction data bucket numerical vector.

[0056] Schematically, a preset bucket transformation function F(x) is pre-set. The preset bucket transformation function is a transformation function that converts the original input data x into a logarithmic probability vector (logits). During dynamic binning transformation, there will be a target number of buckets. Each Fi(x) represents a specific data bucket. For example, assuming the target number of buckets is 3, F 1 (x) represents the first data bucket, F 2 (x) represents the second data bucket, F 3 (x) represents the third data bucket. The subscript in Fi(x) is the i-th data bucket. Fi(x) represents the “raw score” or “confidence” that determines whether the transaction data element is assigned to the i-th bucket, that is, the unnormalized prediction value. The transaction data element in the transaction table data is input into Fi(x) to predict the unnormalized prediction value of the transaction data element being assigned to the i-th data bucket.

[0057] In addition, in the sample transaction table data training phase before actual reasoning, F(x) contains some learnable parameters that can be trained to converge.

[0058] For example: F(x) is a Gaussian function f(x):

[0059]

[0060] The a, b, and c in the Gaussian function are learnable parameters, which determine the feature range and boundaries of each bucket.

[0061] The preset bucket transformation function will train learnable parameters in the sample transaction table data training phase. Learnable parameters refer to the parameters optimized by the back propagation algorithm during the training process. For F(x), these parameters can be weights, biases, or other control parameters (such as the mean and standard deviation of the distribution) in the function (model); in the transaction table data processing phase, the learnable parameters are fixed and can be used directly.

[0062] It should be noted that the preset bucket transformation function can be arbitrarily customized based on actual application conditions, such as Gaussian function, trigonometric function, exponential function, power function, etc.

[0063] Furthermore, after obtaining the transaction data bucket numerical vector, the transaction data bucket numerical vector is then subjected to soft allocation conversion processing to obtain the transaction data soft allocation probability.

[0064] Soft assignment conversion is to calculate the probability value that each transaction data element can be assigned to multiple different categories (data buckets). The transaction data soft assignment probability represents the normalized probability value of the transaction data element being assigned to the data bucket. The sum of the normalized probability values ​​of all data buckets is 1. Soft assignment conversion is to process the originally discrete (the values ​​in the transaction data bucket value vector are discrete) data bucket selection problem through a continuous normalization conversion method so that it can be represented as a continuous probability distribution. In addition, in the training phase of sample transaction table data, the soft assignment conversion can be converted into a differentiable continuous representation because it is a continuous probability distribution. The originally non-differentiable hard selection operation becomes a differentiable continuous operation. Then, in the training environment, the neural network can optimize and adjust the learnable parameters of the discrete selection through the back-propagation algorithm, and then the accurate binning effect can be obtained in the tabular data processing (inference) phase after the training is completed. The binning operation in the prior art corresponds to a hard discrete selection (such as selecting a maximum value) into a "soft" selection with probability, so that each possible option is assigned a certain probability, thereby retaining richer information.

[0065] Schematically, the soft assignment probability vector is defined as p, where p = [p 1 ,p 2 ,…pi,…p N ]. Here pi represents the probability of a transaction data element being assigned to the i-th data bucket. The soft assignment probability is a continuous value, for example, p = [0.1, 0.3, 0.05, 0.5, 0.05], which means that the transaction data element is more likely to be assigned to the 4th bucket, but other buckets also have certain weights.

[0066] S106: performing table lookup embedding processing on the data bucket based on the soft assignment probability of the transaction data to obtain a data bucket embedding vector, and synthesizing the data bucket embedding vector and the soft assignment probability of the transaction data to obtain transaction pre-processing data for the transaction table data;

[0067] Lookup embedding processing is to obtain the bucket embedding vector corresponding to one or more buckets through a lookup operation, and obtain the final transaction preprocessing data through the soft allocation probability and the bucket embedding vector. The concept of probability distribution is introduced to make the binning result smoother and more robust, which is more generalized than the hard allocation method (in this case) in the existing binning operation.

[0068] In a feasible implementation manner, performing table lookup embedding processing on the data bucket based on the soft allocation probability of the transaction data to obtain the data bucket embedding vector includes:

[0069] A2: Get the bucket embedding matrix corresponding to all the buckets;

[0070] A bucket embedding matrix E is defined in advance, and the size of the bucket embedding matrix is ​​N×D, where N is the number of buckets and D is the dimension of each bucket embedding vector.

[0071] Schematically, each row Ei represents the embedding vector of the i-th bucket. For example, if there are n buckets, then the embedding matrix E can be expressed as follows: E = [e 1 , e 2 , …e i ,…e N ], these embedding vectors e will be continuously adjusted in the sample transaction table data training phase to capture the data distribution characteristics of different data buckets. After the training is completed, in the transaction table data processing (inference) phase, the embedding matrix E is in the optimal effect. Usually the matrix E is fixed and will not change;

[0072] A4: Determine the target data bucket number corresponding to the maximum probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to the target data bucket number in the data bucket embedding matrix;

[0073] Lookup operation: Determine the target bucket number corresponding to the maximum probability value in the soft-assigned probability of the transaction data, and extract the bucket embedding vector corresponding to the target bucket number from the bucket embedding matrix E. Assuming there are N buckets, the system will extract the bucket embedding vector e corresponding to the target bucket number from all e1, e2, …, eN in the embedding matrix.

[0074] In a feasible implementation manner, the transaction pre-processing data for the transaction table data is obtained by synthesizing the data bucket embedding vector and the transaction data soft allocation probability, and the following method can be referred to:

[0075] The maximum probability value in the soft allocation probability of the transaction data is determined, and weighted processing is performed based on the data bucket embedding vector and the maximum probability value to obtain transaction pre-processing data for the transaction table data.

[0076] Determine the transaction data soft allocation probability p = [p 1 ,p 2 ,…pi,…p N ], use the soft assignment probability p to perform weighted summation on the embedding vector ei of each bucket to obtain the final transaction preprocessing data representation v: v = p*e;

[0077] Schematically, the data bucket embedding matrix E will be continuously adjusted during the training of sample transaction table data, and is usually stored and optimized as a learnable parameter during the training of the data preprocessing network. During each forward propagation of the data preprocessing network, this embedding matrix will be extracted from the memory, and the system will search according to the index of the bucket. During the training process, each embedding vector ei in the embedding matrix will be continuously adjusted to learn how to better represent the binned data. Through back propagation, not only will the embedding vector be adjusted according to the loss of the prediction task (such as classification, regression), but the binning boundary will also be dynamically adjusted so that the soft assignment probability p can also be continuously updated and optimized.

[0078] S108: Inputting the transaction pre-processing data into the transaction task processing model for transaction processing.

[0079] Schematically, transaction preprocessing data is used as input to the transaction task processing model. The transaction task processing model can be a deep learning model or other types of machine learning models for specific transaction tasks, such as risk assessment, fraud detection, user behavior prediction, etc., to perform transaction processing: the transaction task processing model performs specific tasks based on the input data. For example, in the financial field, the transaction task processing model may analyze transaction data to detect abnormal behavior. In e-commerce, the transaction task processing model may make personalized recommendations based on the user's purchase history and behavior data. After preprocessing, the transaction task processing model can extract more meaningful features from the data, ultimately improving the accuracy of transaction processing.

[0080] In one or more embodiments of the present specification, the service platform performs data bucketing transformation processing on the transaction table data for the transaction task processing model to obtain a transaction data bucketing numerical vector, performs soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, performs table lookup embedding processing on the data bucket based on the transaction data soft allocation probability to obtain a data bucket embedding vector, and obtains transaction pre-processing data for the transaction table data based on a comprehensive analysis of the data bucket embedding vector and the transaction data soft allocation probability. By combining data bucketing transformation and soft allocation transformation with table lookup embedding processing, bucket boundaries are adaptively adjusted for data distribution, which can effectively cope with long-tail distribution and outliers of transaction table data, overcome the disadvantages of direct binning methods in complex distributions, avoid the limitation of poor effect when directly performing transaction data processing on data binning operations, and obtain transaction pre-processing data with excellent data feature quality, thereby ensuring the effect of transaction task processing.

[0081] See also Figure 3 , Figure 3 This is a flow chart of a function solving process proposed in one or more embodiments of this specification. To perform the function solving process on the transaction table data using the preset bucket transformation function to obtain the transaction data bucket numerical vector, the following method can be referred to:

[0082] S202: Obtain a preset bucketing transformation function model of a target number of buckets, wherein the preset bucketing transformation function model is constructed based on a preset bucketing transformation function, and the target number of buckets is the number of all data buckets;

[0083] The target number of buckets indicates the total number of buckets (intervals) into which the transaction data is divided. Each bucket represents a specific data feature interval, which helps capture patterns or trends in the transaction data.

[0084] The preset bucket transformation function model is constructed based on the preset bucket transformation function, and the target number of buckets is the number of all data buckets. Specifically, in the sample transaction table data training stage, the preset bucket transformation function model corresponding to the target number of data buckets is constructed based on the preset bucket transformation function. During the training stage, the preset bucket transformation function model will be adjusted for learnable parameters, thereby realizing adaptive dynamic binning. This scientific parameter adjustment makes the binning boundaries not fixed, but dynamically learns and adjusts through training to adapt to the actual distribution of data, effectively handle long-tail distribution and outliers, and improve the binning effect. By dynamically adjusting the binning boundaries, the risk of overfitting is reduced, the generalization performance of the model is improved, and the limitations caused by the fixed binning direct binning method in the actual transaction data reasoning and processing stage are avoided.

[0085] S204: using each of the preset bucketing transformation function models to perform bucketing function calculations on the transaction data elements of the transaction table data to obtain an unnormalized prediction value for each of the data buckets;

[0086] S206: Generate a transaction data bucket numerical vector based on the unnormalized prediction value of each data bucket.

[0087] Further, a preset bucket transformation function F(x) is preset. The preset bucket transformation function is a transformation function that converts the original input data x into a prediction value vector divided into each of the data buckets. In some embodiments, the preset bucket transformation function F(x) may be a transformation function of a logarithmic type vector (logits). Further, the obtained transaction data bucket value vector may be represented as a logits vector, logits=[z 1 ,z 2 ,z 3 ,…,zi…,z N ]. In dynamic binning transformation, there will be data buckets with the target number of buckets, and each Fi(x) represents a specific data bucket. For example, assuming the target number of buckets is 3, the preset bucketing transformation function model F 1 (x) represents the first data bucket and the preset bucket transformation function model F 2 (x) represents the second data bucket and the preset bucket transformation function model F 3 (x) represents the third data bucket. The subscript i-th data bucket in the preset bucket transformation function model Fi(x) represents the "original score" or "confidence" that determines the transaction data element to be assigned to the i-th bucket, that is, the unnormalized prediction value. The transaction data element in the transaction table data is input into Fi(x), and the unnormalized prediction value of the transaction data element being divided into the i-th data bucket is predicted;

[0088] In addition, in the sample transaction table data training phase before actual reasoning, F(x) contains some learnable parameters that can be trained to converge.

[0089] For example: F(x) is F(x)=ax+b:

[0090] The a and b in the function are learnable parameters, which determine the feature range and boundaries of each bucket.

[0091] The preset bucket transformation function will train learnable parameters in the sample transaction table data training phase. Learnable parameters refer to the parameters optimized by the back propagation algorithm during the training process. For F(x), these parameters can be weights, biases, or other control parameters (such as the mean and standard deviation of the distribution) in the function (model); in the transaction table data processing phase, the learnable parameters are fixed and can be used directly.

[0092] It should be noted that the preset bucket transformation function can be arbitrarily customized based on actual application conditions, such as Gaussian function, trigonometric function, exponential function, power function, etc.

[0093] In one or more embodiments of this specification, the above method can effectively extract bucket features from transaction data and convert these features into a format more suitable for subsequent model use. This method is very effective when dealing with complex transaction data, especially in scenarios that require adaptive binning or dynamic adjustment of distribution, and can achieve better data representation and learning effects.

[0094] See also Figure 4 , Figure 4 is a flowchart of soft allocation conversion proposed in one or more embodiments of this specification. Specifically,

[0095] S3002: Determine a random noise variable, and use the random noise variable to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector;

[0096] Random noise variables are used to introduce some randomness when further processing the bucketed numerical vectors of transaction data, so as to avoid falling into local optimality and enhance the robustness of the model. Random noise variables are usually sampled from probability distributions, such as Gumbel distribution, Gaussian distribution, uniform distribution, etc.

[0097] The bucketed numerical perturbation vector is the result obtained by adding random noise to the transaction data bucketed numerical vector. For example, the transaction data bucketed numerical vector represents the unnormalized predicted value of each transaction data in each bucket. After the perturbation, the unnormalized predicted value will be adjusted.

[0098] In schematic form, by adding a certain random noise variable to the transaction data bucket value vector, each bucket value in the transaction data bucket value vector is perturbed to obtain a bucket value perturbation vector, thereby increasing the randomness in data processing so that there may be slight changes when facing the same input later, instead of always choosing the same result. Random perturbation processing can help break the limitations of deterministic selection and make the subsequent soft allocation process more flexible, especially in scenarios with complex data distribution or containing outliers, which can improve data processing effects.

[0099] See also Figure 5 , Figure 5 It is a schematic diagram of a random disturbance process, which determines a random noise variable, uses the random noise variable to perform random disturbance processing on the bucket value vector of the transaction data to obtain the bucket value disturbance vector, and can refer to the following method:

[0100] S4002: randomly sampling a sampling random number from a preset probability distribution, and obtaining a random noise variable using a first function formula based on the sampling random number;

[0101] Preset probability distributions include but are not limited to Gumbel distribution, Gaussian distribution, uniform distribution, etc.;

[0102] The first function formula satisfies the following formula:

[0103] g i = -log(-logU i +e+e)

[0104] Among them, the g i is the random noise variable, the U i is the sampling random number, and e is a constant coefficient;

[0105] S4004: Based on the random noise variable, a second function formula is used to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector;

[0106] The second function formula satisfies the following formula:

[0107]

[0108] Among them, adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, and the Z i is the i-th vector element of the transaction data bucket numerical vector, τ is the softness temperature parameter, and i is the label.

[0109] The τ is a soft temperature parameter that controls the smoothness of the output. A smaller τ will make the output closer to one-hot encoding.

[0110] S3004: Performing soft allocation conversion processing based on the disturbance bucket numerical disturbance vector to obtain a soft allocation probability of transaction data.

[0111] The soft allocation conversion process is to convert the bucket numerical perturbation vector into an interpretable probability distribution when processing it, so that each transaction data element can be represented as the probability of being in a different bucket. The soft allocation conversion process can be completed through the Softmax operation. Specifically, after adding random noise to the bucket numerical vector to obtain the perturbed bucket numerical perturbation vector, the perturbed bucket numerical perturbation vector is processed by the softmax operation to generate a continuous probability distribution, which is called the transaction data soft allocation probability. The soft allocation conversion process can transform the original discrete prediction selection (such as predicting the bucket with the highest score) into a continuous probability distribution.

[0112] The Softmax operation normalizes the perturbed bucket numerical perturbation vector after perturbation and converts it into a probability distribution in the range [0,1]. The sum of all probabilities is 1, indicating the "likelihood" of the transaction data element in each data bucket.

[0113] In a feasible implementation manner, the soft allocation conversion processing based on the perturbation bucket numerical perturbation vector is performed to obtain the soft allocation probability of transaction data, which can be performed in the following manner:

[0114] Inputting the disturbance bucket numerical disturbance vector into a third function formula to perform soft allocation conversion processing to obtain a soft allocation probability of transaction data;

[0115] The third function formula satisfies the following formula:

[0116]

[0117] Among them, adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, adjusted_logits j is the j-th vector element of the bucket numerical perturbation vector, N is the target number of buckets for all data buckets, and j takes values ​​from the lower limit value 1 to the target number of buckets.

[0118] The third function formula can also be called the Softmax conversion operation, which converts each value of the logarithmic probability vector into a probability value so that the sum of the probabilities of all categories (data buckets) is equal to 1. This conversion process combines random perturbation noise so that each logarithmic probability is added with random perturbations, and then soft assignment is performed, thus retaining the randomness and differentiability of discrete selection.

[0119] In one or more embodiments of this specification, the above soft allocation processing is used, which is suitable for scenarios that need to process complex data distribution, especially in dynamic binning of transaction data, adaptive feature selection, etc. By introducing random perturbations and soft allocation conversion, the subsequent transaction task processing model can more flexibly cope with the diversity and randomness of data, thereby improving the generalization ability and stability of the model.

[0120] Optionally, the transaction task processing model corresponds to a data preprocessing network, and the data preprocessing network may be a part of the transaction task processing model, or the data preprocessing network may be a machine learning model independent of the transaction task processing model;

[0121] Furthermore, the transaction data processing method may include the following implementations:

[0122] S2: Obtain transaction table data for the transaction task processing model;

[0123] S4: performing the data bucketing transformation processing on the transaction table data through the data preprocessing network to obtain a transaction data bucketing numerical vector, performing soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element assigned to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element assigned to a data bucket, performing table lookup embedding processing on the data bucket based on the transaction data soft allocation probability to obtain a data bucket embedding vector, and synthesizing the data bucket embedding vector and the transaction data soft allocation probability to obtain transaction preprocessing data for the transaction table data.

[0124] S6: inputting the transaction pre-processing data into the transaction task processing model for transaction processing;

[0125] Schematically, in transaction data processing, the data preprocessing network is used to convert the raw transaction data into feature representations that are easy for the transaction task processing model to understand and use. This preprocessing process can be part of the transaction task processing model or it can be an independent machine learning module that is responsible for processing and transforming data. The goal of the entire method is to generate richer feature representations through operations such as bucketing and soft allocation, thereby improving the performance of the final transaction task processing model.

[0126] See also Figure 6 , Figure 6 It is a training flow diagram of a data preprocessing network, specifically:

[0127] S5002: Obtain sample transaction table data and an initial data preprocessing network for a transaction task processing model;

[0128] The sample transaction table data is the transaction table data in the training phase, and is used as training data for the initial data preprocessing network;

[0129] Creating an initial data preprocessing network based on a machine learning model; the machine learning model includes but is not limited to fitting one or more of a convolutional neural network (CNN) model, a deep neural network (DNN) model, a recurrent neural network (RNN) model, an embedding model, a gradient boosting decision tree (GBDT) model, a logistic regression (LR) model, and the like;

[0130] S5004: Perform at least one round of model training on the initial data preprocessing network based on the sample transaction table data;

[0131] Indicatively, Figure 7 As shown, Figure 7 This is a schematic diagram of a data preprocessing scenario. Figure 7 The data preprocessing process shown in the figure may represent the forward propagation training process for the initial data preprocessing network, and may represent the reverse propagation training process for the initial data preprocessing network, for details, please refer to S5006 and S5008;

[0132] S5006: During the forward propagation training process: the data bucketing transformation processing is performed on the sample transaction table data through the initial data preprocessing network to obtain the sample transaction data bucketing numerical vector, the sample transaction data bucketing numerical vector is softly allocated and converted to obtain the sample transaction data soft allocation probability, wherein the sample transaction data bucketing numerical vector represents the unnormalized prediction value of the sample transaction data element allocated to the data bucket, and the sample transaction data soft allocation probability represents the normalized probability value of the transaction data element allocated to the data bucket, based on the sample transaction data soft allocation probability, the sample data bucket is subjected to table lookup embedding processing to obtain the sample data bucket embedding vector, and the sample transaction preprocessing data for the sample transaction table data is synthesized based on the sample data bucket embedding vector and the sample transaction data soft allocation probability;

[0133] It should be noted that "the data bucketing transformation processing is performed on the sample transaction table data through the initial data preprocessing network to obtain the sample transaction data bucket value vector, and the sample transaction data bucket value vector is soft allocated to obtain the sample transaction data soft allocation probability, wherein the sample transaction data bucket value vector represents the unnormalized prediction value of the sample transaction data element assigned to the data bucket, and the sample transaction data soft allocation probability represents the normalized probability value of the transaction data element assigned to the data bucket, based on the sample transaction data soft allocation probability, the sample data bucket is subjected to table lookup embedding processing to obtain the sample data bucket embedding vector, and the sample transaction preprocessing data for the sample transaction table data is obtained based on the sample data bucket embedding vector and the sample transaction data soft allocation probability. " The process is similar to the execution process of "performing data bucketing transformation processing on the transaction table type data to obtain a transaction data bucketing numerical vector, performing soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element assigned to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element assigned to a data bucket, performing table lookup embedding processing on the data bucket based on the transaction data soft allocation probability to obtain a data bucket embedding vector, and synthesizing the data bucket embedding vector and the transaction data soft allocation probability to obtain transaction pre-processing data for the transaction table type data" in this specification, the difference being that the potential training stage is the sample data type, and the latter inference application processing stage is the actual data type.

[0134] Schematically, the data bucketing transformation process is performed on the sample transaction table data to obtain the sample transaction data bucket value vector, including:

[0135] The sample transaction table data is processed by using a preset bucketing transformation function to obtain a sample transaction data bucketing numerical vector.

[0136] Furthermore, the method of using a preset bucketing transformation function to perform function solving processing on the sample transaction table data to obtain a sample transaction data bucketing numerical vector includes:

[0137] 1. A preset bucket transformation function model of a target number of buckets constructed based on a preset bucket transformation function, wherein the target number of buckets is the number of all data buckets;

[0138] 2. Using each of the preset bucketing transformation function models to perform bucketing function calculations on the sample transaction data elements of the sample transaction table data to obtain a sample unnormalized prediction value for each of the data buckets;

[0139] 3. Generate a sample transaction data bucket numerical vector based on the sample unnormalized prediction value of each data bucket.

[0140] Optionally, performing soft allocation conversion processing on the sample transaction data bucket numerical vector to obtain the sample transaction data soft allocation probability includes:

[0141] 1) Determine the sample random noise variable, and use the sample random noise variable to perform random perturbation processing on the sample transaction data bucket numerical vector to obtain the sample bucket numerical perturbation vector;

[0142] 2) Based on the sample perturbation bucket numerical perturbation vector, soft allocation conversion processing is performed to obtain the soft allocation probability of the sample transaction data.

[0143] In an optional implementation, the determining of the sample random noise variable and using the sample random noise variable to perform random perturbation processing on the sample transaction data bucket numerical vector to obtain the sample bucket numerical perturbation vector includes:

[0144] A sample sampling random number is randomly sampled from a preset probability distribution, and a sample random noise variable is obtained by using a first function formula based on the sample sampling random number;

[0145] Based on the sample random noise variable, the second function formula is used to perform random perturbation processing on the sample transaction data bucket numerical vector to obtain the sample bucket numerical perturbation vector;

[0146] The first function formula satisfies the following formula:

[0147] g i =-log(-log(U i +e)+e)

[0148] Among them, the g i is the sample random noise variable, the U i is a sample sampling random number, and e is a constant coefficient;

[0149] The second function formula satisfies the following formula:

[0150]

[0151] Among them, adjusted_logits i is the i-th vector element of the sample bucket numerical perturbation vector, the Z i is the i-th vector element of the sample transaction data bucket numerical vector, τ is the softness temperature parameter, and i is the label.

[0152] In an optional implementation, the soft allocation conversion process based on the sample perturbation bucket numerical perturbation vector is performed to obtain the sample transaction data soft allocation probability, including:

[0153] Input the sample perturbation bucket numerical perturbation vector into the third function formula for soft allocation conversion processing to obtain the sample transaction data soft allocation probability;

[0154] The third function formula satisfies the following formula:

[0155]

[0156] Among them, adjusted_logits i is the i-th vector element of the sample bucket numerical perturbation vector, adjusted_logits j is the jth vector element of the sample bucket numerical perturbation vector, N is the target number of buckets for all data buckets, j ranges from the lower limit value 1 to the target number of buckets, and yi is the soft allocation probability of the sample transaction data.

[0157] Optionally, the target number of buckets for all data buckets can be a manually defined fixed value, which can be adjusted later based on the model loss;

[0158] In a feasible implementation, after obtaining the soft allocation probability of sample transaction data in each round of forward propagation training, it is also possible to randomly select whether to trigger a hard sampling mechanism to update the soft allocation probability of sample transaction data. The specific hard sampling mechanism is:

[0159] C2: Randomly generate the sampling parameter hard. If the sampling parameter hard is True, hard sampling is performed, that is, the reference data bucket with the maximum probability is selected, and the soft assignment probability of the current sample transaction data is one-hot encoded. In order to retain the gradient information, the one-hot vector is randomly output as the soft assignment probability of the current new sample transaction data;

[0160] C4: Trigger hard sampling. Hard sampling can be illustrated by the following formula:

[0161] y_hard=(one-hot-y_soft).detach()+y_soft, which allows the gradient to propagate from y_soft (also known as yi), but the output is y_hard.

[0162] If the sampling parameter hard knowledge hopes to obtain a certain category (i.e., one-hot encoding) when processing, hard sampling can be selected to convert it into a one-hot encoding representation by selecting the category index corresponding to the largest value in the soft assignment probability.

[0163] y_soft (also known as yi) is the continuous probability distribution obtained by the Softmax operation, that is, the normalized soft assignment probability of each data bucket. For example, you may get the following result:

[0164] y_soft = [0.2, 0.5, 0.3];

[0165] Among them, each value in y_soft represents the probability of the transaction data element being assigned to each data bucket, not a discrete one-hot encoding.

[0166] One-hot: This is the result of hard selection, that is, the reference data bucket with the highest probability is selected from y_soft, and the probability corresponding to the reference data bucket is converted into a one-hot encoding. For example, if the highest probability in y_soft corresponds to the second data bucket, and the normalized soft assignment probability value corresponding to the second data bucket is 0.5, then the one-hot encoding is as follows:

[0167] one-hot=[0,1,0]

[0168] The ".detach()" operation blocks the gradient propagation, that is, after the ".detach()" operation is performed on (one-hot-y_soft), any calculations related to it will not affect the gradient update in the back propagation. This allows the model to output a one-hot encoding in the forward propagation, but still perform gradient calculations based on y_soft in the back propagation.

[0169] The following explains the role of the hard sampling formula in the training phase:

[0170] In the forward propagation, a hard one-hot encoding is obtained, and the model will still be optimized according to the original y_soft, so that the entire Softmax operation is still differentiable. In the inference stage, it is usually hoped to obtain a clear category (for example, to obtain the final classification result in the classification task), so a hard one-hot encoding result is required. The soft assignment probability of the new sample transaction data obtained by hard sampling can be directly used for these tasks. In the back propagation, (one-hot-y_soft).detach() is blocked, so it will not affect the gradient calculation. The gradient will flow completely through y-soft, achieving a "softened" continuous training effect. However, in the forward propagation, y_hard outputs a one-hot encoding, achieving a "hardened" discrete result. This achieves the effect of "soft during training and hard during inference", so that the data pre-training network can maintain differentiability and make clear classification choices in the inference stage.

[0171] Optionally, the performing table lookup embedding processing on the sample data bucket based on the soft assignment probability of the sample transaction data to obtain a sample data bucket embedding vector, and synthesizing the sample data bucket embedding vector and the soft assignment probability of the sample transaction data to obtain sample transaction preprocessing data for the sample transaction table data, including:

[0172] B2: Obtain the data bucket embedding matrix corresponding to all data buckets, determine the data bucket number corresponding to each probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to each data bucket number in the data bucket embedding matrix;

[0173] B4: Perform weighted processing based on the data bucket embedding vector and the probability value to obtain sample transaction preprocessing data for the sample transaction table data.

[0174] The data bucket embedding vector corresponding to each data bucket number is queried in the data bucket embedding matrix to perform a table lookup embedding operation, the data bucket embedding vector of each data bucket is extracted from the data bucket embedding matrix, and then each data bucket embedding vector and the probability value corresponding to each data bucket are weighted summed to obtain the final sample transaction preprocessing data;

[0175] In this specification, the table lookup operation in dynamic binning is implemented by obtaining the embedding vector of each bucket from the embedding matrix and performing weighted summation using soft assignment probabilities. This allows the model to not only process discrete binning features, but also generate a more comprehensive and refined feature representation in combination with probability information. The entire process is efficient and easy to optimize. During training, the embedding vectors and binning strategies are dynamically adjusted to achieve better learning results.

[0176] S5008: During the back-propagation training process: the sample transaction preprocessing data is input into the transaction task processing model to obtain the sample transaction processing result, the sample transaction processing result and the sample transaction processing label are used to calculate the preprocessing network loss, and the preprocessing network loss is used to adjust the network parameters of the initial data preprocessing network until the initial data preprocessing network completes the network training to obtain the data preprocessing network.

[0177] Since the sample transaction preprocessing data is generated based on the soft assignment probability of transaction data, which is continuous and differentiable, the preprocessing network loss can be calculated through the back propagation algorithm to update the learnable parameters of the entire network;

[0178] The sample transaction processing label can be regarded as the y label, and the sample transaction processing result is the output prediction result of the transaction task processing model based on the sample transaction preprocessing data. In this specification, the preprocessing network loss of the front-end data preprocessing network is calculated based on the output of the back-end transaction task processing model, and the preprocessing network loss is used to adjust the network parameters of the initial data preprocessing network until the initial data preprocessing network completes the network training to obtain the data preprocessing network.

[0179] Optionally, the loss calculation function used for preprocessing network loss may adopt a cross entropy loss calculation function, a hinge loss calculation function, a contrast loss calculation function, a Euclidean distance loss calculation function, etc. in related technologies;

[0180] Optionally, the end training condition may include, for example, the value of the preprocessing network loss is less than or equal to a preset loss function threshold, the number of iterations reaches a preset number threshold, etc. The specific end training condition may be determined based on actual conditions and is not specifically limited here.

[0181] In a feasible implementation manner, the using the preprocessing network loss to adjust the network parameters of the initial data preprocessing network includes:

[0182] C2: Determine the preset bucket transformation function model and data bucket embedding matrix corresponding to the initial data preprocessing network;

[0183] The initial data preprocessing network is used to perform a series of operations on the feature conversion and processing of the input transaction table data, and is used to convert the original transaction table data into a format that can be understood by the transaction task processing model. The initial data preprocessing network will predefine the basic preset bucket transformation function model and data bucket embedding matrix, so that before parameter optimization, the initial data preprocessing network already has a Figure 7 The data processing logic shown;

[0184] The preset bucket transformation function model is used to map the original transaction table data into different data buckets to form bucket numerical vectors. It can be a transformation function based on a specific algorithm, such as Gaussian function, polynomial mapping, etc. The parameters of the preset bucket transformation function model are randomly set in the initial stage, or initialized based on experience. During the training and optimization process, the learnable parameters of the preset bucket transformation function model will be learned and adjusted according to the characteristics of the data to achieve better data distribution and feature extraction effects.

[0185] The bucket embedding matrix is ​​a matrix that stores the feature representation of buckets. Each row corresponds to the bucket embedding vector of a bucket. The bucket embedding vector captures the key feature information in the bucket. In the initialization phase, the value of the bucket embedding matrix can be randomly generated or set by some prior knowledge. During the training optimization process, the bucket embedding matrix will be continuously adjusted according to the data distribution and task requirements reflected by the preprocessing network loss, so as to more accurately describe the characteristics of the input data.

[0186] C4: Use the preprocessing network loss to adjust the parameters of the preset bucket transformation function model and the data bucket embedding matrix.

[0187] The preprocessing network loss is a metric to measure the performance of the data preprocessing network. It is used to evaluate whether the current bucket transformation and embedding operations can effectively extract and represent the features of the input data. The matrix is ​​used to adjust the parameters. The preprocessing network loss reflects the performance of the model in the data preprocessing stage. For example, if the bucket transformation cannot effectively distinguish different categories of data, the loss value will be high, indicating that the preprocessing effect is not good.

[0188] Optionally, during training optimization, it is desired to adjust the learnable parameters of the preset bucket transformation function model and the data bucket embedding matrix by minimizing the preprocessing network loss. Specifically, the partial derivative of the preprocessing network loss for each learnable parameter can be calculated as the gradient. Through these gradients, the adjustment direction and amplitude can be determined to fine-tune the learnable parameters. For example, optimization algorithms such as stochastic gradient descent (SGD) or Adam in related technologies can be used to ensure that the optimization process converges quickly and achieves good results, thereby improving the representation of the data.

[0189] In one or more embodiments of this specification, the above-mentioned method can be used without affecting the resolution ability because the transaction data is in certain stages. By using soft allocation transformation and other methods, the binning boundary can be dynamically adjusted according to the gradient information during the training process to adapt to the real-time changes of the data. Overcoming the shortcomings of "complex results, easy overfitting, and difficult to control the number of bins" caused by direct data binning transformation: This specification calculates the unnormalized transaction data bucket numerical vector, and realizes adaptive binning in the continuous learning process, thereby avoiding complex binning results and overfitting problems. The dynamic binning method based on soft allocation transformation is also applicable to deep learning models, with higher flexibility, avoiding the shortcomings of regularization and standardization "limited processing effect on outliers and long-tail distribution data, and inability to adapt to dynamic data and changing distributions". This specification allows dynamic adjustment of transaction data bucket numerical vectors, which is more robust to outliers. Dynamically adjust feature allocation to adapt to data changes and distribution in real time.

[0190] The following will be combined Figure 8, the transaction data processing device provided in this specification is introduced in detail. It should be noted that, Figure 8 The transaction data processing device shown is used to execute the instructions Figure 1 to Figure 7 For the convenience of explanation, only the parts related to this specification are shown. For the specific technical details not disclosed, please refer to this specification. Figure 1 to Figure 7 The embodiment shown.

[0191] See also Figure 8 , which shows a schematic diagram of the structure of the transaction data processing device of this specification. The transaction data processing device 1 can be implemented as all or part of the device through software, hardware or a combination of both. According to some embodiments, the transaction data processing device 1 includes a data acquisition module 11, a preprocessing module 12 and a transaction processing module 13, which are specifically used to:

[0192] The data acquisition module 11 is used to acquire transaction table data for the transaction task processing model;

[0193] The preprocessing module 12 is used to perform data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing value vector, and perform soft allocation transformation processing on the transaction data bucketing value vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing value vector represents an unnormalized prediction value of a transaction data element being allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element being allocated to a data bucket;

[0194] The preprocessing module 12 is further used to perform table lookup embedding processing on the data bucket based on the soft allocation probability of the transaction data to obtain a data bucket embedding vector, and to obtain transaction preprocessing data for the transaction table data based on the data bucket embedding vector and the soft allocation probability of the transaction data;

[0195] The transaction processing module 13 is used to input the transaction pre-processing data into the transaction task processing model for transaction processing.

[0196] Optionally, the preprocessing module is used to:

[0197] The transaction table data is processed by using a preset bucket transformation function to obtain a transaction data bucket numerical vector.

[0198] Optionally, the preprocessing module is used to:

[0199] Obtaining a preset bucketing transformation function model of a target number of buckets, wherein the preset bucketing transformation function model is constructed based on a preset bucketing transformation function, and the target number of buckets is the number of all data buckets;

[0200] Using each of the preset bucketing transformation function models to perform bucketing function calculations on the transaction data elements of the transaction table data to obtain an unnormalized prediction value for each of the data buckets;

[0201] A transaction data bucket value vector is generated based on the unnormalized prediction value of each data bucket.

[0202] Optionally, the preprocessing module is used to:

[0203] Determine a random noise variable, and use the random noise variable to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector;

[0204] A soft allocation conversion process is performed based on the disturbance bucket numerical disturbance vector to obtain a soft allocation probability of transaction data.

[0205] Optionally, the preprocessing module is used to:

[0206] A sampling random number is randomly sampled from a preset probability distribution, and a random noise variable is obtained by using a first function formula based on the sampling random number;

[0207] Based on the random noise variable, a second function formula is used to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector;

[0208] The first function formula satisfies the following formula:

[0209] g i = -log(-logU i +e+e)

[0210] Among them, the g i is the random noise variable, the U i is the sampling random number, and e is a constant coefficient;

[0211] The second function formula satisfies the following formula:

[0212]

[0213] Among them, adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, and the Z i is the i-th vector element of the transaction data bucket numerical vector, τ is the softness temperature parameter, and i is the label.

[0214] Optionally, the preprocessing module is used to:

[0215] Inputting the disturbance bucket numerical disturbance vector into a third function formula to perform soft allocation conversion processing to obtain a soft allocation probability of transaction data;

[0216] The third function formula satisfies the following formula:

[0217]

[0218] Wherein, yi is the soft assignment probability of the transaction data, and adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, the adjusted_logits j is the j-th vector element of the bucket numerical perturbation vector, N is the target number of buckets for all data buckets, and j takes values ​​from the lower limit value 1 to the target number of buckets.

[0219] Optionally, the preprocessing module is used to:

[0220] Get the bucket embedding matrix corresponding to all buckets;

[0221] Determine the target data bucket number corresponding to the maximum probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to the target data bucket number in the data bucket embedding matrix;

[0222] Optionally, the preprocessing module is used to:

[0223] The maximum probability value in the soft allocation probability of the transaction data is determined, and weighted processing is performed based on the data bucket embedding vector and the maximum probability value to obtain transaction pre-processing data for the transaction table data.

[0224] Optionally, the preprocessing module is used to:

[0225] The data preprocessing network is used to perform data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and the transaction data bucketing numerical vector is softly allocated and converted to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element allocated to a data bucket, and based on the transaction data soft allocation probability, the data bucket is subjected to table lookup and embedding processing to obtain a data bucket embedding vector, and a step of synthesizing the data bucket embedding vector and the transaction data soft allocation probability to obtain transaction preprocessing data for the transaction table data is performed.

[0226] Optionally, the preprocessing module is used to:

[0227] Obtain sample transaction table data and initial data preprocessing network for transaction task processing model;

[0228] Perform at least one round of model training on the initial data preprocessing network based on the sample transaction table data;

[0229] In the forward propagation training process: the data bucketing transformation processing is performed on the sample transaction table data through the initial data preprocessing network to obtain the sample transaction data bucketing numerical vector, the sample transaction data bucketing numerical vector is softly allocated and converted to obtain the sample transaction data soft allocation probability, wherein the sample transaction data bucketing numerical vector represents the unnormalized prediction value of the sample transaction data element allocated to the data bucket, the sample transaction data soft allocation probability represents the normalized probability value of the transaction data element allocated to the data bucket, the sample data bucket is subjected to table lookup embedding processing based on the sample transaction data soft allocation probability to obtain the sample data bucket embedding vector, and the sample transaction preprocessing data for the sample transaction table data is synthesized based on the sample data bucket embedding vector and the sample transaction data soft allocation probability;

[0230] During the back-propagation training process: the sample transaction preprocessing data is input into the transaction task processing model to obtain the sample transaction processing result, the sample transaction processing result and the sample transaction processing label are used to calculate the preprocessing network loss, and the preprocessing network loss is used to adjust the network parameters of the initial data preprocessing network until the initial data preprocessing network completes the network training to obtain the data preprocessing network.

[0231] Optionally, the preprocessing module is used to:

[0232] Obtain a data bucket embedding matrix corresponding to all data buckets, determine the data bucket number corresponding to each probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to each data bucket number in the data bucket embedding matrix;

[0233] A weighted process is performed based on the data bucket embedding vector and the probability value to obtain sample transaction preprocessing data for the sample transaction table data.

[0234] Optionally, the preprocessing module is used to:

[0235] Determine a preset bucket transformation function model and a data bucket embedding matrix corresponding to the initial data preprocessing network;

[0236] The preprocessing network loss is used to adjust the parameters of the preset bucket transformation function model and the data bucket embedding matrix.

[0237] It should be noted that the transaction data processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the transaction data processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the transaction data processing device provided in the above embodiment and the transaction data processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0238] The above serial numbers in this specification are for description only and do not represent the advantages or disadvantages of the embodiments.

[0239] In one or more embodiments of the present specification, the service platform performs data bucketing transformation processing on the transaction table data for the transaction task processing model to obtain a transaction data bucketing numerical vector, performs soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, performs table lookup embedding processing on the data bucket based on the transaction data soft allocation probability to obtain a data bucket embedding vector, and obtains transaction pre-processing data for the transaction table data based on a comprehensive analysis of the data bucket embedding vector and the transaction data soft allocation probability. By combining data bucketing transformation and soft allocation transformation with table lookup embedding processing, bucket boundaries are adaptively adjusted for data distribution, which can effectively cope with long-tail distribution and outliers of transaction table data, overcome the disadvantages of direct binning methods in complex distributions, avoid the limitation of poor effect when directly performing transaction data processing on data binning operations, and obtain transaction pre-processing data with excellent data feature quality, thereby ensuring the effect of transaction task processing.

[0240] The present specification also provides a computer storage medium, which can store multiple instructions, which are suitable for being loaded and executed by a processor as described above. Figure 1 to Figure 7 The transaction data processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 7 The specific description of the illustrated embodiment will not be repeated here.

[0241] The present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1 to Figure 7 The transaction data processing method of the embodiment shown in the figure can be specifically executed by referring to Figure 1 to Figure 7 The specific description of the illustrated embodiment will not be repeated here.

[0242] Please refer to Fig. 9, is a block diagram of a structure of an electronic device provided in an embodiment of this specification. The electronic device in this specification may include one or more of the following components: a processor 1010, a memory 1020, an input device 1030, an output device 1040, and a bus 1050. The processor 1010, the memory 1020, the input device 1030, and the output device 1040 may be connected via a bus 1050.

[0243] The processor 1010 may include one or more processing cores. The processor 1010 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1020, and calling data stored in the memory 1020. Optionally, the processor 1010 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1010 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1010, but may be implemented separately through a communication chip.

[0244] The memory 1020 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1020 includes a non-transitory computer-readable storage medium. The memory 1020 may be used to store instructions, programs, codes, code sets, or instruction sets.

[0245] The input device 1030 is used to receive input instructions or data, and the input device 1030 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 1040 is used to output instructions or data, and the output device 1040 includes but is not limited to a display device and a speaker. In the embodiment of this specification, the input device 1030 can be a temperature sensor for obtaining the operating temperature of the electronic device. The output device 1040 can be a speaker for outputting audio signals.

[0246] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WIFI) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.

[0247] In the embodiments of this specification, the execution subject of each step may be the electronic device described above. Optionally, the execution subject of each step is the operating system of the electronic device. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiments of this specification.

[0248] exist Fig. 9 In the electronic device, the processor 1010 can be used to call the program stored in the memory 1020 and execute it to implement the transaction data processing method as described in the various method embodiments of this specification.

[0249] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0250] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the transaction table data involved in this specification are all obtained with full authorization.

[0251] The above disclosure is only the preferred embodiment of this specification, which certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.

Claims

1. A transaction data processing method, the method comprising: Get transaction table data for transaction task processing model; Performing data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and performing soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element being allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element being allocated to a data bucket; Based on the soft assignment probability of the transaction data, the data bucket is subjected to table lookup embedding processing to obtain a data bucket embedding vector, and based on the data bucket embedding vector and the soft assignment probability of the transaction data, transaction pre-processing data for the transaction table data is obtained by synthesis; The transaction pre-processing data is input into the transaction task processing model for transaction processing.

2. According to the method of claim 1, the step of performing data bucketing transformation on the transaction table data to obtain the transaction data bucketing numerical vector comprises: The transaction table data is processed by using a preset bucket transformation function to obtain a transaction data bucket numerical vector.

3. The method according to claim 2, wherein the step of using a preset bucket transformation function to perform function solving processing on the transaction table data to obtain a transaction data bucket numerical vector comprises: Obtaining a preset bucketing transformation function model of a target number of buckets, wherein the preset bucketing transformation function model is constructed based on a preset bucketing transformation function, and the target number of buckets is the number of all data buckets; Using each of the preset bucketing transformation function models to perform bucketing function calculations on the transaction data elements of the transaction table data to obtain an unnormalized prediction value for each of the data buckets; A transaction data bucket value vector is generated based on the unnormalized prediction value of each data bucket.

4. According to the method of claim 1, the step of performing soft allocation conversion processing on the transaction data bucket numerical vector to obtain the transaction data soft allocation probability comprises: Determine a random noise variable, and use the random noise variable to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector; A soft allocation conversion process is performed based on the disturbance bucket numerical disturbance vector to obtain a soft allocation probability of transaction data.

5. According to the method of claim 4, the determining of the random noise variable and using the random noise variable to perform random perturbation processing on the transaction data bucket numerical vector to obtain the bucket numerical perturbation vector comprises: A sampling random number is randomly sampled from a preset probability distribution, and a random noise variable is obtained by using a first function formula based on the sampling random number; Based on the random noise variable, a second function formula is used to perform random perturbation processing on the transaction data bucket value vector to obtain a bucket value perturbation vector; The first function formula satisfies the following formula: g i j-log(-logU i +e)+e) Among them, the g i is the random noise variable, the U i is the sampling random number, and e is a constant coefficient; The second function formula satisfies the following formula: Among them, adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, and the Z i is the i-th vector element of the transaction data bucket numerical vector, τ is the softness temperature parameter, and i is the label.

6. According to the method of claim 4, the step of performing soft allocation conversion processing based on the disturbance bucket numerical disturbance vector to obtain the transaction data soft allocation probability comprises: Inputting the disturbance bucket numerical disturbance vector into a third function formula to perform soft allocation conversion processing to obtain a soft allocation probability of transaction data; The third function formula satisfies the following formula: Wherein, yi is the soft assignment probability of the transaction data, and adjusted_logits i is the i-th vector element of the bucket numerical perturbation vector, the adjusted_logits j is the j-th vector element of the bucket numerical perturbation vector, N is the target number of buckets for all data buckets, and j takes values ​​from the lower limit value 1 to the target number of buckets.

7. The method according to claim 1, wherein the step of performing table lookup embedding processing on the data bucket based on the soft assignment probability of the transaction data to obtain the data bucket embedding vector comprises: Get the bucket embedding matrix corresponding to all buckets; Determine the target data bucket number corresponding to the maximum probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to the target data bucket number in the data bucket embedding matrix.

8. The method according to claim 1, wherein the step of obtaining transaction pre-processing data for the transaction table data based on the data bucket embedding vector and the transaction data soft assignment probability comprises: The maximum probability value in the soft allocation probability of the transaction data is determined, and weighted processing is performed based on the data bucket embedding vector and the maximum probability value to obtain transaction pre-processing data for the transaction table data.

9. The method according to claim 1, wherein the transaction task processing model corresponds to a data preprocessing network, and the method comprises: The data preprocessing network is used to perform data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and the transaction data bucketing numerical vector is softly allocated and converted to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element allocated to a data bucket, and based on the transaction data soft allocation probability, the data bucket is subjected to table lookup and embedding processing to obtain a data bucket embedding vector, and a step of synthesizing the data bucket embedding vector and the transaction data soft allocation probability to obtain transaction preprocessing data for the transaction table data is performed.

10. The method according to claim 9, further comprising: Obtain sample transaction table data and initial data preprocessing network for transaction task processing model; Perform at least one round of model training on the initial data preprocessing network based on the sample transaction table data; In the forward propagation training process: the data bucketing transformation processing is performed on the sample transaction table data through the initial data preprocessing network to obtain the sample transaction data bucketing numerical vector, the sample transaction data bucketing numerical vector is softly allocated and converted to obtain the sample transaction data soft allocation probability, wherein the sample transaction data bucketing numerical vector represents the unnormalized prediction value of the sample transaction data element allocated to the data bucket, the sample transaction data soft allocation probability represents the normalized probability value of the transaction data element allocated to the data bucket, the sample data bucket is subjected to table lookup embedding processing based on the sample transaction data soft allocation probability to obtain the sample data bucket embedding vector, and the sample transaction preprocessing data for the sample transaction table data is synthesized based on the sample data bucket embedding vector and the sample transaction data soft allocation probability; During the back-propagation training process: the sample transaction preprocessing data is input into the transaction task processing model to obtain the sample transaction processing result, the sample transaction processing result and the sample transaction processing label are used to calculate the preprocessing network loss, and the preprocessing network loss is used to adjust the network parameters of the initial data preprocessing network until the initial data preprocessing network completes the network training to obtain the data preprocessing network.

11. The method according to claim 9, wherein the step of performing table lookup embedding processing on the sample data bucket based on the sample transaction data soft allocation probability to obtain a sample data bucket embedding vector, and synthesizing the sample data bucket embedding vector and the sample transaction data soft allocation probability to obtain sample transaction preprocessing data for the sample transaction table data comprises: Obtain a data bucket embedding matrix corresponding to all data buckets, determine the data bucket number corresponding to each probability value in the soft assignment probability of the transaction data, and query the data bucket embedding vector corresponding to each data bucket number in the data bucket embedding matrix; A weighted process is performed based on the data bucket embedding vector and the probability value to obtain sample transaction preprocessing data for the sample transaction table data.

12. The method according to claim 10, wherein the step of using the preprocessing network loss to adjust network parameters of the initial data preprocessing network comprises: Determine a preset bucket transformation function model and a data bucket embedding matrix corresponding to the initial data preprocessing network; The preprocessing network loss is used to adjust the parameters of the preset bucket transformation function model and the data bucket embedding matrix.

13. A transaction data processing device, the device comprising: A data acquisition module is used to acquire transaction table data for the transaction task processing model; A preprocessing module, used to perform data bucketing transformation processing on the transaction table data to obtain a transaction data bucketing numerical vector, and perform soft allocation transformation processing on the transaction data bucketing numerical vector to obtain a transaction data soft allocation probability, wherein the transaction data bucketing numerical vector represents an unnormalized prediction value of a transaction data element being allocated to a data bucket, and the transaction data soft allocation probability represents a normalized probability value of a transaction data element being allocated to a data bucket; The preprocessing module is further used to perform table lookup embedding processing on the data bucket based on the soft allocation probability of the transaction data to obtain a data bucket embedding vector, and to obtain transaction preprocessing data for the transaction table data based on the data bucket embedding vector and the soft allocation probability of the transaction data; The transaction processing module is used to input the transaction pre-processing data into the transaction task processing model for transaction processing.

14. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 12.

15. A computer program product, the computer program product storing at least one instruction, wherein the at least one instruction is loaded by a processor and executes the method steps according to any one of claims 1 to 12.

16. An electronic device, comprising: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 12.