CN113344662A - Product recommendation method, device and equipment - Google Patents

Product recommendation method, device and equipment Download PDF

Info

Publication number
CN113344662A
CN113344662A CN202110602015.5A CN202110602015A CN113344662A CN 113344662 A CN113344662 A CN 113344662A CN 202110602015 A CN202110602015 A CN 202110602015A CN 113344662 A CN113344662 A CN 113344662A
Authority
CN
China
Prior art keywords
information
product
interacted
sequence
sequence information
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110602015.5A
Other languages
Chinese (zh)
Inventor
王钰桥
谭松波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202110602015.5A priority Critical patent/CN113344662A/en
Publication of CN113344662A publication Critical patent/CN113344662A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Economics (AREA)
  • Data Mining & Analysis (AREA)
  • Finance (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Accounting & Taxation (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Health & Medical Sciences (AREA)
  • General Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a product recommendation method, a device and equipment, wherein the method comprises the following steps: acquiring behaviors of a user within a preset time length, wherein the behaviors comprise user information, recently-interacted product sequence information and long-term-interacted product sequence information; obtaining a plurality of pieces of product information to be predicted; for each piece of product information to be predicted, combining the product information to be predicted and user information to generate corresponding first information; performing feature extraction on recently interacted product sequence information, performing vector conversion on forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information; and selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information. By representing the recent interest and the long-term interest of the user, the interest change trend of the user can be accurately represented according to the recent interest and the long-term interest of the user, and the recommendation accuracy of personalized products is improved.

Description

Product recommendation method, device and equipment
Technical Field
The present application relates to the field of product recommendation technologies, and in particular, to a method, an apparatus, and a device for product recommendation.
Background
At present, on an e-commerce platform, generally, a product recommendation model, such as a GRU4REC model, is obtained by learning behaviors of a user for a period of time and learning general interest trend characteristics of the user for a period of time, and then the product recommendation model is adopted to recommend products to the user. However, sometimes, the behavior of the user for a period of time cannot really reflect the interest change trend of the user due to the fact that the user clicks by mistake during operation or due to external accidental factors, and meanwhile, the interest of the user during shopping is sometimes changeable, so that when recommending products, if only the general interest trend characteristics of the user for a period of time are considered, the products recommended to the user may not be the users' intention, and the recommending effect is limited.
Disclosure of Invention
The embodiment of the invention provides a product recommendation method, a device and equipment, which are used for solving the problems that the conventional product recommendation method only considers the general interest trend characteristics of a user for a period of time, products recommended to the user may not be wanted by the user, and the recommendation effect is limited.
In order to solve the above problem, in a first aspect, an embodiment of the present invention provides a product recommendation method, including: acquiring behaviors of a user within a preset time length, wherein the behaviors comprise user information, recently-interacted product sequence information and long-term-interacted product sequence information; obtaining a plurality of pieces of product information to be predicted; for each piece of product information to be predicted, combining the product information to be predicted and user information to generate corresponding first information; performing feature extraction on recently interacted product sequence information, performing vector conversion on forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information; and selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information.
Optionally, the feature extraction is performed on the recently interacted product sequence information, and includes: carrying out one-hot coding on the product sequence information interacted in the near period; converting the recently interacted product sequence information after the one-hot coding into a first word vector; and performing convolution operation and maximum pooling operation on the first word vector to obtain the characteristic information of the recently interacted product sequence information.
Optionally, performing convolution operation and maximum pooling operation on the first word vector to obtain feature information of recently interacted product sequence information, including: performing convolution operation and maximum pooling operation on the first word vector by adopting a feature extraction model to obtain feature information of recently interacted product sequence information; during training, the feature extraction model performs random block discarding operation on the training samples after convolution operation is performed on the training samples and before maximum pooling operation is performed on the training samples.
Optionally, performing vector transformation on the product sequence information of forward interaction, including: carrying out one-hot coding on the product sequence information interacted in a long term; converting the one-hot coded long-term interactive product sequence information into a second word vector; and calculating the average value of the second word vector to obtain the product sequence information of the long-term interaction after the vector conversion.
Optionally, the step of concatenating the extracted feature information, the forward interactive product sequence information after vector conversion, and the first information to generate corresponding second information includes: one-hot encoding the first information; converting the first information after the one-hot coding into a third word vector; and cascading the feature information of the product sequence information interacted at the near period, the product sequence information interacted at the far period after the vector conversion and the third word vector to generate corresponding second information.
Optionally, selecting recommended product information from the plurality of pieces of product information to be predicted according to each piece of second information includes: inputting each second information into the attention model to obtain corresponding third information, and inputting each third information into a product click probability model to obtain corresponding click probability; and selecting recommended product information from the plurality of pieces of product information to be predicted according to each click probability.
Optionally, the product sequence information of the recent interaction includes a product ID sequence of the recent interaction, the product sequence information of the forward interaction includes a product ID sequence of the forward interaction, and before performing feature extraction on the product sequence information of the recent interaction and performing vector conversion on the product sequence information of the forward interaction, the product recommendation method further includes: determining the length of the product ID sequence of the recent interaction and the length of the product ID sequence of the long-term interaction; if the length of the product ID sequence interacted recently/the product ID sequence interacted at a long term is smaller than the preset length, zero padding is carried out at the tail end of the product ID sequence interacted recently/the product ID sequence interacted at a long term; if the length of the recently interacted product ID sequence/the forward interacted product ID sequence is greater than the preset length, removing product IDs outside the preset length from the beginning of the recently interacted product ID sequence/the forward interacted product ID sequence.
Optionally, after obtaining the behavior of the user within the preset time period, the product recommendation method further includes: and deleting the latest interacted product information in the recently interacted product sequence information.
In a second aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of product recommendation as in the first aspect or any of the embodiments of the first aspect.
In a third aspect, an embodiment of the present invention provides a product recommendation device, including: the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the behaviors of a user within a preset time length, and the behaviors comprise user information, recently interacted product sequence information and long-term interacted product sequence information; the second acquisition unit is used for acquiring a plurality of pieces of product information to be predicted; the combination unit is used for combining the product information to be predicted and the user information to generate corresponding first information for each product information to be predicted; the cascade unit is used for extracting the characteristics of the product sequence information interacted in the near term, performing vector conversion on the product sequence information interacted in the long term, and cascading the extracted characteristic information, the product sequence information interacted in the long term after the vector conversion and the first information to generate corresponding second information; and the selection unit is used for selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information.
According to the product recommendation method, device and equipment provided by the embodiment of the invention, the behaviors of the user in the preset duration are obtained, wherein the behaviors comprise user information, recently interacted product sequence information and long-term interacted product sequence information; obtaining a plurality of pieces of product information to be predicted; for each piece of product information to be predicted, combining the product information to be predicted and user information to generate corresponding first information; performing feature extraction on recently interacted product sequence information, performing vector conversion on forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information; selecting recommended product information from the plurality of pieces of product information to be predicted according to each piece of second information; therefore, when the product is recommended, the behavior of the user for a period of time is divided into recently-interacted product sequence information and long-term-interacted product sequence information, the recent interest and the long-term interest of the user can be represented, the interest change trend of the user can be accurately represented according to the recent interest and the long-term interest of the user, and the recommendation accuracy of the personalized product is improved.
The foregoing description is only an overview of the technical solutions of the present application, and the present application can be implemented according to the content of the description in order to make the technical means of the present application more clearly understood, and the following detailed description of the present application is given in order to make the above and other objects, features, and advantages of the present application more clearly understandable.
Drawings
FIG. 1 is a flow chart illustrating a method for recommending products according to an embodiment of the present invention;
FIG. 2 shows a schematic structural diagram of a self-attention layer in an embodiment of the invention;
FIG. 3 is a flow chart illustrating a convolution operation and a max-pooling operation performed on a first word vector according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a tensor eigenmap undergoing a random block dropping operation in an embodiment of the present invention;
FIG. 5 is a schematic diagram of a product recommendation device according to an embodiment of the present invention;
fig. 6 is a schematic diagram illustrating a hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a product recommendation method, which can be applied to an e-commerce platform for product recommendation, and the product recommendation method is shown in fig. 1 and comprises the following steps:
s101, acquiring behaviors of a user within a preset time length, wherein the behaviors comprise user information, recently-interacted product sequence information and remotely-interacted product sequence information; specifically, when a certain user needs to be recommended, the behavior of the user within a preset time period can be obtained, and the behavior of the user includes user information, recently-interacted product sequence information and long-term-interacted product sequence information. The product sequence information of the recent interaction and the product sequence information of the remote interaction are divided based on the product interaction time. For example, the product sequence information interacted by the user last hour is recently interacted product sequence information, and the product sequence information interacted by the user last month (except the last one hour) is long-term interacted product sequence information. The user information comprises a user ID, the recently interacted product sequence information comprises a recently interacted product ID sequence, and the forward interacted product sequence information comprises a forward interacted product ID sequence.
S102, obtaining information of a plurality of products to be predicted; specifically, when product recommendation needs to be performed on a certain user, a plurality of pieces of product information to be predicted can be randomly acquired from the product information base.
And S103, for each piece of product information to be predicted, combining the product information to be predicted and the user information to generate corresponding first information. Specifically, each piece of product information to be predicted needs to be predicted, and each piece of product information to be predicted needs to be associated to the user, so that for each piece of product information to be predicted, the piece of product information to be predicted and the piece of user information need to be combined to generate corresponding first information.
S104, extracting the characteristics of the product sequence information interacted in the near term, performing vector conversion on the product sequence information interacted in the long term, and cascading the extracted characteristic information, the product sequence information interacted in the long term after the vector conversion and the first information to generate corresponding second information; specifically, the feature extraction of the recently interacted product sequence information can be realized by performing convolution operation and maximum pooling operation on the recently interacted product sequence information; the vector conversion of the product sequence information interacted at a long term can be realized through vector conversion operation.
And S105, selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information. Specifically, each second information may be input into a self-attention layer, which is shown in fig. 2 and can learn to obtain recently interacted product sequence information, long-term interacted product sequence information, and a weight value of the first information during model training. And respectively inputting each piece of second information into the self-attention layer, and outputting the characteristic information in the second information (input characteristic vectors and input tensors), the long-term interactive product sequence information after vector conversion and the first information after multiplying the first information by respective corresponding weight values to obtain third information, so that the third information contains the weight of the product sequence information of the short-term interaction and the product sequence information of the long-term interaction to the product information to be predicted, then inputting the third information into a plurality of layers of fully-connected layers (DNN layers) and Refunction layers, and finally outputting the third information after being activated by a sigmoid function, thereby obtaining a probability value p of clicking the product information to be predicted by the user, wherein the larger the p is, the higher the probability of clicking the product information to be predicted by the user is. Top k to-be-predicted product information with the highest probability value can be taken as recommended product information. k may be the number of recommended hurdles actually exhibited on the line.
According to the product recommendation method provided by the embodiment of the invention, the behaviors of the user in the preset duration are obtained, wherein the behaviors comprise user information, recently interacted product sequence information and long-term interacted product sequence information; obtaining a plurality of pieces of product information to be predicted; for each piece of product information to be predicted, combining the product information to be predicted and user information to generate corresponding first information; performing feature extraction on recently interacted product sequence information, performing vector conversion on forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information; selecting recommended product information from the plurality of pieces of product information to be predicted according to each piece of second information; therefore, when the product is recommended, the behavior of the user for a period of time is divided into recently-interacted product sequence information and long-term-interacted product sequence information, the recent interest and the long-term interest of the user can be represented, the interest change trend of the user can be accurately represented according to the recent interest and the long-term interest of the user, and the recommendation accuracy of the personalized product is improved.
In an optional embodiment, in step S104, performing feature extraction on the recently interacted product sequence information includes: carrying out one-hot coding on the product sequence information interacted in the near period; converting the recently interacted product sequence information after the one-hot coding into a first word vector; and performing convolution operation and maximum pooling operation on the first word vector to obtain the characteristic information of the recently interacted product sequence information.
Specifically, the recently interacted product sequence information is subjected to one-hot coding to be converted into a one hot form. When the recently-interacted product sequence information after the one-hot coding is converted into a first word vector, the recently-interacted product sequence information in the one hot form can be operated through a word vector embedding layer constructed by a layer of fully-connected network, and the first word vector is obtained. A flow chart for performing convolution and max-pooling operations on a first word vector is shown in fig. 3. The length of the recently interacted product sequence is L, and the recently interacted product sequence information after the one-hot coding passes through the word vector embedding layer to obtain a first word vector (word embedding vector) with the dimension d. The first word vector is input into a CNN module (convolution calculation layer), and the CNN module performs convolution operation and maximum pooling operation on the first word vector. The convolution layer can be adopted to carry out convolution operation on the first word vector, the convolution operation is two-dimensional convolution operation and comprises transverse convolution operation and longitudinal convolution operation, the size of a convolution kernel of the transverse convolution operation is h x d, wherein h is less than L, the transverse convolution operation can obtain a first feature map, and the first feature map can be input into the pooling layer to carry out maximum pooling operation to obtain a second feature map. The purpose of pooling is to narrow down the first profile (or down-sampling), and its main purpose is two: 1. causing the first feature map to conform to a size of the display area; 2. and generating a thumbnail corresponding to the first feature map. What exists among the successive convolutional layers is a pooling layer, which can be said to be once pooled after adding an offset term after each convolution calculation; the main functions of the pond are: reducing the number of parameters and computations in the network by progressively reducing the spatial size of the representations; the pooling layer operates independently on each first profile.
The size of the convolution kernel of the vertical convolution operation is L multiplied by 1, and the vertical convolution operation can obtain a third feature map. And the third characteristic diagram and the second characteristic diagram are cascaded together to form an output vector of a convolution calculation layer, so that the characteristic information of the recently interacted product sequence information is obtained. The feature information of the product sequence information of the recent interaction is still in the form of word vectors.
In the embodiment of the invention, the feature information of the recently interacted product sequence information is obtained by converting the recently interacted product sequence information into the first word vector and performing convolution operation and maximum pooling operation on the first word vector, so that the feature information of the recently interacted product sequence information is accurately extracted, and the CNN module is used for performing convolution operation and maximum pooling operation on the first vector, so that the parallelism of calculation can be realized, the parameters of the model are reduced, and the training and reasoning efficiency is greatly improved compared with that of the RNN model.
In an implementable manner, performing convolution operation and maximum pooling operation on the first word vector to obtain feature information of recently interacted product sequence information, including: performing convolution operation and maximum pooling operation on the first word vector by adopting a feature extraction model to obtain feature information of recently interacted product sequence information; during training, the feature extraction model performs random block discarding operation on the training samples after convolution operation is performed on the training samples and before maximum pooling operation is performed on the training samples.
Specifically, the training process of the feature extraction model is as follows: converting a recently-interacted product sequence information training sample into a one hot form; calculating a recently-interacted product sequence information training sample in a one hot form through a word vector embedding layer constructed by a layer of full-connection network to obtain word vector representation of the recently-interacted product sequence; and (3) inputting the word vector representation of the recently interacted product sequence into a convolution network module (CNN module), and obtaining a feature extraction result through convolution operation. Because the learning ability of the neural network is influenced by the number of the neurons and the depth of the neural network layers, the more the number is, the deeper the layer number is, the stronger the learning ability is, and the more overfitting is easily caused. To solve for overfitting, there are two methods, regularization, by adding an L1 or L2 regularization term to the loss function. The dropout method solves the overfitting problem by randomly deleting the neurons in the neural network, and only uses part of the neurons to train the model in each iteration. Generally, overfitting can be reduced by averaging the outputs of different neural networks after training on the same set of training data. Dropout utilizes the principle that about half of hidden layer neurons are discarded every time, which is equivalent to training on different neural networks, so that the dependency among the neurons is reduced, namely each neuron cannot depend on some other neurons (which refer to the neurons connected between layers), and the neural network can learn more robust characteristics with other neurons. Furthermore, Dropout not only reduces overfitting, but also improves test set accuracy.
In the embodiment of the invention, overfitting of the model is reduced by adopting a dropout method, namely, random block discarding (dropout) operation is carried out on the feature extraction result after convolution operation. The tensor characteristic diagram obtained through convolution operation is dXN (d is a word vector representing dimension of an input CNN module, and N is the number of convolution output channels), when the tensor characteristic diagram random block is discarded, as shown in FIG. 4, some continuous areas (black fork areas in FIG. 4) are randomly selected according to Bernoulli function and multiplied by mask (gray areas), the output value of the continuous areas (areas where the gray areas and the black forks are overlapped) in the mask is 0, the continuous areas (black fork areas outside the gray areas) outside the mask keep original value output, and then maximum pooling operation is performed to obtain the characteristic information of the recently interactive product sequence information training sample.
In the embodiment of the invention, a feature extraction model is adopted to carry out convolution operation and maximum pooling operation on the first word vector to obtain the feature information of the recently interacted product sequence information, so that the feature information of the recently interacted product sequence information can be simply and quickly obtained; in addition, during training of the feature extraction model, after convolution operation is carried out on the training samples, before maximum pooling operation is carried out on the training samples, random block discarding operation is carried out on the training samples, overfitting in model training can be effectively prevented, and generalization capability of the model is enhanced.
In an optional embodiment, in step S104, performing vector transformation on the forward interactive product sequence information includes: carrying out one-hot coding on the product sequence information interacted in a long term; converting the one-hot coded long-term interactive product sequence information into a second word vector; and calculating the average value of the second word vector to obtain the product sequence information of the long-term interaction after the vector conversion.
Specifically, the product sequence information of the forward interaction is subjected to one-hot coding to convert the product sequence information of the forward interaction into a one hot form. When the product sequence information of the one hot coded forward interactive product is converted into a second word vector, the word vector embedding layer constructed by one layer of fully connected network can be used for calculating the forward interactive product sequence information in the one hot form to obtain the second word vector. During model training, in order to prevent overfitting of the model, after the second word vector is obtained, random word vector replacement operation may be performed on the second word vector, that is, word vectors corresponding to one or more products in the second word vector may be randomly replaced with word vectors corresponding to other products with a certain probability p. During replacement, word vectors corresponding to other products are searched from a preset mapping relation table, then word vectors of one or more products are randomly selected from the second word vectors, and word vectors of the one or more products are replaced by word vectors corresponding to other products. During the product recommendation process, the random word vector replacement step is skipped). Because the product sequence information of the long-term interaction is more in the interactive product sequence than the product sequence information of the short-term interaction, the calculation amount of the characteristic information of the product sequence information of the long-term interaction acquired by adopting the CNN module is huge, and the long-term interaction product sequence information after vector conversion can be obtained by calculating the average value of the second word vector.
In the embodiment of the invention, because the product sequence information of the long-term interaction is larger and longer, the product sequence information of the long-term interaction is converted into the second word vector, the average value of the second word vector is calculated to obtain the product sequence information of the long-term interaction after the vector conversion, and the characteristic representation of the product sequence information of the long-term interaction can be realized. In addition, when the model is trained, word vectors corresponding to a certain product in the second word vectors are replaced by word vectors corresponding to other products at random according to a certain probability p, so that overfitting can be effectively prevented in model training, and the generalization capability of the model is enhanced.
In an optional embodiment, in step S104, the extracted feature information, the forward interactive product sequence information after vector conversion, and the first information are cascaded to generate corresponding second information, including: one-hot encoding the first information; converting the first information after the one-hot coding into a third word vector; and cascading the feature information of the product sequence information interacted at the near period, the product sequence information interacted at the far period after the vector conversion and the third word vector to generate corresponding second information.
Specifically, the first information is one-hot encoded into a form in which the first information is converted into one hot. When the first information after the one-hot coding is converted into a third word vector, the first information in the one hot form can be operated through a word vector embedding layer constructed by a layer of fully-connected network to obtain a word vector of matrix decomposition, namely the third word vector. And then, cascading the characteristic information of the product sequence information interacted at the near period, the product sequence information interacted at the far period after the vector conversion and the third word vector to generate corresponding second information.
In an optional embodiment, step S105, selecting recommended product information from the plurality of product information to be predicted according to each second information, includes: inputting each second information into the attention model to obtain corresponding third information, and inputting each third information into a product click probability model to obtain corresponding click probability; and selecting recommended product information from the plurality of pieces of product information to be predicted according to each click probability.
Specifically, the self-attention model learns the product sequence information of the near-term interaction, the product sequence information of the long-term interaction and the weight value of the first information during model training, and inputs each second information (input tensor) into the self-attention model, so that the feature information in the second information, the product sequence information of the long-term interaction after vector conversion and the first information are multiplied by the corresponding weight value and then output, and the corresponding third information (output tensor) is obtained. And inputting all the third information into a product click probability model, namely inputting all the third information into a plurality of layers of full connection layers (DNN layers), and finally outputting a probability value p of clicking the information of the product to be predicted by the user after being activated by a sigmoid function. According to each click probability, top k pieces of to-be-predicted product information with the highest probability value can be taken as recommended product information.
In the embodiment of the invention, because the self-attention model can accurately learn the weight of the influence of the interests in different periods on the current purchasing behavior of the user, the second information is input into the self-attention model to obtain corresponding third information, and the third information is input into the product click probability model to obtain corresponding click probability; the recommended product information is selected from the plurality of pieces of product information to be predicted according to each click probability, the interest change trend of the user can be accurately represented, the probability of clicking each piece of product information to be predicted by the user can be accurately obtained, and therefore the accuracy of personalized recommendation can be further improved.
In an optional embodiment, the product sequence information of the recent interaction includes a product ID sequence of the recent interaction, the product sequence information of the forward interaction includes a product ID sequence of the forward interaction, in step S104, feature extraction is performed on the product sequence information of the recent interaction, and before vector conversion is performed on the product sequence information of the forward interaction, the product recommendation method further includes: determining the length of the product ID sequence of the recent interaction and the length of the product ID sequence of the long-term interaction; if the length of the product ID sequence interacted recently/the product ID sequence interacted at a long term is smaller than the preset length, zero padding is carried out at the tail end of the product ID sequence interacted recently/the product ID sequence interacted at a long term; if the length of the recently interacted product ID sequence/the forward interacted product ID sequence is greater than the preset length, removing product IDs outside the preset length from the beginning of the recently interacted product ID sequence/the forward interacted product ID sequence.
Specifically, when the product ID sequence of the recent interaction and the product ID sequence of the future interaction are processed, since the lengths of the product ID sequence of the recent interaction and the product ID sequence of the future interaction of each user are different, in order to facilitate the processing of data by the model, it is specified that both the product ID sequence of the recent interaction and the product ID sequence of the future interaction of the user are fixed. Therefore, before performing feature extraction on the product sequence information of the recent interaction and performing vector conversion on the product sequence information of the forward interaction, the length of the product ID sequence of the recent interaction and the length of the product ID sequence of the forward interaction need to be determined, if the length of the product ID sequence is less than a fixed length, filling and completing with 0, and if the length of the product ID sequence exceeds the fixed length, removing the product IDs outside the fixed length.
In the embodiment of the invention, the product ID series interacted by each user recently and the product ID series interacted by each user in a long term can be fixed in length by supplementing or removing the product IDs, so that the calculated amount of the model can be reduced when the model is adopted to process the product sequence information interacted by each user recently and the product sequence information interacted by each user in a long term.
In an optional embodiment, in step S101, after acquiring the behavior of the user within the preset time period, the product recommendation method further includes: and deleting the latest interacted product information in the recently interacted product sequence information.
Specifically, in the model training process, the product sequence information training samples interacted recently do not include the product information interacted recently, and the product information training samples interacted recently are independently input into the model as positive samples for training.
An embodiment of the present invention further provides a product recommendation device, as shown in fig. 5, including:
the first obtaining unit 21 is configured to obtain a behavior of a user within a preset duration, where the behavior includes user information, recently interacted product sequence information, and remotely interacted product sequence information; the detailed description of the specific implementation manner is given in step S101 of the above method embodiment, and is not repeated herein.
A second obtaining unit 22, configured to obtain information of a plurality of products to be predicted; the detailed description of the specific implementation manner is given in step S102 of the above method embodiment, and is not repeated herein.
The combination unit 23 is configured to combine, for each piece of product information to be predicted, the piece of product information to be predicted and the piece of user information to generate corresponding first information; the detailed description of the specific implementation manner is given in step S103 of the above method embodiment, and is not repeated herein.
The cascade unit 24 is configured to perform feature extraction on recently interacted product sequence information, perform vector conversion on forward interacted product sequence information, and cascade the extracted feature information, the forward interacted product sequence information after the vector conversion, and the first information to generate corresponding second information; the detailed description of the specific implementation manner is given in step S104 of the above method embodiment, and is not repeated herein.
And the selecting unit 25 is used for selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information. The detailed description of the specific implementation manner is given in step S105 of the above method embodiment, and is not repeated herein.
According to the product recommendation device provided by the embodiment of the invention, the behaviors of the user in the preset duration are obtained, wherein the behaviors comprise user information, recently interacted product sequence information and long-term interacted product sequence information; obtaining a plurality of pieces of product information to be predicted; for each piece of product information to be predicted, combining the product information to be predicted and user information to generate corresponding first information; performing feature extraction on recently interacted product sequence information, performing vector conversion on forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information; selecting recommended product information from the plurality of pieces of product information to be predicted according to each piece of second information; therefore, when the product is recommended, the behavior of the user for a period of time is divided into recently-interacted product sequence information and long-term-interacted product sequence information, the recent interest and the long-term interest of the user can be represented, the interest change trend of the user can be accurately represented according to the recent interest and the long-term interest of the user, and the recommendation accuracy of the personalized product is improved.
Based on the same inventive concept as the product recommendation method in the foregoing embodiment, an embodiment of the present invention further provides an electronic device, as shown in fig. 6, including: a processor 31 and a memory 32, wherein the processor 31 and the memory 32 may be connected by a bus or other means, and the connection by the bus is illustrated in fig. 6 as an example.
The processor 31 may be a Central Processing Unit (CPU). The Processor 31 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or combinations thereof.
The memory 32, which is a non-transitory computer readable storage medium, may be used for storing non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the product recommendation method in the embodiments of the present invention. The processor 31 executes various functional applications and data processing of the processor by executing the non-transitory software programs, instructions and modules stored in the memory 32, that is, implements the product recommendation method in the above method embodiment.
The memory 32 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 31, and the like. Further, the memory 32 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 32 may optionally include memory located remotely from the processor 31, and these remote memories may be connected to the processor 31 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
One or more of the modules described above are stored in the memory 32 and, when executed by the processor 31, perform the product recommendation method in the embodiment shown in fig. 1.
The details of the electronic device may be understood with reference to the corresponding related description and effects in the embodiment shown in fig. 1, and are not described herein again.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable information processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable information processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable information processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable information processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A method of product recommendation, comprising:
acquiring behaviors of a user within a preset time length, wherein the behaviors comprise user information, recently-interacted product sequence information and remotely-interacted product sequence information;
obtaining a plurality of pieces of product information to be predicted;
for each piece of product information to be predicted, combining the product information to be predicted and the user information to generate corresponding first information;
performing feature extraction on the recently interacted product sequence information, performing vector conversion on the forward interacted product sequence information, and cascading the extracted feature information, the forward interacted product sequence information after vector conversion and the first information to generate corresponding second information;
and selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information.
2. The product recommendation method of claim 1, performing feature extraction on the recently interacted product sequence information, comprising:
performing one-hot coding on the recently interacted product sequence information;
converting the one-hot coded recent interactive product sequence information into a first word vector;
and carrying out convolution operation and maximum pooling operation on the first word vector to obtain the characteristic information of the recently interacted product sequence information.
3. The product recommendation method of claim 2, wherein the performing convolution operation and maximum pooling operation on the first word vector to obtain feature information of the recently interacted product sequence information comprises:
performing convolution operation and maximum pooling operation on the first word vector by adopting a feature extraction model to obtain feature information of the recently interacted product sequence information;
during training, the feature extraction model performs random block discarding operation on the training samples after convolution operation is performed on the training samples and before maximum pooling operation is performed on the training samples.
4. The product recommendation method of claim 1, performing vector transformation on the forward interactive product sequence information, comprising:
carrying out one-hot coding on the product sequence information of the long-term interaction;
converting the one-hot coded product sequence information of the long-term interaction into a second word vector;
and calculating the average value of the second word vector to obtain the product sequence information of the forward interaction after vector conversion.
5. The product recommendation method according to any one of claims 1 to 4, concatenating the extracted feature information, the vector-converted product sequence information of the forward interaction and the first information, and generating corresponding second information, including:
one-hot encoding the first information;
converting the first information after the one-hot encoding into a third word vector;
and cascading the feature information of the product sequence information interacted at the near period, the product sequence information interacted at the far period after vector conversion and the third word vector to generate corresponding second information.
6. The product recommendation method according to claim 1, wherein the selecting recommended product information from the plurality of pieces of product information to be predicted according to each piece of second information includes:
inputting each second information from the attention model to obtain corresponding third information,
inputting each piece of third information into a product click probability model to obtain corresponding click probability;
and selecting recommended product information from the plurality of pieces of product information to be predicted according to each click probability.
7. The product recommendation method of claim 1, the recently interacted product sequence information comprising a recently interacted product ID sequence, the far interacted product sequence information comprising a far interacted product ID sequence,
before performing feature extraction on the product sequence information of the recent interaction and performing vector conversion on the product sequence information of the forward interaction, the method further comprises the following steps:
determining a length of the product ID sequence of the recent interaction and a length of the product ID sequence of the forward interaction;
if the length of the product ID sequence of the recent interaction/the product ID sequence of the forward interaction is smaller than the preset length, zero padding is carried out at the tail end of the product ID sequence of the recent interaction/the product ID sequence of the forward interaction;
removing product IDs outside a preset length from the beginning of the recently interacted product ID sequence/the forward interacted product ID sequence if the length of the recently interacted product ID sequence/the forward interacted product ID sequence is greater than the preset length.
8. The product recommendation method according to claim 1, further comprising, after the obtaining the user's behavior within the preset duration:
and deleting the latest interacted product information in the recently interacted product sequence information.
9. An electronic device, comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the product recommendation method of any one of claims 1-8.
10. A product recommendation device comprising:
the system comprises a first acquisition unit, a second acquisition unit and a third acquisition unit, wherein the first acquisition unit is used for acquiring the behaviors of a user within a preset time length, and the behaviors comprise user information, recently interacted product sequence information and long-term interacted product sequence information;
the second acquisition unit is used for acquiring a plurality of pieces of product information to be predicted;
the combination unit is used for combining the product information to be predicted and the user information to generate corresponding first information for each product information to be predicted;
the cascade unit is used for extracting the characteristics of the recently interacted product sequence information, performing vector conversion on the forward interacted product sequence information, and cascading the extracted characteristic information, the forward interacted product sequence information after the vector conversion and the first information to generate corresponding second information;
and the selecting unit is used for selecting recommended product information from the plurality of pieces of product information to be predicted according to the second information.
CN202110602015.5A 2021-05-31 2021-05-31 Product recommendation method, device and equipment Pending CN113344662A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110602015.5A CN113344662A (en) 2021-05-31 2021-05-31 Product recommendation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110602015.5A CN113344662A (en) 2021-05-31 2021-05-31 Product recommendation method, device and equipment

Publications (1)

Publication Number Publication Date
CN113344662A true CN113344662A (en) 2021-09-03

Family

ID=77473166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110602015.5A Pending CN113344662A (en) 2021-05-31 2021-05-31 Product recommendation method, device and equipment

Country Status (1)

Country Link
CN (1) CN113344662A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018112696A1 (en) * 2016-12-19 2018-06-28 深圳大学 Content pushing method and content pushing system
CN109460514A (en) * 2018-11-02 2019-03-12 北京京东尚科信息技术有限公司 Method and apparatus for pushed information
CN110765260A (en) * 2019-10-18 2020-02-07 北京工业大学 Information recommendation method based on convolutional neural network and joint attention mechanism
CN111294619A (en) * 2020-02-28 2020-06-16 电子科技大学 Long-short term interest modeling method for IPTV field
CN111881343A (en) * 2020-07-07 2020-11-03 Oppo广东移动通信有限公司 Information pushing method and device, electronic equipment and computer readable storage medium
CN111914178A (en) * 2020-08-19 2020-11-10 腾讯科技(深圳)有限公司 Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN112035747A (en) * 2020-09-03 2020-12-04 腾讯科技(深圳)有限公司 Information recommendation method and device
CN112148976A (en) * 2020-09-21 2020-12-29 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018112696A1 (en) * 2016-12-19 2018-06-28 深圳大学 Content pushing method and content pushing system
CN109460514A (en) * 2018-11-02 2019-03-12 北京京东尚科信息技术有限公司 Method and apparatus for pushed information
CN110765260A (en) * 2019-10-18 2020-02-07 北京工业大学 Information recommendation method based on convolutional neural network and joint attention mechanism
CN111294619A (en) * 2020-02-28 2020-06-16 电子科技大学 Long-short term interest modeling method for IPTV field
CN111881343A (en) * 2020-07-07 2020-11-03 Oppo广东移动通信有限公司 Information pushing method and device, electronic equipment and computer readable storage medium
CN111914178A (en) * 2020-08-19 2020-11-10 腾讯科技(深圳)有限公司 Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN112035747A (en) * 2020-09-03 2020-12-04 腾讯科技(深圳)有限公司 Information recommendation method and device
CN112148976A (en) * 2020-09-21 2020-12-29 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Wang et al. Res2Fusion: Infrared and visible image fusion based on dense Res2net and double nonlocal attention models
CN113688304A (en) Training method for search recommendation model, and method and device for sequencing search results
CN112418292B (en) Image quality evaluation method, device, computer equipment and storage medium
CN108984555B (en) User state mining and information recommendation method, device and equipment
CN111260020A (en) Method and device for calculating convolutional neural network
CN109522561B (en) Question and sentence repeated recognition method, device and equipment and readable storage medium
CN110781893A (en) Feature map processing method, image processing method, device and storage medium
CN114926835A (en) Text generation method and device, and model training method and device
CN111738780A (en) Method and system for recommending object
CN112633002A (en) Sample labeling method, model training method, named entity recognition method and device
CN115797818A (en) Video time sequence action nomination generating method and system
CN114708436A (en) Training method of semantic segmentation model, semantic segmentation method, semantic segmentation device and semantic segmentation medium
CN114998583A (en) Image processing method, image processing apparatus, device, and storage medium
CN113592593A (en) Training and application method, device, equipment and storage medium of sequence recommendation model
CN110659701B (en) Information processing method, information processing apparatus, electronic device, and medium
CN111931841A (en) Deep learning-based tree processing method, terminal, chip and storage medium
CN113344662A (en) Product recommendation method, device and equipment
CN110288444B (en) Method and system for realizing user related recommendation
CN110796504B (en) Article recommendation method and device
CN116244442A (en) Text classification method and device, storage medium and electronic equipment
KR102549937B1 (en) Apparatus and method for providing model for analysis of user's interior style based on text data of social network service
CN115454423A (en) Static webpage generation method and device, electronic equipment and storage medium
CN112434527B (en) Keyword determination method and device, electronic equipment and storage medium
CN114493674A (en) Advertisement click rate prediction model and method
CN112669270A (en) Video quality prediction method and device and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination