CN116401444A - Item recommendation method based on time context graph annotation meaning mechanism - Google Patents

Item recommendation method based on time context graph annotation meaning mechanism Download PDF

Info

Publication number
CN116401444A
CN116401444A CN202310136573.6A CN202310136573A CN116401444A CN 116401444 A CN116401444 A CN 116401444A CN 202310136573 A CN202310136573 A CN 202310136573A CN 116401444 A CN116401444 A CN 116401444A
Authority
CN
China
Prior art keywords
user
time
article
interaction
attention mechanism
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310136573.6A
Other languages
Chinese (zh)
Inventor
吴国栋
刘涵伟
李景霞
刘旭旭
范维成
涂立静
王雪妮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Anhui Agricultural University AHAU
Original Assignee
Anhui Agricultural University AHAU
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 Anhui Agricultural University AHAU filed Critical Anhui Agricultural University AHAU
Priority to CN202310136573.6A priority Critical patent/CN116401444A/en
Publication of CN116401444A publication Critical patent/CN116401444A/en
Pending legal-status Critical Current

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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • G06F16/24578Query processing with adaptation to user needs using ranking
    • 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/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses an article recommendation method and device based on a drawing meaning force mechanism of a time context, wherein the method comprises the following steps: firstly, a user-article interaction diagram is constructed according to user and article interaction data information, a time weight coefficient is determined according to time information of interaction between a user and an article, the time weight coefficient is fused into a first attention mechanism for modeling, a second attention mechanism containing the time information is generated, a prediction score is calculated based on the second attention mechanism, and the article is recommended to the user according to score sorting.

Description

Item recommendation method based on time context graph annotation meaning mechanism
Technical Field
The invention belongs to the technical field of graphic neural networks, and particularly relates to an article recommendation method and device based on a graphic meaning force mechanism of a time context.
Background
With the explosion type development of the Internet, the current society provides mass information and choices for life of people. However, people do not benefit from the information, but rather, the information is not suitable before overload, so that a recommendation system is generated. The recommendation system is a system which can provide personalized pushing for users, help people to make better choices and can prove to be capable of effectively solving the information overload problem. According to the method, the preference information of the user is mined from the historical behaviors of the user, and the articles possibly interested in the user are actively recommended to the user, so that the user does not need to search from mass information, and the user can conveniently access and acquire recommendation information at any time and any place.
However, in the existing recommendation method, such as collaborative filtering recommendation technology, user preference is generally obtained only by using interactive data of the user on the object, the implementation mode is simple, the recommendation process is also faster, but the importance of the context information is often ignored, and the recommendation effect is needed to be improved.
Therefore, in the conventional recommendation technology, the problem that the recommendation effect is not ideal due to capturing the user preference based on the interaction information such as user browsing and purchasing record is solved, which is a technical problem to be solved.
Disclosure of Invention
The invention aims to provide an article recommending method and device based on a time context graph annotation mechanism, which are used for solving the defects in the prior art.
One embodiment of the present application provides a method for item recommendation based on a temporal context graph annotation force mechanism, the method comprising:
constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
determining a time weight coefficient according to the time information of the interaction between the user and the article;
the time weight coefficient is fused into a first attention mechanism for modeling, and a second attention mechanism containing time information is generated;
based on the second attention mechanism, a predictive score is calculated and items are recommended to the user according to the ranking of the scores.
Optionally, determining a time weight coefficient according to the time information of the interaction between the user and the article, including;
calculating a time influence factor according to the time information of the interaction between the user and the article;
based on the time influence factor, normalizing and obtaining a time weight coefficient by using a first activation function.
Optionally, the calculating a time influence factor according to the time information of the interaction between the user and the article includes:
the time-dependent factor is calculated by the following equation:
Figure SMS_1
Figure SMS_2
wherein T is u,i To measure the time-dependent factor of the relative time of the interaction of user u with item i, t u,i Is the time at which user u interacted with item i occurred,
Figure SMS_3
is the earliest interaction occurrence time in user u and all its first-order neighbors,/>
Figure SMS_4
Is the latest interaction occurrence time in the user u and all the first-order neighbors thereof, T i,u Time influence factors of all users interacting for the same item, +.>
Figure SMS_5
Is the earliest interaction occurrence time in item i and all its first-order neighbors,/item i>
Figure SMS_6
Is the latest interaction occurrence time in the article and all first-order neighbors thereof, sigmoid is the first activation function, and the sigmoid first activation function can scale the time information to between (0.5, 1).
Optionally, the normalizing by the first activation function to obtain a time weight coefficient based on the time influence factor includes:
the time weight coefficient is obtained by the following equation:
Figure SMS_7
Figure SMS_8
wherein beta is u,i Time weighting coefficient, beta, of an item to interact with a user relative to the user i,u Time weighting coefficient for user interacting with the item relative to the item, N u Neighbor node set representing user node u, N i Representing an articleNeighbor node set of node i, i is set N u In (a) and u is set N i Is included in the node (a).
Optionally, the integrating the time weight coefficient into the first attention mechanism is used for modeling, and generating a second attention mechanism containing time information includes:
modeling is performed by integrating the time weight coefficient into a first attention mechanism through the following formula, and a second attention mechanism containing time information is generated:
Figure SMS_9
Figure SMS_10
wherein alpha is u,i And alpha i,u Respectively normalized second attention mechanism scores, leakyReLU is a second activation function, a and W are weight parameters, e u Feature vector, e, for node u k Feature vector, e, of neighbor node k of node u i Feature vector, e, of neighbor node i of node u m Feature vector of neighbor node m for node i, k representing set N u In (a), m represents a set N i Is included in the node (a).
Optionally, the second attention mechanism includes a sub-graph generating module, and the calculating of the prediction score based on the second attention mechanism and the recommending of the item to the user according to the score ranking include:
dividing subgraphs by utilizing the subgraph generation module, generating a prediction vector according to users with similar embedding, and dividing the prediction vector into the same subgraph set;
acquiring user object feature representations based on aggregation of a plurality of the same sub-atlases, and acquiring a prediction score by carrying out inner product operation on the user object feature representations;
and according to the prediction scores, performing score sorting, and recommending the items to the user based on sorting results.
Optionally, the dividing the subgraph by using the subgraph generating module generates the prediction vector according to the users with similar embedding, and divides the prediction vector into the same subgraph set, including:
fusing the graph structure and the ID embedding by using the subgraph generation module and a preset fusion method to obtain a feature vector of a user, wherein the I D embedding comprises user I D embedding and article I D embedding;
based on the similar I D embedding, the obtained user feature vector is converted into a prediction vector and divided into the same sub-picture set.
Optionally, the obtaining the feature vector of the user includes:
the feature vector of the user is obtained by the following equation:
Figure SMS_11
wherein F is u For the feature vector of the user, σ is the second activation function of LeakyReLU, W 1 For the preset weight matrix of the fusion method,
Figure SMS_12
for user I D inlay->
Figure SMS_13
Is embedded by a layer of propagated user I D, b 1 Is a bias vector.
Optionally, the converting the obtained user feature vector into a prediction vector includes:
using a two-layer neural network, and converting the obtained user feature vector into a prediction vector by the following formula:
U o =W 3 U h +b 3
wherein U is o To predict vector, W 3 Is a weight matrix of a second layer neural network, U h Meet U h =σ(W 2 F u +b 2 ),W 2 Weight matrix for first layer neural network,b 2 Is the bias vector of the first layer neural network, b 3 Is the bias vector of the second layer neural network.
Yet another embodiment of the present application provides an item recommendation apparatus for a temporal context-based graphical annotation mechanism, the apparatus comprising:
the construction module is used for constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
the determining module is used for determining a time weight coefficient according to the time information of interaction between the user and the article;
the generation module is used for integrating the time weight coefficient into the first attention mechanism for modeling and generating a second attention mechanism containing time information;
and the recommending module is used for calculating a prediction score based on the second attention mechanism and recommending articles to the user according to the score ranking.
Optionally, the determining module includes:
the calculating unit is used for calculating a time influence factor according to the time information of the interaction between the user and the article;
and the obtaining unit is used for obtaining the time weight coefficient by normalizing the first activation function based on the time influence factor.
Optionally, the recommendation module includes:
the generating unit is used for dividing the subgraph by utilizing the subgraph generating module, generating a prediction vector according to users with similar embedding, and dividing the prediction vector into the same subgraph set;
the obtaining unit is used for obtaining user article characteristic representations based on aggregation of a plurality of the same sub-atlas, and obtaining a prediction score through inner product operation on the user article characteristic representations;
and the recommending unit is used for grading and sorting according to the prediction grades and recommending articles to the user based on the sorting result.
Optionally, the generating unit includes:
the obtaining subunit is used for fusing the graph structure and the ID embedding by utilizing the subgraph generation module and a preset fusion method to obtain the feature vector of the user, wherein the ID embedding comprises user ID embedding and article ID embedding;
and the dividing subunit is used for embedding based on the similarity I D, converting the obtained user characteristic vector into a prediction vector and dividing the prediction vector into the same sub-image set.
A further embodiment of the present application provides a storage medium having a computer program stored therein, wherein the computer program is arranged to implement the method of any of the above when run.
Yet another embodiment of the present application provides an electronic device comprising a memory having a computer program stored therein and a processor configured to run the computer program to implement the method described in any of the above.
Compared with the prior art, the method and the system have the advantages that firstly, a user-article interaction diagram is constructed according to user and article interaction data information, a time weight coefficient is determined according to time information of interaction between a user and an article, the time weight coefficient is fused into a first attention mechanism to be modeled, a second attention mechanism containing the time information is generated, a prediction score is calculated based on the second attention mechanism, and the article is recommended to the user according to score ranking.
Drawings
Fig. 1 is a hardware block diagram of a computer terminal of an item recommendation method based on a drawing force mechanism of a time context according to an embodiment of the present invention;
FIG. 2 is a flowchart of an item recommendation method based on a temporal context-based schematic diagram of an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an article recommendation device of a schematic force mechanism based on a time context according to an embodiment of the present invention.
Detailed Description
The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
The embodiment of the invention firstly provides an article recommendation method of a drawing meaning mechanism based on time context, which can be applied to electronic equipment such as computer terminals, in particular to common computers, quantum computers and the like.
The following describes the operation of the computer terminal in detail by taking it as an example. Fig. 1 is a hardware block diagram of a computer terminal of an item recommendation method based on a drawing force mechanism of a time context according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA) and a memory 104 for storing data, and optionally, a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those skilled in the art that the configuration shown in fig. 1 is merely illustrative and is not intended to limit the configuration of the computer terminal described above. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the method of recommending items based on a temporal context-based graphical user interface in the embodiments of the present application, and the processor 102 executes the software programs and modules stored in the memory 104 to perform various functional applications and data processing, i.e., implement the methods described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the computer terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
Referring to fig. 2, fig. 2 is a flowchart of an item recommendation method based on a temporal context graph annotation mechanism according to an embodiment of the present invention, which may include the following steps:
s201: and constructing a user-article interaction diagram according to the user-article interaction data information, wherein the interaction data information comprises time information of interaction between the user and the article, and the user-article interaction diagram takes the user and the article as nodes.
Specifically, a user-object interaction graph can be constructed based on the historical purchase record of the user, for example, the user-object interaction graph is constructed by using the historical purchase record of the user, and when the user purchases a certain object, an undirected edge is newly added between the user node and the object node in the user-object interaction graph.
S202: and determining a time weight coefficient according to the time information of the interaction between the user and the article.
Specifically, the determining the time weight coefficient according to the time information of the interaction between the user and the article may include;
and step 1, calculating a time influence factor according to the time information of interaction between the user and the article.
Specifically, the calculating the time influence factor according to the time information of the interaction between the user and the article may include:
the time-dependent factor is calculated by the following equation:
Figure SMS_14
Figure SMS_15
wherein T is u,i To measure the time-dependent factor of the relative time of the interaction of user u with item i, t u,i Is the time at which user u interacted with item i occurred,
Figure SMS_16
is the earliest interaction occurrence time in user u and all its first-order neighbors,/>
Figure SMS_17
Is the latest interaction occurrence time in the user u and all the first-order neighbors thereof, T i,u Time influence factors of all users interacting for the same item, +.>
Figure SMS_18
Is the earliest interaction occurrence time in item i and all its first-order neighbors,/item i>
Figure SMS_19
The latest interaction occurrence time in all first-order neighbors of the object is the first activation function, and the time information is scaled to be between (0.5, 1) by using the first activation function of the sigmoid to obtain T in consideration of the fact that different purchase times of the same user can be greatly different u,i To measure the time-dependent factor of the relative time at which user u interacts with item i.
And 2, based on the time influence factor, normalizing by using a first activation function to obtain a time weight coefficient.
Specifically, the time weight coefficient may be obtained by the following expression:
Figure SMS_20
Figure SMS_21
wherein beta is u,i Time weighting coefficient, beta, of an item to interact with a user relative to the user i,u Time weighting coefficient for user interacting with the item relative to the item, N u Neighbor node set representing user node u, N i Neighbor node set representing item node i, i being set N u In (a) and u is set N i Is included in the node (a).
Based on the time influence factor obtained in step 1, the time influence factor T of all items to be interacted with by the same user u,i And the time influence factor T of all users interacting with the same item i,u The corresponding time weight coefficient beta can be obtained through Softmax function normalization u,i And beta i,u
S203: and integrating the time weight coefficient into a first attention mechanism for modeling, and generating a second attention mechanism containing time information.
Specifically, integrating the time weight coefficient into the first attention mechanism to perform modeling, and generating a second attention mechanism containing time information may include:
modeling is performed by integrating the time weight coefficient into a first attention mechanism through the following formula, and a second attention mechanism containing time information is generated:
Figure SMS_22
Figure SMS_23
wherein alpha is u,i And alpha i,u Respectively normalized second attention mechanism scores, leakyReLU is a second activation function, a and W are weight parameters, e u Feature vector, e, for node u k Feature vector, e, of neighbor node k of node u i Feature vector, e, of neighbor node i of node u m Feature vector of neighbor node m for node i, k representing set N u In (a), m represents a set N i Is included in the node (a).
The traditional first attention mechanism is improved by integrating the time weight coefficient into the traditional first attention mechanism, and the attention score of the user node neighbor and the attention score of the article node neighbor in the user-article interaction diagram are respectively calculated by utilizing the improved second attention mechanism containing time information. By multiplying each item feature representation by a time weight coefficient, different degrees of contribution of items purchased at different times to the user's interests can be reflected; and multiplying each user characteristic by a time weight coefficient, reflecting different contribution degrees of users purchasing articles at different times to the article characteristics, and endowing the article nodes with different attention weights from the user nodes by utilizing an improved second attention mechanism containing time information, so that the user preference and the learning of the article characteristics are weighted and aggregated, and finally, the user characteristic representation and the article characteristic representation which are fused with the time context information can be obtained.
S204: based on the second attention mechanism, a predictive score is calculated and items are recommended to the user according to the ranking of the scores.
Specifically, the second attention mechanism may include a sub-graph generating module, and the calculating a prediction score based on the second attention mechanism and recommending items to the user according to a score ranking may include:
a. dividing subgraphs by utilizing the subgraph generation module, generating a prediction vector according to users with similar embedding, and dividing the prediction vector into the same subgraph set.
Specifically, the graph structure and the ID embedding are fused by using the subgraph generation module and a preset fusion method, so that the feature vector of the user is obtained, wherein the ID embedding comprises user ID embedding and article ID embedding.
Illustratively, obtaining the feature vector of the user may include: the feature vector of the user is obtained by the following equation:
Figure SMS_24
wherein F is u For the feature vector of the user, σ is the second activation function of LeakyReLU, W 1 For the preset weight matrix of the fusion method,
Figure SMS_25
for user I D inlay->
Figure SMS_26
Is embedded by a layer of propagated user I D, b 1 Is a bias vector.
And based on similar ID embedding, converting the obtained user characteristic vector into a prediction vector and dividing the prediction vector into the same sub-graph set.
Illustratively, a two-layer neural network is utilized and the obtained user feature vector is converted into a prediction vector by the following equation:
U o =W 3 U h +b 3
wherein U is o To predict vector, W 3 Is a weight matrix of a second layer neural network, U h Meet U h =σ(W 2 F u +b 2 ),W 2 A weight matrix for the first layer neural network, b 2 Is the bias vector of the first layer neural network, b 3 Is the bias vector of the second layer neural network.
It should be noted that the graphic structure data is one of hot spot directions of research in the current data mining field. The diagram is an important information organization structure, and consists of nodes and edges. The neural network can efficiently model the data, and accurately capture potential links between the data. For example, the article recommending method in the application can take the user and the article as nodes, and simultaneously realize the relationship between the article and the article, between the user and between the user and the article as the state information of the nodes, so as to realize article recommending.
b. Acquiring user object feature representations based on aggregation of a plurality of the same sub-atlases, and acquiring a prediction score by carrying out inner product operation on the user object feature representations;
c. and according to the prediction scores, performing score sorting, and recommending the items to the user based on sorting results.
Specifically, the sub-graph generating module is utilized to divide the user and the object nodes into different sub-graphs, the first-order embedding in the sub-graphs is respectively weighted and aggregated by using the attention scores, the higher-order embedding is respectively aggregated and updated in the corresponding sub-graphs, the user node is only aggregated and updated in the corresponding sub-graphs, the object nodes are aggregated by embedding the final layer in all the sub-graphs where the object nodes are located, after the final user and the object nodes are obtained, the inner product is utilized to obtain the prediction scores of the user on the object nodes, and the object is recommended to the user by sequencing the prediction scores from large to small or from small to large.
In an alternative embodiment, the aggregation of multiple identical sub-sets may be represented by:
since the direct interaction between the user and the item provides the most important and reliable information of the user's interest, in first order propagation, all first order neighbors participate in the graph convolution operation, namely:
Figure SMS_27
Figure SMS_28
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_29
first layer embedding, alpha, representing user u u,i Representing the attention of an item interacting with a user to the userScore, ->
Figure SMS_30
I D insert representing item i +.>
Figure SMS_31
Representing a first layer embedding of item i, alpha i,u Representing the attention score of a user interacting with an item for the item,/->
Figure SMS_32
I D, representing user u, is embedded.
For higher-order propagation, a node in a subgraph can only be updated with information of neighboring nodes in the subgraph, and the higher-order propagation can be expressed by the following formula:
Figure SMS_33
Figure SMS_34
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_35
k+1 layer I D representing user u is embedded,/->
Figure SMS_36
K-th layer I D representing item i is embedded, < >>
Figure SMS_37
The (k+1) th layer I D representing item i in subgraph s is embedded,/therein>
Figure SMS_38
Representing the set of neighbor nodes of item i in subgraph s, < +.>
Figure SMS_39
The kth layer I D representing user u is embedded.
Combining the k-th layer graph convolution of the subgraphs where all the objects i are located to obtain the representation of the final object i, wherein the representation is shown in the following formula:
Figure SMS_40
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_41
a representation of the final item i obtained by convolving the k-th layer graph in combination with the subgraph of which all items i are located, {>
Figure SMS_42
Representing the representation of item i in the kth layer of subgraph S, S representing the subgraph set to which item i belongs.
Finally, after the representation of the final user u and the object i is obtained, the inner product is used for obtaining a prediction score, and the prediction score is shown in the following formula:
Figure SMS_43
wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure SMS_44
representing predicted interactive preference values of user u for item i, e u Representation of user u, e, obtained by sub-graph aggregation i A representation of the object i obtained after sub-graph aggregation.
It can be seen that the invention firstly constructs a user-article interaction diagram according to the information of the user and the article interaction data, determines a time weight coefficient according to the time information of the user and the article interaction, blends the time weight coefficient into a first attention mechanism for modeling, generates a second attention mechanism containing the time information, calculates a prediction score based on the second attention mechanism, and recommends the article to the user according to the score ranking.
Yet another embodiment of the present application provides an item recommendation device of a time context based annotation mechanism, as shown in fig. 3, which is a schematic structural diagram of the item recommendation device of the time context based annotation mechanism, and the device includes:
the construction module 301 is configured to construct a user-article interaction diagram according to user-article interaction data information, where the interaction data information includes time information of user interaction with an article, and the user-article interaction diagram uses the user and the article as nodes;
a determining module 302, configured to determine a time weight coefficient according to time information of the interaction between the user and the article;
the generating module 303 is configured to integrate the time weight coefficient into a first attention mechanism to perform modeling, and generate a second attention mechanism that includes time information;
and a recommending module 304, configured to calculate a prediction score based on the second attention mechanism, and recommend an item to the user according to the score ranking.
Specifically, the determining module includes:
the calculating unit is used for calculating a time influence factor according to the time information of the interaction between the user and the article;
and the obtaining unit is used for obtaining the time weight coefficient by normalizing the first activation function based on the time influence factor.
Specifically, the recommendation module includes:
the generating unit is used for dividing the subgraph by utilizing the subgraph generating module, generating a prediction vector according to users with similar embedding, and dividing the prediction vector into the same subgraph set;
the obtaining unit is used for obtaining user article characteristic representations based on aggregation of a plurality of the same sub-atlas, and obtaining a prediction score through inner product operation on the user article characteristic representations;
and the recommending unit is used for grading and sorting according to the prediction grades and recommending articles to the user based on the sorting result.
Specifically, the generating unit includes:
the obtaining subunit is used for fusing the graph structure and the ID embedding by utilizing the subgraph generation module and a preset fusion method to obtain the feature vector of the user, wherein the ID embedding comprises user ID embedding and article ID embedding;
and the dividing subunit is used for embedding based on the similarity I D, converting the obtained user characteristic vector into a prediction vector and dividing the prediction vector into the same sub-image set.
Compared with the prior art, the method and the system have the advantages that firstly, a user-article interaction diagram is constructed according to user and article interaction data information, a time weight coefficient is determined according to time information of interaction between a user and an article, the time weight coefficient is fused into a first attention mechanism to be modeled, a second attention mechanism containing the time information is generated, a prediction score is calculated based on the second attention mechanism, and the article is recommended to the user according to score ranking.
The embodiment of the invention also provides a storage medium, in which a computer program is stored, wherein the computer program is configured to implement the steps in any of the method embodiments described above when run.
Specifically, in the present embodiment, the above-described storage medium may be configured to store a computer program for executing the steps of:
s201: constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
s202: determining a time weight coefficient according to the time information of the interaction between the user and the article;
s203: the time weight coefficient is fused into a first attention mechanism for modeling, and a second attention mechanism containing time information is generated;
s204: based on the second attention mechanism, a predictive score is calculated and items are recommended to the user according to the ranking of the scores.
Compared with the prior art, the method and the system have the advantages that firstly, a user-article interaction diagram is constructed according to user and article interaction data information, a time weight coefficient is determined according to time information of interaction between a user and an article, the time weight coefficient is fused into a first attention mechanism to be modeled, a second attention mechanism containing the time information is generated, a prediction score is calculated based on the second attention mechanism, and the article is recommended to the user according to score ranking.
Specifically, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
The embodiment of the invention also provides an electronic device comprising a memory, in which a computer program is stored, and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Specifically, the electronic device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Specifically, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s201: constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
s202: determining a time weight coefficient according to the time information of the interaction between the user and the article;
s203: the time weight coefficient is fused into a first attention mechanism for modeling, and a second attention mechanism containing time information is generated;
s204: based on the second attention mechanism, a predictive score is calculated and items are recommended to the user according to the ranking of the scores.
Compared with the prior art, the method and the system have the advantages that firstly, a user-article interaction diagram is constructed according to user and article interaction data information, a time weight coefficient is determined according to time information of interaction between a user and an article, the time weight coefficient is fused into a first attention mechanism to be modeled, a second attention mechanism containing the time information is generated, a prediction score is calculated based on the second attention mechanism, and the article is recommended to the user according to score ranking.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present invention is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present invention. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present invention.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present invention may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, comprising several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present invention. And the aforementioned memory includes: a U-disk, a Read-only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing has outlined rather broadly the more detailed description of embodiments of the invention, wherein the principles and embodiments of the invention are explained in detail using specific examples, the above examples being provided solely to facilitate the understanding of the method and core concepts of the invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.

Claims (12)

1. A method of item recommendation for a temporal context-based graphical annotation mechanism, the method comprising:
constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
determining a time weight coefficient according to the time information of the interaction between the user and the article;
the time weight coefficient is fused into a first attention mechanism for modeling, and a second attention mechanism containing time information is generated;
based on the second attention mechanism, a predictive score is calculated and items are recommended to the user according to the ranking of the scores.
2. The method of claim 1, wherein determining a time weight coefficient based on time information of the user interacting with the item comprises;
calculating a time influence factor according to the time information of the interaction between the user and the article;
based on the time influence factor, normalizing and obtaining a time weight coefficient by using a first activation function.
3. The method of claim 2, wherein calculating a time-dependent factor based on time information of the user's interaction with the item comprises:
the time-dependent factor is calculated by the following equation:
Figure FDA0004086104040000011
Figure FDA0004086104040000012
wherein T is u,i To measure the time-dependent factor of the relative time of the interaction of user u with item i, t u,i Is the time at which user u interacted with item i occurred,
Figure FDA0004086104040000013
is the earliest interaction occurrence time in user u and all its first-order neighbors,/>
Figure FDA0004086104040000014
Is the latest interaction occurrence time in the user u and all the first-order neighbors thereof, T i,u Time influence factors of all users interacting for the same item, +.>
Figure FDA0004086104040000015
Is the earliest interaction occurrence time in item i and all its first-order neighbors,/item i>
Figure FDA0004086104040000016
Is the latest interaction occurrence time in the article and all first-order neighbors thereof, sigmoid is the first activation function, and the sigmoid first activation function can scale the time information to between (0.5, 1).
4. A method according to claim 3, wherein said normalizing the obtained time weighting coefficients based on said time influencing factor with a first activation function comprises:
the time weight coefficient is obtained by the following equation:
Figure FDA0004086104040000021
Figure FDA0004086104040000022
wherein beta is u,i Time weighting coefficient, beta, of an item to interact with a user relative to the user i,u Time weighting coefficient for user interacting with the item relative to the item, N u Neighbor node set representing user node u, N i Neighbor node set representing item node i, i being set N u In (a) and u is set N i Is included in the node (a).
5. The method of claim 4, wherein modeling the incorporation of the temporal weighting coefficients into a first attention mechanism generates a second attention mechanism containing temporal information, comprising:
modeling is performed by integrating the time weight coefficient into a first attention mechanism through the following formula, and a second attention mechanism containing time information is generated:
Figure FDA0004086104040000023
Figure FDA0004086104040000024
wherein alpha is u,i And alpha i,u Respectively normalized second attention mechanism scores, leakyReLU is a second activation function, a and W are weight parameters, e u Feature vector, e, for node u k Feature vector, e, of neighbor node k of node u i Feature vector, e, of neighbor node i of node u m Feature vector of neighbor node m for node i, k representing set N u In (a), m represents a set N i Is included in the node (a).
6. The method of claim 5, wherein the second attention mechanism includes a sub-graph generation module, wherein the calculating a predictive score based on the second attention mechanism and recommending items to a user according to a ranking of scores comprises:
dividing subgraphs by utilizing the subgraph generation module, generating a prediction vector according to users with similar embedding, and dividing the prediction vector into the same subgraph set;
acquiring user object feature representations based on aggregation of a plurality of the same sub-atlases, and acquiring a prediction score by carrying out inner product operation on the user object feature representations;
and according to the prediction scores, performing score sorting, and recommending the items to the user based on sorting results.
7. The method of claim 6, wherein the dividing the sub-graph by the sub-graph generation module, generating the prediction vector based on users having similar embeddings, and dividing the prediction vector into the same sub-graph set, comprises:
fusing the graph structure and the ID embedding by using the subgraph generation module and a preset fusion method to obtain a feature vector of a user, wherein the ID embedding comprises user ID embedding and article ID embedding;
and based on similar ID embedding, converting the obtained user characteristic vector into a prediction vector and dividing the prediction vector into the same sub-graph set.
8. The method of claim 7, wherein the obtaining the feature vector of the user comprises:
the feature vector of the user is obtained by the following equation:
Figure FDA0004086104040000031
wherein F is u For the feature vector of the user, σ is the second activation function of LeakyReLU, W 1 For the preset weight matrix of the fusion method,
Figure FDA0004086104040000032
embedding->
Figure FDA0004086104040000033
Is embedded by a layer of propagated user ID, b 1 Is a bias vector.
9. The method of claim 8, wherein said converting said obtained user feature vector into a prediction vector comprises:
using a two-layer neural network, and converting the obtained user feature vector into a prediction vector by the following formula:
U o =W 3 U h +b 3
wherein U is o To predict vector, W 3 Is a weight matrix of a second layer neural network, U h Meet U h =σ(W 2 F u +b 2 ),W 2 A weight matrix for the first layer neural network, b 2 Is the bias vector of the first layer neural network, b 3 Is the bias vector of the second layer neural network.
10. An item recommendation device for a time context based annotation mechanism, the device comprising:
the construction module is used for constructing a user-article interaction diagram according to user-article interaction data information, wherein the interaction data information comprises time information of interaction between a user and an article, and the user-article interaction diagram takes the user and the article as nodes;
the determining module is used for determining a time weight coefficient according to the time information of interaction between the user and the article;
the generation module is used for integrating the time weight coefficient into the first attention mechanism for modeling and generating a second attention mechanism containing time information;
and the recommending module is used for calculating a prediction score based on the second attention mechanism and recommending articles to the user according to the score ranking.
11. A storage medium having a computer program stored therein, wherein the computer program is arranged to implement the method of any of claims 1 to 9 when run.
12. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to implement the method of any of the claims 1 to 9.
CN202310136573.6A 2023-02-10 2023-02-10 Item recommendation method based on time context graph annotation meaning mechanism Pending CN116401444A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310136573.6A CN116401444A (en) 2023-02-10 2023-02-10 Item recommendation method based on time context graph annotation meaning mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310136573.6A CN116401444A (en) 2023-02-10 2023-02-10 Item recommendation method based on time context graph annotation meaning mechanism

Publications (1)

Publication Number Publication Date
CN116401444A true CN116401444A (en) 2023-07-07

Family

ID=87008162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310136573.6A Pending CN116401444A (en) 2023-02-10 2023-02-10 Item recommendation method based on time context graph annotation meaning mechanism

Country Status (1)

Country Link
CN (1) CN116401444A (en)

Similar Documents

Publication Publication Date Title
CN107330115B (en) Information recommendation method and device
CN110837598B (en) Information recommendation method, device, equipment and storage medium
Tuarob et al. Fad or here to stay: Predicting product market adoption and longevity using large scale, social media data
WO2015188699A1 (en) Item recommendation method and device
Li et al. A multi-theoretical kernel-based approach to social network-based recommendation
Mirtalaie et al. A decision support framework for identifying novel ideas in new product development from cross-domain analysis
US20230153857A1 (en) Recommendation model training method, recommendation method, apparatus, and computer-readable medium
CN111242729A (en) Serialization recommendation method based on long-term and short-term interests
CN108230009B (en) User preference prediction method and device and electronic equipment
CN111709810A (en) Object recommendation method and device based on recommendation model
CN109783539A (en) Usage mining and its model building method, device and computer equipment
CN110020662B (en) Training method and device for user classification model
CN109087162A (en) Data processing method, system, medium and calculating equipment
CN111026977B (en) Information recommendation method and device and storage medium
US11704324B2 (en) Transition regularized matrix factorization for sequential recommendation
KR102384860B1 (en) Operating method of open market platform with improved product upload convenience by providing templates
CN108629608A (en) User data processing method and processing device
CN113722603A (en) Object pushing method, product pushing method, computer terminal and storage medium
CN111429161A (en) Feature extraction method, feature extraction device, storage medium, and electronic apparatus
CN113610610B (en) Session recommendation method and system based on graph neural network and comment similarity
Bhattacharjee et al. An integrated machine learning and DEMATEL approach for feature preference and purchase intention modelling
Yu et al. NGPR: A comprehensive personalized point-of-interest recommendation method based on heterogeneous graphs
CN109063120A (en) A kind of collaborative filtering recommending method and device based on cluster
CN112950321A (en) Article recommendation method and device
CN114429384B (en) Intelligent product recommendation method and system based on e-commerce platform

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