Method, device, apparatus and computer-readable medium for recommending products
By identifying the characteristics of users' historical product information, generating combined features and using logistic regression to select features and train the machine learning model, the problem of low data classification accuracy is solved and the opening rate of recommended products is improved.
Patent Information
- Application Number
- CN202011250257.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-10
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-11-10
AI Technical Summary
The accuracy of data classification in the existing technology is low, resulting in a low open rate for users to view recommended products.
By identifying the user's historical product information features, a combined feature set is generated, and logistic regression is used to select the combined features as the classification features of the data, and train a preset machine learning model to recommend products.
The accuracy of data classification is improved, thereby increasing the open rate of users viewing recommended products.
Smart Images

Figure CN113763092B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, equipment and computer-readable medium for recommending commodities. Background Art
[0002] With the development of artificial intelligence technology, Internet companies, financial companies and other industries have begun to use machine learning models to analyze data and determine more accurate and appropriate business strategies.
[0003] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art: due to the low accuracy of data classification, the opening rate of users viewing recommended products is low. Summary of the invention
[0004] In view of this, embodiments of the present invention provide a method, apparatus, device and computer-readable medium for recommending products, which can improve the accuracy of data classification and thereby increase the opening rate of users viewing recommended products.
[0005] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for recommending a product is provided, comprising:
[0006] Identify the characteristics of data, where the data is historical product information related to the user;
[0007] Generate a combined feature set according to the plurality of features, the combined feature set including the plurality of combined features of the data;
[0008] In the combined feature set, a combined feature is selected by using logistic regression, and the selected combined feature and the feature of the data are used as classification features of the data;
[0009] A preset machine learning model is trained according to the classification characteristics of the data to recommend products to users.
[0010] Generating a combined feature set according to the plurality of features comprises:
[0011] Generate an original combined feature according to a plurality of the features;
[0012] The original combined features are verified by beam search to obtain successfully verified combined features, and the successfully verified combined features are used as the combined feature set.
[0013] Generating a combined feature set according to the plurality of features comprises:
[0014] According to the two features and the types of the features, the combined features are obtained by dividing;
[0015] A plurality of the combined features are taken as the combined feature set.
[0016] The type of the feature includes a numerical value;
[0017] The combined features are obtained by dividing according to the two features and the types of the features, including:
[0018] The combined feature is obtained by dividing according to the statistical information of the feature and the numerical feature.
[0019] The types of the two features are numerical values;
[0020] The combined features are obtained by dividing according to the two features and the types of the features, including:
[0021] According to a numerical feature and another numerical feature, the combined feature is calculated;
[0022] or,
[0023] Discretization is performed on a numerical feature and another numerical feature to obtain the combined feature.
[0024] In the combination feature set, the combination feature is selected by using logistic regression, including:
[0025] In the combined feature set, logistic regression training is used to obtain the relative weight of the combined feature relative to the feature of the data;
[0026] Based on the relative weight of the combined features, calculating the prediction value corresponding to the combined features;
[0027] The combined feature is selected according to the predicted value corresponding to the combined feature.
[0028] In the combined feature set, the relative weight of the combined feature in the logistic regression is obtained by training relative weights of the combined feature with respect to the feature of the data, including:
[0029] For the combined features in the combined feature set, on the basis that the weights of the features of the data remain unchanged, logistic regression training is used to obtain the relative weights of the combined features.
[0030] According to a second aspect of an embodiment of the present invention, there is provided a device for recommending a product, comprising:
[0031] An identification module, used to identify characteristics of data, where the data is historical commodity information of a user;
[0032] A combination module, used to generate a combination feature set according to the plurality of features, wherein the combination feature set includes the plurality of combination features of the data;
[0033] A selection module, configured to select a combination feature from the combination feature set by using logistic regression, and use the selected combination feature and the feature of the data as a classification feature of the data;
[0034] The recommendation module is used to train a preset machine learning model according to the classification characteristics of the data to recommend products to users.
[0035] The combination module is specifically used to generate an original combination feature according to the multiple features;
[0036] The original combined features are verified by beam search to obtain successfully verified combined features, and the successfully verified combined features are used as the combined feature set.
[0037] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for recommending commodities, including:
[0038] one or more processors;
[0039] a storage device for storing one or more programs,
[0040] When the one or more programs are executed by the one or more processors, the one or more processors implement the above method.
[0041] According to a fourth aspect of an embodiment of the present invention, there is provided a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described above is implemented.
[0042] One embodiment of the above invention has the following advantages or beneficial effects: identifying the characteristics of data, where the data is historical product information related to the user; generating a combination feature set according to multiple characteristics, where the combination feature set includes multiple combination features of the data; in the combination feature set, using logistic regression to select the combination feature, and using the selected combination feature and the characteristics of the data as the classification features of the data. Since the selected combination feature is generated based on the characteristics of the data itself, the above combination feature fully reflects the characteristics of the data; training a preset machine learning model based on the classification features of the data to recommend products to the user. Therefore, dividing the data according to the classification features can improve the accuracy of data classification, thereby increasing the opening rate of users viewing recommended products.
[0043] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0045] Figure 1is a schematic diagram of the main process of the method for recommending commodities according to an embodiment of the present invention;
[0046] Figure 2 is a schematic diagram of a process of generating a combined feature set according to an embodiment of the present invention;
[0047] Figure 3 is a schematic diagram of a process of obtaining combined features by dividing according to an embodiment of the present invention;
[0048] Figure 4 is a schematic diagram of a process of selecting combined features by using logistic regression according to an embodiment of the present invention;
[0049] Figure 5 is a schematic diagram of weight calculation of logistic regression according to an embodiment of the present invention;
[0050] Figure 6 is a schematic diagram of calculating the combined feature weights of the logistic regression according to an embodiment of the present invention;
[0051] Figure 7 is a schematic diagram of a process of obtaining relative weights through training according to an embodiment of the present invention;
[0052] Figure 8 is a schematic diagram of the main structure of a device for recommending products according to an embodiment of the present invention;
[0053] Fig. 9 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0054] Fig.10 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0055] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0056] In Internet companies, algorithms have been used on a large scale to train machine learning models to predict the products that users are interested in and need. Specifically, users leave a lot of historical browsing information on the website, and based on this information, user preferences can be analyzed. The above process requires a lot of manual analysis and screening of effective information, and then provide it to the machine learning model.
[0057] In the process of training machine learning models, data needs to be classified. How to avoid a large amount of manual information screening and directly automate the analysis of the entire process based on existing data has become a research hotspot.
[0058] In the process of training a machine learning model, the main task is to construct classification features. Specifically, classification features can be constructed based on a boosted tree model or a factorization machine.
[0059] The boosted tree model is a model that adds together multiple decision tree models. The first decision tree model learns rough results and large errors, and the second decision tree model learns how to make up for this error. In the process of building a decision tree, features that appear together in a path can be combined to build new features. The boosted tree model is easy to use and has a fast calculation speed.
[0060] However, the model used in the feature combination method based on the boosted tree model is the same as the prediction model commonly used in the industry. Using the boosted tree for feature selection and model training at the same time results in placing too much weight on the features that the boosted tree values, while ignoring other features, resulting in serious overfitting in the results.
[0061] The factorization machine is an improvement on logistic regression. It maps each feature into a vector space, calculates the correlation between two features in the new space, and uses features with high correlation as classification features.
[0062] The disadvantage of feature combination based on factorization machine is that it has poor interpretability and low reusability. Methods based on factorization machine usually use neural network to select features, but the learning process of neural network is invisible, so it is impossible to know what features are combined and how to combine them, and it cannot be reused in similar work in the future.
[0063] Severe overfitting or poor reusability both lead to technical problems such as low accuracy of data classification, which in turn leads to a low opening rate of users viewing recommended products.
[0064] In order to solve the technical problem of low accuracy of data classification, the following technical solution in the embodiment of the present invention can be adopted.
[0065] See also Figure 1 , Figure 1 Schematic diagram of the main process of the method for recommending products according to an embodiment of the present invention, generating a combination feature set according to multiple features, and using logistic regression to select the combination features, thereby obtaining classification features, and then training a preset machine learning model to recommend products to users. Figure 1 As shown, the specific steps include:
[0066] S101. Identify characteristics of data, where the data is historical product information related to the user.
[0067] In an embodiment of the present invention, data is used to train a machine learning model. Data can be divided into multiple categories according to features. Features can include multiple feature types. Feature types are the basis for processing features.
[0068] The data is the historical commodity information of the user. As an example, the historical commodity information of the user includes the historical browsing commodity information of the user and the historical purchasing commodity information of the user.
[0069] For example, features can be roughly divided into numerical features, categorical features, and text features. Generally, features related to numerical values, such as age, can be classified as numerical features, and gender and color can be classified as categorical features.
[0070] Smaller and finer-grained feature types can obtain better classification features, such as time features, spatial features, etc.
[0071] In an embodiment of the present invention, the data may be located in a table, each row of the table is a complete piece of data, and each column of the table corresponds to a feature.
[0072] Since each column in the table corresponds to a feature, the feature of the data can be identified by the content in the specified column of the table. In addition, the features of the data can be annotated by specifying the columns in the table.
[0073] It can be understood that the characteristics of the data can be identified according to the content of each column in the table.
[0074] S102: Generate a combined feature set according to multiple features, where the combined feature set includes multiple combined features of the data.
[0075] It is understandable that the feature of data represents the difference between the data and other data in one aspect. Since data can be evaluated in multiple aspects, data can be represented in a combined feature manner.
[0076] Specifically, multiple combined features of the data are generated according to multiple features, and then a set including the above combined features is used as a combined feature set. In other words, the combined feature set is obtained by expanding the features of the data.
[0077] See also Figure 2 , Figure 2 1 is a schematic diagram of a process for generating a combined feature set according to an embodiment of the present invention, which specifically includes:
[0078] S201, generating original combined features according to multiple features.
[0079] For data, including multiple features, original combined features can be generated according to the multiple features.
[0080] As an example, the data has 100 features. According to the calculation method of permutation and combination, the combination of two features will produce 100×99 / 2=4950 original feature combinations. For the combination of three features, there will be 100×99×98 / 3 / 2=161700 original feature combinations.
[0081] S202, verifying the original combined features through beam search to obtain successfully verified combined features, and using the successfully verified combined features as a combined feature set.
[0082] The number of original combination features is huge, but not every original combination feature is suitable for classification, so it is necessary to verify the original combination features. For each original combination feature, it takes a long time to verify one by one, so in the embodiment of the present invention, the original combination features can be verified by beam search.
[0083] Beam search is a heuristic graph search algorithm, usually used when the graph solution space is relatively large. In order to reduce the space and time occupied by the search, some nodes with poor quality are cut off at each step of depth expansion, and some nodes with higher quality are retained. This reduces space consumption and improves time efficiency. Beam search can be considered as a greedy form of the Viterbi algorithm. Beam search uses parameters to limit the number of possible combination features retained at each step.
[0084] As an example, the original combined features obtained by two features are verified each time through beam search, and the successfully verified combined features are selected from them. For example, as an example, the data has 100 features. The three features are combined in pairs to generate combined features, which only needs to be combined twice, requiring 100*99 / 2+101*100 / 2=4950+5050=10000 verifications. If beam search is not used, 161700 verifications are required. It can be seen that the use of beam search greatly reduces the search space, saves time and improves search efficiency.
[0085] Finally, the successfully verified combined features are taken as the combined feature set.
[0086] exist Figure 2 In the embodiment of the invention, the original combined features are verified by beam search to obtain a combined feature set. The beam search can improve the search efficiency.
[0087] In the embodiment of the present invention, a combined feature set may be generated based on the type of feature. Figure 3 , Figure 3 1 is a schematic diagram of a process of obtaining combined features by dividing according to an embodiment of the present invention, which specifically includes:
[0088] S301. According to two features and feature types, a combined feature is obtained by dividing.
[0089] In the embodiment of the present invention, features can be roughly divided into numerical features, category features and text features. Combination features can be obtained by dividing the two features and the types of the above features.
[0090] Exemplarily, two features are combined by means of a Cartesian product, that is, a cross is made from the dimensions of two categories to divide more fine-grained category features.
[0091] As an example, feature 1 is gender, which belongs to the category feature, and feature 2 is population, which belongs to the category feature. Gender includes male and female, and population includes the elderly and children.
[0092] Feature 1 and feature 2 are both category features. Feature 1 and feature 2 are crossed and divided to obtain the combined features: grandfather, grandmother, little boy and little girl.
[0093] See Table 1, which is a combination of features divided according to feature 1 and feature 2.
[0094] Table 1
[0095] Feature Type male female elder Grandpa Granny Child Little boy Little Girl
[0096] Both features in Table 1 are category features. When the type of the feature is a numerical value, the technical solution in the following embodiments can also be adopted.
[0097] If one of the two features is a numerical feature, that is, the type of one feature is numerical, then the combined feature can be obtained by dividing it according to the statistical information of the one feature and the numerical feature.
[0098] As an example, feature 3 is the population, which is a categorical feature. The population includes the elderly, adults, and children. Feature 4 is income, which is a numerical feature.
[0099] See Table 2, which shows the income information of different people.
[0100] Table 2
[0101] Name crowd income A elder 1600 B Child 40 C Child 21 D Adults 8000 E elder 2900 F Adults 9100 G Child 33
[0102] Feature 3 is the crowd, which includes the elderly, adults, and children. Calculate the statistical information about feature 3. Feature 4 is income, calculate its statistical information about feature 4. The statistical information can include the average, maximum, and minimum values.
[0103] In the statistical information, different statistics of the same category can be added as a unified feature at one time, thus obtaining the data in Table 3.
[0104] Table 3
[0105]
[0106] It can be seen that the combined features can be obtained by dividing the statistical information of a feature and a numerical feature. The combined features are the specific values in Table 3.
[0107] In one embodiment of the present invention, both features in Table 1 are numerical features, and the technical solutions in the following embodiments may also be adopted.
[0108] In one embodiment of the present invention, if both features are numerical features, a combined feature is calculated according to one numerical feature and another numerical feature.
[0109] As an example, if two features are directly calculated to represent corresponding physical parameters, a combined feature can be calculated according to a numerical feature and another numerical feature. For example, feature 5 is the length of the desktop, feature 6 is the width of the desktop, and the physical parameter is the desktop area.
[0110] In one embodiment of the present invention, a numerical feature and another numerical feature are discretized to obtain a combined feature. Specifically, two numerical features are discretized to obtain a combined feature according to the values after the discretization.
[0111] As an example, feature 7 is age and feature 8 is height. Both feature 7 and feature 8 are numerical features.
[0112] Feature 7 is a value between 0 and 100. Feature 7 can be discretized into an age group every ten years. Feature 8 is a value between 10 cm and 200 cm, which can be discretized into a category every 10 cm. Then crossover is performed to obtain people aged 0 to 10 with a height of 50 to 60, etc.
[0113] S302: taking multiple combined features as a combined feature set.
[0114] The combined features obtained by the division are taken as a set, which is the combined feature set. It can be understood that the combined feature set includes multiple combined features of the same data. As an example, the data is a laptop computer, and the laptop computer can be identified by multiple features. The combined feature set of the laptop computer includes multiple combined features of the laptop phone.
[0115] exist Figure 3 In the embodiment, according to the two features and the type of the feature, a combination feature set can be obtained, and the combination features in the combination feature set are all related to the features of the data. The scope of application is wider and the effect is better.
[0116] S103. In the combined feature set, a logistic regression is used to select a combined feature, and the selected combined feature and the features of the data are used as classification features of the data.
[0117] The combined feature set includes combined features of multiple data. It is necessary to select the combined features from the combined feature set and use them together with the features of the data as the classification features of the data.
[0118] Classification features are the basis for data classification. In the process of training machine learning models, different types of data are needed as training data. Then, for the data itself, it can be divided into different types according to the classification features. Using the selected combination of data and data features as the classification features of the data can more accurately describe the data and increase the number of data classification types. Improve the accuracy of the machine learning model, and then accurately predict user preferences.
[0119] In the embodiment of the present invention, logistic regression can be used to select the combined features. Logistic regression is a simple and effective machine learning model, a machine learning method for solving binary classification problems, and is used to estimate the possibility of something. For example, the possibility of a user buying a certain product, the possibility of a patient suffering from a certain disease, and the possibility of an advertisement being clicked by a user.
[0120] See also Figure 4 , Figure 4 1 is a flow chart of selecting combined features by using logistic regression according to an embodiment of the present invention, which specifically includes:
[0121] S401. In a combined feature set, logistic regression training is used to obtain a relative weight of the combined feature relative to the data feature.
[0122] The combined feature set includes multiple combined features of the data. For each of the combined features, logistic regression training can be used to obtain the relative weight of the combined feature relative to the feature of the data.
[0123] See also Figure 5 , Figure 5 Schematic diagram of weight calculation for logistic regression according to an embodiment of the present invention. Figure 5 In machine learning, logistic regression is a linear combination of features and predicts the classification results.
[0124] Figure 5 In the training, the weights of the three features x, y, and z in the previous round are trained first. Then, for the newly added feature m, the weights of the four features x, y, z, and m need to be recalculated. The purpose of calculating the weights is to predict the classification results.
[0125] See also Figure 6 , Figure 64 is a schematic diagram of calculating the combined feature weights of logistic regression according to an embodiment of the present invention. Figure 6 The weights of feature x, feature y, and feature z are all parameters obtained from the previous round of logistic regression training.
[0126] Due to the newly added feature m, it is necessary to calculate the new feature weight, that is, the weight of feature m, in this logistic regression.
[0127] Considering that feature m is a combined feature, it is established on the basis of feature x, feature y and feature z. Therefore, feature m is related to feature x, feature y and feature z. It is not necessary to recalculate all the weights of feature x, feature y, feature z and feature m. Only the weight of feature m needs to be calculated. That is, the relative weight of feature m relative to feature x, feature y and feature z is calculated.
[0128] Continue to see Figure 6 , Figure 6 The weights of feature x, feature y and feature z, a, b and c are the old feature logistic regression results. We only need to calculate the relative weight of feature m relative to feature x, feature y and feature z.
[0129] See also Figure 7 , Figure 7 1 is a flow chart of obtaining relative weights through training according to an embodiment of the present invention, which specifically includes:
[0130] S701. Calculate the weights of data features using logistic regression.
[0131] The calculation goal of logistic regression is to calculate the weight of the features of multiple data on the prediction target. It can be understood that the features of the data are the original features of the data.
[0132] As an example, in the function expression of f(x, y, z) = ax + by + cz, x, y, z are the features of the data, and a, b, c are the prediction targets of logistic regression.
[0133] Using logistic regression for training, we can get the weights a, b, c corresponding to the features x, y, z of the data.
[0134] S702: For a combined feature in the combined feature set, on the basis of keeping the weight of the feature of the data unchanged, obtain the relative weight of the combined feature by using logistic regression training.
[0135] In the process of calculating the relative weight of the combined features, the weights obtained by training in S701, that is, the three values of a, b, and c, are directly used, and the three weights are set to constants without changing.
[0136] Using logistic regression, the weight d of the combined feature m is trained on the basis of keeping the weights of a, b and c unchanged.
[0137] In practical applications, there are many combined features. Considering that the combined features are obtained based on the features of the data, there is a correlation between the combined features and the features of the data. Therefore, the relative weights of the combined features can be obtained by using logistic regression training on the basis of keeping the weights of the features of the data unchanged.
[0138] Compared to recalculating the weights of all features, using Figure 7 The solution in the embodiment can reduce the number of weights obtained through training from hundreds or thousands to single digits, which can greatly reduce the demand for computing power and time loss.
[0139] S402: Calculate the prediction value corresponding to the combined feature based on the relative weight of the combined feature.
[0140] A training set is established based on the combined features and the features of the data, and a model is trained based on the relative weights of the combined features and the weights of the features of the data. The trained model outputs a predicted value, which is the predicted value corresponding to the combined features. The predicted value is an indicator selected by the user based on the specific usage environment, such as prediction accuracy.
[0141] S403: Select a combination feature according to the prediction value corresponding to the combination feature.
[0142] The accuracy of the prediction value corresponding to the combined feature can be calculated using the preset validation set. The combined feature is selected according to the above accuracy.
[0143] As an example, the combination feature set includes combination feature m and combination feature n. The accuracy of using combination feature m is 55%, and the accuracy of using combination feature n is 51%. If a combination feature needs to be selected, the combination feature m with a higher accuracy can be selected.
[0144] Finally, the selected combined features and the features of the data are used as classification features of the data.
[0145] exist Figure 4 In the embodiment, adding a combined feature only requires calculating the relative weight of the combined feature, without calculating the weight of the feature of the data again, thereby reducing the amount of calculation and improving the verification effect.
[0146] S104. Train a preset machine learning model based on the classification characteristics of the data to recommend products to users.
[0147] After determining the classification features of the data, the classification features of the data can be used to train the preset machine learning model. It should be noted that each user has a corresponding trained machine learning model.
[0148] The trained machine learning model is obtained by using the classification features of the user data, so the trained machine learning model can recommend products to the user. Since the recommended products are highly correlated with the historical product information of the user, the opening rate of the recommended products by the user will be significantly increased. Among them, the opening rate of the recommended products refers to the ratio of the number of times the user opens the content related to the recommended products to the number of pushes.
[0149] In the above-mentioned embodiment of the present invention, the characteristics of data are identified, and the data is the historical commodity information involved in the user; a combination feature set is generated according to multiple characteristics, and the combination feature set includes multiple combination features of the data; in the combination feature set, logistic regression is used to select the combination feature, and the selected combination feature and the characteristics of the data are used as the classification features of the data; a preset machine learning model is trained according to the classification features of the data to recommend commodities to the user. Since the selected combination features are generated based on the characteristics of the data itself, the above combination features fully reflect the characteristics of the data. Therefore, dividing the data according to the classification features can improve the accuracy of data classification, thereby improving the opening rate of users viewing recommended commodities.
[0150] With the development of the Internet, various tasks such as content recommendation and trend assessment require the use of machine learning algorithms. Regardless of the application field, algorithm engineers are required to invest a lot of time in data feature processing.
[0151] More and more data is available, and it is very difficult to process data manually. Finding suitable data from a large amount of data through automation can save manpower and material resources on the one hand, and improve the prediction effect of artificial intelligence algorithms on the other.
[0152] By adopting the technical solution in the embodiment of the present invention, features are combined and combined features are selected after the combination. Since the data processing time of algorithm engineers can be saved to a great extent, more energy can be devoted to model optimization and business improvement. This is of great significance to saving company costs and improving work efficiency.
[0153] See also Figure 8 , Figure 8 is a schematic diagram of the main structure of a device for recommending goods according to an embodiment of the present invention. The device for recommending goods can implement a method for recommending goods, such as Figure 8 As shown, the device for recommending goods specifically includes:
[0154] The identification module 801 is used to identify the characteristics of data, where the data is the historical commodity information of the user.
[0155] The combination module 802 is used to generate a combination feature set according to multiple features, and the combination feature set includes multiple combination features of the data.
[0156] The selection module 803 is used to select a combination feature from the combination feature set by using logistic regression, and use the selected combination feature and the features of the data as classification features of the data.
[0157] The recommendation module 804 is used to train a preset machine learning model according to the classification characteristics of the data to recommend products to users.
[0158] In one embodiment of the present invention, the combination module 802 is specifically used to generate an original combined feature according to multiple features;
[0159] The original combined features are verified by beam search to obtain successfully verified combined features, and the successfully verified combined features are used as a combined feature set.
[0160] In one embodiment of the present invention, the combination module 802 is specifically used to divide and obtain a combined feature according to two features and the type of the feature;
[0161] Multiple combined features are taken as a combined feature set.
[0162] In one embodiment of the present invention, the type of the feature includes a numerical value;
[0163] The combination module 802 is specifically used to divide and obtain a combined feature according to statistical information of a feature and a numerical feature.
[0164] In one embodiment of the present invention, the types of both features are numerical values;
[0165] A combination module 802 is specifically used to calculate a combined feature according to a numerical feature and another numerical feature;
[0166] or,
[0167] Discretize a numerical feature and another numerical feature to obtain a combined feature.
[0168] In one embodiment of the present invention, the selection module 803 is specifically used to obtain the relative weight of the combined feature relative to the feature of the data by using logistic regression training in the combined feature set;
[0169] Based on the relative weight of the combined features, calculate the prediction value corresponding to the combined features;
[0170] Select the combined features according to the predicted values corresponding to the combined features.
[0171] In one embodiment of the present invention, the selection module 803 is specifically used to obtain the relative weight of the combined features in the combined feature set by using logistic regression training on the basis of keeping the weight of the features of the data unchanged.
[0172] Fig. 9 An exemplary system architecture 900 is shown to which the method for recommending goods or the apparatus for recommending goods according to the embodiments of the present invention may be applied.
[0173] like Fig. 9 As shown, system architecture 900 may include terminal devices 901, 902, 903, network 904 and server 905. Network 904 is used to provide a medium for communication links between terminal devices 901, 902, 903 and server 905. Network 904 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0174] Users can use terminal devices 901, 902, 903 to interact with server 905 through network 904 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 901, 902, 903, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0175] The terminal devices 901 , 902 , and 903 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0176] The server 905 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 901, 902, and 903. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - only an example) to the terminal device.
[0177] It should be noted that the method for recommending goods provided in the embodiment of the present invention is generally executed by the server 905 , and accordingly, the device for recommending goods is generally set in the server 905 .
[0178] It should be understood that Fig. 9 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0179] Reference below Fig.10 , which shows a schematic diagram of the structure of a computer system 1000 of a terminal device suitable for implementing an embodiment of the present invention. Fig.10 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0180] like Fig.10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage part 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the system 1000 are also stored. The CPU 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0181] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 1007 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed, so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0182] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the above-mentioned functions defined in the system of the present invention are executed.
[0183] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0184] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0185] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be provided in a processor. For example, they may be described as follows: a processor includes a sending unit, an acquisition unit, a determination unit, and a first processing unit. The names of these units do not, in some cases, constitute limitations on the units themselves. For example, the sending unit may also be described as a "unit that sends a request for obtaining an image to a connected server."
[0186] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:
[0187] Identify the characteristics of data, where the data is historical product information related to the user;
[0188] Generate a combined feature set according to the plurality of features, the combined feature set including the plurality of combined features of the data;
[0189] In the combined feature set, a combined feature is selected by using logistic regression, and the selected combined feature and the feature of the data are used as classification features of the data;
[0190] A preset machine learning model is trained according to the classification characteristics of the data to recommend products to users.
[0191] According to the technical solution of the embodiment of the present invention, the characteristics of the data are identified, and the data is the historical commodity information involved in the user; a combination feature set is generated according to multiple characteristics, and the combination feature set includes multiple combination features of the data; in the combination feature set, logistic regression is used to select the combination feature, and the selected combination feature and the characteristics of the data are used as the classification features of the data; a preset machine learning model is trained according to the classification features of the data to recommend commodities to the user. Since the selected combination features are generated based on the characteristics of the data itself, the above combination features fully reflect the characteristics of the data. Therefore, dividing the data according to the classification features can improve the accuracy of data classification, thereby improving the opening rate of users viewing recommended commodities.
[0192] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for recommending products. It is characterized in that include: Identify the characteristics of data, where the data is historical product information related to the user; Generate a combined feature set according to the plurality of features, the combined feature set including the plurality of combined features of the data; In the combined feature set, a combined feature is selected by using logistic regression, and the selected combined feature and the feature of the data are used as classification features of the data; Training a preset machine learning model based on the classification characteristics of the data to recommend products to users; In the combination feature set, the combination feature is selected by using logistic regression, including: In the combined feature set, logistic regression training is used to obtain the relative weight of the combined feature relative to the feature of the data; Based on the relative weight of the combined features, calculating the prediction value corresponding to the combined features; The combined feature is selected according to the predicted value corresponding to the combined feature.
2. The method for recommending products according to claim 1, It is characterized in that Generating a combined feature set according to the plurality of features comprises: Generate an original combined feature according to a plurality of the features; The original combined features are verified by beam search to obtain successfully verified combined features, and the successfully verified combined features are used as the combined feature set.
3. The method for recommending products according to claim 1, It is characterized in that Generating a combined feature set according to the plurality of features comprises: According to the two features and the types of the features, the combined features are obtained by dividing; A plurality of the combined features are taken as the combined feature set.
4. The method for recommending products according to claim 3, It is characterized in that The type of the feature includes a numerical value; The combined features are obtained by dividing according to the two features and the types of the features, including: The combined feature is obtained by dividing according to the statistical information of the feature and the numerical feature.
5. The method for recommending products according to claim 3, It is characterized in that The types of the two features are numerical values; The combined features are obtained by dividing according to the two features and the types of the features, including: According to a numerical feature and another numerical feature, the combined feature is calculated; or, Discretization is performed on a numerical feature and another numerical feature to obtain the combined feature.
6. The method for recommending products according to claim 1, It is characterized in that In the combined feature set, the relative weight of the combined feature in the logistic regression is obtained by training relative weights of the combined feature with respect to the feature of the data, including: For the combined features in the combined feature set, on the basis that the weights of the features of the data remain unchanged, logistic regression training is used to obtain the relative weights of the combined features.
7. A device for recommending products, It is characterized in that include: An identification module, used to identify characteristics of data, where the data is historical commodity information of a user; A combination module, used to generate a combination feature set according to the plurality of features, wherein the combination feature set includes the plurality of combination features of the data; A selection module is used to select a combination feature in the combination feature set by using logistic regression, and use the selected combination feature and the feature of the data as the classification feature of the data; and, in the combination feature set, use logistic regression training to obtain a relative weight of the combination feature relative to the feature of the data; Based on the relative weight of the combined features, calculating the prediction value corresponding to the combined features; and selecting the combined features according to the prediction value corresponding to the combined features; The recommendation module is used to train a preset machine learning model according to the classification characteristics of the data to recommend products to users.
8. The device for recommending products according to claim 7, It is characterized in that The combination module is specifically used to generate an original combination feature according to the multiple features; The original combined features are verified by beam search to obtain successfully verified combined features, and the successfully verified combined features are used as the combined feature set.
9. An electronic device for recommending products, It is characterized in that include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
10. A computer readable medium having a computer program stored thereon, It is characterized in that When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
