CN113987360B - Object recommendation method and device, electronic equipment and storage medium - Google Patents

Object recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113987360B
CN113987360B CN202111602055.6A CN202111602055A CN113987360B CN 113987360 B CN113987360 B CN 113987360B CN 202111602055 A CN202111602055 A CN 202111602055A CN 113987360 B CN113987360 B CN 113987360B
Authority
CN
China
Prior art keywords
user
behavior
historical
real
vector
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.)
Active
Application number
CN202111602055.6A
Other languages
Chinese (zh)
Other versions
CN113987360A (en
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.)
Zhejiang Koubei Network Technology Co Ltd
Original Assignee
Zhejiang Koubei Network Technology Co 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 Zhejiang Koubei Network Technology Co Ltd filed Critical Zhejiang Koubei Network Technology Co Ltd
Priority to CN202111602055.6A priority Critical patent/CN113987360B/en
Publication of CN113987360A publication Critical patent/CN113987360A/en
Application granted granted Critical
Publication of CN113987360B publication Critical patent/CN113987360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • 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/044Recurrent networks, e.g. Hopfield networks

Abstract

One or more embodiments of the present specification provide an object recommendation method, apparatus, electronic device, and storage medium, where the method includes: acquiring the ID and the historical characteristics of each object, and generating a characterization vector of the object based on the ID and the historical characteristics; acquiring real-time behaviors of a user, determining a target object aimed at by the user, and acquiring a representation vector of the target object; processing the representation vector of the target object through a neural network to obtain the probability of each object operated by a user; at least one object of the plurality of objects is recommended to the user based on the probability of the user operating the respective object. The characteristic information of the object can be better represented based on the method; the predicted shops in which the user is interested are more accurate, the short-time interest of the user can be better acquired, and the interested object of the user can be recommended to the user, so that the expectation of the user can be better met, and the satisfaction of the user is improved.

Description

Object recommendation method and device, electronic equipment and storage medium
Technical Field
One or more embodiments of the present disclosure relate to the field of deep learning technologies, and in particular, to an object recommendation method, an object recommendation apparatus, an electronic device, and a computer-readable storage medium.
Background
With the development of the internet era and the arrival of the big data era, people gradually move from the information-deficient era to the information-overloaded era. In order to efficiently acquire information in which a user is interested from massive information, the real-time performance and accuracy of object recommendation play a great role. However, the conventional recommendation algorithm does not well reflect the short-term interests of the user represented by the user information, so that the recommended objects do not meet the interests of the user, and the satisfaction degree of the user is reduced.
Disclosure of Invention
In view of this, one or more embodiments of the present disclosure provide an object recommendation method, an apparatus, an electronic device, and a storage medium.
To achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
according to a first aspect of one or more embodiments of the present specification, there is provided an object recommendation method including:
for each object in a plurality of objects, acquiring the ID and the historical characteristics of the object, and generating a characterization vector of the object based on the ID and the historical characteristics of the object;
acquiring real-time behaviors of a user, determining a target object aimed at by the real-time behaviors from the plurality of objects, and acquiring a characterization vector of the target object;
processing the representation vector of the target object through a pre-trained neural network to obtain the probability of each object operated by a user; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object and determines the probability of operating each object by the user based on the predicted characterization vector and the characterization vector of each object;
recommending at least one object in the plurality of objects to the user based on the probability that the user operates each object.
According to a second aspect of one or more embodiments of the present specification, there is provided an object recommendation apparatus including:
the vector generation module is used for acquiring the ID and the historical characteristics of each object in a plurality of objects and generating a characterization vector of the object based on the ID and the historical characteristics of the object;
the vector selection module is used for acquiring real-time behaviors of a user, determining a target object aimed by the real-time behaviors from the plurality of objects and acquiring a representation vector of the target object;
the probability calculation module is used for processing the representation vectors of the target objects through a pre-trained neural network to obtain the probability of each object operated by a user; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object and determines the probability of operating each object by the user based on the predicted characterization vector and the characterization vector of each object;
and the object recommending module recommends at least one object in the plurality of objects to the user based on the probability of operating each object by the user.
According to a third aspect of one or more embodiments of the present specification, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements an object recommendation method by executing the executable instructions;
the method comprises the following steps:
for each object in a plurality of objects, acquiring the ID and the historical characteristics of the object, and generating a characterization vector of the object based on the ID and the historical characteristics of the object;
acquiring real-time behaviors of a user, determining a target object aimed at by the real-time behaviors from the plurality of objects, and acquiring a characterization vector of the target object;
processing the representation vector of the target object through a pre-trained neural network to obtain the probability of each object operated by a user; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object and determines the probability of operating each object by the user based on the predicted characterization vector and the characterization vector of each object;
recommending at least one object in the plurality of objects to the user based on the probability that the user operates each object.
According to a fourth aspect of one or more embodiments of the present specification, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement an object recommendation method;
the method comprises the following steps:
for each object in a plurality of objects, acquiring the ID and the historical characteristics of the object, and generating a characterization vector of the object based on the ID and the historical characteristics of the object;
acquiring real-time behaviors of a user, determining a target object aimed at by the real-time behaviors from the plurality of objects, and acquiring a characterization vector of the target object;
processing the representation vector of the target object through a pre-trained neural network to obtain the probability of each object operated by a user; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object and determines the probability of operating each object by the user based on the predicted characterization vector and the characterization vector of each object;
recommending at least one object in the plurality of objects to the user based on the probability that the user operates each object.
The description pre-calculates the characterization vector of the object based on the ID and the historical characteristics of the object, so that the characteristic information of the object can be better represented, and the generalization expression of the object characteristics is improved; and then, acquiring the real-time behavior of the user, determining and acquiring the characterization vector of the target object, inputting the characterization vector into a pre-trained neural network, outputting the probability of operating each object by the user through the neural network, and recommending the user according to the acquired probability. The stores which are predicted to be interested by the user based on the method are more accurate, the short-time interest of the user can be better acquired, and the interested objects are recommended to the user, so that the expectation of the user is better met, and the satisfaction degree of the user is improved.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and other drawings can be obtained by those skilled in the art according to the drawings.
Fig. 1 is a flowchart of an object recommendation method according to an exemplary embodiment.
Fig. 2 is a flowchart of an object representation vector generation method according to an exemplary embodiment.
FIG. 3 is a flow chart of a neural network training method provided by an exemplary embodiment.
Fig. 4 is a schematic structural diagram of a neural network according to an exemplary embodiment.
Fig. 5 is a schematic structural diagram of an LSTM neural network according to an exemplary embodiment.
Fig. 6 is a block diagram of an object recommendation apparatus according to an exemplary embodiment.
Fig. 7 is a schematic structural diagram of an object recommendation device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of one or more embodiments of the specification, as detailed in the claims which follow.
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Some of the relevant concepts referred to in this specification will first be described:
the ID (Identity document), also called serial number or account number, is a relatively unique code in a certain system.
RNN (Recurrent Neural Network) is a Recurrent Neural Network in which sequence data is input, recursion is performed in the direction of evolution of the sequence, and all nodes are connected in a chain, and each node is a Recurrent unit.
The LSTM (Long-Short Term Memory network) is a time-cycle neural network, is specially designed for solving the Long-Term dependence problem of the general RNN, and a gating mechanism is added in the traditional cycle neural network to realize the screening of the past information, so that the Long-distance dependence problem can be relieved in the time sequence task. Due to the unique design structure, LSTM is suitable for handling and predicting significant events of very long intervals and delays in a time series.
User behavior sequences, user search behavior on objects such as keyword search and scene search, and click behavior such as select, favorites, forward, and comments.
And (4) feature fusion, namely combining the two feature vectors to obtain a single feature vector, wherein the obtained single feature vector has more discriminative power than the two input feature vectors.
The Attention mechanism focuses limited Attention on key information, so that resources are saved, and the most effective information is obtained quickly; the method is used for selecting the weight in the information transmission process in the neural network, and more important information has larger weight.
Word2vec, a group of correlation models used to generate Word vectors. These models are shallow, two-layer neural networks that are trained to reconstruct linguistic word text. After training is completed, the Word2vec model can be used to map each Word to a vector, which can be used to represent the Word-to-Word relationship, and the vector is a hidden layer of the neural network.
The internet is rapidly developed, and human beings gradually move into a big data era and gradually move into an information overload era from an information deficiency era. In the face of the wide variety of information that is overwhelming on the internet, most people do not well decide which information is really of interest. In order to efficiently acquire information of interest to a user from a large amount of information, various object recommendation methods have been proposed to predict information of interest to the user based on historical information of the user. In order to ensure that the predicted result can well meet the expectations of users, the real-time performance and accuracy of the prediction information are very important.
The conventional recommendation algorithm predicts the behavior characteristics of the user after simple processing, the whole prediction processing process is simple and quick to realize, but the short-term interest of the user represented by the user historical information cannot be well reflected by simple operation processing, and the recommended object cannot meet the interest of the user. Because the real-time performance and accuracy of object recommendation are not good, the satisfaction degree of the user is reduced.
In order to solve the above problem, an embodiment of the present specification proposes an object recommendation method, which is shown in fig. 1 and includes the following steps:
step S101: for each object in a plurality of objects, acquiring the ID and the historical characteristics of the object, and generating a characterization vector of the object based on the ID and the historical characteristics of the object.
Step S102: and acquiring the real-time behavior of a user, determining a target object aimed by the real-time behavior from the plurality of objects, and acquiring a characterization vector of the target object.
Step S103: processing the representation vector of the target object through a pre-trained neural network to obtain the probability of each object operated by a user; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object, and determines the probability of the user operating each object based on the predicted characterization vector and the characterization vector of each object.
Step S104: recommending at least one object in the plurality of objects to the user based on the probability that the user operates each object.
The embodiment of the specification is used for recommending objects to a user, wherein the objects can be online take-out shops or offline physical shops such as restaurants and shopping malls, and can also be online virtual objects such as short videos, pushed articles or electronic books. In addition, the method of the embodiment of the present specification may also be used in a social platform to recommend a friend or a group in which the friend is interested to a user, and the like, which is not described herein again.
The embodiment of the specification is used for realizing the analysis of the user interest based on the characteristics of the object, wherein the characteristics of the object can be used as the label of the object in the neural network, such as commodities sold by shops, the category and the duration of short video content, the word number of an electronic book or the age and the hobbies of users on a social platform, and the like. After the characteristics of the object selected by the user are obtained, the characteristics most possibly selected by the user are analyzed, and the object which accords with the characteristics obtained through analysis is called the object interested by the user.
The object recommendation method in the embodiment of the present specification is used in an inference phase of a neural network, where the neural network may be deployed in a server or a client. Firstly, the IDs and the historical characteristics of all objects and the characterization vectors of the objects are stored in a server, then the real-time behaviors of the users are obtained at a client, the target objects which are aimed at by the real-time behaviors of the users are determined, and then the target objects are transmitted back to the server, and the client obtains the characterization vectors of the target objects. If the neural network is deployed in the server, the client transmits the representation vector of the target object back to the neural network in the server for reasoning, then the server returns the probability output by the neural network to the client, and the client recommends the object to the user according to the probability; if the neural network is deployed in the client, the client inputs the characterization vector of the target object into the neural network of the client for reasoning to obtain the probability output by the neural network, and the object is recommended according to the output probability. Because the neural network has a large demand for computing resources, the performance of the client and the server needs to be considered when the neural network is actually deployed, and the consumption of the resources needs to be considered. It will be appreciated that a neural network may also be deployed between the server and the client, both together performing inference of the neural network to make the recommendation of the object.
In the embodiment of the specification, before the prediction is performed by using the neural network, the object is expressed into a vector form, so that the characteristics of the object can be better characterized, and the generalized expression of the characteristics of the object is improved, so that the prediction result obtained by the embodiment of the specification is more accurate. Therefore, the embodiments of the present specification first obtain the ID and the history feature of each object in a plurality of objects, and then generate the token vector of the object according to the obtained ID and history feature of the object.
Various forms are available depending on the ID and historical characteristics of the object. As an example, the following provides a method for generating a characterization vector of an object after acquiring an ID and a history feature of each object, as shown in fig. 2, and the method includes the steps of:
step S201: a first characterization vector for the object is generated based on the ID of the object.
Step S202: generating a second characterization vector for the object based on the historical features of the object.
Step S203: and splicing the first characterization vector and the second characterization vector to obtain a characterization vector for characterizing the object.
Wherein a token vector is a vector expression indicating some characteristic of an object, such as a brand vector or a category vector. Generating a characterization vector of the object according to the ID and the historical characteristics of the object, and dividing the characterization vector into two parts: generating a first characterization vector of the object according to the ID of the object; and then, according to the historical characteristics of the statistical object, normalization is carried out to obtain a second characterization vector of the object, wherein the historical characteristics of the object refer to the characteristics of the analyzed object, and if the updating state of the electronic book obtained at the current moment is finished, the updating state of the electronic book can be directly set to be finished when the updating state of the electronic book is obtained later, and retrieval in the Internet is not needed.
In some embodiments, the splicing of the first token vector and the second token vector means that the features represented by the first token vector and the features represented by the second token vector are fused together, and the adopted method may be a concat method of TensorFlow or a cat function in Pytorch, which is not described herein again.
Taking the generation of a shop representation vector as an example, firstly, acquiring a historical behavior sequence of a user, and then determining an ID set of a shop operated by the historical behavior of the user; and obtaining a brand vector or category vector of the shop by using Word2vec according to the determined ID of the shop. Then, the historical characteristics of the stores are counted, normalization operation is carried out, the historical characteristics of the stores are expressed as floating point numbers between 0 and 1, and second characterization vectors of the stores are obtained; and finally, splicing the two obtained characterization vectors to obtain the characterization vector of the shop.
For predicting the object which is interested by the user, the reference value of the characteristic represented by the behavior of the user with shorter time interval to the current time is more important, so that the effect of predicting by taking the real-time behavior of the user as a sample is better; the real-time behavior of the user refers to the behavior of the user within a period of time from the current time, and the period of time may be one hour, one day, one week or the like. Therefore, in the embodiment of the present specification, the real-time behavior of the user is first obtained, then, the object operated by the user in a short time is determined according to the real-time behavior of the user, and finally, the determined object is used as a sample to predict the object interested by the user. It should be noted that, in the embodiment of the present specification, various information of the user is obtained on the basis of the authorization of the user.
In predicting an object of interest of a user, the reference value of the behavior of the user that is shorter from the current time is generally higher. Therefore, the weights occupied by the behaviors in the user's historical behavior sequence, which refers to the operation performed by the user on the object, are actually different. In some embodiments, after obtaining the behavior sequence of the user, the obtained behavior sequence of the user is combined with the Attention mechanism. The historical behaviors of the user are input into the neural network, then the attention weight of each behavior of the user is calculated, the input historical behaviors of the user are correspondingly processed according to the calculated attention weight, so that the characteristics really interested by the user can be well predicted, the recommended object can meet the expectation of the user, the processed information amount can be reduced, and the required computing resources are reduced.
In the object recommendation process, the user can directly click the object to operate, and can also search for the object and then operate. Therefore, the user behavior as a sample can be classified into two kinds of click behavior and search behavior. It is understood that both behaviors of the user may be used together as a user sample, or only one of the behaviors may be used as a user sample, which does not affect the implementation of the method of the present specification.
When the click behavior of the user is taken as a user sample, the embodiment of the specification firstly obtains the real-time click behavior of the user, then determines the ID of an object operated by the real-time click behavior of the user, and finally determines the representation vector of the object operated by the real-time click behavior of the user according to the determined ID of the object.
In some embodiments, a token vector of an object is first pushed into a storage system, wherein the token vector of the object is used to describe features of the object; then, acquiring an ID list of an object operated by a real-time click behavior of a user, wherein the IDs of the objects are arranged according to a time sequence; and finally, according to the obtained ID list of the object, finding the characterization vector corresponding to the object in the storage system to obtain the characterization vector of the object which is clicked by the user for behavior operation in real time.
When a search behavior of a user is taken as a user sample, the embodiment of the present specification first obtains a keyword and a scene input by a user in real-time search, determines an ID of an object operated by the user in real-time search behavior based on the keyword and the scene, and then determines a characterization vector of the object operated by the real-time search behavior according to the determined ID of the object.
In some embodiments, the token vector of the object is first pushed into the indexing system as a positive field that can be recalled online; then, recalling based on keywords and scenes in the user search behavior to obtain the ID of the object, and then obtaining the characterization vector of the object operated by the user search behavior through an index system.
It can be understood that, the characterization vectors of the objects obtained in the above two embodiments are input into the neural network as the sample of the user, and the object interested by the user is predicted, so that the features of the object can be better and more comprehensively described, and the prediction result obtained based on the features is more accurate. The two characterization vectors can be spliced and input into the neural network, or the two vectors can be directly used as two inputs of the neural network for processing.
Taking an application scenario in which the object recommendation is applied to the social platform as an example, assuming that the object includes 5 chat groups, identification information of each chat group is respectively marked as 1, 2, 3, 4, and 5, the historical behavior of the user acquired on the basis of the user authorization includes clicking 2 chat groups, searching 1 chat group, and specifically describing the step of acquiring the neural network sample. Wherein, the labels of the chat group 1 are "MOBA game, hand game and 00 post", the labels of the chat group 2 are "business game, hand game, 00 post and end game", the labels of the chat group 3 are "end game, hand game, 90 post and martial art", the labels of the chat group 4 are "movie, scenario and entertainment", the labels of the chat group 5 are "food, tour and landscape", the 2 chat group clicked by the user are chat groups 1 and 2, the labels of the chat groups are "MOBA game, hand game and 00 post", and "business game, hand game, 00 post and end game", the 1 chat group searched is chat group 3, the search keyword is "martial art", and the labels of the chat group are "end game, hand game, 90 post and martial art".
When the click behavior of the user is taken as a user sample, the 5 chat groups and the tags of the chat groups are pushed to the storage system. And then acquiring the real-time click behavior of the user, and determining the ID of the chat groups 1 and 2 to which the real-time click behavior of the user aims. The labels of the chat groups 1 and 2 are found in the storage system according to the IDs of the chat groups 1 and 2 as "MOBA game, hand trip and 00 post", "operation game, hand trip, 00 post and end trip", respectively, and then it is determined that the sample of the user is "MOBA game, 00 post, operation game, hand trip and end trip".
When the search behavior of the user is taken as a user sample, the 5 chat groups and the tags of the chat groups are pushed to the index system. And then acquiring a keyword 'martial arts' in the search behavior of the user to obtain the ID of the chat group 3, finding a label of the chat group 3 in the indexing system according to the ID of the chat group 3, and then determining that the sample of the user is 'end-play, hand-play, post-90 and martial art'.
When the clicking behavior and the searching behavior of the user are analyzed together to be used as the user sample, the two steps of determining the user sample are executed, and then the obtained samples of the two users are spliced into one sample, wherein the sample comprises 'MOBA game, post 00, operation game, hand game, end game, post 90 game and martial art'.
The above embodiment is a simple example of processing the characteristics of the object in the obtained neural network sample, the characteristics of the chat group take the label of the chat group as an example, and the characteristics of the actual chat group may further include the number of people in the chat group, the gender ratio, and the regional distribution and the activity degree of the members, which are not described herein again. Meanwhile, the actual processing procedure for the characteristics of the object is not just to combine the characteristics, and for example, the characteristics of the game can be derived from the characteristics of the music game and the characteristics of the developed game, the characteristics after 90 and the characteristics after 00 can be derived from the characteristics after 90 and the characteristics after 00, and the characteristics of the sweet food can be derived from the characteristics of the chocolate and the characteristics of the milky tea.
After a target object operated by a user is determined, the determined target object is processed by using a pre-trained neural network, the neural network can predict an object interested by the user according to the determined target object, and then the probability of possible operation of each object by the user is determined according to the predicted object interested by the user.
The embodiment of the specification uses a neural network for prediction, and the used neural network needs to be trained in advance. By way of example, the following provides an embodiment of a method of training a neural network, as shown in fig. 3, the method steps comprising:
step S301: and acquiring a historical behavior sequence of the user on the object.
Step S302: and associating the historical behavior sequence with an operation log of the user.
Step S303: and training the neural network by using the associated historical behavior sequence and an operation log of a user.
Wherein the operation log includes at least one of a search log and a click log. In some embodiments, when a historical behavior sequence of an object by a user is obtained, each behavior is marked to distinguish whether an operation on the object is generated by searching or guiding. In this way, the operation log of the user is associated, and a history behavior sequence after association can be obtained, wherein each behavior marks the operation object and the operation mode of the behavior.
Referring to fig. 4, an embodiment of the present disclosure provides a schematic structural diagram of a neural network; wherein f is0Is a characterization vector of the object of interest to the user predicted by the neural network; f. of1、f2、f3And f4Respectively, the characterization vectors for objects 1, 2, 3, and 4; objects 1, 2, 3, and 4 represent objects that the user has operated at some point in the past, respectively. It will be appreciated that objects 1, 2, 3 and 4 may be identical or different. The neural network of the embodiment of the present specification predicts a characterization vector of a vector in which a user is interested based on a characterization vector of an object operated by the user at a past time, and then determines a probability of operating each object by the user according to the predicted characterization vector.
In some embodiments, the neural network in this specification is divided into two sub-networks, behavior prediction and probability prediction; the behavior prediction sub-network is used for predicting the characterization vectors of the objects interested by the user based on the characterization vectors of the objects targeted by the real-time behaviors of the user, and the probability prediction sub-network determines and obtains the probability of each object operated by the user based on the characterization vectors of the objects interested by the user. Compared with the situation of the original neural network, when the object recommendation method is carried out, the method of the embodiment of the specification allows two sub-networks to operate respectively, and when the object recommendation method is carried out, the probability prediction can be carried out for many times only by carrying out the behavior prediction once without carrying out the behavior prediction once before each probability prediction, so that the time spent for predicting the whole neural network is reduced, and the time spent for scoring the neural network model in the embodiment of the specification is reduced. In some embodiments, the higher the score is, the higher the probability that the user selects the object is. For example, if 5 short videos are recommended, the features of the short videos, which are interested by the user, need to be predicted once before calculating the probability of the user operating each short video, the features, which are interested by the user, need to be predicted 5 times in total, and then the predicted features, which are interested by the user, are used to compare with the 5 short videos, which need to be compared 5 times in total; the embodiment of the specification can compare the characteristics of the short videos with the characteristics of 5 short videos by only predicting the characteristics of interest of the user once, and saves the characteristics of the short videos in which the user is interested for 4 times in comparison.
It should be noted that the neural network in the embodiment of the present disclosure may be an LSTM neural network, and may also be a GRU neural network, which is not limited herein. It is to be understood that the script for constructing the neural network is also not limited, and may be TensorFlow or PyTorch, which is not described herein again. The LSTM neural network is a special recurrent neural network, and has a hidden layer unit which is responsible for extracting information of the current time and filtering information of past time and outputting generated new information. LSTM neural network, see FIG. 5, XtIs the input of the neural network at time t, htThe output of the neural network at the time t, A represents the main body of the neural network, and the main body is provided with a ring pointing to the main body, which indicates that the information processed at the current time can be transmitted to the next time for use. Expanding the neural network on the left side of the equal sign to obtain a chain-shaped neural network on the right side of the equal sign; wherein, X0、X1、X2T is the input of the neural network at 0, 1 and 2 times, h0、h1And h2The outputs of the neural network at times t taken as 0, 1 and 2, respectively.
The above-mentioned steps of training the neural network will be specifically described by taking 4 takeoffs h, i, j, and k as examples of recommended objects. The information obtained on the basis of the user authorization comprises food which is purchased by the user once and sold h, food which is searched and purchased by the user once and sold i, food which is searched and sold j but not purchased, and no operation k.
Firstly, constructing a click behavior sequence of the user to 4 shops based on the historical behavior sequence of the user, wherein whether each click behavior is a click generated by guiding the user through searching is marked. And obtaining a click behavior sequence of the user, wherein the click behavior sequence comprises purchase takeoffs h and i, and the takeoffs i comprise search behaviors. And associating the obtained user click behavior sequence with the operation log of the user to obtain the associated behavior sequence of the user, wherein the object of each behavior operation of the user and the operation mode are marked. The associated sequence of user actions includes the food that the user has purchased take h, the food that has been searched and purchased take i, the food that has been searched but not purchased take j, and the relationship between these actions, such as chronological order. And finally, inputting the associated user behavior sequence serving as training data into an LSTM neural network constructed by a TensorFlow script for training.
The neural network is divided into a behavior prediction sub-network and a probability prediction sub-network, and the behavior prediction sub-network can predict and obtain a characterization vector of a shop in which a user is interested based on the correlated user behavior sequence; the probability prediction sub-network compares the representation vector of the shop which is predicted to be interested by the user with the representation vectors of 4 shops, and then obtains the probability of the user operating the 4 shops according to the similarity between the predicted representation vector and the representation vectors of the 4 shops.
And finally, according to the probability of each object operated by the user and output by the neural network, operating a corresponding object from the multiple objects and recommending the corresponding object to the user. The following two recommendation methods are provided, a plurality of objects are ranked according to the probability of each object operated by a user from high to low, and ranking results are sequentially recommended to the user; or presetting a probability threshold value, and then recommending the object with the probability of the user operation object larger than the threshold value to the user. It can be understood that there are many ways to recommend to the user based on the probability of the object, and the description is not repeated herein.
Before predicting the behavior of the user, the method calculates in advance to obtain a characterization vector of the object based on the ID and the historical characteristics of the object, so that the characteristic information of the object can be better represented, the generalized expression of the characteristics of the object is improved, and the accuracy of the prediction result of the embodiment of the method is improved; and then, acquiring the real-time behavior of the user, determining and acquiring the characterization vector of the target object, inputting the characterization vector into a pre-trained neural network, outputting the probability of operating each object by the user through the neural network, and recommending the user according to the acquired probability. The stores which are predicted to be interested by the user based on the method are more accurate, the short-time interest of the user can be better acquired, and the interested objects are recommended to the user, so that the expectation of the user is better met, and the satisfaction degree of the user is improved.
The general flow of the embodiments of the present specification is described below by a specific embodiment:
with the objects as 5 stores: a. b, c, d, and e, where stores c and d are stores with the same characteristics and stores c and e are stores with different characteristics. Firstly, training a neural network by using sample data, wherein the specific process is to obtain historical behavior sequences of a user to 5 shops; and associating the historical behavior sequence of the user with an operation log obtained based on user authorization. And finally, training an LSTM neural network constructed by the TensorFlow script by using the associated historical behavior sequence and the operation log of the user.
Meanwhile, dividing the LSTM neural network into a behavior prediction sub-network and a probability prediction sub-network; the behavior prediction sub-network predicts the characterization vectors of the stores in which the user is interested based on the associated user behavior sequences, the probability prediction sub-network compares the predicted characterization vectors of the stores in which the user is interested with the characterization vectors of 5 stores, and then the probability of the user operating the 5 stores is obtained according to the similarity between the predicted characterization vectors and the characterization vectors of the 5 stores. The higher the similarity between the predicted characterization vector and the characterization vector of the shop, the higher the probability that the user operates the shop.
Based on the operation, the LSTM neural network is trained in advance and is divided into two sub-networks, the two sub-networks are allowed to operate respectively, and multiple probability predictions can be realized only by performing behavior prediction once. Compared with the method that one user behavior prediction is carried out before one LSTM network predicts the shop probability of the user operation each time, the time spent on predicting the 5 shops is changed from the time spent on the five times of behavior prediction plus the time spent on the five times of probability prediction to the time spent on the one time of behavior prediction plus the time spent on the five times of probability prediction, and the time spent on predicting the 5 shops by the LSTM neural network is reduced.
And after the training is finished, analyzing the real-time behavior of the user by using the trained LSTM neural network, thereby recommending the shop for the user. Firstly, acquiring an ID and historical characteristics of each shop for 5 shops, and generating a characterization vector of each shop based on the ID and the historical characteristics of each shop, wherein the specific process comprises the steps of firstly acquiring a historical behavior sequence of a user for 5 shops, and then determining an ID set of the shop operated in the historical behaviors of the user; based on the determined ID of the store, a first characterization vector of the store, such as a brand vector and a category vector, is obtained using Word2 vec. Then, the historical characteristics of the stores are counted, normalization operation is carried out, the historical characteristics of the stores are expressed as floating point numbers between 0 and 1, and second characterization vectors of the stores are obtained; and finally, splicing the two obtained characterization vectors to obtain the characterization vector of the shop.
After the token vectors of the stores are obtained, the real-time behaviors of the users are obtained, and the following examples of the real-time behaviors of the users include clicking the store a, searching the store b, and purchasing the store c. After the real-time behaviors of the user are acquired, target shops a, b and c aiming at the real-time behaviors of the user are determined from the 5 shops. Then, token vectors of the target stores a, b and c are obtained.
After the characterization vectors of the target shops a, b and c are obtained, the characterization vectors of the target shops a, b and c are processed by using the LSTM neural network trained in advance, and the probability that the user operates 5 shops is obtained; the LSTM neural network predicts the characterization vectors of the stores interested by the user based on the characterization vectors of the target stores, and compares the predicted characterization vectors with the characterization vectors of 5 stores to determine the probability of the user operating the 5 stores. To output that the probability that the user operates 5 stores is store a: 32%, store b: 56%, store c: 75%, store d: 64%, store e: the following describes a method of recommending an example in the present specification by taking 10% as an example.
After the 5-shop probability of the user operation is obtained, at least one shop of the 5 shops is recommended to the user based on the probability of the 5 shops of the user operation. Two modes of recommending shops to the user are introduced, a plurality of shops are ranked according to the probability of operating each shop by the user from high to low, and ranking results are sequentially recommended to the user, specifically, shops c, d, b, a and e are sequentially recommended to the user; or presetting a threshold value 50% of the probability, and then recommending the shops c, d and b with the probability that the shop is operated by the user and is greater than the threshold value to the user.
Based on the operation, the recommendation is carried out to the user based on 5 shops, the effect of recommending the shops is more consistent with the expectation of the user, the satisfaction degree of the user to the recommendation shops can be improved, and meanwhile, the time spent on predicting the 5 shops is reduced due to the fact that the LSTM neural network is divided into the behavior prediction sub-network and the probability prediction sub-network.
Accordingly, an embodiment of the present specification further provides an object recommendation apparatus, as shown in fig. 6, the apparatus includes:
a vector generation module 601, configured to obtain, for each object in a plurality of objects, an ID and a history feature of the object, and generate a characterization vector of the object based on the ID and the history feature of the object;
a vector selection module 602, configured to obtain a real-time behavior of a user, determine a target object targeted by the real-time behavior from the multiple objects, and obtain a characterization vector of the target object;
the probability calculation module 603 is configured to process the characterization vectors of the target objects through a pre-trained neural network to obtain probabilities of the user operating each object; the neural network predicts the characterization vector of the object in which the user is interested based on the characterization vector of the target object and determines the probability of operating each object by the user based on the predicted characterization vector and the characterization vector of each object;
an object recommendation module 604 that recommends at least one object of the plurality of objects to a user based on the probability that the user operates the respective object.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
FIG. 7 is a schematic block diagram of an electronic device for object recommendation provided in an exemplary embodiment. Referring to fig. 7, at the hardware level, the apparatus includes a processor 702, an internal bus 704, a network interface 706, a memory 708, and a non-volatile storage 710, but may also include hardware required for other services. One or more embodiments of the present description may be implemented in software, for example, by the processor 702 reading a corresponding computer program from the non-volatile storage 710 into the memory 708 and then running. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
The embodiments of the present specification further provide a computer-readable storage medium for object recommendation, on which a computer program is stored, and the computer program, when executed by a processor, implements the method according to any of the foregoing embodiments.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.

Claims (9)

1. A method of object recommendation, the method comprising:
for each object in a plurality of objects, acquiring the ID and the historical characteristics of the object, generating a characterization vector of the object based on the ID and the historical characteristics of the object, and storing the ID of the object and the corresponding characterization vector in a first system;
the real-time behavior of a user is obtained, the first system is utilized to determine a target object aimed at by the real-time behavior, after a characterization vector of the target object is obtained, a behavior predictor neural network is utilized to predict a characterization vector of an object of interest of the user;
obtaining the characterization vectors of a plurality of historical operation objects of the user by using the first system, and determining the probability of each historical operation object operated by the user by using the predicted characterization vectors and the characterization vectors of the historical operation objects by using a probabilistic predictor neural network; the neural network is trained by using a historical behavior sequence which is marked with each historical operation object and the operation mode of the historical operation object, the historical behavior sequence is obtained by associating a click behavior sequence of the operation object by a user with an operation log of the user, and the click behavior sequence is marked to indicate whether click behaviors are generated by search guidance or not;
and recommending at least one object in the plurality of historical operation objects to the user based on the probability of the user operating each historical operation object.
2. The method of claim 1, the generating a characterization vector for the object based on the ID and historical features of the object, comprising:
generating a first characterization vector for the object based on the ID of the object;
generating a second characterization vector for the object based on the historical features of the object;
and splicing the first characterization vector and the second characterization vector to obtain a characterization vector for characterizing the object.
3. The method of claim 1, the real-time behaviors comprising a user real-time click behavior and a user real-time search behavior.
4. The method of claim 3, determining a target object for which the real-time behavior is intended from the plurality of objects, obtaining a characterization vector for the target object, comprising:
determining the ID of an object for which the real-time clicking behavior of the user aims;
and acquiring a characterization vector of the object for which the real-time click behavior of the user is specific based on the ID of the object for which the real-time click behavior of the user is specific.
5. The method of claim 3, determining a target object for which the real-time behavior is intended from the plurality of objects, obtaining a characterization vector for the target object, comprising:
determining the ID of an object aimed at by the user real-time search behavior based on keywords and scenes in the user real-time search behavior;
and acquiring a characterization vector of the object for which the real-time search behavior of the user is directed based on the ID of the object for which the real-time search behavior of the user is directed.
6. The method of claim 1, the recommending at least one of the plurality of objects to a user based on the probability of the user operating the respective object, comprising:
and sequentially recommending the information of each object in the objects to the user based on the probability of operating each object by the user.
7. An object recommendation apparatus, the apparatus comprising:
the system comprises a vector generation module, a first system and a second system, wherein the vector generation module is used for acquiring the ID and the historical characteristics of each object in a plurality of objects, generating the characterization vector of the object based on the ID and the historical characteristics of the object, and storing the ID and the corresponding characterization vector of the object in the first system;
the vector selection module is used for acquiring the real-time behavior of the user, determining a target object aimed at by the real-time behavior by using the first system, and predicting the characterization vector of the object of interest of the user by using the behavior predictor neural network after acquiring the characterization vector of the target object;
the probability calculation module is used for acquiring the characterization vectors of a plurality of historical operation objects of the user by using the first system, and determining the probability of operating each historical operation object by the user by using the predicted characterization vectors and the characterization vectors of the historical operation objects by using a probability predictor neural network; the neural network is trained by using a historical behavior sequence marked with each historical operation object and the operation mode of the historical operation object, the historical behavior sequence is obtained by associating a click behavior sequence of a user on the operation object with an operation log of the user, and the click behavior sequence marks whether click behaviors are generated through search guidance or not;
and the object recommending module recommends at least one object in the plurality of historical operation objects to the user based on the probability that the user operates each historical operation object.
8. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1 to 6 by executing the executable instructions.
9. A storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 6.
CN202111602055.6A 2021-12-24 2021-12-24 Object recommendation method and device, electronic equipment and storage medium Active CN113987360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111602055.6A CN113987360B (en) 2021-12-24 2021-12-24 Object recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111602055.6A CN113987360B (en) 2021-12-24 2021-12-24 Object recommendation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113987360A CN113987360A (en) 2022-01-28
CN113987360B true CN113987360B (en) 2022-05-17

Family

ID=79734308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111602055.6A Active CN113987360B (en) 2021-12-24 2021-12-24 Object recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113987360B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765392A (en) * 2019-09-16 2020-02-07 浙江口碑网络技术有限公司 Data loading method and device, storage medium and terminal
CN111898033A (en) * 2020-08-27 2020-11-06 深圳市欢太科技有限公司 Content pushing method and device and electronic equipment
CN112463991A (en) * 2021-02-02 2021-03-09 浙江口碑网络技术有限公司 Historical behavior data processing method and device, computer equipment and storage medium
CN112837106A (en) * 2019-11-22 2021-05-25 上海哔哩哔哩科技有限公司 Commodity recommendation method and device and computer equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190340503A1 (en) * 2018-05-07 2019-11-07 Ebay Inc. Search system for providing free-text problem-solution searching
CN108596693B (en) * 2018-05-14 2021-03-02 浙江口碑网络技术有限公司 Shop matching method and device
CN110309427B (en) * 2018-05-31 2023-03-10 腾讯科技(深圳)有限公司 Object recommendation method and device and storage medium
CN109299396B (en) * 2018-11-28 2020-11-06 东北师范大学 Convolutional neural network collaborative filtering recommendation method and system fusing attention model
CN110930219B (en) * 2019-11-14 2022-10-18 电子科技大学 Personalized merchant recommendation method based on multi-feature fusion
CN111159564A (en) * 2019-12-31 2020-05-15 联想(北京)有限公司 Information recommendation method and device, storage medium and computer equipment
CN111310056B (en) * 2020-03-11 2023-04-14 深圳市雅阅科技有限公司 Information recommendation method, device, equipment and storage medium based on artificial intelligence
CN112597395A (en) * 2020-12-28 2021-04-02 上海众源网络有限公司 Object recommendation method, device, equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110765392A (en) * 2019-09-16 2020-02-07 浙江口碑网络技术有限公司 Data loading method and device, storage medium and terminal
CN112837106A (en) * 2019-11-22 2021-05-25 上海哔哩哔哩科技有限公司 Commodity recommendation method and device and computer equipment
CN111898033A (en) * 2020-08-27 2020-11-06 深圳市欢太科技有限公司 Content pushing method and device and electronic equipment
CN112463991A (en) * 2021-02-02 2021-03-09 浙江口碑网络技术有限公司 Historical behavior data processing method and device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Recurrent Knowledge Attention Network For Movie Recommendation;YiHua Cheng,等;《2020 3rd International Conference on Electron Device and Mechanical Engineering (ICEDME)》;20200622;第648-651页 *
一种基于深度偏好网络的点击率预估模型的设计与评价;王学斌;《中国优秀硕士学位论文全文数据库信息科技辑》;20190915;第2-42页 *

Also Published As

Publication number Publication date
CN113987360A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
CN111061946B (en) Method, device, electronic equipment and storage medium for recommending scenerized content
CN110717098B (en) Meta-path-based context-aware user modeling method and sequence recommendation method
Li et al. Next and next new POI recommendation via latent behavior pattern inference
CN111506820B (en) Recommendation model, recommendation method, recommendation device, recommendation equipment and recommendation storage medium
CN111159564A (en) Information recommendation method and device, storage medium and computer equipment
CN112989169B (en) Target object identification method, information recommendation method, device, equipment and medium
CN113191838B (en) Shopping recommendation method and system based on heterogeneous graph neural network
CN111506821B (en) Recommendation model, recommendation method, recommendation device, recommendation equipment and recommendation storage medium
CN113515690A (en) Training method of content recall model, content recall method, device and equipment
CN115687690A (en) Video recommendation method and device, electronic equipment and storage medium
CN115618101A (en) Streaming media content recommendation method and device based on negative feedback and electronic equipment
CN113656699B (en) User feature vector determining method, related equipment and medium
CN116843376A (en) Marketing effect prejudging method, marketing effect prejudging device, storage medium and marketing effect prejudging equipment
CN113987360B (en) Object recommendation method and device, electronic equipment and storage medium
Huang et al. A time-aware hybrid approach for intelligent recommendation systems for individual and group users
Meng et al. Variational Bayesian representation learning for grocery recommendation
CN112035740A (en) Project use duration prediction method, device, equipment and storage medium
Gafoor et al. KNN based Entertainment Enhancing System
Kuzmin Item2vec-based approach to a recommender system
US11966405B1 (en) Inferring brand similarities using graph neural networks and selection prediction
Liu et al. An improved matrix factorization model under multidimensional context situation
CN116028617B (en) Information recommendation method, apparatus, device, readable storage medium and program product
Ali et al. Identifying and Profiling User Interest over time using Social Data
Sridhar et al. Extending Deep Neural Categorisation Models for Recommendations by Applying Gradient Based Learning
CN115391489A (en) Topic recommendation method based on knowledge graph

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
GR01 Patent grant
GR01 Patent grant