Information coding method, apparatus, device, and storage medium
Patent Information
- Application Number
- CN202210882140.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-26
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2042-07-26
AI Technical Summary
[0003]但现阶段对属性信息的编码方法会丢失属性信息中丰富的语义信息,使得属性信息对应的编码对属性信息的体现不够精准
[0009]This application provides an information encoding method, apparatus, device, and storage medium. It can convert attribute information from different categories generated by a transaction into multi-dimensional vectors of attribute categories mapped to the same space, according to the classification categories of attribute information. This allows for the aggregation of multi-dimensional vectors of attribute categories corresponding to attribute information from each category within the same transaction, generating an aggregated attribute information encoding for the transaction. This aggregated attribute information encoding is composed of attribute information from multiple categories, preserving rich semantic information from each category's attribute information in the transaction, avoiding the loss of rich semantic information, and improving the accuracy of the encoding corresponding to the attribute information.
Smart Images

Figure CN115204111B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing, and in particular relates to an information encoding method, apparatus, device and storage medium. Background Technology
[0002] With the continuous development of payment technology, online payment has become a major trend. Each online payment generates a large amount of information, including attribute information and numerical information. Attribute information is often ten or even dozens of times larger than numerical information. To facilitate operations such as transaction classification and risk detection using attribute information, it is necessary to encode the attribute information.
[0003] However, current methods for encoding attribute information lose the rich semantic information within the attribute information, making the encoding of the attribute information not accurately reflect the attribute information. Summary of the Invention
[0004] This application provides an information encoding method, apparatus, device, and storage medium that can improve the accuracy of encoding corresponding to attribute information.
[0005] In a first aspect, embodiments of this application provide an information encoding method, comprising: acquiring attribute information generated from each transaction; converting the attribute information into a multidimensional vector of attribute categories mapped to the same space using a classifier or neural network according to the classification categories of the attribute information; and generating an aggregated encoding of the attribute information corresponding to the transaction based on the multidimensional vectors of attribute categories corresponding to the attribute information of each classification category in the same transaction.
[0006] Secondly, embodiments of this application provide an information encoding device, comprising: an acquisition module for acquiring attribute information generated in each transaction; a conversion module for converting the attribute information into a multi-dimensional vector of attribute categories mapped to the same space using a classifier or neural network according to the classification categories of the attribute information; and a generation module for generating an aggregated encoding of attribute information corresponding to the transaction based on the multi-dimensional vector of attribute categories corresponding to the attribute information of each classification category in the same transaction.
[0007] Thirdly, embodiments of this application provide an information encoding device, including: a processor and a memory storing computer program instructions; the processor implements the information encoding method of the first aspect when executing the computer program instructions.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the information encoding method of the first aspect.
[0009] This application provides an information encoding method, apparatus, device, and storage medium. It can convert attribute information from different categories generated by a transaction into multi-dimensional vectors of attribute categories mapped to the same space, according to the classification categories of attribute information. This allows for the aggregation of multi-dimensional vectors of attribute categories corresponding to attribute information from each category within the same transaction, generating an aggregated attribute information encoding for the transaction. This aggregated attribute information encoding is composed of attribute information from multiple categories, preserving rich semantic information from each category's attribute information in the transaction, avoiding the loss of rich semantic information, and improving the accuracy of the encoding corresponding to the attribute information. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart illustrating an information encoding method provided in an embodiment of this application;
[0012] Figure 2 A flowchart illustrating an information encoding method provided in another embodiment of this application;
[0013] Figure 3 A logical schematic diagram of an example of an information encoding method provided in an embodiment of this application;
[0014] Figure 4 A flowchart illustrating an information encoding method provided in yet another embodiment of this application;
[0015] Figure 5 A flowchart illustrating an information encoding method provided in yet another embodiment of this application;
[0016] Figure 6 A two-dimensional distribution map of the attribute category multidimensional vectors including merchant type in multiple transactions obtained without using the information encoding method of the embodiments of this application;
[0017] Figure 7 A two-dimensional distribution map of the attribute category multidimensional vector including merchant type in multiple transactions obtained using the information encoding method of the embodiments of this application;
[0018] Figure 8 This is a schematic diagram of the structure of an information encoding device provided in an embodiment of this application;
[0019] Figure 9 This is a schematic diagram of the structure of an information encoding device provided in another embodiment of this application;
[0020] Figure 10 This is a schematic diagram of the structure of an information encoding device provided in an embodiment of this application. Detailed Implementation
[0021] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0022] With the continuous development of payment technology, online payment has become a major trend. Each online payment generates a large amount of information, including attribute and numerical information. Attribute information is often ten to dozens of times larger than numerical information. To facilitate operations such as transaction classification and risk detection using attribute information, it is necessary to encode the attribute information and input the encoded data into a model for these operations. However, current methods for encoding attribute information lose the rich semantic information within it, resulting in insufficient accuracy in representing the attribute information through encoding.
[0023] This application provides an information encoding method, apparatus, device, and storage medium that can convert attribute information from different categories generated by a transaction into multi-dimensional vectors of attribute categories mapped to the same space. This allows for the generation of aggregated attribute information encoding for a transaction based on the multi-dimensional vectors of attribute categories corresponding to the attribute information from each category within the same transaction. This aggregated attribute information encoding incorporates attribute information from different categories, avoiding the loss of rich semantic information within the attribute information and improving the accuracy of the encoding.
[0024] The information encoding methods, apparatus, devices, and storage media in this application will be described below.
[0025] The first aspect of this application provides an information encoding method that can be applied to information encoding devices, equipment, etc., that is, the information encoding method can be executed by information encoding devices, equipment, etc., and the type of information encoding device or equipment is not limited herein. Figure 1 A flowchart illustrating an information encoding method provided in an embodiment of this application. Figure 1 As shown, the information encoding method may include steps S101 to S103.
[0026] In step S101, the attribute information generated by each transaction is obtained.
[0027] Each transaction generates attribute information and numerical information. Attribute information is information generated by the transaction that cannot be directly represented by numerical values. For example, attribute information may include the transaction venue, currency, and transaction type. However, attribute information can be represented by numerical codes. For example, the transaction currency includes RMB and Euro; RMB can be represented by 001, and Euro by 002. Numerical information is information generated by the transaction that can be directly represented by numerical values. For example, numerical information may include transaction volume and transaction time. If the transaction volume is 500 yuan, the numerical information is 500. Since numerical information is directly represented by numerical values, its content can be directly obtained. However, attribute information contains rich semantic information, which greatly affects the performance of operations such as transaction classification and risk detection.
[0028] In step S102, according to the classification categories of the attribute information, a classifier or neural network is used to convert the attribute information into a multidimensional vector of attribute categories mapped to the same space.
[0029] Attribute information can be categorized into different types, potentially multiple categories. These categories can be set based on scenarios, needs, experience, etc., and are not limited here. In some examples, categories may include resource card categories, transaction categories, and merchant categories. Resource card category attributes include information related to resource cards, such as resource card type and the institution to which the resource card belongs. Transaction category attributes include information related to transactions, such as transaction type, currency, and transaction details. Merchant category attributes include information related to merchants, such as merchant name and address.
[0030] Different categories have different attribute information, and correspondingly, the dimensions of the attribute information vectors for different categories may also differ. To enable computation between these attribute information vectors, the attribute information can be converted into multi-dimensional attribute category vectors mapped to the same space. A multi-dimensional attribute category vector can represent the content of the attribute information for that category. Vectors mapped to the same space have the same number of dimensions and can be used for computation.
[0031] The number of dimensions in the attribute category multidimensional vector can be set according to the scenario, requirements, experience, etc., and is not limited here. For example, the number of dimensions in the attribute category multidimensional vector can be 128.
[0032] Attribute information can be converted into multidimensional vectors of attribute categories using models such as classifiers or neural networks. The type of classifier or neural network is not limited here; for example, classifiers may include one or more of the following: multilayer perceptron, logistic regression, support vector machine, etc.
[0033] In step S103, the attribute information aggregation code corresponding to the transaction is generated based on the attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction.
[0034] A single transaction can generate attribute information for different categories. Step S102 above yields a multi-dimensional vector of attribute information corresponding to each category. Specifically, the multi-dimensional vectors of attribute information corresponding to each category in a single transaction can be aggregated, realizing the aggregation of attribute information for each category. This allows the aggregated encoding of the generated transaction's attribute information to represent the rich semantic information of each category's attributes.
[0035] In this embodiment, attribute information from different categories generated by a transaction can be converted into multi-dimensional vectors of attribute categories mapped to the same space using a classifier or neural network, according to the classification categories of attribute information. This allows for the aggregation of multi-dimensional vectors of attribute categories corresponding to attribute information from each category in the same transaction, generating an aggregated attribute information code for the transaction. This aggregated attribute information code is composed of attribute information from multiple categories, preserving rich semantic information from the attribute information of each category in the transaction, avoiding the loss of rich semantic information, and improving the accuracy of the encoding corresponding to the attribute information. The improved accuracy of the encoding corresponding to the attribute information corresponding to the transaction also improves the predictive performance of business operations such as transaction classification and risk detection.
[0036] In some embodiments, the intermediate vectors of attribute information under each category can be obtained first, and the intermediate vectors of attribute information under each category can be merged to obtain the attribute category multidimensional vector of the attribute information of that category. Figure 2 A flowchart of an information encoding method provided in another embodiment of this application.
[0037] Figure 2 and Figure 1 The difference is that, Figure 1 Step S102 can be further refined as follows: Figure 2 Steps S1021 to S1025 in the process, Figure 1 Step S103 can be further refined as follows: Figure 2 Step S1031 in the process.
[0038] In step S1021, the item to which the attribute information belongs in the classification category is determined based on the attribute information.
[0039] Each category may include at least one item. Different items correspond to different attribute information, and the item to which an attribute belongs can be determined based on the attribute information. For example, the transaction category may include two items: transaction venue and transaction currency; if the attribute information is RMB, then the item to which this attribute belongs is transaction currency; if the attribute information is XX shopping mall, then the item to which this attribute belongs is transaction venue.
[0040] In step S1022, the attribute information is encoded in a low dimension according to the number of assignable values of the item to which the attribute information belongs, to obtain the first code.
[0041] The number of assignable values for an item is the total number of values that can be assigned to that item, with each item having at least one assignable value. For example, if the category is "Transaction Category," and the Transaction Category includes the item "Transaction Currency," and the transaction currency is pre-defined to include only RMB, Euro, and USD, then the Transaction Currency item has a maximum of 3 assignable values. As another example, if the category is "Resource Card Category," and the Resource Card Category includes the item "Resource Card Type," and the resource card type is pre-defined to include only debit cards and credit cards, then the Resource Card Type item has a maximum of 2 assignable values.
[0042] The number of bits in the first code obtained by low-dimensional encoding of attribute information can be the same as the number of assignable values for the item to which the attribute information belongs. The low-dimensional encoding algorithm for low-dimensional encoding of attribute information is not limited here; for example, low-dimensional encoding algorithms may include one-hot encoding algorithms, numerical encoding algorithms, etc.
[0043] In step S1023, a random embedding matrix corresponding to the number of assignable values of the item to which the attribute information belongs is obtained, and an intermediate vector of the attribute information is obtained based on the first encoding and the random embedding matrix.
[0044] The random embedding matrix is used to transform the first code into an intermediate vector with more dimensions. Different random embedding matrices correspond to different numbers of assignable values. For example, if the number of assignable values for the item to which the attribute information belongs is 3, the resulting first code is a 1×3 matrix, the random embedding matrix corresponding to the number of assignable values of 3 can be a 3×d matrix, and the resulting intermediate vector can be a 1×d matrix.
[0045] In some examples, the intermediate vector of attribute information can be obtained according to the following equation (1):
[0046] e attr =onehot(f attr )⊙E attr (1)
[0047] Among them, e attr The intermediate vector; onehot encoding is the one-hot coding algorithm; f attr For attribute information; E attrIt is a random embedding matrix.
[0048] It should be noted that the number of dimensions of the intermediate vectors of attribute information of different categories may be different. With different numbers of dimensions, it is difficult to aggregate the intermediate vectors of attribute information of different categories. In subsequent steps S1024 and S1025, the intermediate vectors of attribute information of different categories can be transformed into multi-dimensional vectors of attribute categories that can be mapped to the same space.
[0049] In step S1024, the intermediate vectors of the attribute vectors of each item belonging to the same category are summed to obtain the first sum.
[0050] Summing the intermediate vectors of the attribute vectors of all items in the same category can aggregate the features of the attribute vectors of all items in the same category, so as to preserve the semantic information of the attribute information of each item in the same category.
[0051] In step S1025, based on the first summation, a classifier or neural network is used to obtain the attribute category multidimensional vector corresponding to the attribute information of each category.
[0052] A classifier or neural network can be used to transform inputs into vectors that can be mapped to the same space. Inputting the first sum into the classifier or neural network, it outputs a multi-dimensional vector representing the attribute information of each category. Each category corresponds to one multi-dimensional vector, and the content represented by each multi-dimensional vector can include the semantic information of the attributes within that category. For example, if the categories include resource card category, transaction category, and merchant category, the classifier or neural network can output the multi-dimensional vectors representing the resource card category, the transaction category, and the merchant category.
[0053] In some examples, the classifier used can be a multilayer perceptron (MLP), and the multidimensional vector of attribute categories can be obtained according to the following equation (2):
[0054]
[0055] Where i∈{card,trans,mchnt}; card is the resource card category; trans is the transaction category; mchnt is the merchant category; x cat,i The table represents a multidimensional vector of attribute categories corresponding to category i; MLP is a multilayer perceptron algorithm; i For attribute information under category i; e attr,j It is the intermediate vector of the attribute vector.
[0056] In step S1031, the attribute category multidimensional vectors corresponding to the attribute information of each category in the same transaction are summed to obtain the attribute information aggregation code corresponding to the transaction.
[0057] The multidimensional vector representing the attribute category for each category can include the semantic information of that category's attributes. A single transaction generates attribute information for multiple categories. To generate an encoding that represents this transaction while retaining the semantic information of each category's attributes, the multidimensional vectors representing the attribute information for each category in the transaction can be aggregated to obtain an aggregated attribute information encoding for this transaction. This aggregated attribute information encoding can represent the semantic information of the attribute information for each category generated in this transaction.
[0058] In some examples, the aggregate encoding of the attribute information corresponding to the transaction can be obtained according to the following formula (3):
[0059]
[0060] Where i∈{card,trans,mchnt}; card represents the resource card category; trans represents the transaction category; and mchnt represents the merchant category. The attribute information aggregation encoding corresponding to the u-th transaction can be a 1×m matrix; Let be the multidimensional vector of attribute categories corresponding to category i in the u-th transaction.
[0061] For example, Figure 3 This is a logical schematic diagram of an example of an information encoding method provided in an embodiment of this application. Figure 3 As shown, a single transaction generates attribute information for three categories: Card (resource card category), Transaction (transaction category), and Merchant (merchant). The Card attribute information can include items such as resource card category; the Transaction attribute information can include items such as transaction channel and currency; and the Merchant attribute information can include items such as merchant type and merchant terms. After low-dimensional encoding and transformation using a random embedding matrix, the attribute information yields an intermediate vector. Within each category, multiple intermediate vectors are aggregated, and the resulting sum is input into a multilayer perceptron. The multilayer perceptron outputs a multidimensional vector representing the attribute category for each category. The multidimensional vector x representing the attribute category corresponding to the resource card category is shown below. card , Attribute category multidimensional vector x corresponding to the transaction category trans Multidimensional vector aggregation of attribute categories corresponding to merchant categories x mchntThis yields the aggregated encoding of the attribute information corresponding to this transaction.
[0062] In some embodiments, the obtained attribute information aggregation code is used to train the business model. The attribute information aggregation code corresponding to the transaction can be optimized and updated through backpropagation using the business model, so as to further improve the accuracy of the attribute information encoding, i.e., the attribute information aggregation code. Figure 4 A flowchart of an information encoding method provided in another embodiment of this application. Figure 4 and Figure 1 The difference is that, Figure 4 The information encoding method shown also includes steps S104 to S106.
[0063] In step S104, the attribute information is aggregated and encoded and input into the business model to obtain the first output result of the business model.
[0064] The business model may include transaction classification models, risk detection models, etc., and is not limited thereto. For example, a risk detection model may include a fraud detection model for detecting fraudulent transactions, which classifies transactions or detects risks through attribute information aggregation encoding. The output of the business model may represent the classification result or detection result of the transaction corresponding to the attribute information aggregation encoding.
[0065] In step S105, based on the first output result, attribute information aggregation encoding, and preset first increment, the optimization gradient of the business model is obtained using the business model.
[0066] The first increment can be an increment for at least one dimension of the attribute information aggregation code. That is, the second code, relative to the attribute information aggregation code, can be a code with changes in one dimension or more dimensions. The first increment can be set according to the scenario, requirements, experience, etc., and is not limited here. The first increment can be positive or negative. When the first increment is an increment for elements in two or more dimensions of the attribute information aggregation code, the first increment can also include both positive and negative values.
[0067] The optimization gradient is a vector, and the business model changes fastest and has the largest rate of change along the direction of this optimization gradient. The first increment can be used to change the aggregated encoding of attribute information. Then, based on the business model, the first output result, and the changed aggregated encoding of attribute information, the optimization gradient can be obtained.
[0068] In step S106, the attribute information aggregation encoding is updated based on the optimization gradient until the optimization effect represented by the optimization effect parameter of the business model reaches its peak.
[0069] Optimization effect parameters characterize the optimization effect of a business model and can be used to evaluate and calculate the business model to obtain these parameters. In some examples, the attribute information aggregation encoding of a portion of transactions is used to train the business model, while the attribute information aggregation encoding of another portion of transactions is used to test the trained business model. The attribute information aggregation encoding of the transactions used to test the trained business model can be used to evaluate and calculate the business model to obtain the optimization effect parameters.
[0070] Based on the optimization gradient, the attribute information aggregation code can be updated. The updated attribute information aggregation code can improve the optimization effect represented by the optimization effect parameter of the business model. Steps S104 to S106 can be executed repeatedly until the optimization effect represented by the optimization effect parameter of the business model no longer improves but decreases. When this happens, it can be determined that the optimization effect has reached its peak. The attribute information aggregation code with the best optimization effect can be used as the final attribute information aggregation code.
[0071] In some embodiments, a first increment can be used to obtain a second output result through a business model, and an optimization gradient can be obtained based on the first and second output results. By optimizing the gradient, the optimization effect of attribute information aggregation encoding can be gradually improved. Figure 5 A flowchart of an information encoding method provided in another embodiment of this application. Figure 5 and Figure 4 The difference is that, Figure 4 Step S105 can be further refined as follows: Figure 5 Steps S1051 to S1053 in the process, Figure 4 Step S106 can be further refined as follows: Figure 5 Steps S1061 to S1063 in the process.
[0072] In step S1051, a preset first increment is added to the attribute information aggregation encoding to obtain the second encoding.
[0073] The attribute information aggregation code is added to the first increment to obtain the second code.
[0074] In step S1052, the second code is input into the business model to obtain the second output result of the business model.
[0075] The second code is input into the business model, and the second output result of the business model is the attribute information aggregation code corresponding to the second code.
[0076] In step S1053, the optimization gradient of the business model is obtained based on the first output result, the second output result, and the first increment.
[0077] The optimized gradient can be obtained from the first input result, the second output result, and the first increment. The optimized gradient can be obtained using the gradient boosting algorithm, which will not be elaborated here.
[0078] In step S1061, the second increment is obtained based on the optimization gradient.
[0079] Based on the optimization gradient, a second increment can be obtained that can improve the optimization effect. The second increment is the increment that can improve the optimization effect of attribute information aggregation encoding input into the business model.
[0080] In step S1062, a second increment is added to the attribute category multidimensional vector to obtain the updated attribute category multidimensional vector.
[0081] The updated attribute category multidimensional vector can be determined by summing the attribute category multidimensional vector with the second increment.
[0082] In step S1063, the updated attribute information aggregation code is obtained based on the updated attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction.
[0083] The specific details of obtaining the updated attribute information aggregation code based on the updated attribute category multidimensional vector in step S1063 can be found in the relevant descriptions of steps S103 and S1031 in the above embodiments, and will not be repeated here.
[0084] To more intuitively demonstrate that the updated attribute category multidimensional vector in this application embodiment can more accurately reflect the semantic information of attribute information, the following explanation uses a two-dimensional distribution diagram of the attribute category multidimensional vector. Figure 6 This is a two-dimensional distribution map of the attribute category multidimensional vectors including merchant type in multiple transactions obtained without using the information encoding method of the embodiments of this application. Figure 7 This is a two-dimensional distribution map of the attribute category multidimensional vectors including merchant type in multiple transactions obtained using the information encoding method of the embodiments of this application, and Figure 7 The attribute category multidimensional vector is the updated attribute category multidimensional vector obtained by iteratively executing steps S104 to S106 four times. Figure 6 and Figure 7 Each scatter point in the vector represents a multidimensional vector of attribute categories for a transaction. Figure 6 The multiple scattered points in the data exhibit a random distribution, while Figure 7The scattered points exhibit a partially clustered state, with the merchant types in the transactions corresponding to these clustered points being relatively similar, while the merchant types in the transactions corresponding to some more widely spaced scattered points are significantly different. It can be seen that the attribute category multidimensional vector obtained using the information encoding method of this application embodiment is more discriminative and more helpful for business operations such as transaction classification or risk detection. The transactions corresponding to the clustered scattered points are more similar and can be classified into one category, which can also improve the predictive performance of business operations such as transaction classification or risk detection.
[0085] A second aspect of this application provides an information encoding device. Figure 8 This is a schematic diagram of the structure of an information encoding device provided in an embodiment of this application. Figure 8 As shown, the information encoding device 200 may include an acquisition module 201, a conversion module 202, and a generation module 203.
[0086] The acquisition module 201 can be used to acquire attribute information generated by each transaction.
[0087] The conversion module 202 can be used to convert attribute information into a multidimensional vector of attribute categories mapped to the same space, based on the classification categories of attribute information and using a classifier or neural network.
[0088] In some examples, the categories include resource card categories, transaction categories, and merchant categories.
[0089] The generation module 203 can be used to generate the attribute information aggregation code corresponding to the transaction based on the attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction.
[0090] In this embodiment, attribute information from different categories generated by a transaction can be converted into multi-dimensional vectors of attribute categories mapped to the same space using a classifier or neural network, according to the classification categories of attribute information. This allows for the aggregation of multi-dimensional vectors of attribute categories corresponding to attribute information from each category in the same transaction, generating an aggregated attribute information code for the transaction. This aggregated attribute information code is composed of attribute information from multiple categories, preserving rich semantic information from the attribute information of each category in the transaction, avoiding the loss of rich semantic information, and improving the accuracy of the encoding corresponding to the attribute information. The improved accuracy of the encoding corresponding to the attribute information corresponding to the transaction also improves the predictive performance of business operations such as transaction classification and risk detection.
[0091] In some embodiments, the conversion module 202 can be used to: determine the item to which the attribute information belongs in the classification category based on the attribute information; perform low-dimensional encoding on the attribute information according to the number of assignable values of the item to which the attribute information belongs, to obtain a first encoding; obtain a random embedding matrix corresponding to the number of assignable values of the item to which the attribute information belongs, and obtain an intermediate vector of the attribute information based on the first encoding and the random embedding matrix; sum the intermediate vectors of the attribute vectors of each item belonging to the same classification category to obtain a first sum; and obtain the attribute category multidimensional vector corresponding to the attribute information of each classification category using a classifier or neural network based on the first sum.
[0092] In some embodiments, the generation module 203 can be used to: sum the attribute category multidimensional vectors corresponding to the attribute information of each category in the same transaction to obtain the attribute information aggregation code corresponding to the transaction.
[0093] Figure 9 This is a schematic diagram of the structure of an information encoding device provided in another embodiment of this application. Figure 9 and Figure 8 The difference is that, Figure 9 The information encoding device 200 shown may also include a data transmission module 204 and an optimization module 205.
[0094] The data transmission module 204 can be used to aggregate and encode attribute information and input it into the business model to obtain the first output result of the business model.
[0095] The optimization module 205 can be used to obtain the optimization gradient of the business model based on the first output result, the attribute information aggregation code and the preset first increment; and can be used to update the attribute information aggregation code based on the optimization gradient until the optimization effect represented by the optimization effect parameter of the business model reaches the peak.
[0096] In some embodiments, the optimization module 205 can be used to: add a preset first increment to the attribute information aggregation encoding to obtain a second encoding; input the second encoding into the business model to obtain a second output result from the business model; and obtain the optimization gradient of the business model based on the first output result, the second output result, and the first increment.
[0097] In some embodiments, the optimization module 205 may be used to: obtain a second increment based on the optimization gradient; add the second increment to the attribute category multidimensional vector to obtain an updated attribute category multidimensional vector; and obtain an updated attribute information aggregation code based on the updated attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction.
[0098] A third aspect of this application also provides an information encoding device. Figure 10 This is a schematic diagram of the structure of an information encoding device provided in an embodiment of this application. Figure 10 As shown, the information encoding device 300 includes a memory 301, a processor 302, and a computer program stored in the memory 301 and capable of running on the processor 302.
[0099] In one example, the processor 302 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that may be configured to implement the embodiments of this application.
[0100] Memory 301 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the information encoding method according to embodiments of this application.
[0101] The processor 302 runs a computer program corresponding to the executable program code by reading the executable program code stored in the memory 301, so as to implement the information encoding method in the above embodiments.
[0102] In one example, the information encoding device 300 may further include a communication interface 303 and a bus 304. For example, Figure 10 As shown, the memory 301, processor 302, and communication interface 303 are connected through bus 304 and complete communication with each other.
[0103] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 303.
[0104] Bus 304 includes hardware, software, or both, that couples components of information encoding device 300 together. For example, and not limitingly, bus 304 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 304 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0105] A fourth aspect of this application also provides a computer-readable storage medium storing computer program instructions. When these computer program instructions are executed by a processor, they can implement the information encoding method described in the above embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.
[0106] This application provides a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device performs the information encoding method described in the above embodiments and achieves the same technical effect. To avoid repetition, further details are omitted here.
[0107] It should be clarified that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For the device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description section of the method embodiments. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.
[0108] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0109] Those skilled in the art will understand that the above embodiments are exemplary and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, specification, and claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other means or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to identify names and not to indicate any particular order. No reference numerals in the claims should be construed as limiting the scope of protection. The functionality of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. An information encoding method, characterized in that, include: Retrieve attribute information generated from each transaction; According to the classification categories of the attribute information, a classifier or neural network is used to convert the attribute information into a multidimensional vector of attribute categories mapped to the same space; Based on the attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction, generate the attribute information aggregation code corresponding to the transaction; The step of converting the attribute information into a multi-dimensional vector of attribute categories mapped to the same space using a classifier or neural network, according to the classification categories of the attribute information, includes: Based on the attribute information, determine the item to which the attribute information belongs in the classification category; Based on the number of assignable values for the item to which the attribute information belongs, the attribute information is encoded in a low dimension to obtain the first code; Obtain the random embedding matrix corresponding to the number of assignable values of the item to which the attribute information belongs, and obtain the intermediate vector of the attribute information based on the first encoding and the random embedding matrix; The first sum is obtained by summing the intermediate vectors of attribute information for items belonging to the same category. Based on the first summation, a classifier or neural network is used to obtain the attribute category multidimensional vector corresponding to the attribute information of each category.
2. The method according to claim 1, characterized in that, The step of generating an aggregated encoding of attribute information corresponding to a transaction based on the attribute category multidimensional vectors corresponding to the attribute information of each category in the same transaction includes: Summing the attribute information of each category in the same transaction yields the aggregated encoding of the attribute information corresponding to the transaction.
3. The method according to claim 1, characterized in that, Also includes: The attribute information is aggregated and encoded and input into the business model to obtain the first output result of the business model. Based on the first output result, the attribute information aggregation code, and the preset first increment, the optimization gradient of the business model is obtained using the business model. The first increment is an increment for at least one dimension of the attribute information aggregation code, used to change the attribute information aggregation code. Based on the optimization gradient, the attribute information aggregation encoding is updated until the optimization effect represented by the optimization effect parameter of the business model reaches its peak.
4. The method according to claim 3, characterized in that, The step of obtaining the optimization gradient of the business model based on the first output result, the attribute information aggregation encoding, and the preset first increment, using the business model, includes: A preset first increment is added to the aggregated encoding of the attribute information to obtain a second encoding; The second code is input into the business model to obtain the second output result output by the business model; Based on the first output result, the second output result, and the first increment, the optimization gradient of the business model is obtained.
5. The method according to claim 3, characterized in that, The step of updating the attribute information aggregation encoding based on the optimization gradient includes: Based on the optimization gradient, the second increment is obtained; Add the second increment to the attribute category multidimensional vector to obtain the updated attribute category multidimensional vector; Based on the updated attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction, the updated attribute information aggregation code is obtained.
6. The method according to any one of claims 1 to 4, characterized in that, The classification categories include resource card category, transaction category, and merchant category.
7. An information encoding device, characterized in that, include: The acquisition module is used to acquire attribute information generated from each transaction; The conversion module is used to convert the attribute information into a multidimensional vector of attribute categories mapped to the same space, according to the classification categories of the attribute information, using a classifier or neural network. The generation module is used to generate an aggregated encoding of attribute information corresponding to a transaction based on the attribute category multidimensional vector corresponding to the attribute information of each category in the same transaction. The conversion module is used to: determine the item to which the attribute information belongs in the classification category based on the attribute information; and perform low-dimensional encoding on the attribute information according to the number of assignable values of the item to which the attribute information belongs, to obtain a first encoding; Obtain the random embedding matrix corresponding to the number of assignable values of the item to which the attribute information belongs, and obtain the intermediate vector of the attribute information based on the first encoding and the random embedding matrix; The intermediate vectors of attribute information for each item belonging to the same category are summed to obtain a first sum; based on the first sum, a classifier or neural network is used to obtain the multidimensional vector of the attribute category corresponding to the attribute information of each category.
8. An information encoding device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the information encoding method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the information encoding method as described in any one of claims 1 to 6.