CN113505215A - Product recommendation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113505215A
CN113505215A CN202110740749.XA CN202110740749A CN113505215A CN 113505215 A CN113505215 A CN 113505215A CN 202110740749 A CN202110740749 A CN 202110740749A CN 113505215 A CN113505215 A CN 113505215A
Authority
CN
China
Prior art keywords
vector
user
short
target
term
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.)
Granted
Application number
CN202110740749.XA
Other languages
Chinese (zh)
Other versions
CN113505215B (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.)
Beijing Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN202110740749.XA priority Critical patent/CN113505215B/en
Publication of CN113505215A publication Critical patent/CN113505215A/en
Application granted granted Critical
Publication of CN113505215B publication Critical patent/CN113505215B/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/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/335Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • General Business, Economics & Management (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a product recommendation method, a product recommendation device, electronic equipment and a storage medium. The method comprises the steps of confirming a target user and a target commodity; acquiring a commodity browsing record of the target user according to the target user; generating a short-term memory vector and a long-term memory vector of the target user according to the commodity browsing record; calculating the love degree of the target user to the target commodity by using a knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity; and recommending the target commodity for the target user according to the love degree. By adopting the scheme provided by the invention, the long-term and short-term preference of the user can be considered when recommending the product for the user, and the recommendation is more accurate.

Description

Product recommendation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a product recommendation method and apparatus, an electronic device, and a storage medium.
Background
With the rapid development of science and information technology, society enters a highly information-oriented era, and the information presentation in the network is exponentially increased due to the rapid development of the internet and the appearance of the internet of things. Electronic commerce and big data concepts are receiving widespread attention from all over the world. As a new technical revolution, how to fully utilize big data and how to quickly and effectively extract valuable information in a big data environment is a popular topic at present, and the best tool for solving the problem is a recommendation system.
At present, the traditional recommendation algorithms, especially the recommendation algorithms based on knowledge graph, all belong to static recommendation, that is, it is assumed that the preference of the user is not changed for a long time, and the preference change of the user is not considered. In real life, the user preference and the commodity popularity are dynamic rather than static along with the time, and the user preference is influenced by some behaviors in a short time, so that the short-term preference of the user is not considered in the conventional recommendation algorithm, and the recommendation effect is poor.
Disclosure of Invention
In order to solve the related technical problems, embodiments of the present invention provide a product recommendation method, apparatus, electronic device, and storage medium.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a product recommendation method, which comprises the following steps:
confirming a target user and a target commodity;
acquiring a commodity browsing record of a target user according to the target user;
generating a short-term memory vector and a long-term memory vector of a target user according to the commodity browsing record;
calculating the preference degree of the target user to the target commodity by using the knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity;
and recommending the target commodity for the target user according to the love degree.
In the above scheme, generating the short-term memory vector and the long-term memory vector of the target user according to the commodity browsing record includes:
acquiring a click record vector of the target user according to the commodity browsing record;
and generating a short-term memory vector of the target user and a long-term memory vector of the target user according to the click record vector.
In the above scheme, generating the short-term memory vector of the target user according to the click record vector includes:
acquiring a first model parameter;
generating a first input parameter according to the click record vector and the first model parameter;
inputting the first input parameter into an attention mechanism to obtain a first output result;
and carrying out weighted average on the first output result by utilizing an average pooling layer of the model to obtain a short-term memory vector.
In the above scheme, generating the long-term memory vector of the target user according to the click record vector includes:
acquiring a second model parameter;
generating a second input parameter according to the click record vector and the second model parameter;
inputting the second input parameter into an attention mechanism to obtain a second output result;
and carrying out weighted average on the second output result by utilizing an average pooling layer of the model to obtain a long-term memory vector.
In the above scheme, determining the target user's liking degree for the target commodity based on the short-term memory vector, the long-term memory vector and the target commodity by using the knowledge graph comprises:
acquiring an article vector corresponding to a target commodity;
acquiring a user short-term article vector and a user long-term article vector by using a knowledge map based on the short-term memory vector, the long-term memory vector and the article vector;
generating a user representation vector based on the user short-term item vector and the user long-term item vector;
and determining the likeness of the target user to the target commodity based on the user representation vector.
In the above scheme, obtaining the user short-term item vector and the user long-term item vector based on the short-term memory vector, the long-term memory vector, and the item vector using the knowledge graph includes:
inputting the article vector into a knowledge graph to obtain a triple node vector of a target commodity;
acquiring a user short-term article vector by using an attention mechanism according to the triple node vector, the short-term memory vector and the third model parameter;
and acquiring the long-term article vector of the user by using an attention mechanism according to the triple node vector, the long-term memory vector and the third model parameter.
In the above scheme, generating the user representation vector based on the user short-term item vector and the user long-term item vector includes:
and performing head-to-tail splicing on the user short-term article vector and the user long-term article vector to generate a user representation vector.
An embodiment of the present invention further provides a product recommendation device, where the product recommendation device includes:
the confirmation module is used for confirming the target user and the target commodity;
the acquisition module is used for acquiring a commodity browsing record of a target user according to the target user;
the generating module is used for generating a short-term memory vector and a long-term memory vector of a target user according to the commodity browsing record;
the calculation module is used for calculating the love degree of the target user to the target commodity by utilizing the knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity;
and the recommending module is used for recommending the target commodity for the target user according to the love degree.
An embodiment of the present invention further provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor; wherein,
the processor is adapted to perform the steps of any of the methods described above when running the computer program.
The embodiment of the invention also provides a storage medium, wherein a computer program is stored in the storage medium, and when the computer program is executed by a processor, the steps of any one of the methods are realized.
The product recommendation method, the product recommendation device, the electronic equipment and the storage medium provided by the embodiment of the invention confirm the target user and the target commodity; acquiring a commodity browsing record of a target user according to the target user; generating a short-term memory vector and a long-term memory vector of a target user according to the commodity browsing record; calculating the preference degree of the target user to the target commodity by using the knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity; and recommending the target commodity for the target user according to the love degree. By adopting the scheme provided by the invention, the long-term and short-term preference of the user can be considered when recommending the product for the user, and the recommendation is more accurate.
Drawings
FIG. 1 is a flowchart illustrating a product recommendation method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a product recommendation process according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a product recommendation device according to an embodiment of the present invention;
fig. 4 is an internal structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
An embodiment of the present invention provides a product recommendation method, as shown in fig. 1, the method includes:
step 101: confirming a target user and a target commodity;
step 102: acquiring a commodity browsing record of the target user according to the target user;
step 103: generating a short-term memory vector and a long-term memory vector of the target user according to the commodity browsing record;
step 104: calculating the love degree of the target user to the target commodity by using a knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity;
step 105: and recommending the target commodity for the target user according to the love degree.
Specifically, in different application scenarios, the meaning of the target commodity is different. For example, in a short video scene, the target good may refer to a short video that the user is able to view. In an e-market scenario, the target item may refer to an item that the user is able to purchase.
Here, the target user refers to a user for whom the recommendation system recommends a commodity, and the target commodity refers to a commodity for which it is to be determined whether to recommend the target user. After the target user and the target commodity are determined, the method of the embodiment can effectively determine the favorite program of the target user on the target commodity, so that whether the target commodity is recommended to the target user is determined based on the favorite program of the target user on the target commodity. For example, in the short video platform, based on the user a's preference for the short video B, it is determined whether to recommend the short video B for the user a. For another example, in the e-commerce platform, based on the degree of preference of the user C for the commodity D, it is determined whether to recommend the commodity D for the user C.
Further, in an embodiment, the generating the short-term memory vector and the long-term memory vector of the target user according to the product browsing record includes:
acquiring a click record vector of the target user according to the commodity browsing record;
and generating a short-term memory vector of the target user and a long-term memory vector of the target user according to the click record vector.
Here, the click record vector of the target user may be obtained from the product browsing record using the following formula (1):
Sshort=(x1,x2,…,xT) Formula (1)
Wherein S isshortRepresents the click record vector, T represents the length of the record that the user has clicked recently, xi∈RdRepresenting a vector for the features of the record clicked by the ith user, wherein the vector is embedded into the layer (one-hot embedded) through a single neural networkng) is obtained.
Further, in an embodiment, the generating a short-term memory vector of the target user according to the click record vector comprises:
acquiring a first model parameter;
generating a first input parameter according to the click record vector and the first model parameter;
inputting the first input parameter into an attention mechanism to obtain a first output result;
and carrying out weighted average on the first output result by utilizing an average pooling layer of the model to obtain a short-term memory vector.
Specifically, the short-term memory vector can be obtained using the following equation (2):
Hshort=MeanPooling(Attention(Qshort,Kshort,Vshort))
where Qshort=SshortWQ,,Kshort=SshortWK,,Vshort=SshortWV
WQ∈RdXd,WV∈RdXd,WK∈RdXdformula (2)
Wherein Hshort∈RdRepresenting a short-term memory vector, as a d-dimensional vector, WQ,WV,WKRepresenting the first model parameters as a d x d dimensional matrix, which is optimized during the model training process, Qshort,Kshort,VshortRepresenting a first input parameter, Attention representing an Attention mechanism function, MenPooling representing an average pooling layer function, SshortRepresenting a click record vector.
Here, by WQ,WV,WKThe three matrices respectively calculate Qshort,KshortAnd VshortAs input to the Attention mechanism (Attention). Finally, the output of the attention mechanism is weighted and averaged by an averaging pooling layer (MeanPooling) and combined into a d-dimensional vector called Hshort
In one embodiment, the generating a long-term memory vector of the target user according to the click record vector comprises:
acquiring a second model parameter;
generating a second input parameter according to the click record vector and the second model parameter;
inputting the second input parameter into an attention mechanism to obtain a second output result;
and carrying out weighted average on the second output result by utilizing an average pooling layer of the model to obtain a long-term memory vector.
Specifically, the long-term memory vector can be obtained using the following equation (3):
Figure BDA0003141912700000061
wherein Hlong∈RdRepresents a long-term memory vector, is a d-dimensional vector,
Figure BDA0003141912700000062
is a three matrix, which is optimized during model training, Mu∈RK×DThe long-term memory matrix for the user, a matrix of k rows and d columns, is also optimized during the model training process,
Figure BDA0003141912700000063
and Mu∈RK×DRepresenting the second model parameters, Attention representing the Attention mechanism function, MenPooling representing the average pooling layer function, SshortRepresenting a click record vector.
Furthermore, after the short-term memory vector and the long-term memory vector of the target user are obtained through the method, the loving degree of the target user to the target commodity can be judged by utilizing the knowledge map.
In an embodiment, the determining, by using a knowledge graph, the target user's liking of the target commodity based on the short-term memory vector, the long-term memory vector, and the target commodity includes:
acquiring an article vector corresponding to the target commodity;
acquiring a user short-term article vector and a user long-term article vector by using a knowledge graph based on the short-term memory vector, the long-term memory vector and the article vector;
generating a user representation vector based on the user short-term item vector and the user long-term item vector;
and determining the popularity of the target user to the target commodity based on the user representation vector.
Here, the item vector corresponding to the target commodity may be represented as qi∈RdA d-dimensional vector can be obtained through a single neural network embedding layer (one-hot embedding).
Specifically, in an embodiment, the obtaining the user short-term item vector and the user long-term item vector by using the knowledge graph based on the short-term memory vector, the long-term memory vector, and the item vector includes:
inputting the article vector into a knowledge graph to obtain a triple node vector of the target commodity;
acquiring a user short-term article vector by using an attention mechanism according to the triple node vector, the short-term memory vector and a third model parameter;
and acquiring a user long-term article vector by using an attention mechanism according to the triple node vector, the long-term memory vector and the third model parameter.
And further, inputting the article vector into a knowledge graph, and sampling three tuple nodes within one hop around the knowledge graph from an article i node to obtain the triple node vector of the target commodity. Here, the triplet node vector may be expressed as:
Ni{ (h, r, t) ∈ G, h is the head node vector, r is the relationship vector, and t is the tail node vector }.
After the triple node vector is obtained, the user short-term article vector can be obtained by using an attention mechanism by using the triple node vector, the short-term memory vector and the third model parameter; and acquiring the long-term article vector of the user by using the triple node vector, the long-term memory vector and the third model parameter and using an attention mechanism.
Specifically, the user short-term item vector and the user long-term item vector may be obtained by using the following formula (4):
Figure BDA0003141912700000071
Figure BDA0003141912700000072
wherein,
Figure BDA0003141912700000073
a long-term item vector representing the user,
Figure BDA0003141912700000074
representing user short-term item vectors, HshortRepresenting short-term memory vectors, HlongRepresenting the long-term memory vector, WQ′,WK′,WV′Representing the third model parameters, three d x d matrices, are optimized during the model training process,
Figure BDA0003141912700000081
is a node (| N) containing all the objects around ii| represents the number of nodes) is a | NiThe matrix of i rows and d columns, which is optimized in the model training, Attention represents the Attention mechanism function.
After the user short-term item vector and the user long-term item vector are obtained, a user representation vector can be generated by using the user short-term item vector and the user long-term item vector.
In an embodiment, said generating a user representation vector based on said user short term item vector and said user long term item vector comprises:
and performing head-to-tail splicing on the user short-term article vector and the user long-term article vector to generate a user representation vector.
Here, the user short term item may be vectorized
Figure BDA0003141912700000082
And the user long term item vector
Figure BDA0003141912700000083
Splicing head and tail to generate user expression vector
Figure BDA0003141912700000084
User representation vector
Figure BDA0003141912700000085
The value of (2) can represent the favorite degree of the target user to the target commodity.
Here, the knowledge-graph contains rich entities and relationships, displays learned item-to-item, user-to-user relationships through the structure of the knowledge-graph, and assists the algorithm by providing the user and item with a large number of additional features through rich knowledge. Using a knowledge graph to enhance a recommendation system is one way to effectively address a cold start of a recommendation system.
In addition, it should be noted that the parameters mentioned above can be optimized during the model training process. In particular, it can be optimized by the BPR loss function. The BPR loss function can be expressed by the following equation (5):
Figure BDA0003141912700000086
wherein L represents a BPR loss function, O { (u, i, j) | (u, i) ∈ R+,(u,j)∈R-},R+Indicating the user item pair for which the feedback is positive, i.e. the item i, R that the user u has clicked (can be understood to browse) on-Indicating that the feedback is negativeThe user item pair, i.e. item j that user u never clicked on (which can be understood as browsing).
Figure BDA0003141912700000087
The preference score for user u for item i,
Figure BDA0003141912700000088
sigma is sigmoid function for preference score of user u to item j.
Here, by substituting the samples in the sample set O into the BPR loss function L, the parameter when the BPR loss function L is minimum is the parameter after the training is optimized.
The product recommendation method provided by the embodiment of the invention confirms the target user and the target commodity; acquiring a commodity browsing record of a target user according to the target user; generating a short-term memory vector and a long-term memory vector of a target user according to the commodity browsing record; calculating the preference degree of the target user to the target commodity by using the knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity; and recommending the target commodity for the target user according to the love degree. By adopting the scheme provided by the invention, the long-term and short-term preference of the user can be considered when recommending the product for the user, and the recommendation is more accurate.
The present invention will be described in further detail with reference to the following application examples.
At present, the existing algorithms combining the recommendation system and the knowledge graph include rippenet, MKR, KGAT, and the like. However, the algorithms all assume that the preference of the user is static, and recommend the user by combining the semantics of the knowledge graph and the relation auxiliary recommendation algorithm on the basis of the assumption. However, in most scenarios, the user's preferences are short-term and long-term. Therefore, existing recommendation algorithms are not accurate.
Based on the above, the embodiment of the application provides a method for realizing dynamic cold start recommendation by combining knowledge graph technology and a user long-short term preference algorithm.
The specific algorithm principle is as follows:
two modules are constructed to respectively extract long-term memory and short-term memory vectors of the user. These two vectors are then combined with the knowledge-graph to form two new vectors (the user short-term item vector and the user long-term item vector), respectively. The method comprises the following specific steps:
1) and a user short-term memory vector extraction module:
and (3) inputting a user click record vector, wherein the user click record vector can be obtained by using the formula (1).
Calculating user short-term memory vector H according to input click record vectorshort∈Rd,HshortCan be obtained by the calculation of the above formula (2).
2) And a user long-term memory vector extraction module:
and (3) inputting a user click record vector, wherein the user click record vector can be obtained by using the formula (1).
Calculating user long-term memory vector H according to input click record vectorlong∈Rd,HlongCan be obtained by calculation according to the above formula (3).
3) The short-term memory vector and the long-term memory vector are used to combine the knowledge-graph information separately. The method comprises the following steps:
inputting: user vector HlongAnd HshortAnd the user's item vector q to be predictedi∈Rd(the vector is obtained through a single one-hot embedding layer).
From the item i node, sampling triple nodes within one hop around the knowledge graph, and setting the triple nodes as
Ni{ (h, r, t) ∈ G, h is the head node vector, r is the relationship vector, t is the tail node vector }
The final user item vector representation (user long term item vector and user short term item vector) is obtained using the Attention (Attention) mechanism, and can be calculated by equation (4) above.
4) Finally, two vectors are combined
Figure BDA0003141912700000101
And
Figure BDA0003141912700000102
tiled output
Figure BDA0003141912700000103
Finally, the model is optimized through a BPR loss function. The BPR loss function can be obtained by the above equation (5).
In addition, referring to fig. 2, the specific calculation process of the present application embodiment is:
and inputting a user u and an article i, acquiring a user short-term click record according to the input user u, and extracting a user short-term memory vector and a user long-term memory vector according to the user short-term click. And acquiring an article representation vector according to the input article i, and extracting one-hop information (ternary node group) of the article from the knowledge graph. And acquiring the short-term memory vector of the user combined knowledge picture and the long-term memory vector of the user combined knowledge map according to the extracted three-element node group, the short-term memory vector and the long-term memory vector. And combining the two acquired vectors to obtain a user representation vector. And calculating the preference representation of the user u for the item i according to the user representation vector and the item representation vector. Based on the preference expression, in the training stage, when the preference expression can be used for training, the model parameters are obtained by optimizing through a BPR loss function; and in the prediction stage, when the method is used for prediction, the items to be recommended are sorted according to the preference representation.
The embodiment provides a method for combining knowledge graph and dynamic recommendation. The method can combine multiple advantages of knowledge graph recommendation, effectively utilize knowledge structures in the knowledge graph according to the continuously changing preference of the user, recommend the user, and improve the performance of a recommendation system. The recommendation method of the embodiment can utilize the advantages of the knowledge graph, namely recommendation diversity, interpretability and accuracy, and can learn different influences of the knowledge graph on the user at different stages through real-time preference of the user. In addition, the embodiment adopts technologies such as a memory network, an attention mechanism, and an attention mechanism related to the knowledge graph, so that recommendation is more accurate.
In order to implement the method according to the embodiment of the present invention, an embodiment of the present invention further provides a product recommendation device, as shown in fig. 3, the product recommendation device 300 includes: a confirmation module 301, an acquisition module 302, a generation module 303, a calculation module 304 and a recommendation module 305; wherein,
a confirmation module 301 configured to confirm a target user and a target product;
an obtaining module 302, configured to obtain a commodity browsing record of a target user according to the target user;
the generating module 303 is configured to generate a short-term memory vector and a long-term memory vector of the target product according to the product browsing record;
the calculating module 304 is used for calculating the preference degree of the target user to the target commodity based on the short-term memory vector and the long-term memory vector;
and the recommending module 305 is used for recommending the target commodity for the target user according to the love degree.
In practice, the confirming module 301, the obtaining module 302, the generating module 303, the calculating module 304 and the recommending module 305 may be implemented by a processor in the product recommending apparatus.
It should be noted that: the above-mentioned apparatus provided in the above-mentioned embodiment is only exemplified by the division of the above-mentioned program modules when executing, and in practical application, the above-mentioned processing may be distributed to be completed by different program modules according to needs, that is, the internal structure of the terminal is divided into different program modules to complete all or part of the above-mentioned processing. In addition, the apparatus provided by the above embodiment and the method embodiment belong to the same concept, and the specific implementation process thereof is described in the method embodiment and is not described herein again.
Based on the hardware implementation of the program module, in order to implement the method according to the embodiment of the present invention, an electronic device (computer device) is also provided in the embodiment of the present invention. Specifically, in one embodiment, the computer device may be a terminal, and its internal structure diagram may be as shown in fig. 4. The computer apparatus includes a processor a01, a network interface a02, a display screen a04, an input device a05, and a memory (not shown in the figure) connected through a system bus. Wherein processor a01 of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises an internal memory a03 and a non-volatile storage medium a 06. The nonvolatile storage medium a06 stores an operating system B01 and a computer program B02. The internal memory a03 provides an environment for the operation of the operating system B01 and the computer program B02 in the nonvolatile storage medium a 06. The network interface a02 of the computer device is used for communication with an external terminal through a network connection. The computer program is executed by the processor a01 to implement the method of any of the above embodiments. The display screen a04 of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device a05 of the computer device may be a touch layer covered on the display screen, a button, a trackball or a touch pad arranged on a casing of the computer device, or an external keyboard, a touch pad or a mouse.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The device provided by the embodiment of the present invention includes a processor, a memory, and a program stored in the memory and capable of running on the processor, and when the processor executes the program, the method according to any one of the embodiments described above is implemented.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. 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 data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data 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 data 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 data 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.
In a typical configuration, a computing device 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). The memory is an example of a computer-readable medium.
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 tape magnetic disk storage 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, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It will be appreciated that the memory of embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. Among them, the nonvolatile Memory may be a Read Only Memory (ROM), a Programmable Read Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), a magnetic random access Memory (FRAM), a Flash Memory (Flash Memory), a magnetic surface Memory, an optical disk, or a Compact Disc Read-Only Memory (CD-ROM); the magnetic surface storage may be disk storage or tape storage. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Enhanced Synchronous Dynamic Random Access Memory (Enhanced DRAM), Synchronous Dynamic Random Access Memory (SLDRAM), Direct Memory (DRmb Access), and Random Access Memory (DRAM). The described memory for embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.
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 identical elements in the process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A method for recommending products, the method comprising:
confirming a target user and a target commodity;
acquiring a commodity browsing record of the target user according to the target user;
generating a short-term memory vector and a long-term memory vector of the target user according to the commodity browsing record;
calculating the love degree of the target user to the target commodity by using a knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity;
and recommending the target commodity for the target user according to the love degree.
2. The method of claim 1, wherein the generating short-term memory vectors and long-term memory vectors of the target user from the item browsing records comprises:
acquiring a click record vector of the target user according to the commodity browsing record;
and generating a short-term memory vector of the target user and a long-term memory vector of the target user according to the click record vector.
3. The method of claim 2, wherein generating the short-term memory vector of the target user from the click record vector comprises:
acquiring a first model parameter;
generating a first input parameter according to the click record vector and the first model parameter;
inputting the first input parameter into an attention mechanism to obtain a first output result;
and carrying out weighted average on the first output result by utilizing an average pooling layer of the model to obtain a short-term memory vector.
4. The method of claim 2, wherein generating the long-term memory vector for the target user from the click record vector comprises:
acquiring a second model parameter;
generating a second input parameter according to the click record vector and the second model parameter;
inputting the second input parameter into an attention mechanism to obtain a second output result;
and carrying out weighted average on the second output result by utilizing an average pooling layer of the model to obtain a long-term memory vector.
5. The method of claim 1, wherein determining the target user's likeability to the target good using a knowledge graph based on the short-term memory vector, the long-term memory vector, and the target good comprises:
acquiring an article vector corresponding to the target commodity;
acquiring a user short-term article vector and a user long-term article vector by using a knowledge graph based on the short-term memory vector, the long-term memory vector and the article vector;
generating a user representation vector based on the user short-term item vector and the user long-term item vector;
and determining the popularity of the target user to the target commodity based on the user representation vector.
6. The method of claim 5, wherein obtaining a user short-term item vector and a user long-term item vector using a knowledge graph based on the short-term memory vector, the long-term memory vector, and the item vector comprises:
inputting the article vector into a knowledge graph to obtain a triple node vector of the target commodity;
acquiring a user short-term article vector by using an attention mechanism according to the triple node vector, the short-term memory vector and a third model parameter;
and acquiring a user long-term article vector by using an attention mechanism according to the triple node vector, the long-term memory vector and the third model parameter.
7. The method of claim 5, wherein generating a user representation vector based on the user short-term item vector and the user long-term item vector comprises:
and performing head-to-tail splicing on the user short-term article vector and the user long-term article vector to generate a user representation vector.
8. A product recommendation device, characterized in that the product recommendation device comprises:
the confirmation module is used for confirming the target user and the target commodity;
the acquisition module is used for acquiring the commodity browsing record of the target user according to the target user;
the generating module is used for generating a short-term memory vector and a long-term memory vector of the target user according to the commodity browsing record;
the calculation module is used for calculating the love degree of the target user to the target commodity by utilizing a knowledge graph based on the short-term memory vector, the long-term memory vector and the target commodity;
and the recommending module is used for recommending the target commodity for the target user according to the love degree.
9. An electronic device, comprising: a processor and a memory for storing a computer program capable of running on the processor; wherein,
the processor is adapted to perform the steps of the method of any one of claims 1 to 7 when running the computer program.
10. A storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs the steps of the method of any one of claims 1 to 7.
CN202110740749.XA 2021-06-30 2021-06-30 Product recommendation method, device, electronic equipment and storage medium Active CN113505215B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110740749.XA CN113505215B (en) 2021-06-30 2021-06-30 Product recommendation method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110740749.XA CN113505215B (en) 2021-06-30 2021-06-30 Product recommendation method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113505215A true CN113505215A (en) 2021-10-15
CN113505215B CN113505215B (en) 2024-06-14

Family

ID=78009472

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110740749.XA Active CN113505215B (en) 2021-06-30 2021-06-30 Product recommendation method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113505215B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018084853A (en) * 2016-11-21 2018-05-31 一郎 奥山 Recommendation system
CN110008409A (en) * 2019-04-12 2019-07-12 苏州市职业大学 Based on the sequence of recommendation method, device and equipment from attention mechanism
CN111932336A (en) * 2020-07-17 2020-11-13 重庆邮电大学 Commodity list recommendation method based on long-term and short-term interest preference
CN112214685A (en) * 2020-09-27 2021-01-12 电子科技大学 Knowledge graph-based personalized recommendation method
CN112256859A (en) * 2020-10-23 2021-01-22 辽宁工程技术大学 Recommendation method based on bidirectional long-short term memory network explicit information coupling analysis
CN112765486A (en) * 2021-01-22 2021-05-07 重庆邮电大学 Knowledge graph fused attention mechanism movie recommendation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018084853A (en) * 2016-11-21 2018-05-31 一郎 奥山 Recommendation system
CN110008409A (en) * 2019-04-12 2019-07-12 苏州市职业大学 Based on the sequence of recommendation method, device and equipment from attention mechanism
CN111932336A (en) * 2020-07-17 2020-11-13 重庆邮电大学 Commodity list recommendation method based on long-term and short-term interest preference
CN112214685A (en) * 2020-09-27 2021-01-12 电子科技大学 Knowledge graph-based personalized recommendation method
CN112256859A (en) * 2020-10-23 2021-01-22 辽宁工程技术大学 Recommendation method based on bidirectional long-short term memory network explicit information coupling analysis
CN112765486A (en) * 2021-01-22 2021-05-07 重庆邮电大学 Knowledge graph fused attention mechanism movie recommendation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
李多加: "基于混合推荐算法的旅游推荐系统的设计与实现", 《中国优秀硕士论文电子期刊网(信息科技辑)》, pages 138 - 5568 *
沈冬东;汪海涛;姜瑛;陈星: "基于知识图谱嵌入与多神经网络的序列推荐算法", 《计算机工程与科学》, vol. 42, no. 9, pages 1661 - 1669 *

Also Published As

Publication number Publication date
CN113505215B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
US20210027160A1 (en) End-to-end deep collaborative filtering
US10909442B1 (en) Neural network-based artificial intelligence system for content-based recommendations using multi-perspective learned descriptors
CN110008397B (en) Recommendation model training method and device
CN116249991A (en) Neural network distillation method and device
CN111695960A (en) Object recommendation system, method, electronic device and storage medium
CN111967892A (en) Information recommendation method and device
CA3111094C (en) Noise contrastive estimation for collaborative filtering
CN116186326A (en) Video recommendation method, model training method, electronic device and storage medium
CN115423037A (en) Big data-based user classification method and system
CN110851694B (en) Personalized recommendation system based on depth model of user memory network and tree structure
CN111507471A (en) Model training method, device, equipment and storage medium
CN113505215B (en) Product recommendation method, device, electronic equipment and storage medium
CN115630219A (en) Training method and device of recommendation model and computer equipment
CN115017413A (en) Recommendation method and device, computing equipment and computer storage medium
CN117112880A (en) Information recommendation and multi-target recommendation model training method and device and computer equipment
CN114168787A (en) Music recommendation method and device, computer equipment and storage medium
CN110610393A (en) Information recommendation method and device
CN113360744A (en) Recommendation method and device of media content, computer equipment and storage medium
CN110941758B (en) Synthetic feature generation method and device of recommendation system
CN117786234B (en) Multimode resource recommendation method based on two-stage comparison learning
US20240201957A1 (en) Neural network model definition code generation and optimization
CN118227677A (en) Information recommendation and information recommendation model processing method, device, equipment and medium
CN113868408A (en) Text data recommendation method and device, computer equipment and storage medium
CN117874233A (en) Text classification method and device and electronic equipment
CN117726403A (en) Product recommendation method and device, storage medium and electronic equipment

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