CN111797321B - Personalized knowledge recommendation method and system for different scenes - Google Patents

Personalized knowledge recommendation method and system for different scenes Download PDF

Info

Publication number
CN111797321B
CN111797321B CN202010646490.8A CN202010646490A CN111797321B CN 111797321 B CN111797321 B CN 111797321B CN 202010646490 A CN202010646490 A CN 202010646490A CN 111797321 B CN111797321 B CN 111797321B
Authority
CN
China
Prior art keywords
user
information
knowledge
vector
learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010646490.8A
Other languages
Chinese (zh)
Other versions
CN111797321A (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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN202010646490.8A priority Critical patent/CN111797321B/en
Publication of CN111797321A publication Critical patent/CN111797321A/en
Application granted granted Critical
Publication of CN111797321B publication Critical patent/CN111797321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Abstract

The disclosure provides a personalized knowledge recommendation method and system for different scenes, which are used for acquiring user data information and judging the using scene of the user data information; if the short-term conversation type scene is detected, establishing a conversation learning model, extracting user interaction items in the conversation as input, modeling each interaction behavior through an attention mechanism, and outputting the preference of conversation content; establishing an edge information learning module, and predicting the current user requirement by mining the edge information of the project by using the graph structure information; if the scene is a long-term continuous scene, a classification-layering attention mechanism is adopted for coding, preference learning is carried out on two levels of knowledge items and categories, and user requirements are predicted; and recommending related information according to the predicted user requirements, wherein the recommended information is more accurate.

Description

Personalized knowledge recommendation method and system for different scenes
Technical Field
The disclosure belongs to a data information processing method, and relates to a personalized knowledge recommendation method and system oriented to different scenes.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
With the innovation and rapid development of internet technology, internet information resources are increased rapidly, and it is very difficult for network users to accurately acquire required contents from massive information resources; for the internet platform, it is also a very challenging matter how to accurately provide appropriate information services for users, improve the efficiency of user access, and optimize the user experience. The recommendation system plays a key role in relieving information overload, and is widely used by a plurality of internet platforms such as e-commerce and online learning websites. With the increasing of internet information resources, the actual value of the recommendation system is higher and higher. The key of the recommendation system is to model the preference of the user according to historical access information (such as scores and clicks) of the user, and predict the demand or interest preference of the user, so that the user is helped to obtain interested contents or services from mass data more quickly.
For a software knowledge learning platform, the data volume of the platform is large, and the knowledge system and the types are various, such as video-class courses and document-type contents. Meanwhile, the knowledge data structure is different, and the organization form is different. In order to provide personalized services, improve user experience, and enhance interactivity between a user and a platform, personalized knowledge recommendation needs to be better performed by combining the platform and the user. Specifically, on one hand, the organization and processing of heterogeneous data on a platform needs to be considered, such as organizing heterogeneous knowledge items using knowledge graphs; on the other hand, the knowledge level difference between different users needs to be considered, and the current requirements and preferences of the users can be better learned by modeling the current knowledge level information of the users.
To the knowledge of the inventors, in the current recommendation method research, the RNN-based sequence modeling method does not consider the potential relationship between the interactive item and other items, and is difficult to capture deeper user requirements. In the method, by combining the knowledge recommendation background of the software knowledge learning platform, scene-based and hierarchical modeling is adopted to perform better knowledge recommendation, and short-term conversation type scene recommendation and long-term continuous type scene recommendation are mainly included. The short-term conversation type scene means that a user may intensively retrieve and browse the associated knowledge items in order to learn a certain knowledge in some time period, that is, the user has a strong purpose of accessing the platform in a subject manner in the time period. The long-term continuous scene means that the access of the user is general and continuous, and the user can continue to learn corresponding knowledge according to the previous learning progress, so that a continuous process of learning the knowledge by the user is embodied. For short-term conversation type recommendation scenes, the early recommendation method mostly only considers the relationship between a user and an item (user-item), which may cause poor recommendation effect; for personalized recommendation based on user knowledge level, the current sequence recommendation model is difficult to capture across categories.
Disclosure of Invention
The invention provides an individualized knowledge recommendation method and system for different scenes to solve the problems, and the method and system are used for carrying out targeted processing on two scenes, namely a short-term conversation scene and a long-term continuous scene, so that the knowledge level representation and the current knowledge requirement of a user can be studied more deeply, and more accurate knowledge recommendation is carried out.
According to some embodiments, the following technical scheme is adopted in the disclosure:
a personalized knowledge recommendation method oriented to different scenes comprises the following steps:
acquiring user data information and judging a use scene of the user data information;
if the short-term conversation type scene is detected, establishing a conversation learning model, extracting user interaction items in the conversation as input, modeling each interaction behavior through an attention mechanism, and outputting the preference of conversation content; establishing an edge information learning module, and predicting the current user requirement by mining the edge information of the project by using the graph structure information;
if the scene is a long-term continuous scene, a classification-layering attention mechanism is adopted for coding, preference learning is carried out on two levels of knowledge items and categories, and user requirements are predicted;
and recommending the relevant information according to the predicted user requirements.
As an alternative embodiment, user data information is acquired, and if the user has historical data exceeding a set value, the user is considered to be in a long-term continuous type scene, otherwise, the user is considered to be in a short-term conversation type scene.
As an alternative implementation, in a short-term conversational scenario, interactive items are mapped to corresponding entities of a knowledge graph based on a series of continuous interactive behaviors of a user in a conversation, and corresponding edge information vector representations are obtained by aggregating attributes and edge-related entities of the entities, so that edge information learning is realized.
As an alternative implementation, in a short-term conversation type scene, a cooperative attention mechanism is introduced based on a user conversation behavior vector and an edge information vector, the importance of each interaction is calculated, the correlation between conversation items and items in a knowledge graph spectrum is quantified, and a comprehensive vector representation of user preference is obtained;
constructing a softmax function by utilizing the comprehensive vector of the user preference; and calculating a loss function of the output value of the softmax function, and training the learning parameters of the gating cycle unit by adopting a back propagation algorithm to finish the training of the model.
As an alternative implementation, in a long-term continuous scene, the information sequence of the learning platform is accessed based on the user history, and the information sequence is mapped into a corresponding vector representation through an embedding operation, so that the user sequence information is encoded.
As an alternative embodiment, based on information encoding of a user sequence, a hidden state of each time step is acquired through a gating cycle unit to obtain information transmission conditions in a history sequence, so that an implicit state vector set is obtained.
As an alternative implementation, based on the obtained implicit state vector set, classifying according to the original label to obtain the implicit vectors corresponding to the knowledge of the same category; converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge;
performing inner product operation on the obtained attention weight of the user to each category of knowledge and a known candidate item set to construct a softmax function; and calculating a loss function of the output value of the softmax function, and training the learning parameters of the gating cycle unit by adopting a back propagation algorithm to finish the training of the model.
A personalized knowledge recommendation system facing different scenes comprises the following steps:
the scene judging module is configured to acquire user data information and judge a use scene of the user data information;
the short-term conversation type scene processing module is configured to establish a conversation learning model, extract user interaction items in a conversation as input, model each interaction behavior through an attention mechanism, and output the preference of conversation contents; establishing an edge information learning module, and predicting the current user requirement by mining the edge information of the project by using the graph structure information;
the long-term continuous scene processing module is configured to encode by adopting a classification-layering attention mechanism, perform preference learning on two levels of a knowledge item and a category and predict user requirements;
and the information recommending module is configured to recommend the relevant information according to the predicted user requirement.
As an alternative embodiment, the short-term conversational scene processing module includes:
the session information learning module is used for modeling the sequential interaction of the users in the session by utilizing the context-associated GRU network, modifying the operation in the traditional GRU unit, adding the interaction behavior of the users into each gate function, and obtaining the vector representation of the user session behavior;
the edge information learning module is used for mapping the interactive items to corresponding entities of a Knowledge Graph (KG) based on a series of continuous interactive behaviors of the user in the session along with time change, and acquiring corresponding edge information vector representation by aggregating attributes and edge related entities of the entities;
the comprehensive vector acquisition module is used for introducing a cooperative attention mechanism based on the user session behavior vector and the edge information vector, calculating the importance of each interaction, quantifying the correlation between the session item and the items in the knowledge graph spectrum, and acquiring comprehensive vector representation of user preference;
the recommendation model training module is used for constructing a softmax function by utilizing the comprehensive vector of the user preference; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
and the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, continuously optimizing the weight value of the data and perfecting the user behavior recommendation result.
As an alternative embodiment, the long-term continuous scene processing module includes:
the user sequence information coding module is used for mapping the user sequence information into corresponding vector representation by embedding operation by utilizing the information sequence of the user history access learning platform;
the hidden state vector learning module is used for obtaining information transmission conditions in the historical sequence through a GRU (generalized regression unit) method based on the coding vector of the user sequence information;
the user knowledge level learning module is used for classifying according to the original labels based on the obtained hidden state vector set to obtain hidden vectors corresponding to knowledge of the same category; converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge level;
the recommendation model training module is used for carrying out inner product operation on the attention weight of each category of knowledge and a known candidate item set by a user to construct a softmax function; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
and the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, continuously optimizing the weight value of the data and perfecting the user behavior recommendation result.
A computer-readable storage medium, wherein a plurality of instructions are stored, and the instructions are adapted to be loaded by a processor of a terminal device and execute the personalized knowledge recommendation method oriented to different scenes.
A terminal device comprising a processor and a computer readable storage medium, the processor being configured to implement instructions; the computer readable storage medium is used for storing a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the personalized knowledge recommendation method facing different scenes.
Compared with the prior art, the beneficial effect of this disclosure is:
(1) the method and the system respectively carry out recommendation research from two angles of a short-term conversation type scene and a long-term continuous type scene, so that the purpose of personalized recommendation is achieved;
(2) for a short-term conversation type scene, the method is based on a series of continuous interaction behavior data (such as browsing, clicking and the like) of a user in a historical conversation, and considers two aspects of user conversation information learning and edge information learning to better mine potential preference information of the user. For user session information learning, based on a sequence of historical access sessions of users, modeling sequential interaction of the users in the sessions by using a context-associated GRU network to obtain user session behavior vector representation; for the learning of the edge information, the inventor maps interactive items in the session to corresponding entities of a knowledge graph, and corresponding edge information vector representation is obtained by aggregating the attributes of the entities and edge related entities;
(3) aiming at a short-term conversation type scene, the method introduces a cooperative attention mechanism based on a user conversation behavior vector and an edge information vector in consideration of the fact that the items in a user conversation and the information of the items in a knowledge graph have relevance, calculates the importance of each interaction, quantifies the relevance between the conversation items and the items in the knowledge graph, and obtains comprehensive vector representation of user preference, thereby improving the recommendation effect;
(4) aiming at a long-term continuous scene, the method is based on an information sequence of a user history access knowledge platform, in order to learn the current knowledge level change condition of the user, a user embedded vector is converted into a category query vector, a knowledge sensitive attention mechanism is introduced, and the attention weight of the user to each category of knowledge is calculated, so that more suitable recommendation is completed.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure and are not to limit the disclosure.
Fig. 1 is an overall flowchart of a personalized recommendation method for different scenes according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of a process for collaborative attention based user behavior recommendation provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart of a process for attention network recommendation based on knowledge level awareness provided by an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating an attention mechanism recommendation provided by an embodiment of the present disclosure;
FIG. 5 is a flowchart of a recommendation embodiment for different scenarios provided by an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a recommendation device facing different scenes according to an embodiment of the present disclosure.
The specific implementation mode is as follows:
the present disclosure is further described with reference to the following drawings and examples.
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present disclosure. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
As shown in fig. 1 to 5, a personalized recommendation method for different scenes in this embodiment includes:
for a short-term conversational type scenario,
A. the method comprises the steps of collecting user session data, including historical data and current interactive data, and conducting data preprocessing on the acquired massive user session interactive data, including data cleaning, missing data completion, data definition and storage.
Specifically, interactive data of a user are acquired as application examples based on an online purchasing platform, music interactive data and E-commerce interactive data are acquired respectively, and a data set is divided into training data and testing data. As shown in table 1, a data set of interactions in a historical session is for a user.
Table 1 basic statistical information of data sets
Figure BDA0002573322410000091
Figure BDA0002573322410000101
B. Based on a series of continuous interactive behaviors (such as browsing, clicking and the like) of a user in a session, the sequential interaction of the user in the session is modeled by using a context-associated GRU network, the operation in a traditional GRU unit is modified, the interactive behaviors of the user are added into various gate functions, and a user session behavior vector representation is obtained, so that session information learning is realized.
Specifically, the general generation process of the user session information learning in step B is as follows:
B1. session Behavior Learning (SBL) is the modeling of short-term session behavior of a given user u, more specifically, for a given user access session sequence Su={(x1,b1),(x2,b2),…,(xi,bi)},xiThe ith item within the session is represented,irepresenting the way the user interacts with item i (e.g., click, purchase, etc.). Firstly, modeling is carried out according to continuous interactive behaviors (such as browsing, clicking and the like) of a user in a session, and preference information in the current session of the user is obtained.
B2. Modeling sequential interactions of users in a session using context-dependent GRU networks and modifying operations in conventional GRU units, biThe interaction behavior of (2) is added to each gate function separately. Previous studies have demonstrated that GRUs perform better than LSTM in session-based recommendations. Hidden state h in GRUtMay be the previous hidden state ht-1And candidate hidden states
Figure BDA0002573322410000102
Linear interpolation between:
Figure BDA0002573322410000103
zt=σ(Wzxt+Vzbt+Uzht-1) (2)
Figure BDA0002573322410000111
rt=σ(Wrxt+Vrbt+Urht-1) (4)
wherein z istUpdating the gate function;
Figure BDA0002573322410000112
is a candidate activation function; r istIs a reset gate function; wz,Vz,Uz,Wr,Vr,UrRespectively, are weight coefficients.
As described above, implicit state h is usedtSave the current meetingThe intention information of the user in the conversation can be obtained to obtain a user conversation preference set Iu:
Iu={hs,1,hs,2,…,hs,t} (5)
Wherein Iu∈RD×tD is the dimension of the hidden state and R represents the set of real numbers.
C. In the learning of the edge information, the interactive item is mapped to the corresponding entity in the Knowledge Graph (KG), and the attribute of the entity and the edge related entity are aggregated to obtain the corresponding neighborhood information representation N (x)n) And performing relevant potential interest learning. But in real-world knowledge maps, the number and relationship of the neighbors of an entity may vary greatly. To keep the computation of each batch stable and efficient, a fixed-size neighbor set is randomly selected without using its full neighbors.
Specifically, the general generation process of the user edge information learning in step C is as follows:
C1. mapping the interactive items to corresponding entities in a Knowledge Graph (KG) based on a user historical conversation sequence, and aggregating attributes and edge related entities of the entities to obtain corresponding neighborhood information representation N (x)n). Computing a neighborhood representation v of an entity viN (v) is:
Figure BDA0002573322410000113
wherein
Figure BDA0002573322410000121
Representing a relationship weight score between entities.
C2. For each interactive item inCalculating i layer by layernAnd represents neighborhood information of the entity item in the form of neighbor aggregation:
aggneighbor=σ(W·vN(v)+b) (7)
aggregation is a key step for obtaining neighborhood information representation, and the implementation aggregates each entity in a session to obtain a neighborhood information set NuWatch, watchEdge information collection of interactive items within a session:
Nu={aggneighbor,1,aggneighbor,2,…,aggneighbor,t} (8)
D. introducing a cooperative attention mechanism based on the user session behavior vector and the edge information vector, calculating the importance of each interaction, quantifying the correlation between the session items and the items in the knowledge graph spectrum, and obtaining a comprehensive vector representation of the user preference:
the conversation behavior vector I obtained in the step B is useduAnd the edge information vector N obtained in step CuAs input to the cooperative attention network, a correlation matrix c is calculated:
Figure BDA0002573322410000122
wherein, WcF is a tanh function as a weight coefficient.
Then, taking the correlation matrix c as a feature, the attention for calculating the preference and edge information in the session is:
Ps=f1(WNNu+(WiIu+Wihs,t)CT) (10)
Figure BDA0002573322410000123
in the same way as above, the first and second,
Pu=f1(WiIu+(WNNu+Wtaggneighbor,t)CT) (12)
Figure BDA0002573322410000131
wherein f is1,f2Tan h function and softmax function, W, respectivelys,Wt,WtAre weight coefficients.
Depending on the weight of attention, the interdependent characterization of the user's long-term and short-term preferences can be computed as a weighted sum of their interactive characterizations:
Figure BDA0002573322410000132
and
Figure BDA0002573322410000133
to emphasize the effect of the current term on user preferences, this implementation uses Pu=[Ico-u;hs,t],Ps=[Pco-u;aggneighbor,t]The final intra-session preference and edge information potential preference are represented separately.
Finally, the two are combined with the candidate item set, and comprehensive vector representation of user preference is obtained
Figure BDA0002573322410000134
Figure BDA0002573322410000135
E. D, recommending the user behavior of the sample to be predicted, and outputting the result in the step D
Figure BDA0002573322410000136
Inputting softmax layer results in output values as follows:
Figure BDA0002573322410000137
where y' represents the output vector of the model, representing the probability distribution of the candidate items, each probability representing the probability that the item is the next visit.
F. And (3) adopting cross entropy as a loss function, and if y is a real class distribution, defining the loss function as follows:
Figure BDA0002573322410000141
then, optimization was performed using a random gradient descent optimizer.
User behavior recommendation is performed on a sample to be tested, a recommendation result is pushed and compared with an actual user behavior, and table 2 describes performance comparison of methods in the user behavior recommendation:
TABLE 2 Performance comparison of user behavior recommendations
Figure BDA0002573322410000142
Based on the results in table 2, the performance of the proposed user behavior recommendation model of this embodiment is superior to other methods.
For a long-term continuous-type scene recommendation,
A. the method comprises the steps of collecting user access knowledge platform data, including historical data and current data, preprocessing the acquired massive user access data, including data cleaning, missing data completion, data definition and storage.
Specifically, historical access data of a user are obtained as an application example based on a knowledge software knowledge learning platform, and the obtained access data of the user mainly comprise a user ID, a user access course ID, time T for the user to access the course, a user access progress P, difficulty level H for the user to access the course, a category C to which the user accesses the course, and the like. Firstly, the acquired data is processed, and too few and too long user data samples are screened to obtain user access data with uniform length. The specific user data description is shown in table 3.
TABLE 3 basic statistics of the data set
Recording Number of Number after screening
User recording 114827 109696
Course(s) 837 445
User' s 12600 10398
Chapters and sections 3227 2164
Class of course 26 26
B. Based on the historical information sequence of the user accessing the software knowledge learning platform, the current knowledge level of the user can be analyzed hierarchically and the current required knowledge of the user can be presumed.
Let u denote the user, the route that the user has historically learned: the initial full sequence is:
S(u)={k1,k2,…,kn} (1)
further, an internal (implicit) sequence is obtained according to the classification of the class label to which the knowledge belongs:
ci={k1,k2,…,kmwhere m < n (2)
It should be noted that k is1,kiNot necessarily consecutive items in the initial full sequence.
Therefore, the user history learning complete sequence can be expressed as:
Figure BDA0002573322410000161
C. historical access sequence S for a given userk={k1,k2,…,knN is the number of items accessed by the user history. The sequence K is then converted by the embedding layer into a space vector representation E ═ E1,e2,…,en},eiFor a D-dimensional vector, D is the number of all terms, and UserID is also converted into a spatial vector representation by embedding.
D. Based on the user sequence information code obtained in the step C, the hidden state h of each time step is obtained by using a GRU-based methodt,htMay be the previous hidden state ht-1And candidate hidden states
Figure BDA0002573322410000162
Linear interpolation between:
Figure BDA0002573322410000163
wherein the content of the first and second substances,
zt=σ(Wzxt+Uzht-1) (5)
at the same time, candidate activation functions
Figure BDA0002573322410000164
Comprises the following steps:
Figure BDA0002573322410000165
wherein the gate function r is resettThe calculation is as follows:
rt=σ(Wrxt+Urht-1) (7)
W,U,Wz,Uz,Wr,Urare weight coefficients.
By obtaining the implicit state h for each time step, as described aboveiTo obtain the information transmission condition in the history sequence, and obtain the implicit state vector set HS={hs,1,hs,2,…,hs,t},Iu∈RD×tWhere R represents a natural dataset and D is a dimension of the hidden state.
E. Classifying the hidden state vector set obtained in the step D according to the original labels to obtain hidden vectors corresponding to knowledge of the same category, wherein one category is represented as:
Cn={hs,i,hs,j,…,hs,k} (8)
wherein n, i, j, k are constants.
Then, the implicit vectors within the same class are concatenated in series:
Cn=[hs,ihs,j,…,hs,k] (9)
wherein n, i, j, k are constants.
To obtain a current knowledge level representation of a user, a user embedded vector is first converted into a category query vector qcThe expression is as follows:
qc=RelU(Vc×eu+bc) (10)
then, the category-level knowledge sensitive attention score is calculated as follows:
αp(ci)=cTσ(Wp×qc+bp) (11)
Figure BDA0002573322410000171
the end-user knowledge level representation upIs the sum of the attention representations of the classes, weighted according to their attention weights:
Figure BDA0002573322410000172
to verify the improvement of the attention mechanism to the recommendation effect, the performance difference of LSTM + attention and LSTM can be compared, as shown in fig. 4. From the fact that the LSTM + attention result is superior to the LSTM, the attention mechanism has certain learning capacity in sequence modeling, and the effect of the model can be improved in sequence recommendation.
F. Herein, a negative sampling technique is adopted to jointly predict click scores of K +1 candidate sets in model training. The K +1 candidate sets consist of one positive sample of one user and K randomly selected negative samples.
Figure BDA0002573322410000181
Is formed by a candidate set kiAnd a user current knowledge level representation upThen calculated by the softmax function:
Figure BDA0002573322410000182
Figure BDA0002573322410000183
based on the above description, an attention network personalized recommendation algorithm based on knowledge level perception is given.
The attention network personalized recommendation algorithm process based on knowledge level perception is as follows:
inputting: user access record sequence K, user embedding vector u, candidate set V
And (3) outputting: score for each candidate knowledge item
Figure BDA0002573322410000184
01. Model initialization
02.for k in sequence do
03.v=Embedding{k}
04.Dense{v},then GRU-based{vi}
05. Acquiring hidden state in GRU network
06.end for
07.for c in C:
08.for h in c:
09.Concat{hi}
10.Attention layer{category-level}
11. Calculating the contribution score of each knowledge to the current knowledge level on the category level through the formula (12)
12. By equation (13), a knowledge level representation of the current user is obtained
13. Candidate knowledge item k by equations (14) (15)c-iWith user representation upCalculating recommendation score by dot product
Figure BDA0002573322410000191
The core idea of the algorithm is that modeling is carried out based on user sequence access information and characteristic information of classification of the user sequence access information, and the current knowledge level state of a user is learned, so that knowledge recommendation is carried out more reasonably. Specifically, sequence modeling is carried out through a GRU-based method, context information accessed by a user sequence is learned, reclassification processing is carried out according to class characteristics of knowledge items, and the hidden states of the same class are connected in series (lines 2-6); then, at the category level, the contribution score of each type of knowledge to the current user knowledge level is calculated using an attention mechanism (lines 7-10); finally, a knowledge level representation of the current user is obtained and a recommendation score for each candidate is calculated (lines 11-13).
G. And (3) adopting cross entropy as a loss function, and if y is a real class distribution, defining the loss function as follows:
Figure BDA0002573322410000192
then, optimization was performed using a random gradient descent optimizer.
This implementation adopts TensorFlow and Keras to realize the framework of the model and the baseline model that propose, in order to prevent overfitting, used two dropout layers: the first dropout layer is used between the knowledge item embedding layer and the GRU layer, and the discarding rate is set to be 20%; the second dropout layer has a drop rate set to 30% before the user knowledge level is expressed. In order to accurately classify hidden states in the GRU, the text acquires category feature labels corresponding to time steps by position. During training, the learning rate is set to 0.001 and the batch size is set to 128. In the optimization process, parameter optimization is performed by using an Adam optimizer.
User behavior recommendation is performed on the sample to be tested, the recommendation result is pushed and compared with the actual user behavior, and table 4 describes the performance comparison of the method in the user behavior recommendation:
TABLE 4 comparison of Properties
Figure BDA0002573322410000201
Based on the results in table 4, the proposed recommendation model (KLAN) of this embodiment performs better than other methods.
The short-term conversational recommendation scene proposed by the embodiment is generally that a user frequently accesses the content or knowledge of the platform within a certain time, and the purpose is strong. The long-term conversation type recommendation scene is usually directed at a knowledge learning scene with an advanced level and has long-term continuity. Such as the learning history of shallow and deep for each system of knowledge.
As shown in fig. 6, the present embodiment provides a personalized recommendation device facing different scenes, including:
for short-term conversational-type scene recommendations,
(1) the session information learning module is used for modeling the sequential interaction of the users in the session by utilizing the context-associated GRU network, modifying the operation in the traditional GRU unit, adding the interaction behavior of the users into each gate function, and obtaining the vector representation of the session behavior of the users, thereby realizing the session information learning;
(2) the edge information learning module is used for mapping the interactive items to corresponding entities of a Knowledge Graph (KG) based on a series of continuous interactive behaviors (such as browsing, clicking and the like) which change along with time in a conversation of a user, and obtaining corresponding edge information vector representation by aggregating attributes and edge related entities of the entities, so that the edge information learning is realized.
(3) The comprehensive vector acquisition module is used for introducing a cooperative attention mechanism based on the user session behavior vector and the edge information vector, calculating the importance of each interaction, quantifying the correlation between the session item and the items in the knowledge graph spectrum, and acquiring comprehensive vector representation of user preference;
(4) the recommendation model training module is used for constructing a softmax function by utilizing the comprehensive vector of the user preference; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
specifically, in the recommendation model training module, the cross entropy is used as a loss function of the recommendation model to realize the training of the model.
(5) And the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, and continuously optimizing the weight value of the data, thereby continuously improving the user behavior recommendation.
For a long-term continuous-type scene recommendation,
(1) the user sequence information coding module is used for mapping the user sequence information into corresponding vector representation by utilizing the information sequence of the user history access learning platform through embedding operation, so that the user sequence information coding is realized;
(2) an implicit state vector learning module, which is used for obtaining information transmission conditions in a history sequence through a GRU method based on the coding vector of the user sequence information so as to learn the implicit state vector set,
(3) the user knowledge level learning module is used for classifying according to the original labels based on the obtained hidden state vector set to obtain hidden vectors corresponding to knowledge of the same category; meanwhile, in order to obtain the current knowledge level representation of the user, converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge level;
(4) the recommendation model training module is used for carrying out inner product operation on the attention weight of each category of knowledge and a known candidate item set by a user to construct a softmax function; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
specifically, in the recommendation model training module, the cross entropy is used as a loss function of the recommendation model to realize the training of the model.
(5) And the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, and continuously optimizing the weight value of the data, thereby continuously improving the user behavior recommendation.
In another embodiment, a personalized recommendation device facing different scenes is characterized by further comprising:
and the preprocessing module is used for preprocessing data of mass historical user data, and comprises data cleaning, missing data completion, data definition and normalization processing.
In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the recommendation method as shown in fig. 1.
In another embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the proposed method as shown in fig. 1 when executing the program.
As will be appreciated by one skilled in the art, embodiments of the present disclosure may be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present disclosure 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 so forth) having computer-usable program code embodied therein.
The present disclosure is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the disclosure. 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.
The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure, and various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
Although the present disclosure has been described with reference to specific embodiments, it should be understood that the scope of the present disclosure is not limited thereto, and those skilled in the art will appreciate that various modifications and changes can be made without departing from the spirit and scope of the present disclosure.

Claims (8)

1. A personalized knowledge recommendation method oriented to different scenes is characterized by comprising the following steps: the method comprises the following steps:
acquiring user data information and judging a use scene of the user data information;
if the short-term conversation type scene is detected, establishing a conversation learning model, extracting user interaction items in the conversation as input, modeling each interaction behavior through an attention mechanism, and outputting the preference of conversation content; establishing an edge information learning module, and predicting the current user requirement by mining the edge information of the project by using the graph structure information;
if the scene is a long-term continuous scene, a classification-layering attention mechanism is adopted for coding, preference learning is carried out on two levels of knowledge items and categories, and user requirements are predicted; the method specifically comprises the following steps: based on the information sequence of the user history access learning platform, mapping the information sequence into corresponding vector representation through embedding operation to realize the information coding of the user sequence; based on information coding of a user sequence, acquiring a hidden state of each time step through a gating circulation unit to obtain an information transmission condition in a historical sequence, so as to obtain a hidden state vector set; recommending related information according to the predicted user requirements;
classifying according to the original labels based on the obtained hidden state vector set to obtain hidden vectors corresponding to knowledge of the same category; converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge;
performing inner product operation on the obtained attention weight of the user to each category of knowledge and a known candidate item set to construct a softmax function; and calculating a loss function of the output value of the softmax function, and training the learning parameters of the gating cycle unit by adopting a back propagation algorithm to finish the training of the model.
2. The method as claimed in claim 1, wherein the method comprises: and acquiring user data information, and if the user has historical data exceeding a set value, considering the user to be in a long-term continuous scene, or else, considering the user to be in a short-term session scene.
3. The method as claimed in claim 1, wherein the method comprises: during a short-term conversation type scene, based on a series of continuous interactive behaviors of a user in a conversation, mapping interactive items to corresponding entities of a knowledge map, and aggregating attributes and edge related entities of the entities to obtain corresponding edge information vector representation so as to realize edge information learning;
or, when in a short-term conversation type scene, a cooperative attention mechanism is introduced based on a user conversation behavior vector and an edge information vector, the importance of each interaction is calculated, the correlation between conversation items and items in a knowledge graph spectrum is quantized, and comprehensive vector representation of user preference is obtained;
constructing a softmax function by utilizing the comprehensive vector of the user preference; and calculating a loss function of the output value of the softmax function, and training the learning parameters of the gating cycle unit by adopting a back propagation algorithm to finish the training of the model.
4. A personalized knowledge recommendation system oriented to different scenes is characterized in that: the method comprises the following steps:
the scene judging module is configured to acquire user data information and judge a use scene of the user data information;
the short-term conversation type scene processing module is configured to establish a conversation learning model, extract user interaction items in a conversation as input, model each interaction behavior through an attention mechanism, and output the preference of conversation contents; establishing an edge information learning module, and predicting the current user requirement by mining the edge information of the project by using the graph structure information;
the long-term continuous scene processing module is configured to encode by adopting a classification-layering attention mechanism, perform preference learning on two levels of a knowledge item and a category and predict user requirements;
the user sequence information coding module is used for mapping the user sequence information into corresponding vector representation by embedding operation by utilizing the information sequence of the user history access learning platform;
the hidden state vector learning module is used for obtaining information transmission conditions in the historical sequence through a GRU (generalized regression unit) method based on the coding vector of the user sequence information; classifying according to the original label to obtain an implicit vector corresponding to the knowledge of the same category; converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge;
and the information recommending module is configured to recommend the relevant information according to the predicted user requirement.
5. The system of claim 4, wherein the system comprises: the short-term session type scene processing module comprises:
the session information learning module is used for modeling the sequential interaction of the users in the session by utilizing the context-associated GRU network, modifying the operation in the traditional GRU unit, adding the interaction behavior of the users into each gate function, and obtaining the vector representation of the user session behavior;
the edge information learning module is used for mapping the interactive items to corresponding entities of the knowledge graph based on a series of continuous interactive behaviors of the user in the session along with time change, and acquiring corresponding edge information vector representation by aggregating attributes and edge related entities of the entities;
the comprehensive vector acquisition module is used for introducing a cooperative attention mechanism based on the user session behavior vector and the edge information vector, calculating the importance of each interaction, quantifying the correlation between the session item and the items in the knowledge graph spectrum, and acquiring comprehensive vector representation of user preference;
the recommendation model training module is used for constructing a softmax function by utilizing the comprehensive vector of the user preference; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
and the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, continuously optimizing the weight value of the data and perfecting the user behavior recommendation result.
6. The system of claim 4, wherein the system comprises: the long-term continuous scene processing module comprises:
the user sequence information coding module is used for mapping the user sequence information into corresponding vector representation by embedding operation by utilizing the information sequence of the user history access learning platform;
the hidden state vector learning module is used for obtaining information transmission conditions in the historical sequence through a GRU (generalized regression unit) method based on the coding vector of the user sequence information;
the user knowledge level learning module is used for classifying according to the original labels based on the obtained hidden state vector set to obtain hidden vectors corresponding to knowledge of the same category; converting the user embedded vector into a category query vector, and introducing a knowledge sensitive attention mechanism to calculate the attention weight of the user to each category knowledge level;
the recommendation model training module is used for carrying out inner product operation on the attention weight of each category of knowledge and a known candidate item set by a user to construct a softmax function; calculating a loss function of the output value of the softmax function, and training the learning parameters of the GRU by adopting a back propagation algorithm to finish the training of the model;
and the feedback updating module is used for outputting the recommendation result of the experimental sample set after the model training is finished, comparing the recommendation result with the actual user behavior, feeding back and updating the bottom data information, continuously optimizing the weight value of the data and perfecting the user behavior recommendation result.
7. A computer-readable storage medium characterized by: a plurality of instructions are stored, the instructions are suitable for being loaded by a processor of the terminal equipment and executing the personalized knowledge recommendation method facing different scenes, wherein the personalized knowledge recommendation method is as claimed in any one of claims 1 to 3.
8. A terminal device is characterized in that: the system comprises a processor and a computer readable storage medium, wherein the processor is used for realizing instructions; the computer readable storage medium is used for storing a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the personalized knowledge recommendation method facing different scenes, wherein the personalized knowledge recommendation method is as claimed in any one of claims 1 to 3.
CN202010646490.8A 2020-07-07 2020-07-07 Personalized knowledge recommendation method and system for different scenes Active CN111797321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010646490.8A CN111797321B (en) 2020-07-07 2020-07-07 Personalized knowledge recommendation method and system for different scenes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010646490.8A CN111797321B (en) 2020-07-07 2020-07-07 Personalized knowledge recommendation method and system for different scenes

Publications (2)

Publication Number Publication Date
CN111797321A CN111797321A (en) 2020-10-20
CN111797321B true CN111797321B (en) 2021-04-27

Family

ID=72809696

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010646490.8A Active CN111797321B (en) 2020-07-07 2020-07-07 Personalized knowledge recommendation method and system for different scenes

Country Status (1)

Country Link
CN (1) CN111797321B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112269927A (en) * 2020-10-22 2021-01-26 辽宁工程技术大学 Recommendation method based on session sequence dynamic behavior preference coupling relation analysis
CN114610950B (en) * 2020-12-04 2023-11-07 中山大学 Graph network node representation method
CN112559864B (en) * 2020-12-14 2023-03-31 西安电子科技大学 Bilinear graph network recommendation method and system based on knowledge graph enhancement
CN113596131A (en) * 2020-12-21 2021-11-02 刚倩 Page entry extraction model training method and system based on deep learning
CN112529637B (en) * 2020-12-22 2022-12-06 烟台大学 Service demand dynamic prediction method and system based on context awareness
CN112612973B (en) * 2020-12-31 2022-03-22 重庆邮电大学 Personalized intelligent clothing matching recommendation method combining knowledge graph
CN112882621B (en) * 2021-02-07 2022-11-18 微民保险代理有限公司 Module display method, module display device, computer equipment and storage medium
CN112925892B (en) * 2021-03-23 2023-08-15 苏州大学 Dialogue recommendation method and device, electronic equipment and storage medium
CN113449182B (en) * 2021-06-09 2023-06-06 山东大学 Knowledge information personalized recommendation method and system
CN113609266A (en) * 2021-07-09 2021-11-05 阿里巴巴新加坡控股有限公司 Resource processing method and device
CN113807469A (en) * 2021-11-16 2021-12-17 中国科学院理化技术研究所 Multi-energy user value prediction method, device, storage medium and equipment
CN114611015A (en) * 2022-03-25 2022-06-10 阿里巴巴达摩院(杭州)科技有限公司 Interactive information processing method and device and cloud server
CN117094387B (en) * 2023-10-19 2023-12-19 成都市智慧蓉城研究院有限公司 Knowledge graph construction method and system based on big data

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107871164A (en) * 2017-11-17 2018-04-03 济南浪潮高新科技投资发展有限公司 A kind of mist computing environment personalization deep learning method
CN110008409A (en) * 2019-04-12 2019-07-12 苏州市职业大学 Based on the sequence of recommendation method, device and equipment from attention mechanism
CN110287335A (en) * 2019-06-17 2019-09-27 桂林电子科技大学 The personalized recommending scenery spot method and device of knowledge based map and user's shot and long term preference
CN110807156A (en) * 2019-10-23 2020-02-18 山东师范大学 Interest recommendation method and system based on user sequence click behaviors
CN110851601A (en) * 2019-11-08 2020-02-28 福州大学 Cross-domain emotion classification system and method based on layered attention mechanism
CN110941764A (en) * 2019-12-03 2020-03-31 腾讯科技(深圳)有限公司 Object recommendation method and device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11487986B2 (en) * 2017-10-13 2022-11-01 Microsoft Technology Licensing, Llc Providing a response in a session
CN108648049B (en) * 2018-05-03 2022-03-01 中国科学技术大学 Sequence recommendation method based on user behavior difference modeling
CN108921657B (en) * 2018-06-25 2021-06-29 中国人民大学 Knowledge-enhanced memory network-based sequence recommendation method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107871164A (en) * 2017-11-17 2018-04-03 济南浪潮高新科技投资发展有限公司 A kind of mist computing environment personalization deep learning method
CN110008409A (en) * 2019-04-12 2019-07-12 苏州市职业大学 Based on the sequence of recommendation method, device and equipment from attention mechanism
CN110287335A (en) * 2019-06-17 2019-09-27 桂林电子科技大学 The personalized recommending scenery spot method and device of knowledge based map and user's shot and long term preference
CN110807156A (en) * 2019-10-23 2020-02-18 山东师范大学 Interest recommendation method and system based on user sequence click behaviors
CN110851601A (en) * 2019-11-08 2020-02-28 福州大学 Cross-domain emotion classification system and method based on layered attention mechanism
CN110941764A (en) * 2019-12-03 2020-03-31 腾讯科技(深圳)有限公司 Object recommendation method and device, computer equipment and storage medium

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
A Co-Attention Model with Sequential Behaviors and Side Information for Session-based Recommendation;Lin Li 等;《2020 IEEE International Conference on Web Services (ICWS)》;20201023;118-125 *
CAME: Content- and Context-Aware Music Embedding for Recommendation;Wang, Dongjing 等;《IEEE transactions on neural networks and learning systems》;20200414;1-14 *
Session-based recommendations with recurrent neural networks;B. Hidasi 等;《https://arxiv.org/pdf/1511.06939.pdf》;20160329;1-10 *
智能电网系统中费控服务的优化调度研究;史玉良 等;《计算机学报》;20190705;第43卷(第2期);272-285 *
面向软件知识学习平台的个性化推荐研究;李琳;《中国优秀硕士学位论文全文数据库 信息科技辑》;20201215(第 12 期);I138-480 *
面向问答式评论文本的属性类别分类方法研究;刘木沐;《中国优秀硕士学位论文全文数据库 信息科技辑》;20200615;I138-1279 *

Also Published As

Publication number Publication date
CN111797321A (en) 2020-10-20

Similar Documents

Publication Publication Date Title
CN111797321B (en) Personalized knowledge recommendation method and system for different scenes
CN111177575B (en) Content recommendation method and device, electronic equipment and storage medium
Wu et al. Session-based recommendation with graph neural networks
CN111931062B (en) Training method and related device of information recommendation model
CN110717098B (en) Meta-path-based context-aware user modeling method and sequence recommendation method
CN111222332B (en) Commodity recommendation method combining attention network and user emotion
CN109033408B (en) Information pushing method and device, computer readable storage medium and electronic equipment
CN112417306B (en) Method for optimizing performance of recommendation algorithm based on knowledge graph
WO2023065859A1 (en) Item recommendation method and apparatus, and storage medium
CN111310063A (en) Neural network-based article recommendation method for memory perception gated factorization machine
CN108536784B (en) Comment information sentiment analysis method and device, computer storage medium and server
CN109471982B (en) Web service recommendation method based on QoS (quality of service) perception of user and service clustering
CN112364976A (en) User preference prediction method based on session recommendation system
CN114780831A (en) Sequence recommendation method and system based on Transformer
CN113918832B (en) Graph convolution collaborative filtering recommendation system based on social relationship
CN114202061A (en) Article recommendation method, electronic device and medium based on generation of confrontation network model and deep reinforcement learning
CN113918833B (en) Product recommendation method realized through graph convolution collaborative filtering of social network relationship
CN111737578A (en) Recommendation method and system
CN113761359B (en) Data packet recommendation method, device, electronic equipment and storage medium
CN112085525A (en) User network purchasing behavior prediction research method based on hybrid model
CN113918834B (en) Graph convolution collaborative filtering recommendation method fusing social relations
CN107169830B (en) Personalized recommendation method based on clustering PU matrix decomposition
CN110347916B (en) Cross-scene item recommendation method and device, electronic equipment and storage medium
CN109885758A (en) A kind of recommended method of the novel random walk based on bigraph (bipartite graph)
CN113268657B (en) Deep learning recommendation method and system based on comments and item descriptions

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