WO2019154108A1 - Method and apparatus for processing transaction data - Google Patents

Method and apparatus for processing transaction data Download PDF

Info

Publication number
WO2019154108A1
WO2019154108A1 PCT/CN2019/073104 CN2019073104W WO2019154108A1 WO 2019154108 A1 WO2019154108 A1 WO 2019154108A1 CN 2019073104 W CN2019073104 W CN 2019073104W WO 2019154108 A1 WO2019154108 A1 WO 2019154108A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
neural network
transaction
data set
obtaining
Prior art date
Application number
PCT/CN2019/073104
Other languages
French (fr)
Chinese (zh)
Inventor
赵科科
赵星
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2019154108A1 publication Critical patent/WO2019154108A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2477Temporal data queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6245Protecting personal data, e.g. for financial or medical purposes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • One or more embodiments of the present specification relate to the field of computer technology, and more particularly to a method and apparatus for processing transaction data.
  • Transaction data is a high-value data asset.
  • how to dig deep into transaction data and extract the value of data has important significance in technology improvement and business improvement.
  • the transaction data generally reflects the user's transaction history. If the transaction data is mined and processed, the transaction data information can be applied to a wider range of application scenarios, such as credit business scenarios, which will further improve data utilization. In addition, in many cases, there is the possibility of co-building models with other agencies, which requires the initial processing of data to be sent to other agencies. At this point, it is hoped that the data to be mined has higher data value and data meaning, and the system risk of data leakage and the protection of user privacy should be considered, and the business meaning should be hidden as much as possible. In this way, high requirements are placed on data mining and processing.
  • One or more embodiments of the present specification describe a method and apparatus for processing transaction data more efficiently by combining preliminary data mining derived from variables and further data analysis of neural networks.
  • a method of processing transaction data comprising:
  • each data set i includes transaction detail data of the user in the corresponding time period
  • each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
  • the n feature vectors are input to the time recursive neural network in chronological order, and the processing results are obtained from the time recursive neural network.
  • the transaction detail data includes a plurality of fields including at least a transaction time field, a transaction amount field, and at least one category field.
  • the step of forming a feature vector includes: acquiring the plurality of fields of the transaction detail data in the data set i; performing an aggregation operation on the data of the plurality of fields to obtain a derivative variable; The derived variable is used as a vector element of the feature vector Fi.
  • the aggregating the data in the plurality of fields comprises: selecting at least a part of the plurality of fields to be combined to obtain a combined field; and performing an operation operation on the data of the combined field to obtain a derived variable.
  • the operation operation includes one or more of the following: numerical value judgment, counting, summation, averaging, standard deviation, grading, and distribution statistics.
  • the step of forming a feature vector further comprises: acquiring content of the at least one category field in the data set i; converting the content of the at least one category field into a word vector by using a word embedding model;
  • the predicate vector is part of the feature vector Fi.
  • the time recursive neural network employs one of a recurrent neural network RNN, a long-term and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
  • the time recursive neural network further includes at least one fully connected layer.
  • the time recursive neural network is trained using a calibrated data set that includes historical transaction data and has a label for whether a credit default has occurred.
  • obtaining the processing result from the time recursive neural network includes obtaining, from the output layer of the time recursive neural network, a probability that the user has a credit default as a processing result.
  • obtaining the processing result from the time recursive neural network may further comprise: obtaining the node feature value from the hidden layer of the neural network as a processing result.
  • an apparatus for processing transaction data comprising:
  • a data set obtaining unit configured to acquire n data sets respectively corresponding to consecutive n preset time segments, where each data set i of the n data sets includes transaction detail data of the user in the corresponding time period;
  • each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
  • a processing unit configured to input the n feature vectors into the time recursive neural network in chronological order, and obtain the processing result from the time recursive neural network.
  • a computer readable storage medium having stored thereon a computer program for causing a computer to perform the method of the first aspect when the computer program is executed in a computer.
  • a computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, implementing the method of the first aspect .
  • variable derivative of the transaction detail data is firstly performed, preliminary data mining is performed, and then the feature vector based on the derivative variable is input to the neural network for further processing, which significantly improves the network performance, and It can be applied to a variety of scenarios according to network training conditions. In addition, user privacy and security can be guaranteed.
  • FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification
  • FIG. 2 shows a flow chart of a method of processing transaction data, in accordance with one embodiment
  • FIG. 3 illustrates a schematic diagram of transaction detail data in accordance with one embodiment
  • FIG. 4 shows a process diagram of a neural network in accordance with one embodiment
  • FIG. 5 shows a schematic diagram of processing of a neural network according to another embodiment
  • Figure 6 shows a schematic block diagram of a processing device in accordance with one embodiment.
  • FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification.
  • the historical transaction detail data of the user within a long period of time for example, one year, is obtained, and the longer time period is equally divided into consecutive time periods, for example, 12 months.
  • These historical data are organized into corresponding data sets S1, S2, ... S12 according to respective time periods.
  • each month corresponds to a data set, and each data set contains transaction details of the user of the current month.
  • the transaction detail data in each data set is subjected to lateral variable derivation, that is, the transaction detail data in each data set is laterally cross-aggregated and the like, and is not vertically aggregated across the data set.
  • derived variables are obtained for each data set, and then feature vectors F1, F2...F12 corresponding to the data set are formed based on these derived variables.
  • the feature vectors corresponding to the respective data sets thus obtained are input into the time recursive neural network in chronological order, and the processing results are obtained from the neural network. In this way, the data mining derived from variables is combined with the data processing of the neural network, and the transaction data is processed more effectively.
  • the executive body of the method flow can be any device, device, platform or system with computing and processing capabilities, such as a server, and more specifically, for example, an Alipay server. As shown in FIG.
  • the method includes the following steps: Step 21: Obtain n data sets respectively corresponding to consecutive n preset time segments, where each data set i includes transaction detail data of a user in a corresponding time period; 22, forming n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on the transaction detail data in the corresponding data set i; step 23, the n features
  • the vector inputs a time recursive neural network in chronological order, and the processing results are obtained from the time recursive neural network. The specific implementation of each of the above steps is described below.
  • step 21 a transaction detail data set corresponding to each of the n consecutive preset time periods is acquired.
  • the historical transaction detail data of the user within a long period of time is first obtained, and the longer time period is equally divided into shorter, consecutive n time periods, and the historical transaction detail data is obtained. According to each time period, it is organized into corresponding data sets.
  • the longer time period is 1 year, the shorter time period is month, and the continuous n time periods are 12 months.
  • the longer time period described above is 3 months and the consecutive n time periods are 12 weeks.
  • the length of the time period and the size of n can be set according to actual business needs.
  • the data set corresponding to each time period includes the transaction detail data of the user during the time period.
  • each month corresponds to one data set
  • the data set contains the transaction detail data of the user in the month.
  • the transaction detail data is embodied in several transaction records.
  • the transaction detail data can include multiple fields. Generally, these fields include at least: a transaction time field, a transaction amount field. Typically, the transaction data will also include the transaction location field.
  • the transaction data further includes at least one category field.
  • the category fields include, for example, a seller category, a product category, an order source category, and the like.
  • FIG. 3 shows a schematic diagram of transaction detail data in accordance with one embodiment.
  • the transaction detail data contains multiple transaction records and contains the following fields: transaction time, transaction location, transaction amount, and three category fields, namely the seller category, the product category, and the order category.
  • the value of the category field is determined according to a preset rule, for example, the commodity is divided into food (Class A), clothing (Class B), book audio (C), household items (D), virtual goods (E) Class) A total of 5 classes, the order category is divided into online (On) class and offline class (off), and so on.
  • FIG. 3 is just an example.
  • Transaction detail data can take other formats, including more, fewer, or other field content, depending on the business needs.
  • step 22 On the basis of acquiring the transaction detail data sets corresponding to the respective time segments, in step 22, feature vectors corresponding to the respective data sets are formed based on the derived variables of the transaction detail data in the respective data sets.
  • the derived variable is taken as a vector element of the feature vector Fi, thereby forming a feature vector Fi based on the derived variable.
  • the acquisition of the above derived variables is actually a horizontal variable derivation, that is, a derivative operation such as horizontal cross-aggregation for the transaction detail data in each data set, without vertically merging across the data set. For example, in the case where each data set corresponds to one month, the horizontal variable derivation is only aggregated for the transaction details of the user within the one month, and the vertical and the next month are not crossed across the data set. derivative.
  • the horizontal variable derivation specifically includes: selecting at least a part of the plurality of fields of the transaction detail data to be combined to obtain a combined field; and performing an operation operation on the data of the combined field to obtain a derivative variable .
  • the arithmetic operations include: numerical determination, counting, summation, averaging, standard deviation, quantification, distribution statistics, and the like.
  • Table 1 shows examples of derived variables and their derivatives.
  • the variable derivation process it is possible to select only one field of the transaction detail data (in this case, the combination field is the field itself), and perform arithmetic operations such as variables X1 and X2; Select at least two fields of the transaction detail data, combine them, and perform operations on the data of the combined fields to obtain derivative variables.
  • the derived variable X1 represents the total amount of the transaction. In the case where a data set corresponds to one month, X1 represents the total amount of transactions of the user within one month.
  • the process of obtaining the derived variable is that, in the data set corresponding to one month, the amount field is selected, and the data in the field is summed.
  • the derivative variable X2 represents the average amount of transactions in a month.
  • the process of obtaining the derived variable X2 may include selecting an amount field and averaging the data in the field.
  • X3-X6 is a derived variable determined based on a combination of multiple fields. Specifically, the derived variable X3 represents, for example, within one month, the total amount spent on the category A commodity. In order to obtain the derivative variable X3, the amount field of the transaction detail data is combined with the field of the commodity category, and the transaction record of the commodity category field A is determined by numerical judgment, and then the data of the amount field in the records is summed, The derived variable X3 is obtained.
  • the derivative variable X4 represents the number of consumers in the offline two types of shops.
  • the derivative variable X6 represents the distribution of the number of purchases during the week.
  • X6 can be expressed as (p1, p2, ... p7), Where pi represents the proportion of the number of pens purchased on the ith day of the week.
  • a feature vector corresponding to the data set can be formed.
  • a feature vector Fi (X1, X2, X3, X4, X5, X6) can be formed. It can be understood that Table 1 is only an example. It is also possible to use more kinds of field combinations, and use more kinds of operations to perform lateral variable derivation in the same data set, thereby obtaining more derivative variables and forming feature vectors of more elements. .
  • variable derivation the value of the category field used for variable derivation should not be too large.
  • the derivative variable X3 shown in Table 1 indicates the total amount of consumption in the category A commodity. If the case of different values in the same category is treated the same, then the total consumption of goods in Class B, Class C, ... Class E is also counted in correspondence with X3. If the value of the commodity category field is too large, such as 20 classes, then the number of derived variables may be too large. Therefore, variable derivation is generally based on a category field whose value is within a certain range.
  • the transaction detail data in the data set includes a category field having a value greater than a predetermined threshold, such as twenty.
  • a predetermined threshold such as twenty.
  • the content of the category field is converted to a word vector using a word embedding model, with the word vector as part of the feature vector of the data set.
  • the word embedding model is a model used in natural language processing NLP to convert a single word into a vector.
  • a set of features is constructed for each word as its corresponding vector.
  • the language model can be trained in various ways to optimize vector expression.
  • the word2vec tool contains a variety of word embedding methods, which can quickly get the vector expression of a word, and the vector expression can reflect the analogy between words.
  • word embedding algorithms such as one hot encoding algorithms.
  • the word field can be converted to a word vector by the word embedding model.
  • the word vector can be spliced together with the derived variables to form a feature vector corresponding to the data set.
  • a corresponding feature vector Fi is formed for each data set. Then, next in step 23, the thus formed n feature vectors are input into the time recursive neural network in chronological order, and the processing result is obtained from the time recursive neural network.
  • the time recursive neural network employs a Recurrent Neural Network (RNN).
  • RNN Recurrent Neural Network
  • the recurrent neural network RNN is a typical time recurrent neural network that can be used to process sequence data.
  • the current output of a sequence is associated with its previous output.
  • the RNN memorizes the previous information and applies it to the calculation of the current output, that is, the nodes between the hidden layers are connected, and the input of the hidden layer includes not only the output of the input layer but also the previous moment.
  • the output of this hidden layer that is to say, the t-th hidden layer state can be expressed as:
  • Xt is the state of the tth input layer
  • St-1 is the t-1th hidden layer state
  • f is the calculation function
  • W and U are the weights.
  • the time recursive neural network uses a Long Short Term Memory (LSTM).
  • LSTM is an improved model based on the cyclic neural network RNN.
  • Cyclic neural network RNN has long-term dependence problems when dealing with long-term memory, and training is difficult (such as the problem of gradient overflow).
  • the LSTM model proposed on the basis of RNN can further solve the problem of long-term dependence.
  • the time recursive neural network employs a Gated Recurrent Unit (GRU) neural network.
  • the gated loop unit GRU neural network can be considered as a simplification and variant of the LSTM neural network.
  • the GRU model modifies the settings of the input, output, and forgetting gates in the LSTM to two gates: the update gate and the reset gate.
  • the update gate is used to control the degree to which the status information of the previous moment is brought into the current state. The larger the value of the update gate is, the more the status information is brought in at the previous moment.
  • the reset gate is used to control the degree of ignoring the status information of the previous moment. The smaller the value of the reset gate, the more it is ignored.
  • the time recursive neural network includes a number of fully connected layers in addition to the temporal recursive layers implemented by the various models above. Each node in the fully connected layer is connected to all nodes of the upper layer to integrate the features extracted from the front. In this way, a comprehensive analysis and processing of the characteristics of the previously hidden layers is achieved.
  • the neural networks constructed in various ways by various models as described above are time recursive neural networks, and sequences having time series information can be processed.
  • the feature vectors Fi corresponding to the respective data sets i are sequentially input to the above-described neural network in chronological order.
  • the n feature vectors are sequentially input into the time recursive neural network according to the time sequence of the corresponding data set, and further analyzed.
  • the n feature vectors are organized into a feature matrix according to the chronological order of the corresponding data sets. For example, assuming that each feature vector is an m-dimensional vector, n feature vectors can be organized into a matrix of m*n, and the row vector of the i-th row in the matrix corresponds to the feature vector Fi.
  • a feature matrix is input to the above time recursive neural network. Since the row vectors in the feature matrix are organized in chronological order, the neural network can still obtain the timing relationship between the feature vectors, and then perform analysis processing.
  • FIG. 4 shows a process diagram of a neural network in accordance with one embodiment.
  • a total of 12 data sets are acquired, each of which corresponds to one month of transaction detail data, and each data set i forms a corresponding feature vector Fi based on the derived variables.
  • the time recurrent neural network in Figure 4 uses a cyclic neural network RNN.
  • the feature vectors F1, F2, ..., F12 are sequentially input to the cyclic neural network RNN.
  • the horizontal arrow between the RNNs in Fig. 4 indicates the transition of the time state, and H1-H12 indicates the state change of the RNN.
  • the cyclic neural network can output the processing result.
  • FIG. 5 shows a process diagram of a neural network in accordance with another embodiment.
  • the data sets respectively corresponding to one month, and the corresponding feature vectors F1-F12 are still employed, but the time recurrent neural network uses the long- and short-term memory neural network LSTM.
  • the neural network also includes a fully connected layer based on the LSTM architecture.
  • feature vectors F1, F2, ... F12 are sequentially input to the LSTM neural network, and H1-H12 indicate state changes of the LSTM.
  • the result of processing the LSTM to F12 is spliced again with F12 itself, that is, H12 and F12 are spliced together, and then input to the fully connected layer together. Finally, the processing result is output by the fully connected layer.
  • the F12 and H12 are spliced and then input to the fully connected layer
  • H12 can also be directly input to the fully connected layer without being spliced with F12.
  • Time recursive neural networks can be constructed in a variety of ways, including the above examples and other models that are not exhaustively enumerated.
  • a two-class supervised learning algorithm is employed to train the neural network described above. Specifically, the time recursive neural network is trained using the calibrated data set, the calibrated data set including historical transaction data, and a tag having a credit default. More specifically, a data set containing historical transaction data is obtained, which may be from the same user or a different user. Correspondingly, the data set is derived from variables to form a sequence of feature vectors.
  • a record of whether the user has a credit default in the period corresponding to the historical transaction data set is also acquired, and based on the record, the historical transaction data set is given a tag value indicating whether a credit default has occurred.
  • a historical transaction data set with such a tag becomes a calibration data set that can be used to train a neural network.
  • the calibration data set (especially the sequence of feature vectors) is processed by the neural network to give a prediction result of whether credit default will occur, and the prediction result is compared with the actual tag value, thereby calculating The loss function, the gradient transfer according to the loss function, the modification and optimization of the model parameters, and thus repeated training, thereby obtaining the trained neural network.
  • the neural network thus trained can be used to give a probability of a user's credit default by analyzing and processing the transaction data. That is, in step 23, when the n feature vectors corresponding to the n data sets are input to the trained, time recursive neural network, the neural network may output the probability that the user has a credit default as an output result. Accordingly, in one embodiment, obtaining the processing result from the time recursive neural network includes, from the output layer of the neural network, obtaining a probability that the user has a credit default as a processing result. In such cases, transaction data is applied to the business scenario of credit evaluation through variable derivative and neural network training.
  • the node feature values may also be obtained from the hidden layer of the time recursive neural network as a result of the processing.
  • the node feature values in some of the hidden layers also have strong data value and meaning.
  • some neural networks contain a bottleneck layer with a significantly reduced number of nodes.
  • the node feature value of the bottleneck layer can be regarded as a low-dimensional representation of the input feature, which can reflect strong data logic and meaning.
  • Other hidden layers near the output layer the node feature values also have a certain data meaning. Therefore, the node feature values can also be extracted from the hidden layer of the neural network as a result of the processing.
  • Such processing results can be used to input into further models, such as models built with other organizations, for further data analysis and processing.
  • variable derivative is first performed on the transaction detail data, preliminary data mining is performed, and then the feature vector based on the derivative variable is input to the neural network for further processing, which makes the network performance significantly improved and can be applied to Contains a variety of scenarios for credit business.
  • processing of data by the neural network is a process of nonlinear transformation, the data thus processed has both clear data meaning and user privacy and security.
  • FIG. 6 shows a schematic block diagram of a processing device in accordance with one embodiment.
  • the processing device 600 includes: a data set obtaining unit 610, configured to acquire n data sets respectively corresponding to consecutive n preset time segments, where each data set i of the n data sets includes a corresponding a transaction detail data of the user in the time period; the vector forming unit 620 is configured to form n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes, respectively, based on the transaction details in the corresponding data set i Derived variables derived from the data; and processing unit 630 configured to input the n feature vectors into the time recursive neural network in chronological order, and obtain the processing results from the time recursive neural network.
  • the transaction detail data includes a plurality of fields, the plurality of fields including at least: a transaction time field, a transaction amount field, and at least one category field.
  • the vector forming unit 620 includes: a field obtaining module 621 configured to acquire the plurality of fields of the transaction detail data in the data set i; and an aggregation operation module 622 configured to the plurality of fields The data is subjected to an aggregation operation to obtain a derived variable; and an element forming module 623 is configured to use the derived variable as a vector element of the feature vector Fi.
  • the aggregating operation module 622 is further configured to: select at least a part of the plurality of fields to be combined to obtain a combined field; and perform an operation operation on the data of the combined field to obtain a derivative variable.
  • the operation operation includes one or more of the following: numerical value judgment, counting, summation, averaging, standard deviation, grading, and distribution statistics.
  • the vector forming unit 620 further includes a word embedding module 624 configured to: acquire content of the at least one category field in the data set i; convert the content of the at least one category field by using a word embedding model Is a word vector; the word vector is taken as part of the feature vector Fi.
  • a word embedding module 624 configured to: acquire content of the at least one category field in the data set i; convert the content of the at least one category field by using a word embedding model Is a word vector; the word vector is taken as part of the feature vector Fi.
  • the time recursive neural network described above employs one of a recurrent neural network RNN, a long- and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
  • the time recursive neural network further includes at least one fully connected layer.
  • the time recursive neural network is trained using a calibrated data set that includes historical transaction data and has a label for whether a credit default has occurred.
  • the processing unit 630 is configured to obtain, from the output layer of the time recursive neural network, a probability that the user has a credit default as a result of the processing.
  • processing unit 630 may also obtain node feature values from the hidden layer of the time recursive neural network as a result of the process.
  • variable derivative of transaction detail data is firstly carried out, preliminary data mining is performed, and then the feature vector based on the derivative variable is input into the neural network for further processing, which makes the network performance significantly improved and can be applied according to the network training situation.
  • the network performance significantly improved and can be applied according to the network training situation.
  • user privacy and security can be guaranteed.
  • a computer readable storage medium having stored thereon a computer program for causing a computer to perform the method described in connection with FIG. 2 when the computer program is executed in a computer.
  • a computing device comprising a memory and a processor, the memory storing executable code, and when the processor executes the executable code, implementing the method described in connection with FIG. 2 method.
  • the functions described herein can be implemented in hardware, software, firmware, or any combination thereof.
  • the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.

Abstract

A method and apparatus for processing transaction data. The method comprises: first obtaining n data sets respectively corresponding to continuous n time periods, wherein each data set i comprises transaction detail data of a user in a corresponding time period; then obtaining a derivation variable on the basis of the transaction detail data in the corresponding data set i, and forming, on the basis of the derivation variable, a feature factor corresponding to each data set; and on this basis, inputting each feature factor into a time-recursive neural network in a time sequence, and obtaining a processing result from the neural network. Therefore, transaction data is mined and analyzed more effectively.

Description

处理交易数据的方法及装置Method and device for processing transaction data
相关申请的交叉引用Cross-reference to related applications
本专利申请要求于2018年2月12日提交的、申请号为201810146777.7、发明名称为“处理交易数据的方法及装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本文中。The present application claims priority to Chinese Patent Application No. 201101146777.7, filed on Feb. 12, 20, the entire disclosure of which is incorporated herein by reference. in.
技术领域Technical field
本说明书一个或多个实施例涉及计算机技术领域,尤其涉及处理交易数据的方法和装置。One or more embodiments of the present specification relate to the field of computer technology, and more particularly to a method and apparatus for processing transaction data.
背景技术Background technique
随着互联网技术的发展,人们越来越频繁地利用互联网和电子钱包进行各种交易,由此形成了交易数据。交易数据是具有很高价值的数据资产,特别是在目前的大数据背景下,如何深入挖掘交易数据,提炼出数据价值,在技术提升和业务提升方面都有重要的意义。With the development of Internet technology, people use the Internet and e-wallets more and more frequently for various transactions, thereby forming transaction data. Transaction data is a high-value data asset. Especially in the current big data background, how to dig deep into transaction data and extract the value of data has important significance in technology improvement and business improvement.
进一步地,在对数据进行深入挖掘的同时,还需要考虑应用场景问题和安全性问题。交易数据一般反映用户的交易历史,如果能通过交易数据的挖掘和处理,将交易数据的信息应用在更广泛的应用场景,例如信用业务场景,将进一步提升数据的利用率。此外,在许多情况下,存在与其他机构共建模型的可能,这就需要将初步处理的数据发给其他机构。此时,既希望挖掘的数据有较高的数据价值和数据含义,又要考虑数据泄露的系统风险和用户隐私的保护,而尽量隐藏业务含义。如此,对数据的挖掘和处理提出很高的要求。Further, while deep digging data, it is also necessary to consider application scenarios and security issues. The transaction data generally reflects the user's transaction history. If the transaction data is mined and processed, the transaction data information can be applied to a wider range of application scenarios, such as credit business scenarios, which will further improve data utilization. In addition, in many cases, there is the possibility of co-building models with other agencies, which requires the initial processing of data to be sent to other agencies. At this point, it is hoped that the data to be mined has higher data value and data meaning, and the system risk of data leakage and the protection of user privacy should be considered, and the business meaning should be hidden as much as possible. In this way, high requirements are placed on data mining and processing.
因此,希望能有改进的方案,更有效地对交易数据进行处理。Therefore, it is hoped that there will be an improved solution to process transaction data more efficiently.
发明内容Summary of the invention
本说明书一个或多个实施例描述了一种方法和装置,通过结合变量衍生的初步数据挖掘和神经网络的进一步数据分析,更有效地对交易数据进行处理。One or more embodiments of the present specification describe a method and apparatus for processing transaction data more efficiently by combining preliminary data mining derived from variables and further data analysis of neural networks.
根据第一方面,提供了一种处理交易数据的方法,包括:According to a first aspect, a method of processing transaction data is provided, comprising:
获取与连续的n个预设时间段分别对应的n个数据集,其中各个数据集i包括对应的时间段中用户的交易明细数据;Obtaining n data sets respectively corresponding to consecutive n preset time segments, wherein each data set i includes transaction detail data of the user in the corresponding time period;
形成与所述n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;Forming n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果。The n feature vectors are input to the time recursive neural network in chronological order, and the processing results are obtained from the time recursive neural network.
根据一个实施例,交易明细数据包括多个字段,所述多个字段至少包括:交易时间字段,交易金额字段,以及至少一个类别字段。According to one embodiment, the transaction detail data includes a plurality of fields including at least a transaction time field, a transaction amount field, and at least one category field.
在一种可能的设计中,形成特征向量的步骤包括:获取数据集i中所述交易明细数据的所述多个字段;对所述多个字段的数据进行聚合操作,从而获得衍生变量;将所述衍生变量作为所述特征向量Fi的向量元素。In a possible design, the step of forming a feature vector includes: acquiring the plurality of fields of the transaction detail data in the data set i; performing an aggregation operation on the data of the plurality of fields to obtain a derivative variable; The derived variable is used as a vector element of the feature vector Fi.
根据一个实施例,对多个字段中的数据进行聚合操作包括:从所述多个字段中选择至少一部分字段进行组合,得到组合字段;对组合字段的数据进行运算操作,从而得到衍生变量。According to an embodiment, the aggregating the data in the plurality of fields comprises: selecting at least a part of the plurality of fields to be combined to obtain a combined field; and performing an operation operation on the data of the combined field to obtain a derived variable.
进一步地,在一个实施例中,上述运算操作包括以下中的一项或多项:数值判断、计数、求和、求平均、求标准差、求分位数、分布统计。Further, in an embodiment, the operation operation includes one or more of the following: numerical value judgment, counting, summation, averaging, standard deviation, grading, and distribution statistics.
根据一种可能的设计,形成特征向量的步骤还包括:获取数据集i中所述至少一个类别字段的内容;利用词嵌入模型,将所述至少一个类别字段的内容转换为词向量;将所述词向量作为所述特征向量Fi的一部分。According to a possible design, the step of forming a feature vector further comprises: acquiring content of the at least one category field in the data set i; converting the content of the at least one category field into a word vector by using a word embedding model; The predicate vector is part of the feature vector Fi.
在一个实施例中,上述时间递归的神经网络采用循环神经网络RNN,长短期记忆神经网络LSTM,门控循环单元神经网络GRU之一。In one embodiment, the time recursive neural network employs one of a recurrent neural network RNN, a long-term and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
在一个实施例中,时间递归的神经网络还包括至少一个全连接层。In one embodiment, the time recursive neural network further includes at least one fully connected layer.
根据一个实施例,所述时间递归的神经网络利用已标定数据集进行训练,所述已标定数据集包括历史交易数据,且具有是否发生信用违约的标签。According to one embodiment, the time recursive neural network is trained using a calibrated data set that includes historical transaction data and has a label for whether a credit default has occurred.
相应地,在一个实施例中,从时间递归的神经网络获得处理结果包括:从所述时间递归的神经网络的输出层,获得所述用户发生信用违约的概率作为处理结果。Accordingly, in one embodiment, obtaining the processing result from the time recursive neural network includes obtaining, from the output layer of the time recursive neural network, a probability that the user has a credit default as a processing result.
此外,在一个实施例中,从时间递归的神经网络获得处理结果还可以包括:从神经网络的隐含层获得节点特征值作为处理结果。Moreover, in one embodiment, obtaining the processing result from the time recursive neural network may further comprise: obtaining the node feature value from the hidden layer of the neural network as a processing result.
根据第二方面,提供一种处理交易数据的装置,包括:According to a second aspect, an apparatus for processing transaction data is provided, comprising:
数据集获取单元,配置为获取与连续的n个预设时间段分别对应的n个数据集,所述n个数据集中各个数据集i包括对应的时间段中用户的交易明细数据;a data set obtaining unit, configured to acquire n data sets respectively corresponding to consecutive n preset time segments, where each data set i of the n data sets includes transaction detail data of the user in the corresponding time period;
向量形成单元,配置为形成与所述n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;a vector forming unit configured to form n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
处理单元,配置为将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果。And a processing unit configured to input the n feature vectors into the time recursive neural network in chronological order, and obtain the processing result from the time recursive neural network.
根据第三方面,提供了一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行第一方面的方法。According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program for causing a computer to perform the method of the first aspect when the computer program is executed in a computer.
根据第四方面,提供了一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现第一方面的方法。According to a fourth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, implementing the method of the first aspect .
通过本说明书实施例提供的方法及装置,首先对交易明细数据进行变量衍生,进行初步数据挖掘,然后将基于衍生变量的特征向量输入到神经网络进行进一步处理,这使得网络性能得到显著提升,并可以根据网络训练情况应用到多种场景中。此外,还可以保证用户隐私和安全性。Through the method and device provided by the embodiments of the present specification, variable derivative of the transaction detail data is firstly performed, preliminary data mining is performed, and then the feature vector based on the derivative variable is input to the neural network for further processing, which significantly improves the network performance, and It can be applied to a variety of scenarios according to network training conditions. In addition, user privacy and security can be guaranteed.
附图说明DRAWINGS
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present invention, Those skilled in the art can also obtain other drawings based on these drawings without any creative work.
图1为本说明书披露的一个实施例的实施场景示意图;1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification;
图2示出根据一个实施例的处理交易数据的方法的流程图;2 shows a flow chart of a method of processing transaction data, in accordance with one embodiment;
图3示出根据一个实施例的交易明细数据的示意图;Figure 3 illustrates a schematic diagram of transaction detail data in accordance with one embodiment;
图4示出根据一个实施例的神经网络的处理示意图;4 shows a process diagram of a neural network in accordance with one embodiment;
图5示出根据另一个实施例的神经网络的处理示意图;FIG. 5 shows a schematic diagram of processing of a neural network according to another embodiment;
图6示出根据一个实施例的处理装置的示意性框图。Figure 6 shows a schematic block diagram of a processing device in accordance with one embodiment.
具体实施方式Detailed ways
下面结合附图,对本说明书提供的方案进行描述。The solution provided in this specification will be described below with reference to the accompanying drawings.
图1为本说明书披露的一个实施例的实施场景示意图。如图所示,首先获取用户在一段较长的时间周期,例如一年,之内的历史交易明细数据,将该较长的时间周期等分为连续的多个时间段,例如12个月,将这些历史数据按照各个时间段整理为对应的数据集S1,S2,…S12。例如,每个月对应一个数据集,每个数据集包含当月用户的交易明细数据。然后,对于每个数据集中的交易明细数据进行横向变量衍生,也就是,针对每个数据集内的交易明细数据进行横向地交叉聚合等衍生,而不会纵向地跨数据集进行聚合。如此,针对每个数据集获得衍生变量,然后基于这些衍生变量形成数据集对应的特征向量F1,F2…F12。将如此获得的各个数据集对应的特征向量按照时间顺序输入时间递归的神经网络,从该神经网络获得处理结果。如此,将变量衍生的数据挖掘与神经网络的数据处理进行了结合,对交易数据进行了更为有效的处理。FIG. 1 is a schematic diagram of an implementation scenario of an embodiment disclosed in the present specification. As shown in the figure, firstly, the historical transaction detail data of the user within a long period of time, for example, one year, is obtained, and the longer time period is equally divided into consecutive time periods, for example, 12 months. These historical data are organized into corresponding data sets S1, S2, ... S12 according to respective time periods. For example, each month corresponds to a data set, and each data set contains transaction details of the user of the current month. Then, the transaction detail data in each data set is subjected to lateral variable derivation, that is, the transaction detail data in each data set is laterally cross-aggregated and the like, and is not vertically aggregated across the data set. Thus, derived variables are obtained for each data set, and then feature vectors F1, F2...F12 corresponding to the data set are formed based on these derived variables. The feature vectors corresponding to the respective data sets thus obtained are input into the time recursive neural network in chronological order, and the processing results are obtained from the neural network. In this way, the data mining derived from variables is combined with the data processing of the neural network, and the transaction data is processed more effectively.
图2示出根据一个实施例的处理交易数据的方法的流程图。该方法流程的执行主体可以为任何具有计算和处理能力的装置、设备、平台或系统,例如服务器,更具体地,例如是支付宝服务器。如图2所示,该方法包括以下步骤:步骤21,获取与连续的n个预设时间段分别对应的n个数据集,各个数据集i包括对应的时间段中用户的交易明细数据;步骤22,形成与n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;步骤23,将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果。下面描述以上各个步骤的具体执行方式。2 shows a flow diagram of a method of processing transaction data, in accordance with one embodiment. The executive body of the method flow can be any device, device, platform or system with computing and processing capabilities, such as a server, and more specifically, for example, an Alipay server. As shown in FIG. 2, the method includes the following steps: Step 21: Obtain n data sets respectively corresponding to consecutive n preset time segments, where each data set i includes transaction detail data of a user in a corresponding time period; 22, forming n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on the transaction detail data in the corresponding data set i; step 23, the n features The vector inputs a time recursive neural network in chronological order, and the processing results are obtained from the time recursive neural network. The specific implementation of each of the above steps is described below.
首先,在步骤21,获取与连续的n个预设时间段分别对应的交易明细数据集。First, in step 21, a transaction detail data set corresponding to each of the n consecutive preset time periods is acquired.
在一个实施例中,首先获取用户在较长的时间周期之内的历史交易明细数据,将该较长的时间周期等分为较短的、连续的n个时间段,将这些历史交易明细数据按照各个时间段整理为对应的数据集。In one embodiment, the historical transaction detail data of the user within a long period of time is first obtained, and the longer time period is equally divided into shorter, consecutive n time periods, and the historical transaction detail data is obtained. According to each time period, it is organized into corresponding data sets.
在一个例子中,上述较长的时间周期为1年,较短的时间段为月,连续的n个时间段为12个月。在另一例子中,上述较长的时间周期为3个月,连续的n个时间段为12个星期。在其他例子中,可以根据实际的业务需要,设置时间段的长度,以及n的大小。In one example, the longer time period is 1 year, the shorter time period is month, and the continuous n time periods are 12 months. In another example, the longer time period described above is 3 months and the consecutive n time periods are 12 weeks. In other examples, the length of the time period and the size of n can be set according to actual business needs.
相应地,与各个时间段对应的数据集中包括该时间段内用户的交易明细数据。例如,在上述时间段为月的情况下,每个月对应一个数据集,并且该数据集包含用户在该月中 的交易明细数据。Correspondingly, the data set corresponding to each time period includes the transaction detail data of the user during the time period. For example, in the case where the above time period is a month, each month corresponds to one data set, and the data set contains the transaction detail data of the user in the month.
在一个例子中,交易明细数据体现为若干条交易记录。并且,交易明细数据可以包括多个字段。一般地,这些字段至少包括:交易时间字段,交易金额字段。通常,交易数据还会包括交易地点字段。在一个实施例中,交易数据还包括至少一个类别字段。类别字段例如包括,卖家类别、商品类别、订单来源类别等等。In one example, the transaction detail data is embodied in several transaction records. And, the transaction detail data can include multiple fields. Generally, these fields include at least: a transaction time field, a transaction amount field. Typically, the transaction data will also include the transaction location field. In one embodiment, the transaction data further includes at least one category field. The category fields include, for example, a seller category, a product category, an order source category, and the like.
图3示出根据一个实施例的交易明细数据的示意图。在图3的例子中,交易明细数据包含了多条交易记录,并包含有以下字段:交易时间、交易地点、交易金额,以及3个类别字段,即卖家类别、商品类别和订单类别。其中类别字段的取值根据预先设定的规则而确定,例如商品被划分为食品(A类),服装(B类),图书音像(C类),家居用品(D类),虚拟商品(E类)共5个类,订单类别被划分为线上(On)类和线下类(off),等等。可以理解,图3仅仅是一个示例。根据业务需要,交易明细数据可以采取其他的格式,包含更多、更少或其他的字段内容。FIG. 3 shows a schematic diagram of transaction detail data in accordance with one embodiment. In the example of Figure 3, the transaction detail data contains multiple transaction records and contains the following fields: transaction time, transaction location, transaction amount, and three category fields, namely the seller category, the product category, and the order category. The value of the category field is determined according to a preset rule, for example, the commodity is divided into food (Class A), clothing (Class B), book audio (C), household items (D), virtual goods (E) Class) A total of 5 classes, the order category is divided into online (On) class and offline class (off), and so on. It can be understood that FIG. 3 is just an example. Transaction detail data can take other formats, including more, fewer, or other field content, depending on the business needs.
在获取了与各个时间段对应的交易明细数据集的基础上,在步骤22,基于各个数据集中的交易明细数据的衍生变量,形成与各个数据集分别对应的特征向量。On the basis of acquiring the transaction detail data sets corresponding to the respective time segments, in step 22, feature vectors corresponding to the respective data sets are formed based on the derived variables of the transaction detail data in the respective data sets.
具体地,在一个实施例中,为了针对数据集i形成特征向量Fi,首先获取该数据集i中交易明细数据的多个字段,然后对多个字段的数据进行聚合操作,从而获得衍生变量;接着,将所述衍生变量作为特征向量Fi的向量元素,从而基于衍生变量形成特征向量Fi。以上衍生变量的获取实际上是横向变量衍生,即,针对每个数据集内的交易明细数据进行横向地交叉聚合等衍生操作,而不会纵向地跨数据集进行聚合。例如,在每个数据集对应一个月的情况下,横向变量衍生只针对用户在该一个月之内的交易明细数据进行聚合衍生,而不会跨数据集进行上一个月与下一个月的纵向衍生。Specifically, in one embodiment, in order to form the feature vector Fi for the data set i, first acquiring a plurality of fields of the transaction detail data in the data set i, and then performing aggregation operations on the data of the plurality of fields, thereby obtaining a derivative variable; Next, the derived variable is taken as a vector element of the feature vector Fi, thereby forming a feature vector Fi based on the derived variable. The acquisition of the above derived variables is actually a horizontal variable derivation, that is, a derivative operation such as horizontal cross-aggregation for the transaction detail data in each data set, without vertically merging across the data set. For example, in the case where each data set corresponds to one month, the horizontal variable derivation is only aggregated for the transaction details of the user within the one month, and the vertical and the next month are not crossed across the data set. derivative.
更具体地,在一个实施例中,上述横向变量衍生具体包括,从交易明细数据的多个字段中选择至少一部分字段进行组合,得到组合字段;对组合字段的数据进行运算操作,从而得到衍生变量。在一个实施例中,上述运算操作包括:数值判断、计数、求和、求平均、求标准差、求分位数、分布统计,等等。More specifically, in one embodiment, the horizontal variable derivation specifically includes: selecting at least a part of the plurality of fields of the transaction detail data to be combined to obtain a combined field; and performing an operation operation on the data of the combined field to obtain a derivative variable . In one embodiment, the arithmetic operations include: numerical determination, counting, summation, averaging, standard deviation, quantification, distribution statistics, and the like.
表1示出了衍生变量及其衍生过程的示例。Table 1 shows examples of derived variables and their derivatives.
表1Table 1
Figure PCTCN2019073104-appb-000001
Figure PCTCN2019073104-appb-000001
如表1所示,在变量衍生过程中,有可能仅选择交易明细数据的一个字段(在这样的情况下,组合字段即为该字段本身),进行运算操作,例如变量X1和X2;也有可能选择交易明细数据的至少两个字段,对其进行组合,对组合字段的数据进行运算操作,从而得到衍生变量。具体地,在表1的例子中,衍生变量X1表示交易总额。在一个数据集对应一个月的情况下,X1即表示用户在一个月之内的交易总额。该衍生变量的获取过程即为,在对应于一个月的数据集中,选择金额字段,对该字段内的数据进行求和运算。又例如,衍生变量X2表示,一个月中交易平均额。该衍生变量X2的获取过程可以包括,选择金额字段,对该字段内的数据进行求平均。As shown in Table 1, in the variable derivation process, it is possible to select only one field of the transaction detail data (in this case, the combination field is the field itself), and perform arithmetic operations such as variables X1 and X2; Select at least two fields of the transaction detail data, combine them, and perform operations on the data of the combined fields to obtain derivative variables. Specifically, in the example of Table 1, the derived variable X1 represents the total amount of the transaction. In the case where a data set corresponds to one month, X1 represents the total amount of transactions of the user within one month. The process of obtaining the derived variable is that, in the data set corresponding to one month, the amount field is selected, and the data in the field is summed. For another example, the derivative variable X2 represents the average amount of transactions in a month. The process of obtaining the derived variable X2 may include selecting an amount field and averaging the data in the field.
X3-X6为基于多个字段的组合确定的衍生变量。具体地,衍生变量X3表示,(例如一个月内)在A类商品上消费总金额。为获取该衍生变量X3,将交易明细数据的金额字段与商品类别的字段进行组合,通过数值判断确定出商品类别字段为A的交易记录,然后对这些记录中的金额字段的数据求和,如此获得衍生变量X3。衍生变量X4表示线下二类商铺的消费笔数。为获取该衍生变量X4,将交易明细数据的卖家类别字段以及订单类别字段进行组合,通过数值判断筛选出卖家类别字段值为“二类”、且订单类别字段值为“off”的交易记录,并对这些交易记录进行计数,如此获得X4。其他的衍生变量类似地通过字段组合和运算操作来获得。需要注意的是,衍生变量X6表示周内购 买笔数分布。与其他体现为单一数值的衍生变量略有不同的是,这样的表示分布的衍生变量可以采取多个数值构成的子向量的格式来表示,例如X6可以表示为(p1,p2,…p7),其中pi表示一周之内第i天购买笔数的占比。X3-X6 is a derived variable determined based on a combination of multiple fields. Specifically, the derived variable X3 represents, for example, within one month, the total amount spent on the category A commodity. In order to obtain the derivative variable X3, the amount field of the transaction detail data is combined with the field of the commodity category, and the transaction record of the commodity category field A is determined by numerical judgment, and then the data of the amount field in the records is summed, The derived variable X3 is obtained. The derivative variable X4 represents the number of consumers in the offline two types of shops. In order to obtain the derivative variable X4, the seller category field and the order category field of the transaction detail data are combined, and the transaction record whose seller category field value is “second class” and the order category field value is “off” is selected by numerical judgment. And count these transaction records, thus obtaining X4. Other derived variables are similarly obtained through field combination and arithmetic operations. It should be noted that the derivative variable X6 represents the distribution of the number of purchases during the week. A little different from other derived variables that are embodied as a single value, such derived variables of the representation distribution can be represented in the form of sub-vectors of multiple values, for example, X6 can be expressed as (p1, p2, ... p7), Where pi represents the proportion of the number of pens purchased on the ith day of the week.
将各个衍生变量作为向量元素,就可以形成与数据集对应的特征向量。例如,基于表1的衍生变量,可以形成特征向量Fi=(X1,X2,X3,X4,X5,X6)。可以理解,表1只是一个示例,还可以采用更多种字段组合方式,采用更多种运算,在同一数据集内进行横向变量衍生,从而获得更多的衍生变量,形成更多元素的特征向量。Using each derived variable as a vector element, a feature vector corresponding to the data set can be formed. For example, based on the derived variables of Table 1, a feature vector Fi = (X1, X2, X3, X4, X5, X6) can be formed. It can be understood that Table 1 is only an example. It is also possible to use more kinds of field combinations, and use more kinds of operations to perform lateral variable derivation in the same data set, thereby obtaining more derivative variables and forming feature vectors of more elements. .
一般地,用于变量衍生的类别字段的取值不宜过大。例如,对于商品类别,表1所示的衍生变量X3表示在A类商品的消费总金额。如果对同一类别下不同取值的情况等同对待,那么通常与X3对应地,还会统计在B类,C类,…E类商品的消费总额。如果商品类别这一字段的取值过大,例如20个类,那么可能导致衍生变量的数目过于庞大。因此,变量衍生一般基于取值在一定范围内的类别字段。In general, the value of the category field used for variable derivation should not be too large. For example, for the commodity category, the derivative variable X3 shown in Table 1 indicates the total amount of consumption in the category A commodity. If the case of different values in the same category is treated the same, then the total consumption of goods in Class B, Class C, ... Class E is also counted in correspondence with X3. If the value of the commodity category field is too large, such as 20 classes, then the number of derived variables may be too large. Therefore, variable derivation is generally based on a category field whose value is within a certain range.
在一个实施例中,数据集中的交易明细数据包含这样的类别字段,该类别字段的取值大于预定阈值,例如20个。对于这样的类别字段,在一个实施例中,利用词嵌入(embedding)模型,将该类别字段的内容转换为词向量,将词向量作为数据集的特征向量的一部分。In one embodiment, the transaction detail data in the data set includes a category field having a value greater than a predetermined threshold, such as twenty. For such a category field, in one embodiment, the content of the category field is converted to a word vector using a word embedding model, with the word vector as part of the feature vector of the data set.
可以理解,词嵌入模型是自然语言处理NLP中用到的一种模型,用于将单个词转换为一个向量。在最简单的模型中,为每个单词构造一组特征作为其对应向量。更进一步地,为了体现单词之间的关系,例如类别关系,从属关系,可以采用各种方式训练语言模型,优化向量表达。例如,word2vec的工具中包含了多种词嵌入的方法,能够快速得到单词的向量表达,并且向量表达能够体现单词之间的类比关系。还存在一些其他的词嵌入算法,例如独热编码(one hot encoding)算法等。It can be understood that the word embedding model is a model used in natural language processing NLP to convert a single word into a vector. In the simplest model, a set of features is constructed for each word as its corresponding vector. Further, in order to embody the relationship between words, such as category relationship, affiliation, the language model can be trained in various ways to optimize vector expression. For example, the word2vec tool contains a variety of word embedding methods, which can quickly get the vector expression of a word, and the vector expression can reflect the analogy between words. There are also other word embedding algorithms, such as one hot encoding algorithms.
通过词嵌入模型,可以将类别字段的内容转换为词向量。该词向量可以与衍生变量拼接在一起,形成数据集对应的特征向量。The word field can be converted to a word vector by the word embedding model. The word vector can be spliced together with the derived variables to form a feature vector corresponding to the data set.
通过针对各个数据集i,进行以上的横向变量衍生,以及可选的词嵌入转换,为每个数据集形成了对应的特征向量Fi。于是,接下来在步骤23,将如此形成的n个特征向量按照时间顺序输入时间递归的神经网络,从该时间递归的神经网络获得处理结果。By performing the above lateral variable derivation for each data set i, and optional word embedding transformation, a corresponding feature vector Fi is formed for each data set. Then, next in step 23, the thus formed n feature vectors are input into the time recursive neural network in chronological order, and the processing result is obtained from the time recursive neural network.
在一个实施例中,上述时间递归的神经网络采用循环神经网络RNN(Recurrent Neural Network)。循环神经网络RNN是一种典型的时间递归神经网络,可用于处理序 列数据。在RNN中,一个序列当前的输出与其前面的输出相关联。具体的,RNN会对前面的信息进行记忆并应用于当前输出的计算中,即隐含层之间的节点是有连接的,并且隐含层的输入不仅包括输入层的输出还包括上一时刻该隐含层的输出。也就是说,第t次的隐含层状态可以表示为:In one embodiment, the time recursive neural network employs a Recurrent Neural Network (RNN). The recurrent neural network RNN is a typical time recurrent neural network that can be used to process sequence data. In the RNN, the current output of a sequence is associated with its previous output. Specifically, the RNN memorizes the previous information and applies it to the calculation of the current output, that is, the nodes between the hidden layers are connected, and the input of the hidden layer includes not only the output of the input layer but also the previous moment. The output of this hidden layer. That is to say, the t-th hidden layer state can be expressed as:
St=f(U*Xt+W*St-1)St=f(U*Xt+W*St-1)
其中,Xt为第t次输入层的状态,St-1为第t-1次隐含层状态,f为计算函数,W,U为权重。如此,RNN将之前的状态循环回当前输入,从而考虑输入序列的时序影响。Where Xt is the state of the tth input layer, St-1 is the t-1th hidden layer state, f is the calculation function, and W and U are the weights. As such, the RNN loops back to the current input, taking into account the timing effects of the input sequence.
在一个实施例中,上述时间递归的神经网络采用长短期记忆神经网络LSTM(Long Short Term Memory)。LSTM是在循环神经网络RNN基础上提出的一种改进的模型。循环神经网络RNN在处理长期记忆的情况下,存在长期依赖问题,训练比较困难(如发生梯度溢出的问题)。在RNN基础上提出的LSTM模型可以进一步解决该长期依赖的问题。In one embodiment, the time recursive neural network uses a Long Short Term Memory (LSTM). LSTM is an improved model based on the cyclic neural network RNN. Cyclic neural network RNN has long-term dependence problems when dealing with long-term memory, and training is difficult (such as the problem of gradient overflow). The LSTM model proposed on the basis of RNN can further solve the problem of long-term dependence.
在LSTM模型的重复网络模块中,实现了三个门计算,即输入门、输出门和“遗忘门”。“遗忘门”的设置可以让信息选择性地通过,以此丢弃某些不再需要的信息,如此对输入的不必要的干扰信息进行判断和屏蔽,从而更好地对长期数据进行分析处理。In the repetitive network module of the LSTM model, three gate calculations are implemented, namely input gate, output gate and "forgotten gate". The "Forgetting Gate" setting allows information to be selectively passed, thereby discarding some information that is no longer needed, thus judging and shielding the input unnecessary interference information, thereby better analyzing and processing the long-term data.
在一个实施例中,上述时间递归的神经网络采用门控循环单元GRU(Gated Recurrent Unit)神经网络。门控循环单元GRU神经网络可以认为是LSTM神经网络的一种简化和变体。GRU模型将LSTM中的输入门,输出门和遗忘门的设置修改为两个门:更新门和重置门。更新门用于控制前一时刻的状态信息被带入到当前状态中的程度,更新门的值越大说明前一时刻的状态信息带入越多。重置门用于控制忽略前一时刻的状态信息的程度,重置门的值越小说明忽略得越多。通过更新门和重置门,来实现对前一时刻状态信息对当前状态影响程度的控制。In one embodiment, the time recursive neural network employs a Gated Recurrent Unit (GRU) neural network. The gated loop unit GRU neural network can be considered as a simplification and variant of the LSTM neural network. The GRU model modifies the settings of the input, output, and forgetting gates in the LSTM to two gates: the update gate and the reset gate. The update gate is used to control the degree to which the status information of the previous moment is brought into the current state. The larger the value of the update gate is, the more the status information is brought in at the previous moment. The reset gate is used to control the degree of ignoring the status information of the previous moment. The smaller the value of the reset gate, the more it is ignored. By updating the gate and resetting the gate, the control of the influence of the state information of the previous moment on the current state is realized.
循环神经网络RNN和长短期记忆神经网络LSTM还存在一些其他的变体形式。这样的变体模型均可以用来作为实施例中的时间递归的神经网络。There are some other variants of the circulatory neural network RNN and the long- and short-term memory neural network LSTM. Such variant models can be used as a time recursive neural network in the embodiment.
为了进一步提升神经网络的性能,在一个实施例中,上述时间递归的神经网络除包含以上通过各种模型实现的时间递归层之外,还包含若干全连接层。全连接层中的每一个节点都与上一层的所有节点相连,用来把前边提取到的特征综合起来。如此,实现对之前隐含层的特征的全面综合分析和处理。To further enhance the performance of the neural network, in one embodiment, the time recursive neural network includes a number of fully connected layers in addition to the temporal recursive layers implemented by the various models above. Each node in the fully connected layer is connected to all nodes of the upper layer to integrate the features extracted from the front. In this way, a comprehensive analysis and processing of the characteristics of the previously hidden layers is achieved.
如上所述通过各种模型各种方式构成的神经网络均为时间递归的神经网络,可以对 具有时序信息的序列进行处理。相应地,在步骤23,将各个数据集i对应的特征向量Fi按照时间顺序依次输入上述神经网络。The neural networks constructed in various ways by various models as described above are time recursive neural networks, and sequences having time series information can be processed. Correspondingly, in step 23, the feature vectors Fi corresponding to the respective data sets i are sequentially input to the above-described neural network in chronological order.
在一个实施例中,将上述n个特征向量按照所对应的数据集的时间顺序,依次分别输入时间递归的神经网络,进行进一步分析处理。In one embodiment, the n feature vectors are sequentially input into the time recursive neural network according to the time sequence of the corresponding data set, and further analyzed.
在另一实施例中,将上述n个特征向量按照所对应的数据集的时间顺序,组织为特征矩阵。例如,假定每个特征向量为m维向量,那么可以将n个特征向量组织为m*n的矩阵,矩阵中第i行的行向量对应于特征向量Fi。将这样的特征矩阵输入以上时间递归的神经网络。由于该特征矩阵中各个行向量按照时间顺序组织,神经网络依然可以获得各个特征向量之间的时序关系,进而进行分析处理。In another embodiment, the n feature vectors are organized into a feature matrix according to the chronological order of the corresponding data sets. For example, assuming that each feature vector is an m-dimensional vector, n feature vectors can be organized into a matrix of m*n, and the row vector of the i-th row in the matrix corresponds to the feature vector Fi. Such a feature matrix is input to the above time recursive neural network. Since the row vectors in the feature matrix are organized in chronological order, the neural network can still obtain the timing relationship between the feature vectors, and then perform analysis processing.
图4示出根据一个实施例的神经网络的处理示意图。在图4的例子中,共获取了12个数据集,每个数据集对应一个月的交易明细数据,并且每个数据集i基于衍生变量形成对应的特征向量Fi。并且,图4中的时间递归神经网络采用循环神经网络RNN。如图4所示,将特征向量F1,F2,…F12依次输入循环神经网络RNN。图4中RNN之间的横向箭头表示时间状态的推移,H1-H12表示RNN的状态变化。在输入F12之后,循环神经网络可以输出处理结果。4 shows a process diagram of a neural network in accordance with one embodiment. In the example of FIG. 4, a total of 12 data sets are acquired, each of which corresponds to one month of transaction detail data, and each data set i forms a corresponding feature vector Fi based on the derived variables. Moreover, the time recurrent neural network in Figure 4 uses a cyclic neural network RNN. As shown in FIG. 4, the feature vectors F1, F2, ..., F12 are sequentially input to the cyclic neural network RNN. The horizontal arrow between the RNNs in Fig. 4 indicates the transition of the time state, and H1-H12 indicates the state change of the RNN. After inputting F12, the cyclic neural network can output the processing result.
图5示出根据另一个实施例的神经网络的处理示意图。在图5的例子中,仍然采用分别对应于一个月的数据集,以及对应的特征向量F1-F12,但是其中的时间递归神经网络采用长短期记忆神经网络LSTM。并且,该神经网络在LSTM架构基础上还包括了全连接层。在图5的例子中,将特征向量F1,F2,…F12依次输入LSTM神经网络,H1-H12表示LSTM的状态变化。并且,将LSTM对F12处理的结果,与F12本身再次拼接,也就是将H12与F12拼接,然后一起输入到全连接层。最后,由全连接层输出处理结果。尽管在图5中,将F12与H12拼接之后输入全连接层,但是在其他实施例中,也可以将H12直接输入到全连接层,而不与F12拼接。FIG. 5 shows a process diagram of a neural network in accordance with another embodiment. In the example of FIG. 5, the data sets respectively corresponding to one month, and the corresponding feature vectors F1-F12 are still employed, but the time recurrent neural network uses the long- and short-term memory neural network LSTM. Moreover, the neural network also includes a fully connected layer based on the LSTM architecture. In the example of Fig. 5, feature vectors F1, F2, ... F12 are sequentially input to the LSTM neural network, and H1-H12 indicate state changes of the LSTM. Moreover, the result of processing the LSTM to F12 is spliced again with F12 itself, that is, H12 and F12 are spliced together, and then input to the fully connected layer together. Finally, the processing result is output by the fully connected layer. Although in Fig. 5, the F12 and H12 are spliced and then input to the fully connected layer, in other embodiments, H12 can also be directly input to the fully connected layer without being spliced with F12.
可以理解,图4和图5仅仅是个示例。时间递归的神经网络可以通过以上举例以及其他未能穷尽列举的各种模型各种方式构造。It will be understood that Figures 4 and 5 are merely examples. Time recursive neural networks can be constructed in a variety of ways, including the above examples and other models that are not exhaustively enumerated.
要让构造的神经网络更好地处理交易数据,需要预先对该神经网络进行训练,优化网络模型参数。在一个实施例中,采用二分类监督学习算法来训练上述的神经网络。具体地,利用已标定数据集对上述时间递归的神经网络进行训练,上述已标定数据集包括历史交易数据,且具有是否发生信用违约的标签。更具体地,获取包含历史交易数据的 数据集,该历史交易数据集可以来自相同用户或不同用户。对应地,该数据集通过变量衍生,形成特征向量的序列。另一方面,还获取与该历史交易数据集对应的时期中,用户是否发生信用违约的记录,根据该记录,为该历史交易数据集赋予标签值,标签值示出是否发生信用违约。具有这样的标签的历史交易数据集即成为标定数据集,可以用于对神经网络进行训练。在训练的过程中,由神经网络对标定数据集(特别是对特征向量的序列)进行处理,给出是否会发生信用违约的预测结果,将预测结果与实际的标签值进行比对,从而计算损失函数,根据损失函数进行梯度传递,修改并优化模型参数,如此反复训练,从而获得训练的神经网络。In order for the constructed neural network to better process the transaction data, it is necessary to train the neural network in advance to optimize the network model parameters. In one embodiment, a two-class supervised learning algorithm is employed to train the neural network described above. Specifically, the time recursive neural network is trained using the calibrated data set, the calibrated data set including historical transaction data, and a tag having a credit default. More specifically, a data set containing historical transaction data is obtained, which may be from the same user or a different user. Correspondingly, the data set is derived from variables to form a sequence of feature vectors. On the other hand, a record of whether the user has a credit default in the period corresponding to the historical transaction data set is also acquired, and based on the record, the historical transaction data set is given a tag value indicating whether a credit default has occurred. A historical transaction data set with such a tag becomes a calibration data set that can be used to train a neural network. In the process of training, the calibration data set (especially the sequence of feature vectors) is processed by the neural network to give a prediction result of whether credit default will occur, and the prediction result is compared with the actual tag value, thereby calculating The loss function, the gradient transfer according to the loss function, the modification and optimization of the model parameters, and thus repeated training, thereby obtaining the trained neural network.
如此训练的神经网络可以用于,通过对交易数据的分析和处理,给出用户发生信用违约的概率。也就是说,在步骤23,当把n个数据集对应的n个特征向量输入上述经过训练的、时间递归的神经网络,神经网络可以输出用户发生信用违约的概率作为输出结果。相应地,在一个实施例中,从上述时间递归的神经网络获得处理结果即包括,从该神经网络的输出层,获得用户发生信用违约的概率作为处理结果。在这样的情况下,通过变量衍生和神经网络的训练,将交易数据应用到了信用评估的业务场景。The neural network thus trained can be used to give a probability of a user's credit default by analyzing and processing the transaction data. That is, in step 23, when the n feature vectors corresponding to the n data sets are input to the trained, time recursive neural network, the neural network may output the probability that the user has a credit default as an output result. Accordingly, in one embodiment, obtaining the processing result from the time recursive neural network includes, from the output layer of the neural network, obtaining a probability that the user has a credit default as a processing result. In such cases, transaction data is applied to the business scenario of credit evaluation through variable derivative and neural network training.
在另一实施例中,还可以从上述时间递归的神经网络的隐含层获得节点特征值作为处理结果。可以理解,根据神经网络的构造方式,其中的一些隐含层中的节点特征值也具有较强的数据价值和意义。例如,一些神经网络包含有瓶颈层,瓶颈层具有显著减小的节点数目。瓶颈层的节点特征值可以看作是对输入特征的低维表示,能够反映出较强的数据逻辑和含义。另外一些靠近输出层的隐含层,其中的节点特征值也具有一定的数据意义。因此,也可以从神经网络的隐含层提取节点特征值,作为处理结果。这样的处理结果可以用于输入到进一步的模型中,例如与其他机构共建的模型,进行进一步的数据分析和处理。In another embodiment, the node feature values may also be obtained from the hidden layer of the time recursive neural network as a result of the processing. It can be understood that, according to the construction manner of the neural network, the node feature values in some of the hidden layers also have strong data value and meaning. For example, some neural networks contain a bottleneck layer with a significantly reduced number of nodes. The node feature value of the bottleneck layer can be regarded as a low-dimensional representation of the input feature, which can reflect strong data logic and meaning. Other hidden layers near the output layer, the node feature values also have a certain data meaning. Therefore, the node feature values can also be extracted from the hidden layer of the neural network as a result of the processing. Such processing results can be used to input into further models, such as models built with other organizations, for further data analysis and processing.
如此,在以上实施例中,首先对交易明细数据进行变量衍生,进行初步数据挖掘,然后将基于衍生变量的特征向量输入到神经网络进行进一步处理,这使得网络性能得到显著提升,并可以应用到包含信用业务的多种场景中。此外,由于神经网络对数据的处理是非线性变换的过程,因此如此处理得到的数据既具有明确的数据含义,又可以保证用户隐私和安全性。Thus, in the above embodiment, variable derivative is first performed on the transaction detail data, preliminary data mining is performed, and then the feature vector based on the derivative variable is input to the neural network for further processing, which makes the network performance significantly improved and can be applied to Contains a variety of scenarios for credit business. In addition, since the processing of data by the neural network is a process of nonlinear transformation, the data thus processed has both clear data meaning and user privacy and security.
另一方面,说明书的实施例还提供一种处理交易数据的装置。图6示出根据一个实施例的处理装置的示意性框图。如图6所示,处理装置600包括:数据集获取单元610,配置为获取与连续的n个预设时间段分别对应的n个数据集,所述n个数据集中各个数 据集i包括对应的时间段中用户的交易明细数据;向量形成单元620,配置为形成与所述n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;以及处理单元630,配置为将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果。In another aspect, embodiments of the specification also provide an apparatus for processing transaction data. Figure 6 shows a schematic block diagram of a processing device in accordance with one embodiment. As shown in FIG. 6, the processing device 600 includes: a data set obtaining unit 610, configured to acquire n data sets respectively corresponding to consecutive n preset time segments, where each data set i of the n data sets includes a corresponding a transaction detail data of the user in the time period; the vector forming unit 620 is configured to form n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes, respectively, based on the transaction details in the corresponding data set i Derived variables derived from the data; and processing unit 630 configured to input the n feature vectors into the time recursive neural network in chronological order, and obtain the processing results from the time recursive neural network.
根据一个实施例,上述交易明细数据包括多个字段,所述多个字段至少包括:交易时间字段,交易金额字段,以及至少一个类别字段。According to an embodiment, the transaction detail data includes a plurality of fields, the plurality of fields including at least: a transaction time field, a transaction amount field, and at least one category field.
在一个实施例中,向量形成单元620包括:字段获取模块621,配置为获取数据集i中所述交易明细数据的所述多个字段;聚合操作模块622,配置为对所述多个字段的数据进行聚合操作,从而获得衍生变量;以及元素形成模块623,配置为将所述衍生变量作为所述特征向量Fi的向量元素。In an embodiment, the vector forming unit 620 includes: a field obtaining module 621 configured to acquire the plurality of fields of the transaction detail data in the data set i; and an aggregation operation module 622 configured to the plurality of fields The data is subjected to an aggregation operation to obtain a derived variable; and an element forming module 623 is configured to use the derived variable as a vector element of the feature vector Fi.
根据一个实施例,上述聚合操作模块622进一步配置为:从所述多个字段中选择至少一部分字段进行组合,得到组合字段;对组合字段的数据进行运算操作,从而得到衍生变量。According to an embodiment, the aggregating operation module 622 is further configured to: select at least a part of the plurality of fields to be combined to obtain a combined field; and perform an operation operation on the data of the combined field to obtain a derivative variable.
进一步地,在一个实施例中,上述运算操作包括以下中的一项或多项:数值判断、计数、求和、求平均、求标准差、求分位数、分布统计。Further, in an embodiment, the operation operation includes one or more of the following: numerical value judgment, counting, summation, averaging, standard deviation, grading, and distribution statistics.
根据一个实施例,所述向量形成单元620还包括词嵌入模块624,配置为:获取数据集i中所述至少一个类别字段的内容;利用词嵌入模型,将所述至少一个类别字段的内容转换为词向量;将所述词向量作为所述特征向量Fi的一部分。According to an embodiment, the vector forming unit 620 further includes a word embedding module 624 configured to: acquire content of the at least one category field in the data set i; convert the content of the at least one category field by using a word embedding model Is a word vector; the word vector is taken as part of the feature vector Fi.
根据一个实施例,上述时间递归的神经网络采用循环神经网络RNN,长短期记忆神经网络LSTM,门控循环单元神经网络GRU之一。According to one embodiment, the time recursive neural network described above employs one of a recurrent neural network RNN, a long- and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
在一个实施例中,上述时间递归的神经网络还包括至少一个全连接层。In one embodiment, the time recursive neural network further includes at least one fully connected layer.
根据一个实施例,所述时间递归的神经网络利用已标定数据集进行训练,所述已标定数据集包括历史交易数据,且具有是否发生信用违约的标签。According to one embodiment, the time recursive neural network is trained using a calibrated data set that includes historical transaction data and has a label for whether a credit default has occurred.
在一个实施例中,处理单元630配置为:从所述时间递归的神经网络的输出层,获得所述用户发生信用违约的概率作为处理结果。In one embodiment, the processing unit 630 is configured to obtain, from the output layer of the time recursive neural network, a probability that the user has a credit default as a result of the processing.
在一个实施例中,处理单元630还可以从所述时间递归的神经网络的隐含层获得节点特征值作为处理结果。In one embodiment, processing unit 630 may also obtain node feature values from the hidden layer of the time recursive neural network as a result of the process.
通过以上装置,首先对交易明细数据进行变量衍生,进行初步数据挖掘,然后将基于衍生变量的特征向量输入到神经网络进行进一步处理,这使得网络性能得到显著提升,并可以根据网络训练情况应用到多种场景中。此外,还可以保证用户隐私和安全性。Through the above device, variable derivative of transaction detail data is firstly carried out, preliminary data mining is performed, and then the feature vector based on the derivative variable is input into the neural network for further processing, which makes the network performance significantly improved and can be applied according to the network training situation. In a variety of scenarios. In addition, user privacy and security can be guaranteed.
根据另一方面的实施例,还提供一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行结合图2所描述的方法。According to another embodiment, there is also provided a computer readable storage medium having stored thereon a computer program for causing a computer to perform the method described in connection with FIG. 2 when the computer program is executed in a computer.
根据再一方面的实施例,还提供一种计算设备,包括存储器和处理器,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现结合图2所述的方法。According to still another embodiment, there is also provided a computing device comprising a memory and a processor, the memory storing executable code, and when the processor executes the executable code, implementing the method described in connection with FIG. 2 method.
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的功能可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些功能存储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。Those skilled in the art will appreciate that in one or more examples described above, the functions described herein can be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored in a computer readable medium or transmitted as one or more instructions or code on a computer readable medium.
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的技术方案的基础之上,所做的任何修改、等同替换、改进等,均应包括在本发明的保护范围之内。The specific embodiments of the present invention have been described in detail with reference to the preferred embodiments of the present invention. The scope of the protection, any modifications, equivalent substitutions, improvements, etc., which are made on the basis of the technical solutions of the present invention, are included in the scope of the present invention.

Claims (22)

  1. 一种处理交易数据的方法,包括:A method of processing transaction data, including:
    获取与连续的n个预设时间段分别对应的n个数据集,所述n个数据集中各个数据集i包括对应的时间段中用户的交易明细数据;Obtaining n data sets respectively corresponding to consecutive n preset time segments, where each data set i in the n data sets includes transaction detail data of the user in the corresponding time period;
    形成与所述n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;Forming n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
    将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果,其中获得处理结果包括,从所述时间递归的神经网络的输出层,获得所述用户发生信用违约的概率作为处理结果。Importing the n feature vectors into a time recursive neural network in chronological order, obtaining a processing result from the time recursive neural network, wherein obtaining the processing result includes obtaining the result from an output layer of the time recursive neural network The probability that a user has a credit default is the result of the processing.
  2. 根据权利要求1所述的方法,其中所述交易明细数据包括多个字段,所述多个字段至少包括:交易时间字段,交易金额字段,以及至少一个类别字段。The method of claim 1 wherein said transaction detail data comprises a plurality of fields, said plurality of fields comprising at least: a transaction time field, a transaction amount field, and at least one category field.
  3. 根据权利要求2所述的方法,其中形成与所述n个数据集分别对应的n个特征向量包括:The method of claim 2, wherein forming n feature vectors respectively corresponding to the n data sets comprises:
    获取数据集i中所述交易明细数据的所述多个字段;Obtaining the plurality of fields of the transaction detail data in the data set i;
    对所述多个字段的数据进行聚合操作,从而获得衍生变量;Aggregating data of the plurality of fields to obtain derived variables;
    将所述衍生变量作为所述特征向量Fi的向量元素。The derived variable is taken as a vector element of the feature vector Fi.
  4. 根据权利要求3所述的方法,其中对所述多个字段中的数据进行聚合操作包括:The method of claim 3 wherein the aggregating the data in the plurality of fields comprises:
    从所述多个字段中选择至少一部分字段进行组合,得到组合字段;Selecting at least a part of the plurality of fields to be combined to obtain a combined field;
    对组合字段的数据进行运算操作,从而得到衍生变量。The data of the combined field is operated to obtain the derived variable.
  5. 根据权利要求4所述的方法,其中所述运算操作包括以下中的一项或多项:数值判断、计数、求和、求平均、求标准差、求分位数、分布统计。The method of claim 4 wherein said computing operation comprises one or more of the following: numerically determining, counting, summing, averaging, seeking standard deviation, finding quantile, and distributing statistics.
  6. 根据权利要求2所述的方法,其中形成与所述n个数据集分别对应的n个特征向量包括:The method of claim 2, wherein forming n feature vectors respectively corresponding to the n data sets comprises:
    获取数据集i中所述至少一个类别字段的内容;Obtaining content of the at least one category field in the data set i;
    利用词嵌入模型,将所述至少一个类别字段的内容转换为词向量;Converting the content of the at least one category field into a word vector using a word embedding model;
    将所述词向量作为所述特征向量Fi的一部分。The word vector is taken as part of the feature vector Fi.
  7. 根据权利要求1所述的方法,其中所述时间递归的神经网络采用循环神经网络RNN,长短期记忆神经网络LSTM,门控循环单元神经网络GRU之一。The method of claim 1 wherein said time recursive neural network employs one of a recurrent neural network RNN, a long- and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
  8. 根据权利要求7所述的方法,其中所述时间递归的神经网络包括至少一个全连接层。The method of claim 7 wherein said time recursive neural network comprises at least one fully connected layer.
  9. 根据权利要求1所述的方法,所述时间递归的神经网络利用已标定数据集进行训练,所述已标定数据集包括历史交易数据,且具有是否发生信用违约的标签。The method of claim 1, the time recursive neural network training with a calibrated data set comprising historical transaction data and having a label of whether a credit default has occurred.
  10. 根据权利要求1所述的方法,其中从所述时间递归的神经网络获得处理结果包括:从所述时间递归的神经网络的隐含层获得节点特征值作为处理结果。The method of claim 1, wherein obtaining the processing result from the time recursive neural network comprises obtaining a node feature value from the hidden layer of the time recursive neural network as a processing result.
  11. 一种处理交易数据的装置,包括:A device for processing transaction data, comprising:
    数据集获取单元,配置为获取与连续的n个预设时间段分别对应的n个数据集,所述n个数据集中各个数据集i包括对应的时间段中用户的交易明细数据;a data set obtaining unit, configured to acquire n data sets respectively corresponding to consecutive n preset time segments, where each data set i of the n data sets includes transaction detail data of the user in the corresponding time period;
    向量形成单元,配置为形成与所述n个数据集分别对应的n个特征向量,其中各个特征向量Fi分别包括,基于对应的数据集i中的交易明细数据衍生出的衍生变量;a vector forming unit configured to form n feature vectors respectively corresponding to the n data sets, wherein each feature vector Fi includes a derivative variable derived based on transaction detail data in the corresponding data set i;
    处理单元,配置为将所述n个特征向量按照时间顺序输入时间递归的神经网络,从所述时间递归的神经网络获得处理结果,其中获得处理结果包括,从所述时间递归的神经网络的输出层,获得所述用户发生信用违约的概率作为处理结果。a processing unit configured to input the n feature vectors into a time recursive neural network in chronological order, obtain a processing result from the time recursive neural network, wherein obtaining the processing result includes output from the time recursive neural network The layer obtains the probability that the user has a credit default as a processing result.
  12. 根据权利要求11所述的装置,其中所述交易明细数据包括多个字段,所述多个字段至少包括:交易时间字段,交易金额字段,以及至少一个类别字段。The apparatus of claim 11, wherein the transaction detail data comprises a plurality of fields, the plurality of fields comprising at least: a transaction time field, a transaction amount field, and at least one category field.
  13. 根据权利要求12所述的装置,其中所述向量形成单元包括:The apparatus of claim 12 wherein said vector forming unit comprises:
    字段获取模块,配置为获取数据集i中所述交易明细数据的所述多个字段;a field obtaining module configured to acquire the plurality of fields of the transaction detail data in the data set i;
    聚合操作模块,配置为对所述多个字段的数据进行聚合操作,从而获得衍生变量;An aggregation operation module configured to perform aggregation operations on data of the plurality of fields to obtain a derivative variable;
    元素形成模块,配置为将所述衍生变量作为所述特征向量Fi的向量元素。An element forming module configured to use the derived variable as a vector element of the feature vector Fi.
  14. 根据权利要求13所述的装置,其中所述聚合操作模块进一步配置为:The apparatus of claim 13 wherein said aggregation operation module is further configured to:
    从所述多个字段中选择至少一部分字段进行组合,得到组合字段;Selecting at least a part of the plurality of fields to be combined to obtain a combined field;
    对组合字段的数据进行运算操作,从而得到衍生变量。The data of the combined field is operated to obtain the derived variable.
  15. 根据权利要求14所述的装置,其中所述运算操作包括以下中的一项或多项:数值判断、计数、求和、求平均、求标准差、求分位数、分布统计。The apparatus of claim 14, wherein the arithmetic operation comprises one or more of the following: numerical value determination, counting, summation, averaging, standard deviation, grading, distribution statistics.
  16. 根据权利要求12所述的装置,其中所述向量形成单元还包括词嵌入模块,配置为:The apparatus of claim 12, wherein the vector forming unit further comprises a word embedding module configured to:
    获取数据集i中所述至少一个类别字段的内容;Obtaining content of the at least one category field in the data set i;
    利用词嵌入模型,将所述至少一个类别字段的内容转换为词向量;Converting the content of the at least one category field into a word vector using a word embedding model;
    将所述词向量作为所述特征向量Fi的一部分。The word vector is taken as part of the feature vector Fi.
  17. 根据权利要求11所述的装置,其中所述时间递归的神经网络采用循环神经网络RNN,长短期记忆神经网络LSTM,门控循环单元神经网络GRU之一。The apparatus of claim 11 wherein said time recursive neural network employs one of a recurrent neural network RNN, a long- and short-term memory neural network LSTM, and a gated loop unit neural network GRU.
  18. 根据权利要求17所述的装置,其中所述时间递归的神经网络包括至少一个全连接层。The apparatus of claim 17 wherein said time recursive neural network comprises at least one fully connected layer.
  19. 根据权利要求12所述的装置,所述时间递归的神经网络利用已标定数据集进行训练,所述已标定数据集包括历史交易数据,且具有是否发生信用违约的标签。The apparatus of claim 12, said time recursive neural network training with a calibrated data set comprising historical transaction data and having a label of whether a credit default has occurred.
  20. 根据权利要求11所述的装置,其中所述处理单元配置为:从所述时间递归的神经网络的隐含层获得节点特征值作为处理结果。The apparatus of claim 11, wherein the processing unit is configured to obtain a node feature value from the hidden layer of the time recursive neural network as a result of the processing.
  21. 一种计算机可读存储介质,其上存储有计算机程序,当所述计算机程序在计算机中执行时,令计算机执行权利要求1-10中任一项的所述的方法。A computer readable storage medium having stored thereon a computer program for causing a computer to perform the method of any of claims 1-10 when the computer program is executed in a computer.
  22. 一种计算设备,包括存储器和处理器,其特征在于,所述存储器中存储有可执行代码,所述处理器执行所述可执行代码时,实现权利要求1-10中任一项所述的方法。A computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, implementing the method of any one of claims 1-10 method.
PCT/CN2019/073104 2018-02-12 2019-01-25 Method and apparatus for processing transaction data WO2019154108A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810146777.7A CN108446978A (en) 2018-02-12 2018-02-12 Handle the method and device of transaction data
CN201810146777.7 2018-02-12

Publications (1)

Publication Number Publication Date
WO2019154108A1 true WO2019154108A1 (en) 2019-08-15

Family

ID=63192622

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/073104 WO2019154108A1 (en) 2018-02-12 2019-01-25 Method and apparatus for processing transaction data

Country Status (3)

Country Link
CN (1) CN108446978A (en)
TW (1) TW201935386A (en)
WO (1) WO2019154108A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539532A (en) * 2020-04-01 2020-08-14 深圳市魔数智擎人工智能有限公司 Model construction-oriented automatic feature derivation method
CN111985924A (en) * 2020-05-22 2020-11-24 徽商银行股份有限公司 Method and system for judging abnormal transaction behaviors of credit card based on deep learning
CN113516304A (en) * 2021-06-29 2021-10-19 上海师范大学 Space-time joint prediction method and device for regional pollutants based on space-time graph network

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108446978A (en) * 2018-02-12 2018-08-24 阿里巴巴集团控股有限公司 Handle the method and device of transaction data
CN109584057B (en) * 2018-09-28 2023-08-11 创新先进技术有限公司 Transaction detail data acquisition method, device and server
CN109919744B (en) * 2018-11-23 2023-01-10 创新先进技术有限公司 Neural network-based detection method and device
CN110009384A (en) * 2019-01-07 2019-07-12 阿里巴巴集团控股有限公司 Predict the method and device of operational indicator
CN110223076A (en) * 2019-05-24 2019-09-10 东方银谷(北京)科技发展有限公司 For the data processing method and device of financial business risk control, server
CN110533526A (en) * 2019-08-13 2019-12-03 深圳追一科技有限公司 A kind of recognition methods, device, computer equipment and the storage medium of black mark client
CN110796240A (en) * 2019-10-31 2020-02-14 支付宝(杭州)信息技术有限公司 Training method, feature extraction method, device and electronic equipment
JP6967575B2 (en) * 2019-12-26 2021-11-17 楽天グループ株式会社 Credit calculation system, credit calculation method, and program
US11790236B2 (en) * 2020-03-04 2023-10-17 Google Llc Minimum deep learning with gating multiplier

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105184574A (en) * 2015-06-30 2015-12-23 电子科技大学 Method for detecting fraud behavior of merchant category code cloning
CN105678395A (en) * 2014-11-21 2016-06-15 阿里巴巴集团控股有限公司 Neural network establishing method, neural network establishing system, neural network applying method and neural network applying system
US20170213280A1 (en) * 2016-01-27 2017-07-27 Huawei Technologies Co., Ltd. System and method for prediction using synthetic features and gradient boosted decision tree
CN107133865A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 A kind of acquisition of credit score, the output intent and its device of characteristic vector value
CN107590690A (en) * 2017-09-05 2018-01-16 阿里巴巴集团控股有限公司 Data processing method, device and server
CN108446978A (en) * 2018-02-12 2018-08-24 阿里巴巴集团控股有限公司 Handle the method and device of transaction data

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912770B2 (en) * 2004-10-29 2011-03-22 American Express Travel Related Services Company, Inc. Method and apparatus for consumer interaction based on spend capacity
CN105183785B (en) * 2015-08-17 2019-08-16 上海斐讯数据通信技术有限公司 A kind of data digging method and system for protecting former transaction data collection correlation rule
CN105490823B (en) * 2015-12-24 2019-12-10 原肇 data processing method and device
CN105844501A (en) * 2016-05-18 2016-08-10 上海亿保健康管理有限公司 Consumption behavior risk control system and method
CN106682067B (en) * 2016-11-08 2018-05-01 浙江邦盛科技有限公司 A kind of anti-fake monitoring system of machine learning based on transaction data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105678395A (en) * 2014-11-21 2016-06-15 阿里巴巴集团控股有限公司 Neural network establishing method, neural network establishing system, neural network applying method and neural network applying system
CN105184574A (en) * 2015-06-30 2015-12-23 电子科技大学 Method for detecting fraud behavior of merchant category code cloning
US20170213280A1 (en) * 2016-01-27 2017-07-27 Huawei Technologies Co., Ltd. System and method for prediction using synthetic features and gradient boosted decision tree
CN107133865A (en) * 2016-02-29 2017-09-05 阿里巴巴集团控股有限公司 A kind of acquisition of credit score, the output intent and its device of characteristic vector value
CN107590690A (en) * 2017-09-05 2018-01-16 阿里巴巴集团控股有限公司 Data processing method, device and server
CN108446978A (en) * 2018-02-12 2018-08-24 阿里巴巴集团控股有限公司 Handle the method and device of transaction data

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111539532A (en) * 2020-04-01 2020-08-14 深圳市魔数智擎人工智能有限公司 Model construction-oriented automatic feature derivation method
CN111985924A (en) * 2020-05-22 2020-11-24 徽商银行股份有限公司 Method and system for judging abnormal transaction behaviors of credit card based on deep learning
CN113516304A (en) * 2021-06-29 2021-10-19 上海师范大学 Space-time joint prediction method and device for regional pollutants based on space-time graph network
CN113516304B (en) * 2021-06-29 2024-01-23 上海师范大学 Regional pollutant space-time joint prediction method and device based on space-time diagram network

Also Published As

Publication number Publication date
TW201935386A (en) 2019-09-01
CN108446978A (en) 2018-08-24

Similar Documents

Publication Publication Date Title
WO2019154108A1 (en) Method and apparatus for processing transaction data
US11100435B2 (en) Machine learning artificial intelligence system for predicting hours of operation
US9576248B2 (en) Record linkage sharing using labeled comparison vectors and a machine learning domain classification trainer
AU2016328959B2 (en) Updating attribute data structures to indicate trends in attribute data provided to automated modeling systems
US20200134716A1 (en) Systems and methods for determining credit worthiness of a borrower
EP3956822A1 (en) Neural network architecture for transaction data processing
Bardwell et al. Most recent changepoint detection in panel data
Pavlidis et al. Adaptive consumer credit classification
Sridhar et al. Multi-head self-attention transformer for dogecoin price prediction
JP2019194849A (en) Causal relationship for machine learning system
US11501107B2 (en) Key-value memory network for predicting time-series metrics of target entities
US20200380524A1 (en) Transaction feature generation
JP2016099915A (en) Server for credit examination, system for credit examination, and program for credit examination
CN112988840A (en) Time series prediction method, device, equipment and storage medium
Rath et al. Modern approach for loan sanctioning in banks using machine learning
US11042677B1 (en) Systems and methods for time series simulation
Yasir et al. Machine learning–assisted efficient demand forecasting using endogenous and exogenous indicators for the textile industry
US11144938B2 (en) Method and system for predictive modeling of consumer profiles
Rachmawan et al. Optimization of missing value imputation using reinforcement programming
AU2020377394B2 (en) Hierarchical deep neural network forecasting of cashflows with linear algebraic constraints
US9892462B1 (en) Heuristic model for improving the underwriting process
US20200371999A1 (en) System and computer program for providing automated actions and content to one or more web pages relating to the improved management of a value chain network
Mazumder et al. A Framework for Trustworthy AI in Credit Risk Management: Perspectives and Practices
Nagashima et al. Data Imputation Method based on Programming by Example: APREP-S
Chen Knowledge-based analytics for massively distributed networks with noisy data

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19750299

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19750299

Country of ref document: EP

Kind code of ref document: A1