Brand recommendation method, electronic equipment, storage medium and systemTechnical Field
The invention relates to the field of data processing, in particular to a brand recommendation method, electronic equipment, a storage medium and a brand recommendation system.
Background
Because a large amount of brand goods are sold every day in the current online shopping platform, and a user basically only sees a limited number of brands at a time, how to make the brands interested by the user appear in the limited number of brands becomes the key point of research.
At present, the following two methods are adopted: 1. determining brand rankings manually based on the sensitivity of business personnel to goods and users; 2. the users are classified, features of different user types are extracted, and then click rates of different brands are predicted by using CTR (advertisement click rate prediction) to determine the ranking. However, with the above two methods, as the population classification increases and the workload of manual sorting increases sharply, a great deal of effort is required to determine the characteristics for each user group, and the brands seen by all users in another user group are still the same, so that there is no way to completely customize the brand list of interest for each user independently.
Disclosure of Invention
In order to overcome the disadvantages of the prior art, one of the objectives of the present invention is to provide a brand recommendation method, which can solve the problem that the current brand recommendation method cannot completely customize the brand list of interest for each user independently.
It is a second object of the present invention to provide an electronic device that solves the problem that the current brand recommendation method has no way to completely customize the list of brands that are of interest to each user independently.
It is a further object of the present invention to provide a storage medium that can solve the problem that the current brand recommendation method has no way to completely customize a brand list of interest to each user independently.
The fourth purpose of the present invention is to provide a brand recommendation system, which can solve the problem that the current brand recommendation method has no way to completely customize the brand list of interest for each user independently.
One of the purposes of the invention is realized by adopting the following technical scheme:
a brand recommendation method, comprising:
the method comprises the steps of obtaining order data, wherein the order data are obtained from a data storage device on an online shopping platform and comprise commodity brand information and user names;
data cleaning, namely classifying and sorting a plurality of order data according to different user names, combining the order data of the same user name to obtain user order data, and taking the user order data and the user name as training data;
the training model is used for inputting the training data into a preset recommendation model, training the training data in the preset recommendation model by adopting a logistic regression algorithm and a random negative sampling algorithm and obtaining a trained recommendation model;
acquiring information, namely acquiring an active user list on an online shopping platform and acquiring on-sale brand data on the online shopping platform;
and recommending brands, namely inputting the active user list and the on-sale brand data into the trained recommendation model for matching to obtain a recommended brand list.
Further, recommending the recommended brand list to corresponding active users in the user list.
Further, the brand recommendation specifically is: and inputting the active user list and the on-sale brand data into the trained recommendation model, matching corresponding user order data according to the active user list by the trained recommendation model, and matching a related on-sale brand list in the on-sale brand data according to the user order data to serve as a recommended brand list.
Further, updating data is included before the training model, updated new order data in a data storage device is regularly collected every day, the new order data is classified and sorted to obtain new user order data, and the new user order data is blended into the user order data.
The second purpose of the invention is realized by adopting the following technical scheme:
an electronic device, characterized by comprising: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a brand recommendation method of the present invention.
The third purpose of the invention is realized by adopting the following technical scheme:
a computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program is executed by a processor to perform a brand recommendation method of the present invention.
The fourth purpose of the invention is realized by adopting the following technical scheme:
a brand recommendation system, comprising:
the order data acquisition module is used for acquiring a plurality of order data from a data storage device on the online shopping platform, and the order data comprises commodity brand information and a user name;
the data cleaning module is used for classifying and sorting a plurality of order data according to different user names, combining the order data of the same user name to obtain user order data, and taking the user order data and the user name as training data;
the training model module is used for inputting the training data into a preset recommendation model, training the training data in the preset recommendation model by adopting a logistic regression algorithm and a random negative sampling algorithm and obtaining a trained recommendation model;
the system comprises an information acquisition module, a data processing module and a data processing module, wherein the information acquisition module is used for acquiring an active user list on an online shopping platform and acquiring on-sale brand data on the online shopping platform;
and the brand recommending module is used for inputting the active user list and the on-sale brand data into the trained recommending model for matching to obtain a recommended brand list.
Further, the system further comprises a sending module, wherein the sending module is used for recommending the recommended brand list to corresponding active users in the user list.
The system further comprises an update data module, wherein the update data module is used for regularly acquiring new order data updated in a data storage device every day, classifying and sorting the new order data to obtain new user order data, and integrating the new user order data into the user order data.
Further, the data cleaning module comprises a classification unit and a merging unit, the classification unit is used for classifying and sorting the order data according to different user names, the merging unit is used for merging the order data of the same user name to obtain user order data, and the user order data and the user name are used as training data.
Compared with the prior art, the invention has the beneficial effects that: the invention relates to a brand recommending method, which obtains a plurality of order data from a data storage device on an online shopping platform, classifies and sorts the order data according to different user names, combines the order data of the same user name to obtain user order data, uses the user order data as training data, inputs the training data into a preset recommending model, trains the training data in the preset recommending model by adopting a logistic regression algorithm and a random negative sampling algorithm to obtain a trained recommending model, inputs an active user list and on-sale brand data into the trained recommending model to be matched to obtain a recommended brand list, wherein the recommended brand list corresponds to each active user one by one, namely each user corresponds to a group of recommended brand lists, and the problem that the brand lists which are interested by each user cannot be customized independently in the past is solved, meanwhile, the training model is used for recommendation matching in the whole process, so that the recommendation accuracy and efficiency are improved, and the experience of the user is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and in order to make the technical solutions of the present invention more clearly understood and to implement them in accordance with the contents of the description, the following detailed description is given with reference to the preferred embodiments of the present invention and the accompanying drawings. The detailed description of the present invention is given in detail by the following examples and the accompanying drawings.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a flow chart of a brand recommendation method of the present invention;
FIG. 2 is a logic architecture diagram of a brand recommendation method of the present invention:
FIG. 3 is a block diagram of a brand recommendation system of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and the detailed description, and it should be noted that any combination of the embodiments or technical features described below can be used to form a new embodiment without conflict.
As shown in FIGS. 1-2, a brand recommendation method of the present invention includes
Acquiring order data, namely acquiring a plurality of order data from a data storage device on an online shopping platform, wherein the order data comprises commodity brand information and a user name; at present, a lot of order information is generated on an online shopping platform every day, and a large number of users do not purchase commodities of various brands.
Data cleaning, namely classifying and sorting a plurality of order data according to different user names, combining the order data of the same user name to obtain user order data, and taking the user order data and the user name as training data; in the present embodiment, there are a large number of individual orders in the order data obtained through the order data, and this step is to summarize orders with the same user name in the order data together to form a good category, for example, the user name in the existing order data is called as: three Zhang and Li Ming, etc., the order information called three Zhang according to all user names in the order data is summarized into a class, the order information called Li Ming by all user names is summarized into a class, namely the classification of the system is completed, and the commodity brand information in the order data is in one-to-one correspondence with the user names. The method further comprises updating data, and collecting updated new order data from the data storage device every day at regular time, because new order data are generated every day, the latest order data are merged into the user order data acquired before, so that the training data are the latest data, and the method also comprises the steps of cleaning the data of the new order data before the data are merged, and sorting and summarizing commodity brand information and user names in the new order data.
The training model is used for inputting training data into a preset recommendation model, training the training data in the preset recommendation model by adopting a logistic regression algorithm and a random negative sampling algorithm and obtaining a trained recommendation model; in the embodiment, the logistic regression algorithm and the random negative sampling algorithm are used for training the training data by using a preset recommendation model. The specific training algorithm is as follows: 1. the training algorithm yields: for theAll brands B ∈ BallLet b comprise two vectors XbAnd thetab,XbIs a vector of values of brand b, θbAn auxiliary vector for brand b; the specific derivation process is as follows: for the correlation between two brands b1 and b2, a certain value is set as L (b1, b2), when L (b1, b2) is 1, b1 is correlated with b2, when L (b1, b2) is 0, b1 and b2 are uncorrelated, and the correlation probability value of the correlation between b1 and b2 is p (b1| b2), specifically, as formula (1):
p(b1|b2)=f(b1,b2)L(b1,b2)(1-f(b1,b2))1-L(b1,b2) (1)
wherein p (b1| b2) is a correlation probability value, L (b1, b2) is a constant value, and L (b1, b2) is a Sigmoid function related to b1 and b 2. For a user purchase record U ═ B1, B2, B3 … … bn, U ∈ Ball(ii) a If brand b belongs to purchase record U, NEG (b, U) is all brands in set U except b; NEG (B, B)all) As set BallAll brands except b. B ∈ U, the brand v ∈ NEG (B, U), the brand w ∈ NEG (B, B)all) (ii) a For each brand v, v and b are related, brand v and brand w are not related.
Acquiring information, namely acquiring an active user list on an online shopping platform and acquiring on-sale brand data on the online shopping platform; the method comprises the steps of obtaining near three user lists which are frequently logged in on the online shopping platform, locating the user lists to be active, and obtaining on-sale brand data on the online shopping platform, namely, on-sale brands on the online shopping platform.
And (4) recommending brands, inputting the active user list and the on-sale brand data into the trained recommendation model for matching, and obtaining a recommended brand list. And inputting the active user list and the on-sale brand data into a trained recommendation model, matching corresponding user order data according to the active user list by the trained recommendation model, and matching a related on-sale brand list in the on-sale brand data according to the user order data to serve as a recommended brand list. In this embodiment, a list of the brands ranked one hundred times before is generally selected according to the relevance, and the list of the one hundred times before is recommended to the corresponding user. As shown in fig. 2, a logic architecture diagram of the brand recommendation method in this embodiment is to obtain at first a timing, the obtaining at the timing includes obtaining order data, obtaining an active user list, obtaining on-sale brand information, storing the data in an Hdfs data storage, storing the order data, the active user data, and the on-sale brand data, respectively, inputting the order data into a recommendation model for training, synthesizing the active user data by a trained recommendation model, performing brand recommendation on the on-sale brand data, matching a recommended brand result for each active user, reading the recommended brand result by a background, and sending the recommended brand result to a user for browsing.
An embodiment of the present invention provides an electronic device, including: a processor;
a memory; and a program, wherein the program is stored in the memory and configured to be executed by the processor, the program comprising instructions for performing a brand recommendation method of the present invention.
An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, and the computer program is characterized in that: the computer program is executed by a processor to perform a brand recommendation method of the present invention.
An embodiment of the present invention further provides a brand recommendation system, as shown in fig. 3, which specifically includes: the order data acquisition module is used for acquiring a plurality of order data from a data storage device on the online shopping platform, and the order data comprises commodity brand information and user names; the data cleaning module is used for classifying and sorting a plurality of order data according to different user names, combining the order data of the same user name to obtain user order data, and taking the user order data and the user name as training data; the training model module is used for inputting training data into a preset recommendation model, training the training data in the preset recommendation model by adopting a logistic regression algorithm and a random negative sampling algorithm and obtaining a trained recommendation model; the information acquisition module is used for acquiring an active user list on the online shopping platform and acquiring on-sale brand data on the online shopping platform; and the brand recommending module is used for inputting the active user list and the on-sale brand data into the trained recommending model for matching to obtain a recommended brand list. Further, the system further comprises a sending module, wherein the sending module is used for recommending the recommended brand list to the corresponding active users in the user list. The system also comprises an update data module, wherein the update data module is used for regularly acquiring new order data updated in the data storage device every day, classifying and sorting the new order data to obtain new user order data, and fusing the new user order data into the user order data. The data cleaning module comprises a classification unit and a merging unit, the classification unit is used for classifying and sorting a plurality of order data according to different user names, the merging unit is used for merging the order data of the same user name to obtain user order data, and the user order data and the user name are used as training data.
The invention relates to a brand recommending method, which obtains a plurality of order data from a data storage device on an online shopping platform, classifies and sorts the order data according to different user names, combines the order data of the same user name to obtain user order data, uses the user order data as training data, inputs the training data into a preset recommending model, trains the training data in the preset recommending model by adopting a logistic regression algorithm and a random negative sampling algorithm to obtain a trained recommending model, inputs an active user list and on-sale brand data into the trained recommending model to be matched to obtain a recommended brand list, wherein the recommended brand list corresponds to each active user one by one, namely each user corresponds to a group of recommended brand lists, and the problem that the brand lists which are interested by each user cannot be customized independently in the past is solved, meanwhile, the training model is used for recommendation matching in the whole process, so that the recommendation accuracy and efficiency are improved, and the experience of the user is improved.
The foregoing is merely a preferred embodiment of the invention and is not intended to limit the invention in any manner; those skilled in the art can readily practice the invention as shown and described in the drawings and detailed description herein; however, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the scope of the invention as defined by the appended claims; meanwhile, any changes, modifications, and evolutions of the equivalent changes of the above embodiments according to the actual techniques of the present invention are still within the protection scope of the technical solution of the present invention.