Data filling method, device, electronic equipment and medium
By using a self-attention module to fill data in bank transaction data and using a decoder for weighted summing and decoding, the problem of low data filling accuracy in the prior art is solved, and more efficient and accurate data analysis is achieved.
Patent Information
- Application Number
- CN202110327307.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-26
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-03-26
AI Technical Summary
The existing data filling method has increased the analysis difficulty due to the low accuracy of filling missing values in the bank acquiring transactions and the inability to fill the correlation between variables.
By determining the merchant transaction data matrix within the preset time, and using the self-attention module to fill the data from the variable dimension and time dimension, the filled matrix is obtained, and then weighted sum and decoded through the decoder, analytical merchants can be obtained Transaction flow data.
It improves the accuracy of data filling, takes advantage of the correlation between merchant transaction information, and enhances the accuracy and efficiency of data analysis.
Smart Images

Figure CN112907376B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of big data, and in particular to a data filling method, device, electronic device and medium. Background Art
[0002] In the flow of bank acquiring transactions, a transaction is usually determined by many variables: transaction amount, transaction time, card number, merchant type, merchant number, etc. When describing a transaction, the more variables used, the more accurate the description of the transaction will be. However, the increase in variables also makes the phenomena they describe more complex and more dimensional, and the correlation between their attributes doubles the difficulty of analysis. At the same time, the lack of data brings certain troubles to data analysis, so data needs to be filled.
[0003] The current filling scheme generally presets the number of missing values for filling by judging whether the data before and after the missing value is missing, or when the data is continuously missing or has large volatility, the existing method is used to take the average value for filling. This scheme requires the preset number of missing values, has low calculation efficiency, and the accuracy of the filling value is very low. It is also impossible to use the correlation between variables to fill missing values. Summary of the invention
[0004] The embodiments of the present invention provide a data filling method, device, electronic device and medium, so as to achieve data filling by utilizing the correlation between merchant transaction information, thereby improving the accuracy of data filling.
[0005] In a first aspect, an embodiment of the present invention provides a data filling method, comprising:
[0006] Determine the merchant transaction data matrix within a preset time period;
[0007] Filling the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix;
[0008] The first merchant transaction matrix and the second merchant transaction matrix are decoded according to the decoder to obtain merchant transaction flow data to be analyzed.
[0009] In a second aspect, an embodiment of the present invention further provides a data filling device, including:
[0010] A matrix determination module, used to determine the merchant transaction data matrix within a preset time period;
[0011] A data filling module, used to fill the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix;
[0012] The matrix decoding module is used to decode the first merchant transaction matrix and the second merchant transaction matrix according to a decoder to obtain merchant transaction flow data to be analyzed.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0014] one or more processors;
[0015] A storage device for storing one or more programs;
[0016] The one or more programs are executed by the one or more processors, so that the one or more processors implement the data filling method provided in any embodiment of the present invention.
[0017] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, a data filling method as provided in any embodiment of the present invention is implemented.
[0018] A data filling method is provided in an embodiment of the present invention. The data filling system first determines a merchant transaction data matrix within a preset time length, fills the merchant transaction data matrix with data through a self-attention module, and obtains a first merchant transaction data matrix and a second merchant transaction data matrix after filling. Finally, the first merchant transaction data matrix and the second merchant transaction data matrix are decoded according to a decoder to obtain merchant transaction flow data that can be intuitively analyzed.
[0019] By adopting the technical solution of the present application, after determining the merchant transaction data matrix within a preset time length, the missing values are filled according to the correlation of the internal attributes of the merchant transaction data based on the self-attention mechanism, and the first merchant transaction data matrix and the second merchant transaction data matrix after filling are weighted summed and decoded through a decoder, thereby achieving the technical effect of using the correlation between merchant transaction information to perform data filling, thereby improving the accuracy of data filling.
[0020] The above invention content is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Other features, objects and advantages of the present invention will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings. The drawings are only for the purpose of illustrating preferred embodiments and are not to be considered as limiting the present invention. Also, the same reference symbols are used throughout the drawings to represent the same parts. In the drawings:
[0022] Figure 1 is a flow chart of a data filling method provided in Example 1 of the present application;
[0023] Figure 2 is a flow chart of another data filling method provided in Embodiment 2 of the present application;
[0024] Figure 3 This is a schematic diagram of a variable attention module structure provided in Example 2 of the present application;
[0025] Figure 4 This is a schematic diagram of the structure of a temporal attention module provided in Example 2 of the present application;
[0026] Figure 5 is a structural diagram of a data filling device provided in Embodiment 3 of the present application;
[0027] Figure 6 It is a structural schematic diagram of an electronic device provided in Example 4 of the present application. DETAILED DESCRIPTION
[0028] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0029] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0030] Embodiment 1
[0031] Figure 11 is a flow chart of a data filling method provided in the first embodiment of the present invention. The method can be applied to fill in missing data in a bank merchant transaction form. The method can be executed by a data filling device, which can be implemented by software and / or hardware and can be integrated into an electronic device. Figure 1 As shown, the data filling method in this embodiment includes the following steps:
[0032] In the process of banks collecting merchant transaction orders, the factor variable data in the transaction order is likely to be incomplete, and some factor variable data is often missing. When the bank system analyzes the transaction order, the more variables there are, the more accurate the description of a transaction is. Therefore, when analyzing bank transaction order data, it is generally necessary to fill in the missing factor variable data in the transaction order to facilitate the subsequent processing and analysis of merchant transaction orders. At present, the existing data missing value filling method generally uses the average value method to fill in, which has low accuracy and cannot associate the correlation of internal attributes of the data.
[0033] S110, determining a merchant transaction data matrix within a preset time period.
[0034] Among them, the bank's data filling system determines a merchant transaction data matrix within a preset time period, the preset time period can be 1 hour, and the merchant transaction data matrix can be composed of the merchant's transaction order within the preset time period and the element variable data in the transaction.
[0035] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. Determining the merchant transaction data matrix within a preset time period may include steps A1-A2:
[0036] Step A1: Obtain merchant transaction orders within a preset time period and transaction variables corresponding to each transaction.
[0037] Step A2: determining a merchant transaction data matrix according to the merchant transaction order and the transaction variables.
[0038] Among them, the bank data filling system obtains merchant transaction orders within a preset time period and the transaction variables corresponding to each transaction. The merchant transaction orders within the bank's preset time period are sorted in chronological order, and the transaction variables in each order are arranged in the preset variable arrangement order.
[0039] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the row vectors in the merchant transaction data matrix are arranged according to the time sequence of the merchant transaction order, and the column vectors are arranged according to the type of transaction variable.
[0040] Among them, in the merchant transaction data matrix, the first row of elements are all transaction variables of the first transaction order within the preset time, and the second row of elements are all transaction variables of the second transaction order within the preset time. The first column of elements is the first transaction variable of all transaction orders within the preset time, and the second column of elements is the second transaction variable of all transaction orders within the preset time. If there are T transaction orders within the preset time, and each transaction has V transaction variables, then the merchant transaction data matrix is a T×V matrix.
[0041] By adopting the above technical solution, by defining the row vectors and column vectors of the merchant transaction data matrix separately, when it is necessary to delete or add transaction variable elements, the transaction variable element types can be more conveniently expanded by directly transforming the rows and columns of the matrix.
[0042] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the transaction variable includes: at least one of: bank card number, transaction amount, transaction time, authorization number, transaction currency, merchant number, merchant name, merchant address, and merchant type.
[0043] Among them, the transaction variable types in the bank's merchant transaction order may include bank card number, transaction amount, transaction time, authorization number, transaction currency, merchant number, merchant name, merchant address, merchant type, etc., and the elements in the transaction variables may be increased or decreased.
[0044] S120. Fill the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix.
[0045] Among them, the bank data filling system fills the merchant transaction data matrix with data based on the self-attention mechanism module, and obtains the filled first merchant transaction data matrix and the second merchant transaction data matrix respectively. The first merchant transaction data matrix is the result of filling through the variable attention mechanism, and the second merchant transaction data matrix is the result of filling through the time attention mechanism.
[0046] S130. Decode the first merchant transaction matrix and the second merchant transaction matrix according to a decoder to obtain merchant transaction flow data to be analyzed.
[0047] The bank's data filling system decodes the filled first merchant transaction matrix and the second merchant transaction data matrix according to a pre-configured decoder, and after decoding, merchant transaction flow data that can be directly analyzed and intuitively viewed can be obtained.
[0048] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. In which, decoding the first merchant transaction matrix and the second merchant transaction matrix according to the decoder to obtain the merchant transaction flow data to be analyzed may include steps B1-B2:
[0049] Step B1: input the first merchant transaction data matrix and the second merchant transaction data matrix filled in the variable dimension and the time dimension into a decoder.
[0050] Step B2: performing weighted sum decoding on the filled first merchant transaction data matrix and the second merchant transaction data matrix to obtain transaction flow data to be analyzed.
[0051] Among them, the first merchant transaction data matrix and the second merchant transaction data matrix after filling in different dimensions of time and variables are input into the decoder together, and the weighted sum operation is performed on the two merchant transaction data matrices to obtain a complete filled merchant transaction flow data that can be used for intuitive analysis.
[0052] In an optional solution of this embodiment, it can be combined with one or more optional solutions of this embodiment. Wherein, the decoder is a multi-layer perceptron MLP.
[0053] By adopting the above technical solution, the weighted summation of the merchant transaction matrices filled in two dimensions can be performed through the decoder multi-layer perceptron MLP, thereby achieving the technical effect that after decoding, the merchant transaction flow data can be used intuitively and conveniently by people.
[0054] The technical solution of this embodiment determines the merchant transaction data matrix within a preset time period through the bank data filling system, fills the data from two dimensions separately according to the self-attention mechanism, and finally performs weighted summation on the merchant transaction data after filling in the two dimensions. It can use the correlation between merchant transaction information to fill the data and improve the accuracy of data filling.
[0055] Embodiment 2
[0056] Figure 2 1 is a flow chart of another data filling method provided in the second embodiment of the present application. The embodiment of the present invention further optimizes the above embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the data filling method provided in the embodiment of the present invention may include the following steps:
[0057] S210: Determine a merchant transaction data matrix within a preset time period.
[0058] S220. Input the merchant transaction data matrix into a variable attention module and a time attention module.
[0059] Among them, the bank data filling system inputs the merchant transaction data matrix into the variable attention module and the time attention module.
[0060] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. In which, the merchant transaction data matrix is input into the variable attention module and the time attention module, which may include steps C1-C2:
[0061] Step C1, transposing the merchant transaction data matrix to obtain a transposed merchant transaction data matrix.
[0062] Step C2: input the merchant transaction data matrix into a variable attention module; input the transposed merchant transaction matrix into a time attention module.
[0063] Among them, Figure 3 As shown in , if the size of the merchant transaction data matrix is T×V, the merchant transaction data matrix is directly input into the variable attention module, such as Figure 4 As shown, the size of the transposed merchant transaction data matrix is V×T, and the transposed merchant transaction data matrix is directly input into the temporal attention module. Here, the merchant transaction data matrix and the transposed merchant transaction data matrix are respectively input into the variable attention module and the temporal attention module, which are two processes performed simultaneously and in parallel.
[0064] S230, respectively filling the missing data of the merchant transaction data matrix from the variable dimension and the time dimension to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix.
[0065] In an optional solution of this embodiment, one or more optional solutions of this embodiment can be combined. In which, filling the missing data of the merchant transaction data matrix from the variable dimension and the time dimension respectively may include steps D1-D2:
[0066] Step D1, determining a variable attention matrix based on the merchant transaction data matrix; determining a time attention module based on the transposed merchant transaction data matrix.
[0067] Step D2: fill missing data in the merchant transaction data matrix from the variable dimension according to the variable attention matrix; and fill missing data in the transposed merchant transaction data matrix from the time dimension according to the time attention matrix.
[0068] Among them, Figure 3As shown, when the variable attention module performs data filling, the variable attention matrix A is first determined based on the size T×V of the merchant transaction data matrix and the variable data. The size of the variable attention matrix A is V×V. Then, data is filled from the variable dimension based on the variable attention matrix, and the filled first merchant transaction data matrix is output. Figure 4 As shown, when the time attention module performs data filling, the time attention matrix A is determined according to the size V×T of the transposed merchant transaction data matrix and the time series of the transaction order. The size of the time attention matrix A is T×T, and then data is filled from the time dimension according to the time attention matrix, and the filled second merchant transaction data matrix is output.
[0069] By adopting the above technical solution, the merchant transaction data matrix is transposed to obtain the transposed merchant transaction data matrix, and the merchant transaction data matrix and the transposed merchant transaction data matrix are respectively input into the variable attention module and the time attention module, and the merchant transaction data matrix is fully filled from the variable dimension and the time dimension respectively, which can achieve more accurate data filling for data sets with high variable data correlation or long time step.
[0070] S240: Decode the first merchant transaction matrix and the second merchant transaction matrix according to a decoder to obtain merchant transaction flow data to be analyzed.
[0071] The technical solution of this embodiment is to transpose the merchant transaction data matrix to obtain a transposed merchant transaction data matrix, and input the merchant transaction data matrix and the transposed merchant transaction data matrix into the variable attention module and the time attention module respectively, and comprehensively fill the merchant transaction data matrix from the variable dimension and the time dimension respectively to obtain the filled first merchant transaction data matrix and the second merchant transaction data matrix, and then perform weighted summation decoding on the two filled merchant transaction data matrices, so as to achieve more accurate data filling for data sets with high variable data correlation or long time step.
[0072] Embodiment 3
[0073] Figure 5 : is a schematic diagram of the structure of a data filling device provided in the third embodiment of the present invention. The device can be used to fill in missing data in a bank merchant transaction form. The device can be implemented by software and / or hardware and integrated in an electronic device. The device is used to implement the data filling method provided in the above embodiment. Figure 5 As shown, the data filling device provided in this embodiment includes:
[0074] A matrix determination module 510, for determining a merchant transaction data matrix within a preset time period;
[0075] A data filling module 520 is used to fill the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix;
[0076] The matrix decoding module 530 is used to decode the first merchant transaction matrix and the second merchant transaction matrix according to a decoder to obtain merchant transaction flow data to be analyzed.
[0077] Based on the above embodiment, optionally, the matrix determination module 510 is used to:
[0078] Get merchant transaction orders within a preset time period and the transaction variables corresponding to each transaction;
[0079] A merchant transaction data matrix is determined according to the merchant transaction sheet and the transaction variables.
[0080] Based on the above embodiment, optionally, the matrix determination module 510 is further configured to:
[0081] The row vectors in the merchant transaction data matrix are arranged according to the time sequence of the merchant transaction orders, and the column vectors are arranged according to the types of transaction variables.
[0082] Based on the above embodiment, optionally, the matrix determination module 510 is further configured to:
[0083] The transaction variables include: at least one of: bank card number, transaction amount, transaction time, authorization number, transaction currency, merchant number, merchant name, merchant address, and merchant type.
[0084] Based on the above embodiment, optionally, the data filling module 520 is used to:
[0085] Inputting the merchant transaction data matrix into a variable attention module and a time attention module;
[0086] The missing data of the merchant transaction data matrix are filled from the variable dimension and the time dimension respectively to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix.
[0087] Based on the above embodiment, optionally, the data filling module 520 is further used for:
[0088] Transposing the merchant transaction data matrix to obtain a transposed merchant transaction data matrix;
[0089] The merchant transaction data matrix is input into the variable attention module; the transposed merchant transaction matrix is input into the time attention module.
[0090] Based on the above embodiment, optionally, the data filling module 520 is further used for:
[0091] Determine a variable attention matrix based on the merchant transaction data matrix; determine a time attention module based on the transposed merchant transaction data matrix;
[0092] The missing data of the merchant transaction data matrix are filled in from the variable dimension according to the variable attention matrix; the missing data of the transposed merchant transaction data matrix are filled in from the time dimension according to the time attention matrix.
[0093] Based on the above embodiment, optionally, the matrix decoding module 530 is used to:
[0094] Inputting the first merchant transaction data matrix and the second merchant transaction data matrix filled in the variable dimension and the time dimension into a decoder;
[0095] The filled first merchant transaction data matrix and the second merchant transaction data matrix are weighted summed and decoded to obtain the transaction flow data to be analyzed.
[0096] Based on the above embodiment, optionally, the matrix decoding module 530 is further used for:
[0097] The decoder is a multi-layer perceptron MLP.
[0098] The data filling device provided in the embodiment of the present invention can execute the turnout fault diagnosis method provided in any embodiment of the present invention, and has the corresponding functions and beneficial effects of executing the turnout fault diagnosis method. For detailed process, please refer to the relevant operations of the turnout fault diagnosis method in the above embodiment.
[0099] Embodiment 4
[0100] Figure 6 Schematic diagram of the structure of an electronic device provided in the fourth embodiment of the present application. The present embodiment of the present application provides an electronic device, in which the data filling device provided in the embodiment of the present application can be integrated. Figure 6 As shown, this embodiment provides an electronic device 600, which includes: one or more processors 620; a storage device 610, which is used to store one or more programs. When the one or more programs are executed by the one or more processors 620, the one or more processors 620 implement the data filling method provided in the embodiment of the present application. The method includes:
[0101] Determine the merchant transaction data matrix within a preset time period;
[0102] Filling the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix;
[0103] The first merchant transaction matrix and the second merchant transaction matrix are decoded according to the decoder to obtain merchant transaction flow data to be analyzed.
[0104] Of course, those skilled in the art can understand that the processor 620 also implements the technical solution of the data filling method provided in any embodiment of the present application.
[0105] Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0106] like Figure 6 As shown, the electronic device 600 includes a processor 620, a storage device 610, an input device 630, and an output device 640; the number of the processor 620 in the electronic device can be one or more. Figure 6 A processor 620 is taken as an example; the processor 620, the storage device 610, the input device 630 and the output device 640 in the electronic device can be connected via a bus or other means. Figure 6 The connection via bus 650 is taken as an example.
[0107] The storage device 610, as a computer-readable storage medium, can be used to store software programs, computer executable programs and module units, such as program instructions corresponding to the data filling method in the embodiment of the present application.
[0108] The storage device 610 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the storage device 610 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 610 may further include a memory remotely arranged relative to the processor 620, and these remote memories may be connected via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0109] The input device 630 may be used to receive input numbers, character information or voice information, and generate key signal input related to user settings and function control of the electronic device. The output device 640 may include electronic devices such as a display screen and a speaker.
[0110] The electronic device provided in the embodiment of the present application can achieve the technical effect of using the correlation between merchant transaction information to fill in data and improve the accuracy of data filling.
[0111] Embodiment 5
[0112] A fifth embodiment of the present invention provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the program is used to perform a data filling method. The method includes:
[0113] Determine the merchant transaction data matrix within a preset time period;
[0114] Filling the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix;
[0115] The first merchant transaction matrix and the second merchant transaction matrix are decoded according to the decoder to obtain merchant transaction flow data to be analyzed.
[0116] Optionally, when the program is executed by a processor, it can also be used to execute the data filling method provided in any embodiment of the present invention.
[0117] The computer storage medium of the embodiment of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable CD-ROM, an optical storage device, a magnetic storage device, or any suitable combination of the above. The computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device.
[0118] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to: electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0119] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the above.
[0120] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0121] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0122] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A data filling method, characterized in that: include: Determine the merchant transaction data matrix within a preset time period; Filling the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix; Decoding the first merchant transaction data matrix and the second merchant transaction data matrix according to a decoder to obtain merchant transaction flow data to be analyzed; The step of determining a merchant transaction data matrix within a preset time period includes: Get merchant transaction orders within a preset time period and the transaction variables corresponding to each transaction; Determining a merchant transaction data matrix according to the merchant transaction order and the transaction variables; The method of filling the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix includes: Inputting the merchant transaction data matrix into a variable attention module and a time attention module; Filling the missing data of the merchant transaction data matrix from the variable dimension and the time dimension respectively to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix; The method of decoding the first merchant transaction data matrix and the second merchant transaction data matrix according to the decoder to obtain merchant transaction flow data to be analyzed includes: Inputting the first merchant transaction data matrix and the second merchant transaction data matrix filled in the variable dimension and the time dimension into a decoder; The filled first merchant transaction data matrix and the second merchant transaction data matrix are weighted summed and decoded to obtain the transaction flow data to be analyzed.
2. The method according to claim 1, characterized in that The row vectors in the merchant transaction data matrix are arranged according to the time sequence of the merchant transaction orders, and the column vectors are arranged according to the types of transaction variables.
3. The method according to claim 1, characterized in that The transaction variables include: at least one of: bank card number, transaction amount, transaction time, authorization number, transaction currency, merchant number, merchant name, merchant address, and merchant type.
4. The method according to claim 1, characterized in that: Inputting the merchant transaction data matrix into the variable attention module and the time attention module includes: Transposing the merchant transaction data matrix to obtain a transposed merchant transaction data matrix; The merchant transaction data matrix is input into a variable attention module; and the transposed merchant transaction data matrix is input into a time attention module.
5. The method according to claim 4, characterized in that Filling the missing data of the merchant transaction data matrix from the variable dimension and the time dimension respectively includes: Determine a variable attention matrix based on the merchant transaction data matrix; determine a time attention matrix based on the transposed merchant transaction data matrix; The missing data of the merchant transaction data matrix are filled in from the variable dimension according to the variable attention matrix; the missing data of the transposed merchant transaction data matrix are filled in from the time dimension according to the time attention matrix.
6. The method according to claim 1, characterized in that The decoder is a multi-layer perceptron MLP.
7. A data filling device, characterized in that: The device comprises: A matrix determination module, used to determine the merchant transaction data matrix within a preset time period; A data filling module, used to fill the merchant transaction data matrix with data according to the self-attention module to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix; A matrix decoding module, used for decoding the first merchant transaction data matrix and the second merchant transaction data matrix according to a decoder to obtain merchant transaction flow data to be analyzed; The matrix determination module is specifically used for: Get merchant transaction orders within a preset time period and the transaction variables corresponding to each transaction; Determining a merchant transaction data matrix according to the merchant transaction order and the transaction variables; The data filling module is specifically used for: Inputting the merchant transaction data matrix into a variable attention module and a time attention module; Filling the missing data of the merchant transaction data matrix from the variable dimension and the time dimension respectively to obtain a filled first merchant transaction data matrix and a filled second merchant transaction data matrix; The matrix decoding module is specifically used for: Inputting the first merchant transaction data matrix and the second merchant transaction data matrix filled in the variable dimension and the time dimension into a decoder; The filled first merchant transaction data matrix and the second merchant transaction data matrix are weighted summed and decoded to obtain the transaction flow data to be analyzed.
8. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the data filling method described in any one of claims 1-6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the data filling method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method and device for processing data
CN106919957A
Filling method and device for genotype data missing and server
CN111028884A