WO2021147568A1 - 基于gbdt高阶特征组合的推荐方法、装置及存储介质 - Google Patents

基于gbdt高阶特征组合的推荐方法、装置及存储介质 Download PDF

Info

Publication number
WO2021147568A1
WO2021147568A1 PCT/CN2020/136398 CN2020136398W WO2021147568A1 WO 2021147568 A1 WO2021147568 A1 WO 2021147568A1 CN 2020136398 W CN2020136398 W CN 2020136398W WO 2021147568 A1 WO2021147568 A1 WO 2021147568A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
model
gbdt
feature
recommendation
Prior art date
Application number
PCT/CN2020/136398
Other languages
English (en)
French (fr)
Inventor
陈宏斌
孙立博
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021147568A1 publication Critical patent/WO2021147568A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2465Query processing support for facilitating data mining operations in structured databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/24323Tree-organised classifiers

Definitions

  • This application relates to the field of big data, and in particular to a method, system, device, and computer-readable storage medium for recommending based on the GBDT high-level feature combination.
  • Feature combination is also called feature intersection, which is a feature generation method in feature engineering.
  • feature intersection is a feature generation method in feature engineering.
  • subtraction and multiplication of continuous features in addition to generating new features, multiple features (continuous feature discretization) can also be combined.
  • continuous feature discretization can also be combined.
  • the discretization of the characteristics requires certain analysis, and the discrete planning is reasonable to form new characteristics.
  • the traditional feature combination methods mainly include exhaustive method, rule-based combination method, and model-based second-order feature combination method.
  • the exhaustive method may easily lead to high-order crossover when the number of features is large.
  • the number of later feature combinations increases exponentially, and it is difficult to list them exhaustively.
  • the rule-based combination method has high requirements for the design of rules, requires a deep understanding of the business, consumes a lot of manpower and time, and the feature combination based on the construction paradigm still faces exponential explosion and is difficult to exhaustively.
  • the model-based second-order feature combination method is only applicable to the mining of second-order cross-features, and the scope of application is limited.
  • This application provides a recommendation method, system, electronic device, and computer-readable storage medium based on the GBDT high-level feature combination, the main purpose of which is to improve the recommendation efficiency and accuracy based on the GBDT high-level feature combination.
  • this application provides a recommendation method based on GBDT high-level feature combinations, including:
  • Predictive recommendation is made based on the feature ranking.
  • the present application also provides a recommendation system based on the GBDT high-level feature combination, and the system includes:
  • the modeling wide table construction module is used to construct the modeling wide table and preprocess the to-be-processed data in the modeling wide table to determine the training data; wherein, the to-be-processed data includes user factor data and items Factor data
  • the recommendation model recommendation module is used to train the GBDT model based on the training data to form a recommendation model
  • a cross-feature acquisition module configured to acquire the interpretable cross-features of the data to be processed based on the recommendation model
  • the feature ranking acquisition module is used to analyze and process the cross features to acquire corresponding feature rankings
  • the recommendation module is used to make prediction recommendations based on the feature ranking.
  • the present application also provides an electronic device, which includes:
  • Memory storing at least one instruction
  • the processor executes the instructions stored in the memory to implement the following steps:
  • Predictive recommendation is made based on the feature ranking.
  • the present application also provides a computer-readable storage medium having at least one instruction stored in the computer-readable storage medium, and the at least one instruction is executed by a processor in an electronic device to implement the aforementioned Recommended method of GBDT high-level feature combination.
  • the embodiment of the application constructs a modeling width table, preprocesses the data to be processed in the modeling width table, obtains corresponding training data, and trains the GBDT model according to the training data to form a recommendation model.
  • the recommendation model obtains the interpretable cross-features and feature rankings of the data to be processed, and can mine valuable features and high-level feature combinations, and then make prediction recommendations based on the feature ranking results.
  • the feature acquisition method of first-order features can realize the interpretability of the recommended model and improve the efficiency of mining valuable and important feature combinations.
  • FIG. 1 is a schematic flowchart of a recommendation method based on a GBDT high-level feature combination provided by an embodiment of this application;
  • FIG. 2 is a schematic diagram of the first algorithm provided by an embodiment of this application.
  • FIG. 3 is a schematic diagram of a second algorithm provided by an embodiment of this application.
  • FIG. 4 is a schematic diagram of modules of a recommendation system based on a GBDT high-level feature combination provided by an embodiment of the application;
  • FIG. 5 is a schematic diagram of the internal structure of an electronic device implementing a recommendation method based on a GBDT high-level feature combination provided by an embodiment of the application;
  • This application provides a recommendation method based on the high-level feature combination of GBDT.
  • FIG. 1 it is a schematic flowchart of a recommendation method based on a GBDT high-level feature combination provided by an embodiment of this application.
  • the method can be executed by a device, and the device can be implemented by software and/or hardware.
  • the recommendation method based on the GBDT high-level feature combination includes:
  • S110 Construct a modeling wide table, and preprocess the to-be-processed data in the modeling wide table to determine training data; wherein the to-be-processed data includes user factor data and item factor data. It should be emphasized that, in order to further ensure the privacy and security of the data to be processed, the data to be processed may also be stored in a node of a blockchain.
  • HIVE can be used to integrate necessary user factor data and item factor data on the big data Hadoop platform.
  • the user factor data includes the user's operation behavior on the mobile phone APP, the user's basic information and user history information, etc.
  • the factor data includes features such as the price, category, and sales volume of the item. Among them, a user and an item are spliced together to form a sample, and at the same time, it is determined whether the Label of the recommended model is to click the function.
  • the process of preprocessing the to-be-processed data in the modeling wide table includes:
  • the training data is used to train the recommended model
  • the modeling tools of the recommended model can choose Python compilation environments such as Anaconda and Pycharm, which can provide Python editing and execution functions and development environment management functions.
  • the process of training the GBDT model based on the training data includes:
  • the GBDT of LightGBM is used as the basic model of the recommendation model, and the maximum tree depth is 5, the maximum number of leaf nodes is 31, the minimum leaf data is 1000, the feature sampling rate is 0.5, and the sample sampling rate is 0.7 as the training model. Then, calculate the number of the leaf node corresponding to each tree in the GBDT model for all the data in the data set, and then perform one-hot encoding on it. This step can also be understood as GBDT conversion; all the data in the data set is the construction The user factor data and item factor data in the module width table are waiting to be processed.
  • the trained recommendation model can be saved as a model file in the form of a json file, and the first algorithm is used to analyze it to obtain the high-order cross feature corresponding to each leaf node, and then the second algorithm is used to obtain the high-order cross feature
  • the feature corresponds to the interpretable cross feature.
  • the order of high-order cross features is determined by the maximum depth of the decision tree and can be set by itself.
  • FIG. 2 shows a schematic diagram of the first algorithm according to an embodiment of the present application.
  • the encoded GBDT vector is used as the input of the GBDT model, and the high-order cross feature is acquired through training.
  • the above first algorithm first uses GBDT to perform high-level feature combination and feature selection on the original features to obtain the most discriminative high-level combination feature code; then, it uses the LR model to quickly calculate and enhance the generalization of the model. Combines the advantages of GBDT and LR.
  • the second algorithm process includes:
  • Step 1 Obtain a decision tree of the GBDT of the recommendation model, and point the pointer to the node of the decision tree; where the pointer is the variable that saves the address of the variable;
  • Step 2 Determine whether the node is a leaf node; if the node is not a leaf node, push the feature represented by the node onto the stack, otherwise, store the current cross feature data of the entire stack, and then save the sample size and information gain corresponding to the leaf Information, and press a null value;
  • Step 3 Point the pointer to the left subtree of the node, and repeat step 2 until all the left subtrees are traversed, and the data at the top of the stack is pushed out; at the same time,
  • Step 4 Return all the data saved in Step 2, and all the data are all the interpretable cross features of the decision tree.
  • FIG. 3 shows the principle of the second algorithm according to an embodiment of the present application.
  • the recommendation model includes decision trees Tree1, Tree2 to TreeN, and each decision tree includes a corresponding node.
  • the nodes are processed through the above steps to obtain cross-feature data. Then determine all the data on the top of the stack. All the data are all interpretable cross-features of the decision tree, for example, male X under 30 years old, no room, inactive...renewal and more than 3 consecutive years, etc.
  • the above second algorithm is a binary tree traversal algorithm based on the bottom cabinet, which combines the idea of stacking to complete the analysis of the decision in GBDT, and then you can know the price difference characteristics corresponding to each leaf node in GBDT, or you can understand The customer group corresponding to the leaf node.
  • the click-through rate prediction business scenario through the APP function can mine up to 30+ important high-order cross-features.
  • cross-features mainly use the correlation indicators of cross-features, such as: Pearson coefficient, information entropy, IV value (information value or information amount); or simple models, such as: logistic regression model, decision tree Models, etc., analyze features, output feature rankings, and mine important high-order cross features.
  • correlation indicators of cross-features such as: Pearson coefficient, information entropy, IV value (information value or information amount); or simple models, such as: logistic regression model, decision tree Models, etc., analyze features, output feature rankings, and mine important high-order cross features.
  • the model is no longer a black box for us at this time, and we can find that there are some logical errors and problems caused by the unreasonable data itself. And if a problem is found, return to step S110 to rebuild the modeling wide table or optimize the training data (processing features), otherwise, if there is no problem, you can directly proceed to the next step for recommendation prediction.
  • S150 Perform prediction recommendation based on the feature ranking.
  • a good and interpretable predictive model or recommendation model has been obtained.
  • the user's purchase rate or utilization rate of any product can be determined based on the predictive model or feature ranking.
  • the model can be defined according to the demand to realize the prediction of different indicators) to make predictions.
  • N probabilities corresponding to N products For example, take the characteristics of a user, and then for each commodity in the commodity pool (assuming there are N commodities), a handful of user's characteristics and the commodity are spliced together and the probabilities are predicted. In the end, we will get N probabilities corresponding to N products. In the final application, we can push to the user the product with the highest probability (which may be the user's favorite). Or for the Top N products with the highest probability, a list is formed and displayed to the user when the user opens the APP or searches. The ultimate goal is to promote the behavior of the user to click or purchase the product.
  • the traditional feature combination or feature interleaving is to combine all decompositions in pairs (second-order crossover).
  • n the required feature Combination of parameters.
  • the dimension n is huge, the parameters increase exponentially and cannot be trained.
  • This application is based on the GBDT high-order feature combination recommendation method, which can naturally have the characteristics of mining feature combinations by minimizing the impurity of the Gini coefficient, which can improve the efficiency of mining important feature combinations and save calculation time; in addition, the existing Model-based feature combination mining algorithms, such as the FM-based second-order cross feature mining algorithm, only support the second-order cross combination of features.
  • the GBDT-based cross-feature mining algorithm proposed in this application supports high-order combined feature mining and provides more diverse feature combinations.
  • the order can be customized according to business requirements and data conditions.
  • 40+ high-order feature combinations with high positive correlation and high negative correlation have been mined.
  • the implementation of the high-level feature combination mining function of this application can enhance the interpretability of the model, allowing developers to have a deeper understanding of the working mechanism of the model, instead of blindly adjusting parameters, which improves the work efficiency and the upper limit of model optimization.
  • this application is based on the GBDT high-level feature combination recommendation method, which can improve the efficiency of mining important feature combinations and save calculation time; and can provide more diverse combination features, and the order can be customized according to requirements and data conditions. Enhance the interpretability of the model, so that developers have a deeper understanding of the working mechanism of the model, and improve the work efficiency and the upper limit of model optimization.
  • FIG. 4 it is a functional module diagram of a recommendation system based on a GBDT high-level feature combination in an embodiment of the present application.
  • the recommendation system 100 based on the GBDT high-level feature combination described in this application can be installed in an electronic device.
  • the recommendation system based on the GBDT high-level feature combination may include: a modeling wide table construction module 101, a recommendation model recommendation module 102, a cross feature acquisition module 103, a feature ranking acquisition module 104, and a recommendation module 105.
  • the module described in the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by the processor of an electronic device and can complete fixed functions, and are stored in the memory of the electronic device.
  • each module/unit is as follows:
  • the modeling wide table construction module 101 is used to construct a modeling wide table, and preprocess the to-be-processed data in the modeling wide table to determine training data; wherein, the to-be-processed data includes user factor data and Item factor data.
  • the user factor data includes: operating behavior on the APP, basic information of the user himself, and user history information;
  • the item factor data includes: the item's price, category, and sales volume.
  • modeling wide table construction module 101 includes:
  • the to-be-processed data processing module is used to clean the to-be-processed data and fill in missing values using Python;
  • the training data determination module is used to perform univariate analysis on the data after cleaning and filling of missing values, and eliminate abnormalities or factors with degree of difference or saturation lower than a preset value to determine the training data.
  • the recommendation model recommendation module 102 is configured to train the GBDT model based on the training data to form a recommendation model.
  • the recommendation model recommendation module 102 includes:
  • the basic model determination module is used to adopt the GBDT model of LightGBM as the basic model
  • the training model formation module is used to set the maximum tree depth, the maximum number of leaf nodes, the minimum number of leaf nodes, the feature sampling rate, and the sample sampling rate of the basic model, and a training model has been formed;
  • the number obtaining module is used to obtain the number of the leaf node corresponding to each tree of the training data in the training model
  • the training completion module is used to perform one-hot encoding on the number to realize the training of the GBDT model.
  • the cross feature acquisition module 103 is configured to acquire the interpretable cross feature of the data to be processed based on the recommendation model.
  • the cross feature acquisition module 103 includes:
  • the first algorithm module is configured to analyze the recommendation model through the first algorithm, and obtain the high-order cross feature corresponding to each leaf node;
  • the second algorithm module is used to obtain the interpretable cross feature corresponding to the high-order cross feature through the second algorithm.
  • the first algorithm module includes:
  • the encoded GBDT vector is used as the input of the GBDT model, and the high-order cross feature is acquired through training.
  • the second algorithm module includes:
  • Step 1 Obtain a decision tree of the GBDT of the recommendation model, and point a pointer to a node of the decision tree; wherein, the pointer is a variable that stores variable addresses;
  • Step 2 Determine whether the node is a leaf node; if the node is not a leaf node, push the feature represented by the node onto the stack, otherwise, store the current cross feature data of the entire stack, and then save the sample size corresponding to the leaf, Information gain information, and press a null value;
  • Step 3 Point the pointer to the left subtree of the node, and repeat the step 2 until all the left subtrees are traversed, and the data at the top of the stack is pushed out; at the same time,
  • Step 4 Return all the data saved in the second step, and all the data are all interpretable cross-features of the decision tree.
  • the feature ranking acquiring module 104 is configured to analyze and process the cross features to acquire corresponding feature rankings.
  • the recommendation module 105 is configured to perform prediction recommendation based on the feature ranking.
  • the data to be processed may also be stored in a node of a blockchain.
  • FIG. 5 it is a schematic structural diagram of an electronic device implementing the recommendation method based on the GBDT high-level feature combination according to the present application.
  • the electronic device 1 may include a processor 10, a memory 11, and a bus, and may also include a computer program that is stored in the memory 11 and can run on the processor 10, such as a recommended program based on a GBDT high-level feature combination 12.
  • the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (such as SD or DX memory, etc.), magnetic memory, magnetic disk, CD etc.
  • the memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, for example, a mobile hard disk of the electronic device 1.
  • the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart media card (SMC), and a secure digital (Secure Digital) equipped on the electronic device 1. , SD) card, flash card (Flash Card), etc.
  • the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device.
  • the memory 11 can be used not only to store application software and various data installed in the electronic device 1, such as the code of a recommended program based on the high-level feature combination of GBDT, etc., but also to temporarily store data that has been output or will be output. .
  • the processor 10 may be composed of integrated circuits in some embodiments, for example, may be composed of a single packaged integrated circuit, or may be composed of multiple integrated circuits with the same function or different functions, including one or more Combinations of central processing unit (CPU), microprocessor, digital processing chip, graphics processor, and various control chips, etc.
  • the processor 10 is the control unit of the electronic device, which uses various interfaces and lines to connect the various components of the entire electronic device, and runs or executes programs or modules stored in the memory 11 (for example, based on GBDT high-level feature combination recommendation program, etc.), and call data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
  • the bus may be a peripheral component interconnect standard (PCI) bus or an extended industry standard architecture (EISA) bus, etc.
  • PCI peripheral component interconnect standard
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on.
  • the bus is configured to implement connection and communication between the memory 11 and at least one processor 10 and the like.
  • FIG. 5 only shows an electronic device with components. Those skilled in the art can understand that the structure shown in FIG. 5 does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure. Components, or a combination of certain components, or different component arrangements.
  • the electronic device 1 may also include a power source (such as a battery) for supplying power to various components.
  • the power source may be logically connected to the at least one processor 10 through a power management device, so as to manage the power supply.
  • the device implements functions such as charge management, discharge management, and power consumption management.
  • the power supply may also include any components such as one or more DC or AC power supplies, recharging devices, power failure detection circuits, power converters or inverters, and power status indicators.
  • the electronic device 1 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
  • the electronic device 1 may also include a network interface.
  • the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is usually used in the electronic device 1 Establish a communication connection with other electronic devices.
  • the electronic device 1 may also include a user interface.
  • the user interface may be a display (Display) and an input unit (such as a keyboard (Keyboard)).
  • the user interface may also be a standard wired interface or a wireless interface.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc.
  • the display can also be appropriately called a display screen or a display unit, which is used to display the information processed in the electronic device 1 and to display a visualized user interface.
  • the recommended program 12 based on the GBDT high-level feature combination stored in the memory 11 in the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can realize:
  • Predictive recommendation is made based on the feature ranking.
  • the user factor data includes: operation behavior used on the APP, basic information of the user himself, and user history information;
  • the item factor data includes: the item's price, category, and sales volume.
  • the data to be processed is stored in a blockchain, and the process of preprocessing the data to be processed in the modeling wide table includes:
  • the process of training the GBDT model based on the training data includes:
  • Adopt LightGBM's GBDT model as the basic model
  • One-hot encoding is performed on the number to achieve training of the GBDT model.
  • the process of acquiring the interpretable cross-features of the to-be-processed data based on the recommendation model includes:
  • the interpretable cross feature corresponding to the high-order cross feature is obtained through the second algorithm.
  • the first algorithm includes:
  • the encoded GBDT vector is used as the input of the GBDT model, and the high-order cross feature is acquired through training.
  • the second algorithm includes:
  • Step 1 Obtain a decision tree of the GBDT of the recommendation model, and point a pointer to a node of the decision tree; wherein, the pointer is a variable that stores variable addresses;
  • Step 2 Determine whether the node is a leaf node; if the node is not a leaf node, push the feature represented by the node onto the stack, otherwise, store the current cross feature data of the entire stack, and then save the sample size corresponding to the leaf, Information gain information, and press a null value;
  • Step 3 Point the pointer to the left subtree of the node, and repeat step 2 until all the left subtrees are traversed, and the data at the top of the stack is pushed out; at the same time,
  • Step 4 Return all the data saved in Step 2, and all the data are all the interpretable cross features of the decision tree.
  • the data to be processed may also be stored in a node of a blockchain.
  • the integrated module/unit of the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory) .
  • the computer-readable storage medium may be non-volatile or volatile.
  • the disclosed device, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
  • modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of hardware plus software functional modules.
  • the blockchain referred to in this application is a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain essentially a decentralized database, is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of the information (anti-counterfeiting) and the generation of the next block.
  • the blockchain can include the underlying platform of the blockchain, the platform product service layer, and the application service layer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Fuzzy Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

涉及大数据领域,一种基于GBDT高阶特征组合的推荐方法,包括:构建建模宽表,并对建模宽表中的待处理数据进行预处理,以确定训练数据;其中,待处理数据包括用户因子数据和物品因子数据(S110);基于训练数据对GBDT模型进行训练,以形成推荐模型(S120);基于推荐模型获取待处理数据的可解释性的交叉特征(S130);对交叉特征进行分析处理,获取对应的特征排序(S140);基于特征排序进行预测推荐(S150)。还涉及区块链技术,待处理数据存储于区块链中。可以提高基于GBDT高阶特征组合的推荐效率及准确度。

Description

基于GBDT高阶特征组合的推荐方法、装置及存储介质
本申请要求申请号为202010880908.1,申请日为2020年8月27日,申请创造名称为“基于GBDT高阶特征组合的推荐方法、装置及存储介质”的专利申请的优先权。
技术领域
本申请涉及大数据领域,尤其涉及一种基于GBDT高阶特征组合的推荐的方法、系统、装置、及计算机可读存储介质。
背景技术
特征组合也叫特征交叉,是特征工程中的一种特征生成方式,除了一般对于连续型特征的加减乘除生成新的特征以外,还可以对多个特征(连续特征离散化)进行组合,这里的离散化的特征需要进行一定的分析,离散规划且合理,形成新的特征。
在推荐领域,为了提高推荐预测的准确性,时常需要通过构造组合特征来表达更强的区分能力,常见的组合特征有单特征交叉、二阶特征交叉、高阶特征交叉等方式。在得到组合特征之后,即可通过组合特征的相关指标挖掘出学习目标重要的数据。
目前,申请人意识到传统的特征组合方法主要包括穷举法、基于规则的组合法以及基于模型的二阶特征组合法等,其中的穷举法在特征数量较大时,容易导致高阶交叉后的特征组合数量呈指数增长,难以穷举。基于规则的组合法对规则的设计要求很高,需要对业务有深刻理解,存在耗费大量人力和时间,并且基于构造范式的特征组合依然存在面临指数爆炸,难以穷举的问题。而基于模型的二阶特征组合法仅适用于二阶交叉特征的挖掘,适用范围受限。
申请内容
本申请提供一种基于GBDT高阶特征组合的推荐方法、系统、电子装置及计算机可读存储介质,其主要目的在于提高基于GBDT高阶特征组合的推荐效率及准确度。
第一方面,本申请提供一种基于GBDT高阶特征组合的推荐方法,包括:
构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
对所述交叉特征进行分析处理,获取对应的特征排序;
基于所述特征排序进行预测推荐。
第二方面,本申请还提供一种基于GBDT高阶特征组合的推荐系统,所述系统包括:
建模宽表构建模块,用于构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
推荐模型推荐模块,用于基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
交叉特征获取模块,用于基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
特征排序获取模块,用于对所述交叉特征进行分析处理,获取对应的特征排序;
推荐模块,用于基于所述特征排序进行预测推荐。
第三方面,本申请还提供一种电子装置,所述电子装置包括:
存储器,存储至少一个指令;及
处理器,执行所述存储器中存储的指令以实现如下步骤:
构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
对所述交叉特征进行分析处理,获取对应的特征排序;
基于所述特征排序进行预测推荐。
第四方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有至少一个指令,所述至少一个指令被电子设备中的处理器执行以实现上述所述的基于GBDT高阶特征组合的推荐方法。
本申请实施例通过构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,获取对应的训练数据,并根据训练数据对GBDT模型进行训练,以形成推荐模型,通过推荐模型获取待处理数据的可解释性的交叉特征及特征排序,可挖掘出有价值的特征和高阶特征组合,进而根据特征排序结果进行预测推荐,相比现有通过穷举、组合以及二阶特征的特征获取方式,能够实现推荐模型的可解释性,提升挖掘有价值的重要的特征组合的效率。
附图说明
图1为本申请一实施例提供的基于GBDT高阶特征组合的推荐方法的流程示意图;
图2为本申请一实施例提供的第一算法的原理图;
图3为本申请一实施例提供的第二算法的原理图;
图4为本申请一实施例提供的基于GBDT高阶特征组合的推荐系统的模块示意图;
图5为本申请一实施例提供的实现基于GBDT高阶特征组合的推荐方法的电子设备的内部结构示意图;
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种基于GBDT高阶特征组合的推荐方法。参照图1所示,为本申请一实施例提供的基于GBDT高阶特征组合的推荐方法的流程示意图。该方法可以由一个装置执行,该装置可以由软件和/或硬件实现。
在本实施例中,基于GBDT高阶特征组合的推荐方法包括:
S110:构建建模宽表,并对建模宽表中的待处理数据进行预处理,以确定训练数据;其中,待处理数据包括用户因子数据和物品因子数据。需要强调的是,为进一步保证上述待处理数据的私密和安全性,上述待处理数据还可以存储于一区块链的节点中。
具体地,可使用HIVE在大数据Hadoop平台上整合必要的用户因子数据和物品因子数据,其中的用户因子数据包括用户在手机APP上的操作行为、用户本身的基本信息以及用户历史信息等,物品因子数据包括物品的价格、类别、销量等特征。其中,一个用户与一个物品拼接在一起构成一条样本,同时,确定推荐模型的Label为是否点击该功能。
具体地,对建模宽表中的待处理数据进行预处理的过程包括:
1、使用Python对待处理数据做清洗和缺失值填充,对不平衡样本进行采样;2、对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定最终进入推荐模型的因子作为训练数据。可知,区别度和饱和度的预设值可自行设定。
S120:基于所述训练数据对GBDT模型进行训练,以形成推荐模型。
其中,训练数据用于训练推荐模型,推荐模型的建模工具可选用Anaconda、Pycharm 等Python的编译环境,能够提供Python的编辑和执行的功能和开发环境的管理等功能。
在该步骤中,基于训练数据对GBDT模型进行训练的过程包括:
1、采用LightGBM的GBDT模型作为基础模型;
2、设定基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,以形成训练模型;
3、获取训练数据在训练模型中的每一个树所对应的叶子节点的编号;
4、对编号进行独热编码,以实现对GBDT模型的训练。
作为具体示例,使用LightGBM的GBDT作为推荐模型的基础模型,设置最大树深度为5、最大叶子节点数为31、最小叶子数据为1000、特征采样率为0.5,样本采样率为0.7作为训练模型。然后,计算数据集中的所有数据在GBDT模型里每一个树所对应的叶子节点的编号,然后对其做独热编码,该步骤也可以理解为GBDT转换;其中的数据集中的所有数据即为建模宽表中的用户因子数据和物品因子数据等待处理数据。
S130:基于所述推荐模型获取所述待处理数据的可解释性的交叉特征。
其中,训练完成的推荐模型可以json文件的形式保存为model文件,通过第一算法对其进行解析,获取每个叶子节点对应的高阶交叉特征,然后通过第二算法获取与所述高阶交叉特征对应的可解释性的交叉特征。其中,高阶交叉特征的阶数由决策树的最大深度来决定,可自行设定。
具体地,图2示出了根据本申请实施例的第一算法原理图。
如图2所示,在第一算法过程中:
首先,预训练推荐模型的GBDT模型;
然后,将原始特征向量x输入所述GBDT模型中,对叶子节点进行独热编码,获取与每个原始特征向量相对应的一串GBDT编码;
最后,将编码后的GBDT向量作为所述GBDT模型的输入,训练获取所述高阶交叉特征。
上述第一算法,先利用GBDT对原始特征进行高阶的特征组合和特征选择,得到最有区分度的高阶组合特征编码;然后,再利用LR模型快速计算,并增强模型的泛化性,融合了GBDT和LR的优点。
具体地,第二算法过程包括:
步骤一:获取推荐模型的GBDT的一颗决策树,并将指针指向该决策树的节点;其中,指针为保存变量地址的变量;
步骤二:判断节点是否为叶子节点;如果所述节点不是叶子节点,则将节点代表的特征压入栈,否则,则存储整堆栈当前的交叉特征数据,然后保存叶子对应的样本量、信息增益信息,并且压入一个空值;
步骤三:将指针指向所述节点的左子树,并且重复执行步骤二,直至所有的左子树都被遍历,推出栈顶的数据;同时,
将所述指针指向所述节点的右子树,并且重复执行步骤二,直至所有的右子树都被遍历,推出栈顶的数据;
步骤四:返回步骤二中保存的所有数据,该所有数据即为该决策树的所有可解释性的交叉特征。
最后,取GBDT中的下一颗决策树,并循环执行上述各步骤,直至GBDT中的所所有数均被处理一遍。
作为具体示例,图3示出了根据本申请实施例的第二算法的原理。
如图3示出,在该实施例中,推荐模型包括有决策树Tree1、Tree2至TreeN,在每棵决策树中均包括含有对应的节点,通过上述步骤对节点进行处理,获取交叉特征数据,进而确定推出栈顶的所有数据,所有数据即为该决策树的所有可解释性的交叉特征,例如,男X30岁以下、无房、非活跃…续保且连续3年以上等。
上述第二算法是一种基于底柜的二叉树遍历算法,结合了堆栈的思想,完成对GBDT中的决策的解析,继而可知道GBDT中的每一个叶子节点所对应的价差特征,或者也可以理解为叶子节点对应的客群。
可知,在得到GBDT编码对应的高阶组合特征之后,就可以运用指标,如IV值,或者简单模型如逻辑回归,挖掘其中的重要高阶组合特征。具体地可使用逻辑回归模型,利用转化后的GBDT编码训练模型,提取其逻辑回归系数的降序排名。在具体应用场景中,通过APP功能点击率预测业务场景,能够挖掘重要的高阶交叉特征高达30+个。
S140:对交叉特征进行分析处理,获取对应的特征排序。
其中,对交叉特征的分析处理,主要是利用交叉特征的相关性指标,例如:皮尔森系数、信息熵、IV值(信息值或信息量);或者简单模型,如:逻辑回归模型、决策树模型等等,对特征进行分析,输出特征排序,挖掘重要的高阶交叉特征。此外,由于我们更加直观的了解了模型的内在,这时模型对于我们不再是一个黑箱,我们可以发现其中存在一些因为数据本身不合理导致的逻辑错误和问题。并可在发现问题的情况下,返回步骤S110,重新构建建模宽表或者优化训练数据(处理特征),否则,在没有问题的情况下,可直接 进行下一步骤进行推荐预测。
S150:基于所述特征排序进行预测推荐。
其中,经过上述各步骤的处理后,已获得一个效果良好且可解释的预测模型或推荐模型,在对其应用过程中,可基于预测模型或特征排序对用户任何一个商品的购买率或者使用率等指标(可根据需求定义模型实现对不同指标的预测)做预测。
例如,取一个用户的特征,然后针对商品池(假设有N个商品)中的每一个商品,一一把用户的特征与商品的拼接在一起并且预测概率,最终我们将得到N个概率,对应N个商品。最终应用的时候,我们可以针对概率最大的商品(可能是用户最喜欢的)推送给用户。或者针对概率最大的Top N个商品,形成一个列表,在用户打开APP或者搜索的时候展示给用户,最终的目标是提升用户点击或者购买商品的行为发生。
可知,传统的特征组合或者特征交叉发,如穷举法,是要把所有分解两两组合(二阶交叉)。这样,当特征数量为n时,特征要求的
Figure PCTCN2020136398-appb-000001
个组合参数。这在维度n巨大的时候,参数成指数增长而无法被训练。而本申请基于GBDT高阶特征组合的推荐方法,可通过最小化基尼系数不纯度分割特征,天然具有挖掘特征组合的特性,能够提升挖掘重要特征组合的效率,节省计算时间;此外,现有的基于模型的特征组合挖掘算法,如基于FM的二阶交叉特征的挖掘算法,只支持特征的二阶的交叉组合。而本申请提出的基于GBDT的交叉特征挖掘算法支持高阶的组合特征挖掘,提供了更加多样的特征组合,阶数可以根据业务需求和数据情况自定义。目前,已挖掘出高正相关,高负相关的高阶特征组合40+个。
另外,本申请高阶特征组合挖掘功能的实现,能够增强模型的可解释性,使得开发人员更加深刻的理解模型的工作机制,而不是盲目调参,提高了工作效率与模型优化的上限。
可知,本申请基于GBDT高阶特征组合的推荐方法,能够提升挖掘重要特征组合的效率,节省计算时间;且能够提供更加多样的组合特征,阶数可根据也无需求和数据情况进行自定义,增强模型的可解释性,使得开发人员更加深刻的了解模型的工作机制,提高工作效率与模型优化的上限。
如图4所示,是本申请实施例基于GBDT高阶特征组合的推荐系统的功能模块图。
本申请所述基于GBDT高阶特征组合的推荐系统100可以安装于电子设备中。根据实现的功能,所述基于GBDT高阶特征组合的推荐系统可以包括:建模宽表构建模块101、推荐模型推荐模块102、交叉特征获取模块103、特征排序获取模块104以及推荐模块105。本发所述模块也可以称之为单元,是指一种能够被电子设备处理器所执行,并且能够完成固定功能的一系列计算机程序段,其存储在电子设备的存储器中。
在本实施例中,关于各模块/单元的功能如下:
建模宽表构建模块101,用于构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据。
其中,所述用户因子数据包括:用于在APP上的操作行为、用户自身的基本信息以及用户历史信息;
所述物品因子数据包括:物品的价格、类别以及销量。
进一步地,所述建模宽表构建模块101包括:
待处理数据处理模块,用于使用Python对所述待处理数据做清洗和缺失值填充;
训练数据确定模块,用于对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定所述训练数据。
推荐模型推荐模块102,用于基于所述训练数据对GBDT模型进行训练,以形成推荐模型。
其中,所述推荐模型推荐模块102包括:
基础模型确定模块,用于采用LightGBM的GBDT模型作为基础模型;
训练模型形成模块,用于设定所述基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,已形成训练模型;
编号获取模块,用于获取训练数据在所述训练模型中的每一个树所对应的叶子节点的编号;
训练完成模块,用于对所述编号进行独热编码,以实现对所述GBDT模型的训练。
交叉特征获取模块103,用于基于所述推荐模型获取所述待处理数据的可解释性的交叉特征。
其中,所述交叉特征获取模块103包括:
第一算法模块,用于通过第一算法对所述推荐模型进行解析,获取每个叶子节点对应的高阶交叉特征;
第二算法模块,用于通过第二算法获取与所述高阶交叉特征对应的可解释性的交叉特征。
具体地,所述第一算法模块包括:
预训练所述推荐模型的GBDT模型;
将原始特征向量输入所述GBDT模型中,对叶子节点进行独热编码,获取与每个原始特征向量相对应的一串GBDT编码;
将编码后的GBDT向量作为所述GBDT模型的输入,训练获取所述高阶交叉特征。
另外,所述第二算法模块包括:
步骤一:获取所述推荐模型的GBDT的一颗决策树,并将指针指向该决策树的节点; 其中,所述指针为保存变量地址的变量;
步骤二:判断所述节点是否为叶子节点;如果所述节点不是叶子节点,则将节点代表的特征压入栈,否则,则存储整堆栈当前的交叉特征数据,然后保存叶子对应的样本量、信息增益信息,并且压入一个空值;
步骤三:将所述指针指向所述节点的左子树,并且重复执行所述步骤二,直至所有的左子树都被遍历,推出栈顶的数据;同时,
将所述指针指向所述节点的右子树,并且重复执行所述步骤二,直至所有的右子树都被遍历,推出栈顶的数据;
步骤四:返回所述步骤二中保存的所有数据,该所有数据即为该决策树的所有可解释性的交叉特征。
特征排序获取模块104,用于对所述交叉特征进行分析处理,获取对应的特征排序。
推荐模块105,用于基于所述特征排序进行预测推荐。
需要强调的是,为进一步保证上述待处理数据的私密和安全性,上述待处理数据还可以存储于一区块链的节点中。
基于GBDT高阶特征组合的推荐系统100的实施例可参考基于GBDT高阶特征组合的推荐方法实施例中的描述,此处不再一一赘述。
如图5所示,是本申请实现基于GBDT高阶特征组合的推荐方法的电子装置的结构示意图。
所述电子装置1可以包括处理器10、存储器11和总线,还可以包括存储在所述存储器11中并可在所述处理器10上运行的计算机程序,如基于GBDT高阶特征组合的推荐程序12。
其中,所述存储器11至少包括一种类型的可读存储介质,所述可读存储介质包括闪存、移动硬盘、多媒体卡、卡型存储器(例如:SD或DX存储器等)、磁性存储器、磁盘、光盘等。所述存储器11在一些实施例中可以是电子装置1的内部存储单元,例如该电子装置1的移动硬盘。所述存储器11在另一些实施例中也可以是电子装置1的外部存储装置,例如电子装置1上配备的插接式移动硬盘、智能存储卡(Smart Media Card,SMC)、安全数字(Secure Digital,SD)卡、闪存卡(Flash Card)等。进一步地,所述存储器11还可以既包括电子装置1的内部存储单元也包括外部存储装置。所述存储器11不仅可以用于存储安装于电子装置1的应用软件及各类数据,例如基于GBDT高阶特征组合的推荐程序的代码等,还可以用于暂时地存储已经输出或者将要输出的数据。
所述处理器10在一些实施例中可以由集成电路组成,例如可以由单个封装的集成电路所组成,也可以是由多个相同功能或不同功能封装的集成电路所组成,包括一个或者多个中央处理器(Central Processing unit,CPU)、微处理器、数字处理芯片、图形处理器及各种控制芯片的组合等。所述处理器10是所述电子装置的控制核心(Control Unit),利用各种接口和线路连接整个电子装置的各个部件,通过运行或执行存储在所述存储器11内的程序或者模块(例如基于GBDT高阶特征组合的推荐程序等),以及调用存储在所述存储器11内的数据,以执行电子装置1的各种功能和处理数据。
所述总线可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。所述总线被设置为实现所述存储器11以及至少一个处理器10等之间的连接通信。
图5仅示出了具有部件的电子装置,本领域技术人员可以理解的是,图5示出的结构并不构成对所述电子装置1的限定,可以包括比图示更少或者更多的部件,或者组合某些部件,或者不同的部件布置。
例如,尽管未示出,所述电子装置1还可以包括给各个部件供电的电源(比如电池),优选地,电源可以通过电源管理装置与所述至少一个处理器10逻辑相连,从而通过电源管理装置实现充电管理、放电管理、以及功耗管理等功能。电源还可以包括一个或一个以上的直流或交流电源、再充电装置、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。所述电子装置1还可以包括多种传感器、蓝牙模块、Wi-Fi模块等,在此不再赘述。
进一步地,所述电子装置1还可以包括网络接口,可选地,所述网络接口可以包括有线接口和/或无线接口(如WI-FI接口、蓝牙接口等),通常用于在该电子装置1与其他电子装置之间建立通信连接。
可选地,该电子装置1还可以包括用户接口,用户接口可以是显示器(Display)、输入单元(比如键盘(Keyboard)),可选地,用户接口还可以是标准的有线接口、无线接口。可选地,在一些实施例中,显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。其中,显示器也可以适当的称为显示屏或显示单元,用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面。
应该了解,所述实施例仅为说明之用,在专利申请范围上并不受此结构的限制。
所述电子装置1中的所述存储器11存储的基于GBDT高阶特征组合的推荐程序12是多个指令的组合,在所述处理器10中运行时,可以实现:
构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
对所述交叉特征进行分析处理,获取对应的特征排序;
基于所述特征排序进行预测推荐。
可选地,所述用户因子数据包括:用于在APP上的操作行为、用户自身的基本信息以及用户历史信息;
所述物品因子数据包括:物品的价格、类别以及销量。
可选地,所述待处理数据存储于区块链中,对所述建模宽表中的待处理数据进行预处理的过程包括:
使用Python对所述待处理数据做清洗和缺失值填充;
对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定所述训练数据。
可选地,基于所述训练数据对GBDT模型进行训练的过程包括:
采用LightGBM的GBDT模型作为基础模型;
设定所述基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,已形成训练模型;
获取训练数据在所述训练模型中的每一个树所对应的叶子节点的编号;
对所述编号进行独热编码,以实现对所述GBDT模型的训练。
可选地,基于所述推荐模型获取所述待处理数据的可解释性的交叉特征的过程包括:
通过第一算法对所述推荐模型进行解析,获取每个叶子节点对应的高阶交叉特征;
通过第二算法获取与所述高阶交叉特征对应的可解释性的交叉特征。
可选地,所述第一算法包括:
预训练所述推荐模型的GBDT模型;
将原始特征向量输入所述GBDT模型中,对叶子节点进行独热编码,获取与每个原始特征向量相对应的一串GBDT编码;
将编码后的GBDT向量作为所述GBDT模型的输入,训练获取所述高阶交叉特征。
可选地,所述第二算法包括:
步骤一:获取所述推荐模型的GBDT的一颗决策树,并将指针指向该决策树的节点;其中,所述指针为保存变量地址的变量;
步骤二:判断所述节点是否为叶子节点;如果所述节点不是叶子节点,则将节点代表的特征压入栈,否则,则存储整堆栈当前的交叉特征数据,然后保存叶子对应的样本量、信息增益信息,并且压入一个空值;
步骤三:将所述指针指向所述节点的左子树,并且重复执行步骤二,直至所有的左子树都被遍历,推出栈顶的数据;同时,
将所述指针指向所述节点的右子树,并且重复执行步骤二,直至所有的右子树都被遍历,推出栈顶的数据;
步骤四:返回步骤二中保存的所有数据,该所有数据即为该决策树的所有可解释性的交叉特征。
具体地,所述处理器10对上述指令的具体实现方法可参考图1对应实施例中相关步骤的描述,在此不赘述。需要强调的是,为进一步保证上述待处理数据的私密和安全性,上述待处理数据还可以存储于一区块链的节点中。
进一步地,所述电子装置1集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)。
其中,计算机可读存储介质可以是非易失性,也可以是易失性。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
对于本领域技术人员而言,显然本申请不限于上述示范性实施例的细节,而且在不背 离本申请的精神或基本特征的情况下,能够以其他的具体形式实现本申请。
因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本申请的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本申请内。不应将权利要求中的任何附关联图标记视为限制所涉及的权利要求。
本申请所指区块链是分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Blockchain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统权利要求中陈述的多个单元或装置也可以由一个单元或装置通过软件或者硬件来实现。第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施例仅用以说明本申请的技术方案而非限制,尽管参照较佳实施例对本申请进行了详细说明,本领域的普通技术人员应当理解,可以对本申请的技术方案进行修改或等同替换,而不脱离本申请技术方案的精神和范围。

Claims (20)

  1. 一种基于GBDT高阶特征组合的推荐方法,其特征在于,所述方法包括:
    构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
    基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
    基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
    对所述交叉特征进行分析处理,获取对应的特征排序;
    基于所述特征排序进行预测推荐。
  2. 如权利要求1所述的基于GBDT高阶特征组合的推荐方法,其特征在于,
    所述用户因子数据包括:用于在APP上的操作行为、用户自身的基本信息以及用户历史信息;
    所述物品因子数据包括:物品的价格、类别以及销量。
  3. 如权利要求1所述的基于GBDT高阶特征组合的推荐方法,其特征在于,所述待处理数据存储于区块链中,对所述建模宽表中的待处理数据进行预处理的过程包括:
    使用Python对所述待处理数据做清洗和缺失值填充;
    对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定所述训练数据。
  4. 如权利要求1所述的基于GBDT高阶特征组合的推荐方法,其特征在于,基于所述训练数据对GBDT模型进行训练的过程包括:
    采用LightGBM的GBDT模型作为基础模型;
    设定所述基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,已形成训练模型;
    获取训练数据在所述训练模型中的每一个树所对应的叶子节点的编号;
    对所述编号进行独热编码,以实现对所述GBDT模型的训练。
  5. 如权利要求1所述的基于GBDT高阶特征组合的推荐方法,其特征在于,所述基于所述推荐模型获取所述待处理数据的可解释性的交叉特征的过程包括:
    通过第一算法对所述推荐模型进行解析,获取每个叶子节点对应的高阶交叉特征;
    通过第二算法获取与所述高阶交叉特征对应的可解释性的交叉特征。
  6. 如权利要求5所述的基于GBDT高阶特征组合的推荐方法,其特征在于,所述第一算法包括:
    预训练所述推荐模型的GBDT模型;
    将原始特征向量输入所述GBDT模型中,对叶子节点进行独热编码,获取与每个原始特征向量相对应的一串GBDT编码;
    将编码后的GBDT向量作为所述GBDT模型的输入,训练获取所述高阶交叉特征。
  7. 如权利要求5所述的基于GBDT高阶特征组合的推荐方法,其特征在于,所述第二算法包括:
    步骤一:获取所述推荐模型的GBDT的一颗决策树,并将指针指向该决策树的节点;其中,所述指针为保存变量地址的变量;
    步骤二:判断所述节点是否为叶子节点;如果所述节点不是叶子节点,则将节点代表的特征压入栈,否则,则存储整堆栈当前的交叉特征数据,然后保存叶子对应的样本量、信息增益信息,并且压入一个空值;
    步骤三:将所述指针指向所述节点的左子树,并且重复执行所述步骤二,直至所有的左子树都被遍历,推出栈顶的数据;同时,
    将所述指针指向所述节点的右子树,并且重复执行所述步骤二,直至所有的右子树都被遍历,推出栈顶的数据;
    步骤四:返回所述步骤二中保存的所有数据,该所有数据即为该决策树的所有可解释性的交叉特征。
  8. 如权利要求1所述的基于GBDT高阶特征组合的推荐方法,其特征在于,所述对所述交叉特征进行分析处理,获取对应的特征排序包括:
    对所述交叉特征的相关性指标进行分析处理;或者,通过简单模型对所述交叉特征进行分析处,以获取对应的特征排序。
  9. 如权利要求8所述的基于GBDT高阶特征组合的推荐方法,其特征在于,
    所述相关性指标至少包括皮尔森系数、信息熵和信息值;
    所述简单模型至少包括逻辑回归模型和决策树模型。
  10. 一种基于GBDT高阶特征组合的推荐系统,其特征在于,所述系统包括:
    建模宽表构建模块,用于构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
    推荐模型推荐模块,用于基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
    交叉特征获取模块,用于基于所述推荐模型获取所述待处理数据的可解释性的交叉特 征;
    特征排序获取模块,用于对所述交叉特征进行分析处理,获取对应的特征排序;
    推荐模块,用于基于所述特征排序进行预测推荐。
  11. 如权利要求10所述的基于GBDT高阶特征组合的推荐系统,其特征在于,
    所述用户因子数据包括:用于在APP上的操作行为、用户自身的基本信息以及用户历史信息;
    所述物品因子数据包括:物品的价格、类别以及销量。
  12. 如权利要求10所述的基于GBDT高阶特征组合的推荐系统,其特征在于,所述建模宽表构建模块包括:
    待处理数据处理模块,用于使用Python对所述待处理数据做清洗和缺失值填充;
    训练数据确定模块,用于对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定所述训练数据。
  13. 如权利要求10所述的基于GBDT高阶特征组合的推荐系统,其特征在于,所述推荐模型推荐模块包括:
    基础模型确定模块,用于采用LightGBM的GBDT模型作为基础模型;
    训练模型形成模块,用于设定所述基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,已形成训练模型;
    编号获取模块,用于获取训练数据在所述训练模型中的每一个树所对应的叶子节点的编号;
    训练完成模块,用于对所述编号进行独热编码,以实现对所述GBDT模型的训练。
  14. 如权利要求10所述的基于GBDT高阶特征组合的推荐系统,其特征在于,所述交叉特征获取模块包括:
    第一算法模块,用于通过第一算法对所述推荐模型进行解析,获取每个叶子节点对应的高阶交叉特征;
    第二算法模块,用于通过第二算法获取与所述高阶交叉特征对应的可解释性的交叉特征。
  15. 如权利要求14所述的基于GBDT高阶特征组合的推荐系统,其特征在于,所述第一算法模块包括:
    预训练所述推荐模型的GBDT模型;
    将原始特征向量输入所述GBDT模型中,对叶子节点进行独热编码,获取与每个原 始特征向量相对应的一串GBDT编码;
    将编码后的GBDT向量作为所述GBDT模型的输入,训练获取所述高阶交叉特征。
  16. 如权利要求14所述的基于GBDT高阶特征组合的推荐系统,其特征在于,所述第二算法模块包括:
    步骤一:获取所述推荐模型的GBDT的一颗决策树,并将指针指向该决策树的节点;其中,所述指针为保存变量地址的变量;
    步骤二:判断所述节点是否为叶子节点;如果所述节点不是叶子节点,则将节点代表的特征压入栈,否则,则存储整堆栈当前的交叉特征数据,然后保存叶子对应的样本量、信息增益信息,并且压入一个空值;
    步骤三:将所述指针指向所述节点的左子树,并且重复执行所述步骤二,直至所有的左子树都被遍历,推出栈顶的数据;同时,
    将所述指针指向所述节点的右子树,并且重复执行所述步骤二,直至所有的右子树都被遍历,推出栈顶的数据;
    步骤四:返回所述步骤二中保存的所有数据,该所有数据即为该决策树的所有可解释性的交叉特征。
  17. 一种电子装置,其特征在于,所述电子装置包括:
    至少一个处理器;以及,
    与所述处理器通信连接的存储器;其中,
    所述存储器存储有可被所述处理器执行的指令,所述指令被所述处理器执行,以使所述处理器能够执行如下所示步骤:
    构建建模宽表,并对所述建模宽表中的待处理数据进行预处理,以确定训练数据;其中,所述待处理数据包括用户因子数据和物品因子数据;
    基于所述训练数据对GBDT模型进行训练,以形成推荐模型;
    基于所述推荐模型获取所述待处理数据的可解释性的交叉特征;
    对所述交叉特征进行分析处理,获取对应的特征排序;
    基于所述特征排序进行预测推荐。。
  18. 如权利要求17所述的电子装置,其特征在于,
    所述待处理数据存储于区块链中,对所述建模宽表中的待处理数据进行预处理的过程包括:
    使用Python对所述待处理数据做清洗和缺失值填充;
    对清洗完及缺失值填充后的数据做单变量分析,剔除异常或区别度、饱和度低于预设值的因子,以确定所述训练数据。
  19. 如权利要求17所述的电子装置,其特征在于,
    基于所述训练数据对GBDT模型进行训练的过程包括:
    采用LightGBM的GBDT模型作为基础模型;
    设定所述基础模型的最大树深度、最大叶子节点数、最小叶子节点数、特征采样率以及样本采样率,已形成训练模型;
    获取训练数据在所述训练模型中的每一个树所对应的叶子节点的编号;
    对所述编号进行独热编码,以实现对所述GBDT模型的训练。
  20. 一种计算机可读存储介质,存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至9中任一所述的基于GBDT高阶特征组合的推荐方法。
PCT/CN2020/136398 2020-08-27 2020-12-15 基于gbdt高阶特征组合的推荐方法、装置及存储介质 WO2021147568A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010880908.1A CN112035453B (zh) 2020-08-27 2020-08-27 基于gbdt高阶特征组合的推荐方法、装置及存储介质
CN202010880908.1 2020-08-27

Publications (1)

Publication Number Publication Date
WO2021147568A1 true WO2021147568A1 (zh) 2021-07-29

Family

ID=73587308

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/136398 WO2021147568A1 (zh) 2020-08-27 2020-12-15 基于gbdt高阶特征组合的推荐方法、装置及存储介质

Country Status (2)

Country Link
CN (1) CN112035453B (zh)
WO (1) WO2021147568A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591477A (zh) * 2021-08-10 2021-11-02 平安银行股份有限公司 基于关联数据的故障定位方法、装置、设备及存储介质
CN113592606A (zh) * 2021-08-10 2021-11-02 平安银行股份有限公司 基于多重决策的产品推荐方法、装置、设备及存储介质
CN114548298A (zh) * 2022-02-25 2022-05-27 阿波罗智联(北京)科技有限公司 模型训练、交通信息处理方法、装置、设备和存储介质
CN115438101A (zh) * 2022-10-13 2022-12-06 中国兵器工业计算机应用技术研究所 一种基于特征形态和数据关系的数据特征构建系统和方法
CN116645211A (zh) * 2023-05-15 2023-08-25 中信建投证券股份有限公司 推荐用户信息生成方法、装置、设备和计算机可读介质
CN116977035A (zh) * 2023-09-25 2023-10-31 临沂大学 一种基于LightGBM和深度学习的农产品推荐方法
CN117649898A (zh) * 2024-01-30 2024-03-05 烟台国工智能科技有限公司 基于数据挖掘的液晶材料配方分析方法及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111784040B (zh) * 2020-06-28 2023-04-25 平安医疗健康管理股份有限公司 政策模拟分析的优化方法、装置及计算机设备
CN112035453B (zh) * 2020-08-27 2024-03-12 平安科技(深圳)有限公司 基于gbdt高阶特征组合的推荐方法、装置及存储介质
CN112822189A (zh) * 2021-01-04 2021-05-18 中国电力科学研究院有限公司 一种流量识别方法及装置
CN112860851B (zh) * 2021-01-22 2022-05-06 平安科技(深圳)有限公司 基于根因分析的课程推荐方法、装置、设备及介质
CN113327131A (zh) * 2021-06-03 2021-08-31 太原理工大学 基于三支决策理论进行特征交互选择的点击率预估模型
CN113312552A (zh) * 2021-06-10 2021-08-27 北京百度网讯科技有限公司 数据处理方法、装置、电子设备和介质
CN113516513B (zh) * 2021-07-20 2023-04-07 重庆度小满优扬科技有限公司 数据分析方法、装置、计算机设备和存储介质
CN113961774B (zh) * 2021-12-22 2022-04-15 四川新网银行股份有限公司 一种多特征组合策略的推荐方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301577A (zh) * 2016-04-15 2017-10-27 阿里巴巴集团控股有限公司 信用评估模型的训练方法、信用评估方法以及装置
WO2019088972A1 (en) * 2017-10-30 2019-05-09 Equifax, Inc. Training tree-based machine-learning modeling algorithms for predicting outputs and generating explanatory data
CN109871858A (zh) * 2017-12-05 2019-06-11 北京京东尚科信息技术有限公司 预测模型建立、对象推荐方法及系统、设备及存储介质
CN110245987A (zh) * 2019-06-17 2019-09-17 重庆金窝窝网络科技有限公司 一种广告点击率预测方法、装置、服务器及存储介质
CN110880014A (zh) * 2019-10-11 2020-03-13 中国平安财产保险股份有限公司 数据处理方法、装置、计算机设备及存储介质
CN112035453A (zh) * 2020-08-27 2020-12-04 平安科技(深圳)有限公司 基于gbdt高阶特征组合的推荐方法、装置及存储介质

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108073568B (zh) * 2016-11-10 2020-09-11 腾讯科技(深圳)有限公司 关键词提取方法和装置
CN107578332A (zh) * 2017-09-22 2018-01-12 深圳乐信软件技术有限公司 一种推荐现金商品的方法、装置、设备及存储介质
CN111581877A (zh) * 2020-03-25 2020-08-25 中国平安人寿保险股份有限公司 样本模型训练方法、样本生成方法、装置、设备及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107301577A (zh) * 2016-04-15 2017-10-27 阿里巴巴集团控股有限公司 信用评估模型的训练方法、信用评估方法以及装置
WO2019088972A1 (en) * 2017-10-30 2019-05-09 Equifax, Inc. Training tree-based machine-learning modeling algorithms for predicting outputs and generating explanatory data
CN109871858A (zh) * 2017-12-05 2019-06-11 北京京东尚科信息技术有限公司 预测模型建立、对象推荐方法及系统、设备及存储介质
CN110245987A (zh) * 2019-06-17 2019-09-17 重庆金窝窝网络科技有限公司 一种广告点击率预测方法、装置、服务器及存储介质
CN110880014A (zh) * 2019-10-11 2020-03-13 中国平安财产保险股份有限公司 数据处理方法、装置、计算机设备及存储介质
CN112035453A (zh) * 2020-08-27 2020-12-04 平安科技(深圳)有限公司 基于gbdt高阶特征组合的推荐方法、装置及存储介质

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113591477A (zh) * 2021-08-10 2021-11-02 平安银行股份有限公司 基于关联数据的故障定位方法、装置、设备及存储介质
CN113592606A (zh) * 2021-08-10 2021-11-02 平安银行股份有限公司 基于多重决策的产品推荐方法、装置、设备及存储介质
CN113592606B (zh) * 2021-08-10 2023-08-22 平安银行股份有限公司 基于多重决策的产品推荐方法、装置、设备及存储介质
CN113591477B (zh) * 2021-08-10 2023-09-15 平安银行股份有限公司 基于关联数据的故障定位方法、装置、设备及存储介质
CN114548298A (zh) * 2022-02-25 2022-05-27 阿波罗智联(北京)科技有限公司 模型训练、交通信息处理方法、装置、设备和存储介质
CN114548298B (zh) * 2022-02-25 2023-06-23 阿波罗智联(北京)科技有限公司 模型训练、交通信息处理方法、装置、设备和存储介质
CN115438101A (zh) * 2022-10-13 2022-12-06 中国兵器工业计算机应用技术研究所 一种基于特征形态和数据关系的数据特征构建系统和方法
CN116645211A (zh) * 2023-05-15 2023-08-25 中信建投证券股份有限公司 推荐用户信息生成方法、装置、设备和计算机可读介质
CN116645211B (zh) * 2023-05-15 2024-05-10 中信建投证券股份有限公司 推荐用户信息生成方法、装置、设备和计算机可读介质
CN116977035A (zh) * 2023-09-25 2023-10-31 临沂大学 一种基于LightGBM和深度学习的农产品推荐方法
CN117649898A (zh) * 2024-01-30 2024-03-05 烟台国工智能科技有限公司 基于数据挖掘的液晶材料配方分析方法及装置
CN117649898B (zh) * 2024-01-30 2024-05-03 烟台国工智能科技有限公司 基于数据挖掘的液晶材料配方分析方法及装置

Also Published As

Publication number Publication date
CN112035453B (zh) 2024-03-12
CN112035453A (zh) 2020-12-04

Similar Documents

Publication Publication Date Title
WO2021147568A1 (zh) 基于gbdt高阶特征组合的推荐方法、装置及存储介质
WO2019169756A1 (zh) 产品推荐方法、装置及存储介质
US8645291B2 (en) Encoding of data for processing in a spatial and temporal memory system
WO2022160449A1 (zh) 文本分类方法、装置、电子设备及存储介质
CN111652278B (zh) 用户行为检测方法、装置、电子设备及介质
CN112380343A (zh) 问题解析方法、装置、电子设备及存储介质
CN113449187A (zh) 基于双画像的产品推荐方法、装置、设备及存储介质
CN112528616B (zh) 业务表单生成方法、装置、电子设备及计算机存储介质
WO2021238563A1 (zh) 基于配置算法的企业运行数据分析方法、装置、电子设备及介质
CN113435202A (zh) 基于用户画像的产品推荐方法、装置、电子设备及介质
US8914378B2 (en) Specification document check method, program, and system
CN115146865A (zh) 基于人工智能的任务优化方法及相关设备
CN112507230A (zh) 基于浏览器的网页推荐方法、装置、电子设备及存储介质
CN114997263B (zh) 基于机器学习的结训率分析方法、装置、设备及存储介质
CN114781832A (zh) 课程推荐方法、装置、电子设备及存储介质
CN115018588A (zh) 产品推荐方法、装置、电子设备及可读存储介质
CN113656690B (zh) 产品推荐方法、装置、电子设备及可读存储介质
CN113505273B (zh) 基于重复数据筛选的数据排序方法、装置、设备及介质
CN113886708A (zh) 基于用户信息的产品推荐方法、装置、设备及存储介质
CN115034812B (zh) 基于大数据的钢铁行业销售量预测方法及装置
CN116578696A (zh) 文本摘要生成方法、装置、设备及存储介质
CN113705201B (zh) 基于文本的事件概率预测评估算法、电子设备及存储介质
CN115081447A (zh) 软件开发的需求文档构建方法、装置、设备及存储介质
CN114881001A (zh) 基于人工智能的报表生成方法及相关设备
CN114610854A (zh) 智能问答方法、装置、设备及存储介质

Legal Events

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

Ref document number: 20915015

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20915015

Country of ref document: EP

Kind code of ref document: A1