Table data-based classification prediction method, device, equipment and medium

By introducing embedding and encoding layers into the neural network model, and utilizing the statistical information and embedding representation of feature values, the classification prediction accuracy of the neural network model on tabular data is improved, solving the problem of poor performance of neural network models on tabular data and improving the user experience.

CN116702011BActive Publication Date: 2026-06-02CHINA PING AN LIFE INSURANCE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA PING AN LIFE INSURANCE CO LTD
Filing Date
2023-07-07
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Neural network models perform worse than tree models such as XGBoost and LightGBM in classifying and predicting tabular data, resulting in lower user satisfaction in financial product recommendations.

Method used

By introducing embedding, encoding, and output layers into the neural network model, and utilizing the statistical information and embedding representation of feature values, the model's ability to analyze tabular data is improved. The model is trained using loss values ​​to enhance prediction accuracy.

Benefits of technology

It improves the accuracy of neural network models in classifying and predicting tabular data, thereby enhancing user satisfaction with financial product recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116702011B_ABST
    Figure CN116702011B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of artificial intelligence, and provides a classification prediction method based on table data, which comprises the following steps: inputting a characteristic value, a characteristic type corresponding to the characteristic value and statistical information corresponding to the characteristic value into an embedding layer of a neural network classification model to obtain an embedding representation corresponding to the characteristic value; then determining an embedding representation sequence according to the embedding representation; inputting the embedding representation sequence into an encoding layer of the neural network classification model to obtain a semantic vector sequence; inputting the semantic vector sequence into an output layer of the neural network classification model to obtain a prediction result; determining a loss value according to the prediction result and a labeled label, and training the neural network classification model according to the loss value to obtain a target neural network classification model. Through the above scheme, the neural network model can understand the global statistical information of the characteristics like a tree model, the performance and accuracy of the neural network model in performing a classification prediction task based on table data are improved, and the satisfaction of users in the experience of financial products is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, specifically to a classification prediction method, apparatus, device, and medium based on tabular data. Background Technology

[0002] In the fintech field, when using tabular data-based classification and prediction methods to recommend financial products, neural networks are used to predict the financial products that users are interested in based on their attribute characteristics, and then product recommendations are displayed to users based on the prediction results.

[0003] With the development of artificial intelligence technology, there are more and more scenarios where artificial intelligence technology is used to perform various classification predictions. For example, in product recommendation scenarios, neural networks are often used to predict products that the target object is interested in based on the attribute characteristics of the target object, and then product recommendation content is displayed to the target object according to the prediction results.

[0004] Tabular data is a common data type in risk control, recommendation, and other business scenarios. Its characteristic is that the data is in tabular format, typically with one row representing a sample and one column representing a feature. Neural network models have shown excellent performance in text, image, and speech processing, but their performance on tabular data is often inferior to tree models such as XGBoost and LightGBM. Neural network models can be used for representation learning, clustering, and transfer learning, while tree models cannot. Therefore, neural network models have enormous potential for application on tabular data. Thus, improving the analytical capabilities of neural network models for tabular data, enabling them to achieve higher accuracy in classification and prediction tasks based on tabular data, has become a pressing technical problem that needs to be solved, thereby enhancing user satisfaction with financial products. Summary of the Invention

[0005] This application provides a classification prediction method, apparatus, device, and medium based on tabular data, which can improve the accuracy of classification prediction performed by neural network models and enhance user satisfaction with financial product experiences.

[0006] In a first aspect, embodiments of this application provide a classification prediction method based on tabular data, the method comprising the following steps:

[0007] Obtain a neural network classification model and tabular data samples. The neural network classification model includes an embedding layer, an encoding layer, and an output layer. The tabular data samples include multiple feature types, multiple feature data groups, and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence.

[0008] For each feature value in the table data sample, the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value are input into the embedding layer to obtain the embedding representation corresponding to the feature value. The statistical information is obtained by statistically analyzing the labels corresponding to the feature value in the table data sample.

[0009] Based on the embedding representation corresponding to each feature value in the feature data group, determine the embedding representation sequence corresponding to the feature data group;

[0010] The embedding representation sequence corresponding to the feature data group is input into the encoding layer to obtain the semantic vector sequence corresponding to the feature data group;

[0011] The semantic vector sequence corresponding to the feature data group is input into the output layer to obtain the prediction result corresponding to the feature data group;

[0012] The loss value is determined based on the prediction result and the label corresponding to the feature data group, and the neural network classification model is trained based on the loss value to obtain the target neural network classification model;

[0013] Obtain the target table data and input the target table data into the target neural network classification model to obtain the classification prediction result.

[0014] In some embodiments, before inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer, the method further includes:

[0015] The frequency of the feature value in the labels of each category is counted to obtain the statistical information corresponding to the labels of each category;

[0016] The frequency of the feature value in all the feature data groups is counted to obtain full sample statistical information.

[0017] The statistical information corresponding to the feature value is obtained based on the statistical information corresponding to the labels of each category and the statistical information of the whole sample.

[0018] In some embodiments, the step of inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer to obtain the embedding representation corresponding to the feature value includes:

[0019] The feature value, the feature type corresponding to the feature value, the statistical information corresponding to the label of each category corresponding to the feature value, and the full sample statistical information corresponding to the feature value are input into the embedding layer to obtain the feature value embedding representation, feature type embedding representation, label statistical information embedding representation of each category, and full sample statistical information embedding representation output by the embedding layer.

[0020] The embedding representation corresponding to the feature value is obtained by averaging the feature value embedding representation, the feature type embedding representation, the label statistical information embedding representation of each category, and the full sample statistical information embedding representation.

[0021] In some embodiments, inputting the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group includes:

[0022] The semantic vector representation corresponding to the feature data group is obtained by averaging multiple semantic vectors in the semantic vector sequence corresponding to the feature data group.

[0023] The semantic vector representation is input into the output layer to obtain the prediction result output by the output layer.

[0024] In some embodiments, the label corresponding to each feature data group is 0 or 1; the loss value is determined based on the prediction result corresponding to the feature data group and the label, and is calculated using the following formula:

[0025] loss=-y*log(p)-(1-y)*log(1-p);

[0026] Where loss represents the loss value, p represents the predicted probability output by the output layer, and y represents the label corresponding to each feature data group.

[0027] In some embodiments, the feature values ​​include discrete feature values ​​and numerical feature values; before inputting the feature values, the feature types corresponding to the feature values, and the statistical information corresponding to the feature values ​​into the embedding layer, the method further includes:

[0028] When the feature value is a numerical feature value, the numerical range corresponding to the feature value is determined according to a preset mapping relationship;

[0029] Based on the numerical range corresponding to the feature value, the feature value is converted from the numerical feature value to the discrete feature value.

[0030] In some embodiments, training the neural network classification model based on the loss value to obtain a target neural network classification model includes:

[0031] Determine whether the loss value is less than or equal to a preset loss value threshold;

[0032] If the loss value is less than or equal to a preset loss value threshold, training ends, and the target neural network classification model is obtained.

[0033] If the loss value is greater than a preset loss value threshold, the model parameters of the neural network classification model are updated, and the neural network classification model is trained again based on the table data samples.

[0034] Secondly, embodiments of this application provide an artificial intelligence-based classification prediction device, the device comprising:

[0035] The first acquisition module is used to acquire a neural network classification model and a tabular data sample. The neural network classification model includes an embedding layer, an encoding layer and an output layer. The tabular data sample includes multiple feature types, multiple feature data groups and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence.

[0036] The first input module is used to input the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer for each feature value in the table data sample, so as to obtain the embedding representation corresponding to the feature value, wherein the statistical information is obtained by statistically analyzing the labels corresponding to the feature value in the table data sample;

[0037] The first determining module is used to determine the embedding representation sequence corresponding to the feature data group based on the embedding representation corresponding to each feature value in the feature data group;

[0038] The second input module is used to input the embedding representation sequence corresponding to the feature data group into the encoding layer to obtain the semantic vector sequence corresponding to the feature data group;

[0039] The third input module is used to input the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group;

[0040] The second determining module is used to determine a loss value based on the prediction result and the label corresponding to the feature data group, and to train the neural network classification model based on the loss value to obtain the target neural network classification model;

[0041] The prediction module is used to acquire target table data and input the target table data into the target neural network classification model to obtain classification prediction results.

[0042] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores computer programs or instructions, and the processor executes the computer programs or instructions to implement the method provided in the first aspect of embodiments of this application.

[0043] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions, which, when executed by a processor, implement the method provided in the first aspect of embodiments of this application.

[0044] The solution provided in this application firstly inputs the feature value, its corresponding feature type, and the corresponding statistical information into the embedding layer of a neural network classification model for each feature value in the tabular data sample, obtaining the embedding representation corresponding to the feature value; then, based on the embedding representations corresponding to each feature value in the feature data group, a sequence of embedding representations corresponding to the feature data group is determined; this sequence is then input into the encoding layer of the neural network classification model, obtaining a sequence of semantic vectors corresponding to the feature data group; the sequence is then input into the output layer of the neural network classification model, obtaining a prediction result corresponding to the feature data group; a loss value is determined based on the prediction result and the labeled information, and the neural network classification model is trained based on the loss value to obtain a target neural network classification model; finally, target tabular data is acquired and input into the target neural network classification model to obtain a classification prediction result. Through this solution, the neural network model can understand the global statistical information of features like a tree model, improving the performance and accuracy of the neural network model when performing classification prediction tasks based on tabular data. Attached Figure Description

[0045] Figure 1 This is a flowchart illustrating a classification prediction method based on tabular data provided in an embodiment of this application;

[0046] Figure 2 This is a schematic diagram of the structure of the neural network classification model provided in the embodiments of this application;

[0047] Figure 3 This is a schematic diagram illustrating the process of obtaining statistical information corresponding to feature values ​​provided in an embodiment of this application;

[0048] Figure 4 This is a schematic diagram illustrating the process of obtaining the embedded representation corresponding to the feature value provided in the embodiments of this application;

[0049] Figure 5 This is a schematic diagram of the structure of an artificial intelligence-based classification prediction device provided in an embodiment of this application;

[0050] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0053] First, let's analyze some of the terms used in this application:

[0054] Artificial Intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.

[0055] Neural Networks (NNs) are complex network systems formed by the extensive interconnection of a large number of simple processing units (called neurons). They reflect many fundamental characteristics of human brain function and are highly complex nonlinear dynamic learning systems. Neural networks possess massive parallelism, distributed storage and processing, self-organization, self-adaptation, and self-learning capabilities, making them particularly suitable for handling imprecise and fuzzy information processing problems that require simultaneous consideration of many factors and conditions.

[0056] Supervised learning is a process that uses a set of labeled data to learn the mapping from input to output, and then applies this mapping to unknown data to achieve the purpose of classification or regression.

[0057] Embedding is a method of representing an object using a numerical vector. This object can be a word, an item, a movie, etc. An item can be represented by a vector because the distance between this vector and other item vectors reflects the similarity between those items. Furthermore, the distance vector between two vectors can even reflect the relationship between them.

[0058] In the fintech field, when using tabular data-based classification and prediction methods to recommend financial products, neural networks are used to predict the financial products that users are interested in based on their attribute characteristics, and then product recommendations are displayed to users based on the prediction results.

[0059] With the development of artificial intelligence technology, there are more and more scenarios where artificial intelligence technology is used to perform various classification predictions. For example, in product recommendation scenarios, neural networks are often used to predict products that the target object is interested in based on the attribute characteristics of the target object, and then product recommendation content is displayed to the target object according to the prediction results.

[0060] Tabular data is a common data type in risk control, recommendation, and other business scenarios. Its characteristic is that the data is in tabular format, typically with one row representing a sample and one column representing a feature. Neural network models have shown excellent performance in text, image, and speech processing, but their performance on tabular data is often inferior to tree models such as XGBoost and LightGBM. Neural network models can be used for representation learning, clustering, and transfer learning, while tree models cannot. Therefore, neural network models have enormous potential for application on tabular data. Thus, improving the analytical capabilities of neural network models for tabular data, enabling them to achieve higher accuracy in classification and prediction tasks based on tabular data, has become a pressing technical problem that needs to be solved, thereby enhancing user satisfaction with financial products.

[0061] In view of this, embodiments of this application provide a classification prediction method, classification prediction device, electronic device, and computer-readable storage medium based on tabular data, which solves the problem of low performance of neural network models on tabular data and improves the accuracy of neural network models in performing classification prediction tasks based on tabular data.

[0062] The classification prediction method, classification prediction device, electronic device and storage medium provided in the embodiments of this application are specifically described through the following embodiments. First, the classification prediction method in the embodiments of this application is described.

[0063] The classification prediction method provided in this application can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms; the software can be an application that implements the classification prediction method, but is not limited to the above forms.

[0064] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0065] It should be noted that in various specific embodiments of the present invention, when processing is required based on data related to the characteristics of an object (such as a user's attribute information or a set of attribute information), the permission or consent of the corresponding object will be obtained first. Furthermore, the collection, use, and processing of this data will comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, when an embodiment of the present invention needs to obtain the attribute information of an object, separate permission or consent from the corresponding object will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the separate permission or consent of the corresponding object will the necessary object-related data for the normal operation of the embodiments of the present invention be obtained.

[0066] The following describes a classification prediction method based on tabular data provided in the embodiments of this application, with reference to specific application scenarios.

[0067] This application embodiment can be applied to financial product recommendations in the fintech field. Specifically, a neural network model and tabular data samples are acquired via a terminal, a server, or software within the terminal or server. The tabular data samples include multiple feature types, multiple feature data groups, and corresponding labels for each feature data group. Each feature data group includes multiple feature values, and these feature values ​​correspond one-to-one with the multiple feature types. The feature types include the user's gender, age, education level, personal income, family income, occupation, target return, risk tolerance level, financial risk tolerance, preset investment amount, and historical investment data. The neural network model includes an embedding layer, an encoding layer, and an output layer. By inputting the tabular data samples into the neural network model, prediction results corresponding to the feature data groups are obtained. A loss value is determined based on the prediction results and the labels, and the neural network classification model is trained based on the loss value to obtain a target neural network classification model. Target tabular data is acquired and input into the target neural network classification model to obtain classification prediction results, which are then used to display financial product recommendations to the user.

[0068] Please see Figure 1 This is a flowchart illustrating a classification prediction method based on tabular data provided in an embodiment of this application. The method includes the following steps S101-S107, which are described in detail below:

[0069] Step S101: Obtain a neural network classification model and a tabular data sample. The neural network classification model includes an embedding layer, an encoding layer, and an output layer. The tabular data sample includes multiple feature types, multiple feature data groups, and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence.

[0070] The classification prediction method provided in this application is based on a neural network classification model. Please refer to [link to relevant documentation]. Figure 2 The neural network classification model used in this application embodiment may include an embedding layer, an encoding layer, and an output layer. The neural network classification model may be of the type such as a convolutional neural network (CNN) or a recurrent neural network (LSTM / GRU / attention), and this application embodiment does not specifically limit the type of recurrent neural network (LSTM / GRU / attention).

[0071] For example, Table 1 is an exemplary tabular data sample provided in an embodiment of this application. The first row of the tabular data sample shown in Table 1 displays multiple feature types, and each feature type has a corresponding feature value. The other rows in the tabular data sample, excluding the first row, display multiple feature data groups, where the feature value in each feature data group corresponds to a feature type. Each feature data group has a corresponding label.

[0072] Table 1

[0073]

[0074]

[0075] Step S102: For each feature value in the table data sample, input the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer to obtain the embedding representation corresponding to the feature value. The statistical information is obtained by statistically analyzing the labels corresponding to the feature value in the table data sample.

[0076] For example, for feature value 11 in Table 1, the value, feature type (feature type 1), and statistical information corresponding to feature value 11 are input into the embedding layer, so that the embedding layer outputs the embedding corresponding to feature value 11 based on the value, feature type, and statistical information.

[0077] Please see Figure 3 Before inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer, this embodiment of the application also performs... Figure 3 The steps S201-S203 shown are used to obtain statistical information corresponding to the feature values.

[0078] Step S201: Count the number of times the feature value appears in the label of each category to obtain the statistical information corresponding to the label of each category.

[0079] Step S202: Count the number of times the feature value appears in all the feature data groups to obtain full sample statistics.

[0080] Step S203: Obtain the statistical information corresponding to the feature value based on the statistical information corresponding to the labels of each category and the statistical information of the whole sample.

[0081] For example, the labels in the table include two types: "0" and "1". The j-th feature value under the i-th feature type is "Male". First, we count the number of times the feature value "Male" appears under labels "0" and "1" respectively, obtaining the statistical information. and Then, count the total number of times the characteristic value "male" appears in the table, that is... and Add them together to obtain the full sample statistics.

[0082] Please see Figure 4 The step of inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer to obtain the embedding representation corresponding to the feature value includes the following steps S301-S302:

[0083] Step S301: Input the feature value, the feature type corresponding to the feature value, the statistical information corresponding to the label of each category corresponding to the feature value, and the full sample statistical information corresponding to the feature value into the embedding layer to obtain the feature value embedding representation, feature type embedding representation, label statistical information embedding representation of each category, and full sample statistical information embedding representation output by the embedding layer;

[0084] Step S302: Calculate the average of the feature value embedding representation, the feature type embedding representation, the label statistical information embedding representation of each category, and the full sample statistical information embedding representation to obtain the embedding representation corresponding to the feature value.

[0085] For example, for the j-th feature value under the i-th feature type in the table, its corresponding statistical information includes... and Then confirm and The corresponding embedding is obtained and Based on the specific value of the j-th feature value under the i-th feature type in the table, the feature value embedding is obtained, denoted as . Based on the feature type of the j-th feature value under the i-th feature type in the table, the feature value type embedding is obtained, denoted as .

[0086] Understandably, for binary classification scenarios where the labels only include two types, "0" and "1", the embedding of the j-th feature value under the i-th feature type in the table can be represented by the following formula:

[0087]

[0088] It should be noted that the method of this application embodiment is not only applicable to binary classification scenarios including two types, "0" and "1", but also applicable to other classification scenarios with more than two labels. This application embodiment does not impose too many limitations on this.

[0089] It is understandable that the feature values ​​in the table include discrete feature values ​​and numerical feature values. For example, the feature value "male" / "female" indicating gender is a discrete feature value, while the feature value "180 cm" indicating height is a numerical feature value.

[0090] Before inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer, the method further includes:

[0091] When the feature value is a numerical feature value, the numerical range corresponding to the feature value is determined according to a preset mapping relationship;

[0092] Based on the numerical range corresponding to the feature value, the feature value is converted from the numerical feature value to the discrete feature value.

[0093] For numerical feature values, firstly, based on multiple preset numerical intervals, determine which numerical interval the current feature value belongs to. Each preset numerical interval has a corresponding embedding. Then, determine the embedding corresponding to the feature value based on the numerical interval to which the current feature value belongs.

[0094] For discrete feature values, first, an embedding is pre-set for each category. For example, for the "gender" field, the embedding for "male" is set to "embedding1" and the embedding for "female" is set to "embedding2".

[0095] Step S103: Determine the embedding representation sequence corresponding to the feature data group based on the embedding representation corresponding to each feature value in the feature data group.

[0096] For example, for feature data group 1 in Table 1, the embeddings of each feature value corresponding to feature data group 1 are obtained as embedding11, embedding21, and embedding31. Embedding11, embedding21, and embedding31 are concatenated to obtain the embedding representation sequence {embedding11-embedding21-embedding31} corresponding to feature data group 1.

[0097] Step S104: Input the embedding representation sequence corresponding to the feature data group into the encoding layer to obtain the semantic vector sequence corresponding to the feature data group.

[0098] It is understood that the embedding representation sequence corresponding to the feature data group is input into the encoding layer, so that the encoding layer outputs a semantic vector sequence based on the embedding representation sequence. In this embodiment of the application, the semantic vector sequence is denoted as E.

[0099] For example, the encoder can use the BERT model as the encoder. Of course, other types of encoders can also be used in specific implementations, and this application does not limit the specific type of encoder.

[0100] Step S105: Input the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group.

[0101] It is understood that the semantic vector sequence corresponding to the feature data group is input into the output layer, so that the output layer makes predictions based on the semantic vector sequence, outputs the probability of each category, and determines the prediction result based on the category with the highest probability.

[0102] In one embodiment, the semantic vector sequence corresponding to the feature data group includes multiple semantic vectors, each semantic vector corresponding to a feature type; the step of inputting the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group includes:

[0103] Step S401: Calculate the average of multiple semantic vectors in the semantic vector sequence corresponding to the feature data group to obtain the semantic vector representation corresponding to the feature data group;

[0104] Step S402: Input the semantic vector representation into the output layer to obtain the prediction result output by the output layer.

[0105] Step S106: Determine the loss value based on the prediction result and the label corresponding to the feature data group, and train the neural network classification model based on the loss value to obtain the target neural network classification model.

[0106] It is understandable that after obtaining the prediction results corresponding to the feature data set, the prediction results corresponding to the feature data set are compared with the labeled values ​​to calculate the loss value, and then the neural network classification model is trained based on the loss value.

[0107] For example, in a binary classification scenario, the label corresponding to the feature data set is 0 or 1. Correspondingly, the loss value is determined based on the prediction result and the label corresponding to the feature data set, calculated using the following formula:

[0108] loss=-y*log(p)-(1-y)*log(1-p);

[0109] Where loss represents the loss value, p represents the predicted probability output by the output layer, and y represents the label corresponding to each feature data group.

[0110] In one embodiment, training the neural network classification model based on the loss value to obtain a target neural network classification model includes:

[0111] Step S501: Determine whether the loss value is less than or equal to a preset loss value threshold;

[0112] Step S502: If the loss value is less than or equal to a preset loss value threshold, training ends and the target neural network classification model is obtained.

[0113] Step S503: If the loss value is greater than a preset loss value threshold, update the model parameters of the neural network classification model, and continue to train the neural network classification model based on the table data samples.

[0114] It is understandable that training a neural network classification model based on the loss value includes: determining whether the training termination condition of the neural network classification model is met by comparing the loss value with a preset loss threshold; if the training termination condition is met, the current neural network classification model is used as the target neural network classification model; if the training termination condition is not met, the model parameters of the neural network classification model are adjusted according to the loss value, and the neural network classification model is retrained based on the tabular data samples.

[0115] Step S107: Obtain the target table data and input the target table data into the target neural network classification model to obtain the classification prediction result.

[0116] Understandably, after obtaining the target neural network classification model, it can be used to perform classification prediction tasks based on tabular data. Specifically, the target tabular data is input into the target neural network classification model, which first extracts features from the target tabular data, outputs semantic embedding vectors corresponding to the target tabular data, and then performs classification prediction based on the semantic embedding vectors, outputting the corresponding classification prediction results.

[0117] The classification prediction method based on tabular data provided in this application will be described in detail below with specific examples.

[0118] For example, Table 2 is an exemplary tabular data provided in an embodiment of this application. The first row of the tabular data shown in Table 2 displays multiple feature types, namely "Gender", "Age", and "Occupation", with corresponding feature values ​​under each feature type. The other rows in the sample tabular data display feature data groups corresponding to multiple users, with each feature value in the feature data group corresponding to a feature type. Each feature data group has a corresponding label; for example, in Table 2, the label for user 1 is 0.

[0119] Table 2

[0120]

[0121]

[0122] This example uses Table 2 as the target table data and includes the following steps:

[0123] Step S601: For each feature value in the target table data, obtain statistical information of the feature value; for example, for the feature value of gender "male", count the number of times the feature value "male" appears in label 0 and label 1 respectively, and count the total number of times the feature value "male" appears in the target table data.

[0124] Step S602: For each feature value in the target table data, input the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the target neural network classification model; for example, for the gender feature value of user 1, input the feature value "male", the feature type "gender", the number of times the feature value "male" appears in label 0, the number of times the feature value "male" appears in label 1, and the total number of times the feature value "male" appears into the embedding layer of the target neural network classification model;

[0125] Step S603: Output the embedding representation corresponding to each feature value through the embedding layer; for example, for the input feature value "male", feature value type "gender", the number of times the feature value "male" appears in label 0, the number of times the feature value "male" appears in label 1, and the total number of times the feature value "male" appears, determine the corresponding embedding representations respectively: Then, the mean of these embedding representations is calculated to obtain the embedding representation corresponding to the feature value;

[0126] Step S604: For each user in the target table data, the embedded representations of multiple feature values ​​corresponding to the user are concatenated to obtain the embedded representation sequence corresponding to the user.

[0127] Step S605: Input the embedding representation sequence corresponding to the user into the encoding layer of the target neural network classification model, so that the encoding layer outputs the semantic vector sequence corresponding to the user;

[0128] Step S606: Input the semantic vector sequence corresponding to the user into the output layer of the target neural network classification model to obtain the predicted label corresponding to the user.

[0129] The solution provided in this application firstly inputs the feature value, its corresponding feature type, and the corresponding statistical information into the embedding layer of a neural network classification model for each feature value in the tabular data sample, obtaining the embedding representation corresponding to the feature value; then, based on the embedding representations corresponding to each feature value in the feature data group, a sequence of embedding representations corresponding to the feature data group is determined; this sequence is then input into the encoding layer of the neural network classification model, obtaining a sequence of semantic vectors corresponding to the feature data group; the sequence is then input into the output layer of the neural network classification model, obtaining a prediction result corresponding to the feature data group; a loss value is determined based on the prediction result and the labeled information, and the neural network classification model is trained based on the loss value to obtain a target neural network classification model; finally, target tabular data is acquired and input into the target neural network classification model to obtain a classification prediction result. Through this solution, the neural network model can understand the global statistical information of features like a tree model, improving the performance and accuracy of the neural network model when performing classification prediction tasks based on tabular data.

[0130] The target task model of this application can be applied to e-commerce scenarios. For example, the object attribute information of the target object is recorded in a tabular modality, and then the tabular object attribute information is input into the target task model. The target task model performs feature extraction on the tabular object attribute information to obtain the corresponding semantic embedding vector. Then, recall prediction is performed based on the semantic embedding vector, and the recall prediction result corresponding to the target object is output. Finally, the recall text corresponding to the target object is obtained based on the recall prediction result.

[0131] Please see Figure 5 , Figure 5 This application provides an artificial intelligence-based classification prediction device, the device comprising:

[0132] The first acquisition module 801 is used to acquire a neural network classification model and a tabular data sample. The neural network classification model includes an embedding layer, an encoding layer and an output layer. The tabular data sample includes multiple feature types, multiple feature data groups and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence.

[0133] The first input module 802 is used to input the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer for each feature value in the table data sample, so as to obtain the embedding representation corresponding to the feature value, wherein the statistical information is obtained by statistically analyzing the label corresponding to the feature value in the table data sample;

[0134] The first determining module 803 is used to determine the embedding representation sequence corresponding to the feature data group based on the embedding representation corresponding to each feature value in the feature data group;

[0135] The second input module 804 is used to input the embedding representation sequence corresponding to the feature data group into the coding layer to obtain the semantic vector sequence corresponding to the feature data group;

[0136] The third input module 805 is used to input the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group;

[0137] The second determining module 806 is used to determine a loss value based on the prediction result and the label corresponding to the feature data group, and to train the neural network classification model based on the loss value to obtain a target neural network classification model.

[0138] The prediction module 807 is used to acquire target table data and input the target table data into the target neural network classification model to obtain classification prediction results.

[0139] The specific implementation of this classification prediction device is basically the same as the specific implementation of the classification prediction method described above, and will not be repeated here.

[0140] This application also provides an electronic device, which includes a memory and a processor. The memory stores computer programs or instructions, and the processor executes the computer programs or instructions to implement the above-described classification prediction method. This electronic device can be a server or a smart terminal.

[0141] Please see Figure 6 , Figure 6 The diagram illustrates the hardware structure of an electronic device, which includes:

[0142] The processor 1010 can be implemented using a general-purpose central processing unit (CPU), microprocessor, application specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0143] The memory 1020 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010 using the classification prediction method of the embodiments of this application.

[0144] The input / output interface 1030 is used to implement information input and output;

[0145] The communication interface 1040 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0146] Bus 1050 transmits information between various components of the device (e.g., processor 1010, memory 1020, input / output interface 1030, and communication interface 1040);

[0147] The processor 1010, memory 1020, input / output interface 1030 and communication interface 1040 are connected to each other within the device via bus 1050.

[0148] This application also provides a computer-readable storage medium storing a computer program or instructions that, when executed by a processor, implement the above-described classification prediction method.

[0149] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0150] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0151] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0152] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0154] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0155] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0156] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0157] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0158] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0159] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0160] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for classification prediction based on tabular data, characterized in that, The method includes the following steps: Obtain a neural network classification model and tabular data samples. The neural network classification model includes an embedding layer, an encoding layer, and an output layer. The tabular data samples include multiple feature types, multiple feature data groups, and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence. The frequency of the feature value in the labels of each category is counted to obtain the statistical information corresponding to the labels of each category; The frequency of the feature value in all the feature data groups is counted to obtain full sample statistical information. The statistical information corresponding to the feature value is obtained based on the statistical information corresponding to the labels of each category and the statistical information of the whole sample; The feature value, the feature type corresponding to the feature value, the statistical information corresponding to the label of each category corresponding to the feature value, and the full sample statistical information corresponding to the feature value are input into the embedding layer to obtain the feature value embedding representation, feature type embedding representation, label statistical information embedding representation of each category, and full sample statistical information embedding representation output by the embedding layer. The embedding representation corresponding to the feature value is obtained by averaging the feature value embedding representation, the feature type embedding representation, the label statistical information embedding representation of each category, and the full sample statistical information embedding representation. Based on the embedding representation corresponding to each feature value in the feature data group, determine the embedding representation sequence corresponding to the feature data group; The embedding representation sequence corresponding to the feature data group is input into the encoding layer to obtain the semantic vector sequence corresponding to the feature data group; The semantic vector sequence corresponding to the feature data group is input into the output layer to obtain the prediction result corresponding to the feature data group; The loss value is determined based on the prediction result and the label corresponding to the feature data group, and the neural network classification model is trained based on the loss value to obtain the target neural network classification model; Obtain the target table data and input the target table data into the target neural network classification model to obtain the classification prediction result. 2.The table data-based classification prediction method of claim 1, wherein, The step of inputting the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group includes: The semantic vector representation corresponding to the feature data group is obtained by averaging multiple semantic vectors in the semantic vector sequence corresponding to the feature data group. The semantic vector representation is input into the output layer to obtain the prediction result output by the output layer. 3.The table data-based classification prediction method of claim 2, wherein, The feature data sets are labeled with either 0 or 1; the loss value is determined based on the prediction results and labels corresponding to the feature data sets, and is calculated using the following formula: ; wherein, represents a loss value, represents a prediction probability of the output layer output, and y represents a labeled label corresponding to the feature data set respectively. 4.The table data-based classification prediction method of claim 1, wherein, The eigenvalues ​​include discrete eigenvalues ​​and numerical eigenvalues; Before inputting the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer, the method further includes: When the feature value is a numerical feature value, the numerical range corresponding to the feature value is determined according to a preset mapping relationship; Based on the numerical range corresponding to the feature value, the feature value is converted from the numerical feature value to the discrete feature value. 5.The table data-based classification prediction method of claim 1, wherein, The step of training the neural network classification model based on the loss value to obtain the target neural network classification model includes: Determine whether the loss value is less than or equal to a preset loss value threshold; If the loss value is less than or equal to a preset loss value threshold, training ends, and the target neural network classification model is obtained. If the loss value is greater than a preset loss value threshold, the model parameters of the neural network classification model are updated, and the neural network classification model is trained again based on the table data samples.

6. A classification prediction device based on tabular data, characterized in that, The apparatus is used to implement the method according to any one of claims 1-5, comprising: The first acquisition module is used to acquire a neural network classification model and a tabular data sample. The neural network classification model includes an embedding layer, an encoding layer and an output layer. The tabular data sample includes multiple feature types, multiple feature data groups and labels corresponding to the multiple feature data groups. Each feature data group includes multiple feature values, and the multiple feature values ​​and the multiple feature types have a one-to-one correspondence. The first input module is used to input the feature value, the feature type corresponding to the feature value, and the statistical information corresponding to the feature value into the embedding layer for each feature value in the table data sample, so as to obtain the embedding representation corresponding to the feature value, wherein the statistical information is obtained by statistically analyzing the labels corresponding to the feature value in the table data sample; The first determining module is used to determine the embedding representation sequence corresponding to the feature data group based on the embedding representation corresponding to each feature value in the feature data group; The second input module is used to input the embedding representation sequence corresponding to the feature data group into the encoding layer to obtain the semantic vector sequence corresponding to the feature data group; The third input module is used to input the semantic vector sequence corresponding to the feature data group into the output layer to obtain the prediction result corresponding to the feature data group; The second determining module is used to determine a loss value based on the prediction result and the label corresponding to the feature data group, and to train the neural network classification model based on the loss value to obtain the target neural network classification model; The prediction module is used to acquire target table data and input the target table data into the target neural network classification model to obtain classification prediction results.

7. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program or instructions, and the processor executing the computer program or instructions to implement the method of any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program or instructions that, when executed by a processor, implement the method as described in any one of claims 1 to 5.