WO2022218139A1 - Personalized search method and search system combined with attention mechanism - Google Patents
Personalized search method and search system combined with attention mechanism Download PDFInfo
- Publication number
- WO2022218139A1 WO2022218139A1 PCT/CN2022/083375 CN2022083375W WO2022218139A1 WO 2022218139 A1 WO2022218139 A1 WO 2022218139A1 CN 2022083375 W CN2022083375 W CN 2022083375W WO 2022218139 A1 WO2022218139 A1 WO 2022218139A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- item
- user
- visible
- layer
- group
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000008447 perception Effects 0.000 claims abstract description 32
- 238000012549 training Methods 0.000 claims abstract description 18
- 239000013598 vector Substances 0.000 claims description 83
- 101000742844 Homo sapiens RNA-binding motif protein, Y chromosome, family 1 member A1 Proteins 0.000 claims description 69
- 102100038040 RNA-binding motif protein, Y chromosome, family 1 member A1 Human genes 0.000 claims description 69
- 101001046999 Homo sapiens Kynurenine-oxoglutarate transaminase 3 Proteins 0.000 claims description 58
- 230000004913 activation Effects 0.000 claims description 43
- 238000011156 evaluation Methods 0.000 claims description 40
- 230000006870 function Effects 0.000 claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 12
- 101001076867 Homo sapiens RNA-binding protein 3 Proteins 0.000 claims description 11
- 102100025902 RNA-binding protein 3 Human genes 0.000 claims description 11
- 230000004927 fusion Effects 0.000 claims description 7
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000010276 construction Methods 0.000 claims description 5
- 230000002452 interceptive effect Effects 0.000 claims description 5
- 230000006399 behavior Effects 0.000 claims description 4
- 238000012552 review Methods 0.000 claims description 4
- 238000005070 sampling Methods 0.000 claims 1
- 230000003044 adaptive effect Effects 0.000 abstract description 4
- 238000005457 optimization Methods 0.000 description 8
- 230000001149 cognitive effect Effects 0.000 description 2
- 238000007418 data mining Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 230000001537 neural effect Effects 0.000 description 2
- 230000001568 sexual effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000002360 explosive Substances 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 238000007620 mathematical function Methods 0.000 description 1
- 238000013178 mathematical model Methods 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000010845 search algorithm Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2415—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- the invention belongs to the technical field of data mining, and particularly relates to a personalized search method and a search system.
- the essence of the personalized search task for user-generated content is to search for optimization goals that meet user needs and personalized preferences in the dynamic evolution space composed of multi-source heterogeneous user-generated data, which is a kind of dynamic qualitative index optimization problem. Due to this kind of complex qualitative index optimization problem, not only its objective function and performance index cannot be accurately described by mathematical functions, but even the decision variables of its optimization problem are no longer simple structured data, and often have greater subjectivity and ambiguity. , uncertainty and inconsistency, users are required to qualitatively analyze, evaluate and make decisions on the items to be searched based on their experience, knowledge and interests, so it is difficult to establish a specific and accurate mathematical model for description. In recent years, the interactive co-evolutionary computing integrated with human intelligence evaluation, which combines the user's subjective cognitive experience, intelligent evaluation decision-making and traditional evolutionary computing, is an effective way to deal with the above-mentioned complex personalized search qualitative index optimization problem.
- the Chinese patent with application number CN2020102165574 discloses an interactive personalized search method driven by restricted Boltzmann machine, wherein the construction of the user interest preference model does not consider the different influences of decision variables describing different item attributes on user preference.
- the same weight is used for the decision variables of the items used, which cannot fully reflect the impact of each decision variable on user preferences, so it is difficult to build a more accurate user preference model, which further affects the effect of users' personalized search.
- the present invention provides a personalized search method and a search system integrating attention mechanism, wherein the search method takes into account the different influences of different decision components on user preferences, which can help users to better Personalize your search efficiently.
- the present invention discloses a personalized search method integrating attention mechanism, including:
- Step 1 Collect and obtain user-generated content, which includes all items that user u has evaluated, ratings and textual comments for each item, images of each item, and usefulness of other users’ evaluations of user u. Sexual evaluation score; vectorize text comments, extract features from item images, and obtain feature vectors;
- Step 3 Build a user preference perception model fused with an attention mechanism.
- the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, wherein the visible layer of the first layer of restricted Boltzmann machines includes the first layer of restricted Boltzmann machines.
- a group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 is the visible layer, and the second layer of RBM is formed with the hidden layer h 2 ; h 2 is the visible layer layer, and the hidden layer h 3 constitutes the third layer of RBM;
- the activation state of each visible unit is independent, and the vector of an item x i represents [C i , T i , G i ] input to the visible layer, its first
- the activation probabilities of the visible units in the group, the second group, and the third group are:
- a 1,j , a 1,k and a 1,l represent the first, second and third visible cell offsets, respectively.
- the information entropy of the item category label is:
- the information entropy of the text review vector is:
- the information entropy of the item image feature vector is:
- c ij represents the j-th element of the category label vector C i of the item x i
- p(c ij ) represents the visible unit activation probability corresponding to the j-th element represented by the item category label vector in RBM1;
- t ik represents user u’s textual comments on item xi i to represent the k-th element of T i
- p(t ik ) represents the visible unit activation probability corresponding to the k-th element represented by the user text comment vector in RBM1;
- g il represents, p(g il ) represents the image feature vectorization of item x i represents the lth element of G i , p(g il ) represents the visible unit in RBM1 corresponding to the lth element represented by the item image feature vector activation probability;
- H(x i ) H(C i )+H(T i )+H(G i );
- v1j is the state of the jth visible unit in the first group of visible units v1 of RMB1 ;
- v2k is the kth visible unit in the second group of visible units v2 of RMB1
- ⁇ i represents the state of each visible unit in the visible layer of RBM1, the state of the m 1 hidden unit in the hidden layer h 1 ;
- n ( xi ) represents the attention weight of each decision component ⁇ in of item x i ;
- the item xi in the dominant item group D is coded based on the attention mechanism, and expressed as x ati after coding:
- x atn' is the n'th element of x ati ;
- the self-attention mechanism operation is performed by the visible unit activation probability V RBM1 (x ati ) of RBM1, and the user preference attention weight vector A(x ati ) of the dynamic learning project individual is:
- the softmax() function ensures that the sum of all weight coefficients is 1;
- the function a(V RBM1 (x ati ),w 1 ) measures the attention weight coefficient of item xi relative to user preference features, and is calculated as follows:
- the item decision vector x i ′ fused with the attention mechanism is used to form the training set, and the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer.
- Step 4 According to the trained DBN-based user preference perception model and its model parameters that integrate the attention mechanism, establish and construct a distribution estimation probability model P(x) based on user preference:
- Step 5 Set the population size N, use the distribution based on user preference to estimate the probability model P(x), and use the distribution estimation algorithm to generate N new individuals, each individual is an item; the category label vector of the vth new individual
- the setting steps are as follows:
- Step 6 Select and N new individual category label vectors in the search space
- the N items with the highest similarity constitute a set of items to be recommended S u ;
- Step 7. Calculate the fitness value of each item in the item set Su to be recommended
- Step 8 Select the top N items with the highest fitness value in Su as the search result, TopN ⁇ N;
- the dominant item group D is updated, the user preference perception model fused with the attention mechanism is retrained, and the extracted user preference features are dynamically updated. , update the estimated probability model P(x) based on the distribution of user preferences.
- the present invention also discloses a search system for realizing the above-mentioned personalized search method, including:
- the user-generated content acquisition module is used to collect and acquire user-generated content, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and user-generated content from other users. u The usefulness evaluation score of the evaluation; vectorize the text comment, extract the feature of the item image, and obtain the feature vector;
- the advantageous project group building module is used to form the advantageous project group D with user preference of the projects whose user score is greater than the preset score threshold and whose trust degree is greater than the preset trust degree threshold;
- the user preference perception model construction and training module is used to construct and train a user preference perception model fused with an attention mechanism;
- the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, of which the first layer is restricted
- the visible layer of the Boltzmann machine includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 is used as the visible layer, and the hidden layer h 2 Constitute the second-layer restricted Boltzmann machine; h 2 as the visible layer, and the hidden layer h 3 form the third-layer restricted Boltzmann machine;
- the distribution estimation probability model building module based on user preference is used to build a user preference-based distribution estimation probability model P(x ):
- the population generation module is used to estimate the probability model P(x) based on the distribution based on user preferences, use the distribution estimation algorithm to generate N new individuals, each individual is an item, and set the category label vector of each new individual, N is preset population size;
- the building block of the item set to be recommended is used to select and N new individual category label vectors in the search space
- the N items with the highest similarity constitute a set of items to be recommended S u ;
- the fitness value calculation module is used to calculate the fitness value of each item in the item set Su to be recommended;
- the search result selection module is used to select the top TopN items with the highest fitness value in Su as the search result, TopN ⁇ N.
- the personalized search method disclosed in the present invention makes full use of multi-source heterogeneous user-generated content, including user ratings, item category labels, user text comments, evaluation trust and item image information, and constructs user preference perception fused with attention mechanism Model, based on this user preference perception model, constructs a distribution estimation probability model based on user preference, generates new feasible solution items containing user preference, and selects multiple items with the highest fitness value as the final search result.
- This method can well handle the personalized search task of multi-source heterogeneous user-generated content in the big data environment, effectively guide users to conduct personalized search, help users search for satisfactory solutions as soon as possible, and improve the comprehensive performance of personalized search algorithms.
- Fig. 1 is the flow chart of the personalized search method disclosed by the present invention fused with attention mechanism
- FIG. 2 is a schematic structural diagram of a user preference perception model fused with an attention mechanism
- Figure 3 is a schematic diagram of the composition of a personalized search system incorporating an attention mechanism.
- the present invention discloses a personalized search method integrating attention mechanism, including:
- Step 1 Collect and obtain user-generated content, which includes all items that user u has evaluated, ratings and textual comments for each item, images of each item, and usefulness of other users’ evaluations of user u. Sexual evaluation score; vectorize text comments, extract features from item images, and obtain feature vectors;
- the steps for the vectorized representation of text comments in this embodiment are: removing stop words and punctuation marks in the text comments, and performing data preprocessing; using documents: Devlin J, Chang M W, Lee K, et al.BERT: The BERT model in Pre-training of Deep Bidirectional Transformers for Language Understanding[J].arXiv:1810.04805v2[cs.CL]24 May 2019. is a vectorized representation of user text comments.
- the feature extraction of the project image is to use the literature: Krizhevsky A, Sutskever I, Hinton G E. Image Net classification with deep convolutional neural networks. In: Proceedings of the 25th International Conference on Neural Information Processing Systems. Lake Tahoe, Nevada, USA: Curran Associates Inc., 2012.1097-1105.
- the AlexNet model in the project image is feature extraction and vectorized representation.
- the usefulness judgement of other users’ evaluations on user u means that other users make useful judgements on the current user u’s evaluation information about a certain item.
- the user's evaluation of the current user u's evaluation information on a certain item, the total number marked as 1 is the usefulness evaluation score of the evaluation of the user u by other users.
- the current user u has made an evaluation on item x
- user A and user B have made a usefulness judgment on the evaluation, which reflects the credibility of the current user's evaluation of item x.
- u Judging the usefulness of the evaluation of item x you can filter invalid evaluations or fake reviews.
- the ratio of the usefulness evaluation score of the evaluation made by other users to user u to the total number of evaluation items of user u is the trust degree of user u to the evaluation of the item.
- Step 2 Construct the advantageous project group D that the user prefers
- An item whose user rating is greater than the preset rating threshold and whose trust degree is greater than the preset trust degree threshold is an item preferred by the user. Due to the characteristics of users' ambiguity, uncertainty and dynamic changes, this embodiment introduces a certain randomness into the existing user preference item groups, so as to increase the user's selection range, so that the user's selection is not too limited to the current Within the range of preference information, it adapts to the actual situation of the environment and the dynamic variability of user preferences. Thereby, the items whose scores are greater than the preset scoring threshold and whose trust degree is greater than the preset trust degree threshold, and multiple new items randomly sampled in the search space, form a dominant item group D.
- the new items added to the dominant item group D may or may not contain user preferences, and are random, which increases the diversity of the item group.
- the proportion of new projects in the advantageous project group D does not exceed 30%.
- the new projects account for 10% of the total number of projects in the advantageous project group D.
- the current user u may or may not have rated them. If the current user u has no comments on the new item, the text comments on the new item by similar users u' of the current user u are used as the evaluation of the new item by user u; if multiple similar users of user u all share the new item When making an evaluation, the evaluation of the user with the greatest similarity to user u is selected. If the similar users of the current user u do not evaluate the new item, the user u's evaluation of the new item adopts the method of random assignment.
- Similar users of user u are users who have a common rating item with user u and whose similarity is greater than a preset similarity threshold.
- the similarity Sim(u, u') of u and u' is:
- I u,u' represents the set of items scored by both users u and u'
- R ux' is the user u's rating on the item x' in I u, u'
- R u'x' is the user u' to x'rating
- is the average rating of all items evaluated by user u is the average rating of all items evaluated for user u'.
- T i is the vectorized representation of the text comments of the user on the item xi , the length is n 2 ;
- Step 3 Construct a user preference perception model fused with the attention mechanism, as shown in Figure 2, the model is based on the Deep Belief Network (DBN), and the model consists of a three-layer Restricted Boltzmann Machine (Restricted Boltzmann Machine).
- DBN Deep Belief Network
- the model consists of a three-layer Restricted Boltzmann Machine (Restricted Boltzmann Machine).
- the visible layer of the first layer of restricted Boltzmann machine RBM1 includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , and the hidden layer is h 1 ;
- the first group of visible unit v1 has n1 units, and each unit is a binary variable;
- the second and third groups of visible units v2 and v3 have n2 and n3 units respectively, and each unit is Real variable;
- h 1 as the visible layer, and the hidden layer h 2 form the second-layer Restricted Boltzmann Machine RBM2;
- h 2 as the visible layer, and the hidden layer h 3 form the third-layer Restricted Boltzmann Machine RBM3 .
- h 1 , h 2 , and h 3 respectively have M 1 , M 2 and M 3 hidden units, and each hidden unit is a real variable; for each RBM, the number of hidden units is selected to be 0.8-1.2 times the total number of visible units. In the example, it is set to 0.8 times.
- the number M 2 of hidden units in h 2 is:
- the number M 3 of hidden units in h 3 is:
- RBM1 is trained, which can be considered as pre-training of RBM1.
- RBM1, RBM2, and RBM3 will be trained layer by layer again.
- the decision vector ⁇ i of item x i is composed of C i , T i , and G i , and C i , T i , and G i contain different user preference information.
- the length n 1 of the category label vector C i is usually less than
- the image feature vectorization of the item represents the length n 3 of G i ; if each component in the decision vector of the item is treated equally, the data containing more information will flood the data containing less preference information, and this kind of preference Data with less information is a useful supplement for building user preference perception models and cannot be ignored. Therefore, the present invention considers the information entropy represented by each data type, and uses weights to adjust the components of various types of multi-source heterogeneous data input to the visible layer neural units of the user preference perception model, so as to ensure that all types of data can contribute to the construction of the user preference perception model. make an effective contribution.
- the activation state of each visible unit is independent, and the vector of an item x i represents [C i , T i , G i ] input to the visible layer, its first
- the activation probabilities of the visible units in the group, the second group, and the third group are:
- the information entropy of the text review vector is:
- the information entropy of the item image feature vector is:
- c ij represents the j-th element of the category label vector C i of the item x i
- p(c ij ) represents the visible unit activation probability corresponding to the j-th element represented by the item category label vector in RBM1;
- t ik represents user u’s textual comments on item xi i to represent the k-th element of T i
- p(t ik ) represents the visible unit activation probability corresponding to the k-th element represented by the user text comment vector in RBM1;
- g il represents, p(g il ) represents the image feature vectorization of item x i represents the lth element of G i , p(g il ) represents the visible unit in RBM1 corresponding to the lth element represented by the item image feature vector activation probability;
- H(x i ) H(C i )+H(T i )+H(G i );
- the decision vector ⁇ i of the item x i is formed by combining the vectors C i , T i , and G i into the visible units in v 1 , v 2 , and v 3 , each unit in the hidden layer h 1
- the activation states of the hidden units are conditionally independent, and the activation probability of the m1th hidden unit is:
- v1j is the state of the jth visible unit in the first group of visible units v1 of RMB1 , that is, the value of the jth element of C i ;
- v2k is the second value of RMB1
- the activation state of each visible unit is also conditionally independent, and the activation probability of the nth visible unit is:
- a 1,n represents the bias of the nth visible unit in the visible layer.
- the state of each hidden unit corresponding to item x i can be obtained according to formula (5), and then the user's preference for each decision component of each item in the dominant project group D can be obtained, that is, the activation probability of the visible layer unit, As the attention weight coefficient at n (x i ):
- ⁇ i represents the state of each visible unit in the visible layer of RBM1, the state of the m 1 hidden unit in the hidden layer h 1 ; at n ( xi ) represents the attention weight of each decision component ⁇ in of item x i , which reflects the self adaptive characteristics.
- the item xi in the dominant item group D is coded based on the attention mechanism, and expressed as x ati after coding:
- x atn' is the n'th element of x ati .
- Equation (9) actually nests the activation probability of the hidden unit and the activation probability of the visible unit, namely:
- the softmax() function guarantees that the sum of all weight coefficients is 1.
- the function a(V RBM1 (x ati ),w 1 ) measures the attention weight coefficient of item xi relative to user preference features, and is calculated as follows:
- the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer.
- the RBM1 is trained to obtain parameters ⁇ w 1 , a 1 , b 1 ⁇ ; 1 pass into a 2 in RBM2, train RBM2 on this basis, and obtain optimization parameters ⁇ w 2 , a 2 , b 2 ⁇ ; pass b 2 into a 3 in RBM3, train RBM3 on this basis, and obtain optimization parameters ⁇ w 3 , a 3 , b 3 ⁇ ; thus, the three-layer RBM models in the DBN network influence and correlate with each other, forming a network as a whole.
- the DBN-based user preference perception model fused with the attention mechanism and its optimized model parameters ⁇ are obtained.
- the DBN model training method here is an improved DBN model training method based on the attention mechanism.
- the purpose is to better use the adaptive weight information to extract user preference features, focus on important features, and be more appropriate. It expresses the influence of different types of attribute decision components of each item on user preference characteristics in practical application scenarios, and expresses user preference characteristics more precisely.
- Step 4 According to the trained DBN-based user preference perception model and its model parameters that integrate the attention mechanism, establish and construct a distribution estimation probability model P(x) based on user preference:
- p(x) is a ⁇ -dimensional vector, and its n-th element p( ⁇ n ) is the activation probability of the n-th decision component of the user preference item; a lower bound constraint is applied to p( ⁇ n ), and the constrained value is the user preference
- the probability P( ⁇ n ) of the nth decision component of the item namely:
- ⁇ is the preset lower bound threshold.
- ⁇ 0.1, that is, for the decision component whose activation probability calculated according to formula (18) is less than 0.1, the activation probability value is set to 0.1; this constraint considers the activation of the decision component When the probability is small, the decision component is randomly sampled with a certain probability value to enhance the diversity of the generated population and prevent the evolutionary optimization algorithm from prematurely converging and missing the optimal solution.
- Step 5 Set the population size N, use the distribution based on user preference to estimate the probability model P(x), and use the distribution estimation algorithm (Estimation of Distribution Algorithms, EDA) to generate N new individuals, each individual is an item; vth class label vector for new individuals
- EDA Estimatment of Distribution Algorithms
- Step 6 Select and N new individual category label vectors in the search space
- the N items with the highest similarity constitute the item set S u to be recommended; in this embodiment, the Euclidean distance is used as the similarity calculation, that is, the smaller the Euclidean distance between the two vectors, the higher the similarity between the two;
- Step 7. Calculate the fitness value of each item in the item set Su to be recommended:
- the fitness value of the item is calculated based on the energy function, and the fitness value of the item x * in the recommended item set S u is treated. is calculated as follows:
- a 1,n represents the bias of the nth visible unit in the visible layer of RBM1
- nth decision component of item x * is the bias of the m1th hidden unit in h1
- element value in w 1 indicating the connection weight between the nth visible unit and the m1th hidden unit in RBM1.
- Step 8 Select the top TopN items with the highest fitness value in Su as the search result, TopN ⁇ N.
- the user preference information contained in the dominant item group D is not sufficient, so users trained based on this
- the user preference features extracted by the preference-aware model are relatively rough.
- update the dominant project group D according to the recent evaluation data of the current user, update the dominant project group D, retrain the user preference perception model integrated with the attention mechanism, and dynamically update the extracted user preference features.
- This embodiment also discloses a personalized search system that realizes the above-mentioned personalized search method and integrates the attention mechanism, as shown in FIG. 3 , including:
- User-generated content acquisition module 1 used to collect and acquire user-generated content, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and comments from other users.
- the usefulness evaluation score of the evaluation made by the user u vectorize the text comments, extract the feature of the item image, and obtain the feature vector;
- the advantageous project group building module 2 is used to form the advantageous project group D containing the user's preference with the projects whose user score is greater than the preset score threshold and the trust degree is greater than the preset trust degree threshold;
- the user preference perception model construction and training module 3 is used to construct and train the user preference perception model fused with the attention mechanism according to step 3;
- the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, in which the first The visible layer of a restricted Boltzmann machine includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , and the hidden layer is h 1 ;
- the hidden layer h 2 constitutes the second-layer restricted Boltzmann machine; h 2 serves as the visible layer, and the hidden layer h 3 constitutes the third-layer restricted Boltzmann machine;
- the distribution estimation probability model building module 4 based on user preference is used to build a user preference-based distribution estimation probability model P( x):
- the population generation module 5 is used to estimate the probability model P(x) by using the distribution based on the user preference, use the distribution estimation algorithm to generate N new individuals, each individual is an item, and set the category label vector of each new individual, N is the preset population size;
- the N items with the highest similarity constitute a set of items to be recommended S u ;
- the fitness value calculation module 7 is used to calculate the fitness value of each item in the item set Su to be recommended according to step 7;
- the search result selection module 8 is used to select the top TopN items with the highest fitness value in Su as the search result, TopN ⁇ N.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Evolutionary Computation (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Bioinformatics & Computational Biology (AREA)
- Databases & Information Systems (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Disclosed in the present invention are a personalized search method and search system combined with an attention mechanism. The search method comprises: 1, collecting and obtaining a large amount of user generation content generated by a user in an Internet information media, and performing vectorization representation; 2, constructing a dominant item group; 3, constructing and training a user preference perception model combined with the attention mechanism, the model being based on a DBN and being composed of three RBMs; 4, constructing a distribution estimation probabilistic model based on a user preference; 5, setting a population size N, and generating N new individuals by using the distribution estimation probabilistic model based on the user preference; 6, selecting N items having the highest similarity to the N new individuals in a search space to form a set of items to be recommended Su; 7, calculating an adaptive value of each item in Su, and 8, selecting the Top N items having the highest adaptive values in Su as the search result, and performing personalized recommendation. In the method, different influences of different decision components on the user preference are considered, so that the user can be helped to perform personalized search more effectively.
Description
本发明属于数据挖掘技术领域,具体涉及一种个性化搜索方法和搜索系统。The invention belongs to the technical field of data mining, and particularly relates to a personalized search method and a search system.
随着大数据、云计算、物联网等技术的迅猛发展,互联网规模和用户数量急剧增加,用户已经成为数据的主动创造者,聚集了大量多源异构用户生成内容,各类信息错综复杂并呈现爆炸式增长。用户生成内容包含海量多源异构且动态演化的复杂数据,具有来源与结构多样化、稀疏性、多模态、不完整性、传播社会性等特点,蕴含着丰富的有价值信息和巨大的挖掘潜力,也是各类互联网平台和移动应用商家获取信息、提升业绩与服务的重要来源,成为一类典型的大数据环境。然而,这些复杂多源异构用户生成内容给用户带来新资讯的同时,也增加了用户筛选、甄别和处理信息并最终做出决策的难度,即带来了“信息过载”问题。个性化搜索和推荐算法作为连接用户与信息的桥梁,能够充分利用海量多源异构用户生成数据,根据用户潜在需求与认知偏好预测用户行为和发展动态,尽可能帮助用户从海量信息中筛选出与用户需求和兴趣偏好相符的内容,有效缓解“信息过载”,提升用户的使用体验和网站平台的商业利益。With the rapid development of technologies such as big data, cloud computing, and the Internet of Things, the scale of the Internet and the number of users have increased dramatically. Users have become active creators of data, gathering a large number of multi-source and heterogeneous user-generated content, and all kinds of information are intricate and presented. Explosive growth. User-generated content contains massive, multi-source, heterogeneous and dynamically evolving complex data. It has the characteristics of diverse sources and structures, sparseness, multi-modality, incompleteness, and social dissemination. It contains rich valuable information and huge Mining potential is also an important source for various Internet platforms and mobile application merchants to obtain information, improve performance and services, and become a typical big data environment. However, while these complex, multi-source and heterogeneous user-generated content bring new information to users, it also increases the difficulty for users to screen, screen and process information and finally make decisions, which brings about the problem of "information overload". As a bridge connecting users and information, personalized search and recommendation algorithms can make full use of massive multi-source heterogeneous user-generated data, predict user behavior and development trends based on users’ potential needs and cognitive preferences, and help users filter from massive amounts of information as much as possible. Content that is in line with user needs and interests and preferences can effectively alleviate "information overload" and improve user experience and the commercial interests of the website platform.
面向用户生成内容的个性化搜索任务,其本质是在多源异构用户生成数据构成的动态演化空间中搜寻满足用户需求及个性化偏好的优化目标,即一类动态定性指标优化问题。由于这类复杂定性指标优化问题,不仅其目标函数和性能指标不能用数学函数准确描述,甚至其优化问题的决策变量也不再是简单的结构化数据,往往具有较大的主观性、模糊性、不确定性及不一致性,需要用户依据经验知识和兴趣偏好对于待搜索项目进行定性分析、评价和决策,从而难以建立具体精确的数学模型进行描述。近年来提出的融入人类智能评价的交互式协同进化计算,将用户主观认知经验、智能评价决策与传统进化计算相结合,是处理上述复杂个性化搜索定性指标优化问题的有效途径。The essence of the personalized search task for user-generated content is to search for optimization goals that meet user needs and personalized preferences in the dynamic evolution space composed of multi-source heterogeneous user-generated data, which is a kind of dynamic qualitative index optimization problem. Due to this kind of complex qualitative index optimization problem, not only its objective function and performance index cannot be accurately described by mathematical functions, but even the decision variables of its optimization problem are no longer simple structured data, and often have greater subjectivity and ambiguity. , uncertainty and inconsistency, users are required to qualitatively analyze, evaluate and make decisions on the items to be searched based on their experience, knowledge and interests, so it is difficult to establish a specific and accurate mathematical model for description. In recent years, the interactive co-evolutionary computing integrated with human intelligence evaluation, which combines the user's subjective cognitive experience, intelligent evaluation decision-making and traditional evolutionary computing, is an effective way to deal with the above-mentioned complex personalized search qualitative index optimization problem.
申请号为CN2020102165574的中国专利公开了一种基于受限玻尔兹曼机驱动的交互式个性化搜索方法,其中用户兴趣偏好模型的构建未考虑描述不同项目属性决策变量对于用户偏好影响力不同,而对于所用项目的决策变量采用了相同权重,不能够充分体现各决策变量对于用户偏好的影响,从而难以构建更加精确的用户偏好模型,进一步影响用户进行个性化搜索的效果。The Chinese patent with application number CN2020102165574 discloses an interactive personalized search method driven by restricted Boltzmann machine, wherein the construction of the user interest preference model does not consider the different influences of decision variables describing different item attributes on user preference. However, the same weight is used for the decision variables of the items used, which cannot fully reflect the impact of each decision variable on user preferences, so it is difficult to build a more accurate user preference model, which further affects the effect of users' personalized search.
发明内容SUMMARY OF THE INVENTION
发明目的:针对现有技术中存在的问题,本发明提供一种融合注意力机制的个性化搜索方法和搜索系统,其中搜索方法考虑了不同决策分量对用户偏好的影响力不同,能够帮助用户更有效地进行个性化搜索。Purpose of the invention: In view of the problems existing in the prior art, the present invention provides a personalized search method and a search system integrating attention mechanism, wherein the search method takes into account the different influences of different decision components on user preferences, which can help users to better Personalize your search efficiently.
技术方案:本发明一方面公开了一种融合注意力机制的个性化搜索方法,包括:Technical solution: On the one hand, the present invention discloses a personalized search method integrating attention mechanism, including:
步骤1、收集并获取用户生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化,项目图像进行特征提取,获取特征向量; Step 1. Collect and obtain user-generated content, which includes all items that user u has evaluated, ratings and textual comments for each item, images of each item, and usefulness of other users’ evaluations of user u. Sexual evaluation score; vectorize text comments, extract features from item images, and obtain feature vectors;
步骤2、将用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目组成含用户偏好的优势项目群体D;D中的项目构成集合S,S={(u,x
i,C
i,T
i,G
i)}, 其中x
i∈D,C
i为项目x
i的类别标签向量,T
i为用户对项目x
i文本评论的向量化表示,G
i为项目x
i的图像特征向量化表示,i=1,2,L,|D|,|D|表示D中的项目数量;
Step 2. The items whose user score is greater than the preset score threshold and whose trust degree is greater than the preset trust degree threshold are formed into an advantageous project group D containing the user's preference; the items in D constitute a set S, S={(u, x i , C i ,T i ,G i )}, where x i ∈ D, C i is the category label vector of item x i , T i is the vectorized representation of the user's textual comments on item x i , and G i is the image of item x i Feature vectorized representation, i=1, 2, L, |D|, |D| represents the number of items in D;
步骤3、构建融合注意力机制的用户偏好感知模型,所述模型基于深度置信网络,由三层受限玻尔兹曼机组成,其中第一层受限玻尔兹曼机的可见层包括第一组可见单元v
1、第二组可见单元v
2和第三组可见单元v
3,隐藏层为h
1;h
1作为可见层,与隐藏层h
2构成第二层RBM;h
2作为可见层,与隐藏层h
3构成第三层RBM;所述融合注意力机制的用户偏好感知模型的参数为θ={θ
1,θ
2,θ
3}={w
1,a
1,b
1,w
2,a
2,b
2,w
3,a
3,b
3};
Step 3. Build a user preference perception model fused with an attention mechanism. The model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, wherein the visible layer of the first layer of restricted Boltzmann machines includes the first layer of restricted Boltzmann machines. A group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 is the visible layer, and the second layer of RBM is formed with the hidden layer h 2 ; h 2 is the visible layer layer, and the hidden layer h 3 constitutes the third layer of RBM; the parameters of the user preference perception model of the fusion attention mechanism are θ={θ 1 ,θ 2 ,θ 3 }={w 1 ,a 1 ,b 1 , w 2 ,a 2 ,b 2 ,w 3 ,a 3 ,b 3 };
利用优势项目群体D,采用对比散度学习算法对融合注意力机制的用户偏好感知模型中的第一层RBM进行训练,获得其模型参数θ
1={w
1,a
1,b
1};
Using the dominant project group D, the contrast divergence learning algorithm is used to train the first-layer RBM in the user preference perception model fused with the attention mechanism, and its model parameters θ 1 ={w 1 ,a 1 ,b 1 } are obtained;
第一层RBM模型训练完成后,当给定隐单元状态时,各可见单元的激活状态条件独立,某项目x
i的向量表示[C
i,T
i,G
i]输入可见层,其第一组、第二组和第三组可见单元的激活概率分别为:
After the training of the first layer of RBM model is completed, when the state of the hidden unit is given, the activation state of each visible unit is independent, and the vector of an item x i represents [C i , T i , G i ] input to the visible layer, its first The activation probabilities of the visible units in the group, the second group, and the third group are:
其中,a
1,j、a
1,k和a
1,l分别表示第一组、第二组和第三组可见单元偏置。
where a 1,j , a 1,k and a 1,l represent the first, second and third visible cell offsets, respectively.
计算各类多源异构数据的信息熵,项目类别标签的信息熵为:Calculate the information entropy of various multi-source heterogeneous data, the information entropy of the item category label is:
文本评论向量的信息熵为:The information entropy of the text review vector is:
项目图像特征向量的信息熵为:The information entropy of the item image feature vector is:
其中c
ij表示项目x
i的类别标签向量C
i的第j个元素,p(c
ij)表示RBM1中对应于项目类别标签向量表示的第j个元素的可见单元激活概率;
where c ij represents the j-th element of the category label vector C i of the item x i , and p(c ij ) represents the visible unit activation probability corresponding to the j-th element represented by the item category label vector in RBM1;
t
ik表示用户u对项目x
i文本评论向量化表示T
i的第k个元素,p(t
ik)表示RBM1中对应于用户文本评论向量表示的第k个元素的可见单元激活概率;
t ik represents user u’s textual comments on item xi i to represent the k-th element of T i , p(t ik ) represents the visible unit activation probability corresponding to the k-th element represented by the user text comment vector in RBM1;
g
il表示,p(g
il)表示项目x
i的图像特征向量化表示G
i的第l个元素,p(g
il)表示RBM1中对应于项目图像特征向量表示的第l个元素的可见单元激活概率;
g il represents, p(g il ) represents the image feature vectorization of item x i represents the lth element of G i , p(g il ) represents the visible unit in RBM1 corresponding to the lth element represented by the item image feature vector activation probability;
其次,计算各类信息熵占总信息熵的比例作为权重因子:Secondly, calculate the proportion of various types of information entropy to the total information entropy as a weight factor:
其中H(x
i)=H(C
i)+H(T
i)+H(G
i);
Wherein H(x i )=H(C i )+H(T i )+H(G i );
将向量C
i、T
i、G
i组合构成项目x
i的决策向量Ψ
i输入v
1、v
2、v
3中各可见单元时,隐藏层h
1中各隐单元的激活状态条件独立,第m
1个隐单元的激活概率为:
Combining the vectors C i , T i , and G i to form the decision vector Ψ i of the item x i is input to each visible unit in v 1 , v 2 , and v 3 , the activation state of each hidden unit in the hidden layer h 1 is independent, and the first The activation probability of m 1 hidden unit is:
其中,m
1=1,2,…,M
1,
为h
1中第m
1个隐单元的偏置;v
1j为RMB1第一组可见单元v
1中第j个可见单元的状态;v
2k为RMB1第二组可见单元v
2中第k个可见单元的状态;v
3lRMB1第三组可见单元v
3中第l个可见单元的状态;w
1,n,m1为w
1中的元素值,表示RBM1中第n个可见单元与第m
1个隐单元之间的连接权重,n=1,2,…,Ф;
表示隐层h
1中第m
1个隐单元的状态;σ(x)=1/(1+exp(-x))是sigmoid激活函数;
Among them, m 1 =1,2,...,M 1 , is the bias of the m1th hidden unit in h1 ; v1j is the state of the jth visible unit in the first group of visible units v1 of RMB1 ; v2k is the kth visible unit in the second group of visible units v2 of RMB1 The state of the unit; the state of the lth visible unit in the third group of visible units v3 in v 3l RMB1; w 1, n, m1 are the element values in w 1 , indicating the nth visible unit in RBM1 and the m 1th unit Connection weight between hidden units, n=1,2,...,Ф; Represents the state of the m1th hidden unit in the hidden layer h1; σ(x)= 1 /( 1 +exp(-x)) is the sigmoid activation function;
RBM1训练完成后,根据式(9)获取项目x
i对应的各隐单元的状态,进而获得用户对于优势项目群体D中各项目的各决策分量的偏好程度,即可见层单元激活概率,作为注意力权重系数at
n(x
i):
After the training of RBM1 is completed, the state of each hidden unit corresponding to item x i is obtained according to formula (9), and then the user's preference for each decision component of each item in the dominant item group D is obtained, that is, the activation probability of visible layer unit, as attention Force weight coefficient at n (x i ):
其中
表示Ψ
i作为RBM1可见层各可见单元状态时,隐藏层h
1中第m
1个隐单元的状态;at
n(x
i)表示项目x
i各决策分量ψ
in的注意力权重;
in Represents Ψ i as the state of each visible unit in the visible layer of RBM1, the state of the m 1 hidden unit in the hidden layer h 1 ; at n ( xi ) represents the attention weight of each decision component ψ in of item x i ;
将注意力权重系数at
n(x
i)作为项目x
i各决策分量的权重系数,对优势项目群体D中项目x
i进行基于注意力机制的编码,编码后表示为x
ati:
Taking the attention weight coefficient at n ( xi ) as the weight coefficient of each decision component of the item xi , the item xi in the dominant item group D is coded based on the attention mechanism, and expressed as x ati after coding:
x
ati=Ψ
i+at
n(x
i)×Ψ
i (12)
x ati =Ψ i +at n (x i )×Ψ i (12)
将x
ati输入预训练后的RBM1,得到可见单元激活概率V
RBM1(x
ati):
Input x ati into the pre-trained RBM1 to get the visible unit activation probability V RBM1 (x ati ):
其中x
atn′为x
ati的第n′个元素;
where x atn' is the n'th element of x ati ;
由RBM1可见单元激活概率V
RBM1(x
ati)进行自注意力机制运算,动态学习项目个体的用户偏好注意力权重向量A(x
ati):
The self-attention mechanism operation is performed by the visible unit activation probability V RBM1 (x ati ) of RBM1, and the user preference attention weight vector A(x ati ) of the dynamic learning project individual is:
A(x
ati)=softmax(a(V
RBM1(x
ati),w
1)) (14)
A(x ati )=softmax(a(V RBM1 (x ati ),w 1 )) (14)
其中,softmax()函数保证所有权重系数之和为1;函数a(V
RBM1(x
ati),w
1)衡量了项目x
i相对于用户偏好特征的注意力权重系数,计算如下:
Among them, the softmax() function ensures that the sum of all weight coefficients is 1; the function a(V RBM1 (x ati ),w 1 ) measures the attention weight coefficient of item xi relative to user preference features, and is calculated as follows:
a(V
RBM1(x
ati),w
1)=V
RBM1(x
ati)·(w
1)
T (15)
a(V RBM1 (x ati ), w 1 )=V RBM1 (x ati )·(w 1 ) T (15)
结合用户偏好注意力权重向量A(x
ati)和项目x
i的原始决策向量C
i,T
i,G
i,生成融合注意力机制的项目决策向量:
Combining the user preference attention weight vector A(x ati ) and the original decision vectors C i , T i , G i of the item xi , generate the item decision vector fused with the attention mechanism:
x
i′=A(x
ati)×Ψ
i (16)
x i ′=A(x ati )×Ψ i (16)
利用融合注意力机制的项目决策向量x
i′构成训练集,对DBN中的RBM1、RBM2、RBM3模型进行逐层训练,训练完成后获得融合注意力机制的基于DBN的用户偏好感知模型及其优化模型参数θ;
The item decision vector x i ′ fused with the attention mechanism is used to form the training set, and the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer. model parameter θ;
步骤4、根据已训练好的融合注意力机制的基于DBN的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x): Step 4. According to the trained DBN-based user preference perception model and its model parameters that integrate the attention mechanism, establish and construct a distribution estimation probability model P(x) based on user preference:
P(x)=[P(ψ
1),P(ψ
2),L,P(ψ
n),L,P(ψ
Ф)] (17)
P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Ф )] (17)
其中(ψ
1,ψ
2,…,ψ
n,…,ψ
Ф)为项目x的原始决策向量,P(ψ
n)表示用户偏好的项目第n个决策分量的概率;
where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψ Ф ) is the original decision vector of item x, and P(ψ n ) represents the probability of the nth decision component of the item preferred by the user;
步骤5、设定种群大小N,利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法生成N个新个体,每个个体为一个项目;第v个新个体的类别标签向量
的设置步骤如下:
Step 5. Set the population size N, use the distribution based on user preference to estimate the probability model P(x), and use the distribution estimation algorithm to generate N new individuals, each individual is an item; the category label vector of the vth new individual The setting steps are as follows:
(5.1)令v=1;(5.1) Let v=1;
(5.2)生成[0,1]之间的随机数z;如果z≤P(ψ
j=1),则第v个新个体的类别标签向量
的第j个元素为1,否则为0;
(5.2) Generate a random number z between [0, 1]; if z≤P(ψ j =1), then the class label vector of the vth new individual The jth element of is 1, otherwise it is 0;
(5.3)令v加一,重复步骤(5.2),直至v>N;(5.3) add one to v, and repeat step (5.2) until v>N;
步骤6、在搜索空间中选择与N个新个体类别标签向量
相似度最高的N个项目,构成待推荐项目集合S
u;
Step 6. Select and N new individual category label vectors in the search space The N items with the highest similarity constitute a set of items to be recommended S u ;
步骤7、计算待推荐项目集合S
u中各项目的适应值
Step 7. Calculate the fitness value of each item in the item set Su to be recommended
其中,
和
分别表示待推荐项目集合S
u中项目能量函数的最大值和最小值;
为项目x
*的能量函数,x
*∈S
u,其计算如下:
in, and respectively represent the maximum and minimum value of the item energy function in the item set Su to be recommended; is the energy function of item x * , x * ∈ S u , which is calculated as:
步骤8、选择S
u中适应值最高的前TopN个项目作为搜索结果,TopN<N;
Step 8. Select the top N items with the highest fitness value in Su as the search result, TopN <N;
随着用户交互式搜索过程的推进和用户行为动态演变,根据当前用户最近的评价数据,更新优势项目群体D,再次训练融合注意力机制的用户偏好感知模型,动态更新提取的用户偏好特征,同时,更新基于用户偏好的分布估计概率模型P(x)。With the advancement of the user's interactive search process and the dynamic evolution of user behavior, according to the current user's recent evaluation data, the dominant item group D is updated, the user preference perception model fused with the attention mechanism is retrained, and the extracted user preference features are dynamically updated. , update the estimated probability model P(x) based on the distribution of user preferences.
另一方面,本发明还公开了实现上述个性化搜索方法的搜索系统,包括:On the other hand, the present invention also discloses a search system for realizing the above-mentioned personalized search method, including:
用户生成内容获取模块,用于收集并获取用户u生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图 像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化,项目图像进行特征提取,获取特征向量;The user-generated content acquisition module is used to collect and acquire user-generated content, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and user-generated content from other users. u The usefulness evaluation score of the evaluation; vectorize the text comment, extract the feature of the item image, and obtain the feature vector;
优势项目群体构建模块,用于将用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目组成含用户偏好的优势项目群体D;The advantageous project group building module is used to form the advantageous project group D with user preference of the projects whose user score is greater than the preset score threshold and whose trust degree is greater than the preset trust degree threshold;
用户偏好感知模型构建与训练模块,用于构建并训练融合注意力机制的用户偏好感知模型;所述模型基于深度置信网络,由三层受限玻尔兹曼机组成,其中第一层受限玻尔兹曼机的可见层包括第一组可见单元v
1、第二组可见单元v
2和第三组可见单元v
3,隐藏层为h
1;h
1作为可见层,与隐藏层h
2构成第二层受限玻尔兹曼机;h
2作为可见层,与隐藏层h
3构成第三层受限玻尔兹曼机;所述融合注意力机制的用户偏好感知模型的参数为θ={θ
1,θ
2,θ
3}={w
1,a
1,b
1,w
2,a
2,b
2,w
3,a
3,b
3};
The user preference perception model construction and training module is used to construct and train a user preference perception model fused with an attention mechanism; the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, of which the first layer is restricted The visible layer of the Boltzmann machine includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 is used as the visible layer, and the hidden layer h 2 Constitute the second-layer restricted Boltzmann machine; h 2 as the visible layer, and the hidden layer h 3 form the third-layer restricted Boltzmann machine; the parameter of the user preference perception model of the fusion attention mechanism is θ ={θ 1 ,θ 2 ,θ 3 }={w 1 ,a 1 ,b 1 ,w 2 ,a 2 ,b 2 ,w 3 ,a 3 ,b 3 };
基于用户偏好的分布估计概率模型构建模块,用于根据已训练好的融合注意力机制的基于深度置信网络的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x):The distribution estimation probability model building module based on user preference is used to build a user preference-based distribution estimation probability model P(x ):
P(x)=[P(ψ
1),P(ψ
2),L,P(ψ
n),L,P(ψ
Ф)] (17)
P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Ф )] (17)
其中(ψ
1,ψ
2,…,ψ
n,…,ψ
Ф)为项目x的原始决策向量,P(ψ
n)表示用户对于项目的第n个决策分量的偏好概率;
where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψ Ф ) is the original decision vector of item x, and P(ψ n ) represents the user’s preference probability for the nth decision component of the item;
种群生成模块,用于利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法生成N个新个体,每个个体为一个项目,并设置每个新个体的类别标签向量,N为预设的种群大小;The population generation module is used to estimate the probability model P(x) based on the distribution based on user preferences, use the distribution estimation algorithm to generate N new individuals, each individual is an item, and set the category label vector of each new individual, N is preset population size;
待推荐项目集合构建模块,用于在搜索空间中选择与N个新个体类别标签向量
相似度最高的N个项目,构成待推荐项目集合S
u;
The building block of the item set to be recommended is used to select and N new individual category label vectors in the search space The N items with the highest similarity constitute a set of items to be recommended S u ;
适应值计算模块,用于计算待推荐项目集合S
u中各项目的适应值;
The fitness value calculation module is used to calculate the fitness value of each item in the item set Su to be recommended;
搜索结果选择模块,用于选择S
u中适应值最高的前TopN个项目作为搜索结果,TopN<N。
The search result selection module is used to select the top TopN items with the highest fitness value in Su as the search result, TopN<N.
有益效果:本发明公开的个性化搜索方法充分利用多源异构用户生成内容,包括用户评分、项目类别标签、用户文本评论、评价信任度和项目图像信息,构建融合注意力机制的用户偏好感知模型,基于此用户偏好感知模型,构建基于用户偏好的分布估计概率模型,生成含用户偏好的新的可行解项目,选择适应值最高的多个项目作为最终搜索结果。该方法能够很好地处理大数据环境下面向多源异构用户生成内容的个性化搜索任务,有效引导用户进行个性化搜索,尽快帮助用户搜索到满意解,提高个性化搜索算法的综合性能。Beneficial effects: The personalized search method disclosed in the present invention makes full use of multi-source heterogeneous user-generated content, including user ratings, item category labels, user text comments, evaluation trust and item image information, and constructs user preference perception fused with attention mechanism Model, based on this user preference perception model, constructs a distribution estimation probability model based on user preference, generates new feasible solution items containing user preference, and selects multiple items with the highest fitness value as the final search result. This method can well handle the personalized search task of multi-source heterogeneous user-generated content in the big data environment, effectively guide users to conduct personalized search, help users search for satisfactory solutions as soon as possible, and improve the comprehensive performance of personalized search algorithms.
图1为本发明公开融合注意力机制的个性化搜索方法的流程图;Fig. 1 is the flow chart of the personalized search method disclosed by the present invention fused with attention mechanism;
图2为融合注意力机制的用户偏好感知模型的结构示意图;FIG. 2 is a schematic structural diagram of a user preference perception model fused with an attention mechanism;
图3为融合注意力机制的个性化搜索系统的组成示意图。Figure 3 is a schematic diagram of the composition of a personalized search system incorporating an attention mechanism.
下面结合附图和具体实施方式,进一步阐明本发明。The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments.
如图1所示,本发明公开了一种融合注意力机制的个性化搜索方法,包括:As shown in Figure 1, the present invention discloses a personalized search method integrating attention mechanism, including:
步骤1、收集并获取用户生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化,项目图像进行特征提取,获取特征向量; Step 1. Collect and obtain user-generated content, which includes all items that user u has evaluated, ratings and textual comments for each item, images of each item, and usefulness of other users’ evaluations of user u. Sexual evaluation score; vectorize text comments, extract features from item images, and obtain feature vectors;
本实施例中对于文本评论向量化表示的步骤为:去除文本评论中的停用词和标点符号等,进行数据预处理;采用文献:Devlin J,Chang M W,Lee K,et al.BERT:Pre-training of Deep Bidirectional Transformers for Language Understanding[J].arXiv:1810.04805v2[cs.CL]24 May 2019.中的BERT模型,将用户文本评论进行向量化表示。The steps for the vectorized representation of text comments in this embodiment are: removing stop words and punctuation marks in the text comments, and performing data preprocessing; using documents: Devlin J, Chang M W, Lee K, et al.BERT: The BERT model in Pre-training of Deep Bidirectional Transformers for Language Understanding[J].arXiv:1810.04805v2[cs.CL]24 May 2019. is a vectorized representation of user text comments.
对项目图像提取特征是利用文献:Krizhevsky A,SutskeverI,Hinton G E.Image Net classification with deep convolutional neural networks.In:Proceedings of the 25th International Conference on Neural Information Processing Systems.Lake Tahoe,Nevada,USA:Curran Associates Inc.,2012.1097-1105.中的AlexNet模型,将项目图像进行特征提取及向量化表示。The feature extraction of the project image is to use the literature: Krizhevsky A, Sutskever I, Hinton G E. Image Net classification with deep convolutional neural networks. In: Proceedings of the 25th International Conference on Neural Information Processing Systems. Lake Tahoe, Nevada, USA: Curran Associates Inc., 2012.1097-1105. The AlexNet model in the project image is feature extraction and vectorized representation.
其他用户对用户u所做评价的有用性评断,是指其他用户对于当前用户u就某一项目的评价信息做出对其有用的评断,如果认为有用就标注1,否则标注0,统计所有其他用户对当前用户u就某一项目的评价信息的评断,标注为1的总数即为其他用户对用户u所做评价的有用性评价得分。例如,当前用户u就项目x做出了评价,用户A和用户B对该评价做了有用性评断,该评断反映了当前用户对项目x评价的可信度,通过统计所有其他用户对当前用户u就项目x评价的有用性评断,可以过滤无效评价或者虚假评论。The usefulness judgement of other users’ evaluations on user u means that other users make useful judgements on the current user u’s evaluation information about a certain item. The user's evaluation of the current user u's evaluation information on a certain item, the total number marked as 1 is the usefulness evaluation score of the evaluation of the user u by other users. For example, the current user u has made an evaluation on item x, and user A and user B have made a usefulness judgment on the evaluation, which reflects the credibility of the current user's evaluation of item x. u Judging the usefulness of the evaluation of item x, you can filter invalid evaluations or fake reviews.
其他用户对用户u所做评价的有用性评价得分与用户u评价项目的总数的比值,为用户u对项目评价的信任度。The ratio of the usefulness evaluation score of the evaluation made by other users to user u to the total number of evaluation items of user u is the trust degree of user u to the evaluation of the item.
步骤2、构建用户偏好的优势项目群体D; Step 2. Construct the advantageous project group D that the user prefers;
用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目是用户偏好的项目。由于用户的具有模糊性、不确定性和动态变化的特性,本实施例在已有的用户偏好项目群体中引入一定的随机性,以增加用户的选择范围,使得用户的选择不要过于局限于当前偏好信息的范围内,适应实际情况下的环境和用户偏好的动态变化性。由此,将评分大于预设评分阈值且信任度大于预设信任度阈值的项目,以及在搜索空间随机采样的多个新项目,组成优势项目群体D。优势项目群体D中加入的新项目可能包含用户偏好,也可能不包含用户偏好,是随机的,其增加了项目群体的多样性。新项目在优势项目群体D中的占比不超过30%,本实施例中,新项目占优势项目群体D中项目总数的10%。An item whose user rating is greater than the preset rating threshold and whose trust degree is greater than the preset trust degree threshold is an item preferred by the user. Due to the characteristics of users' ambiguity, uncertainty and dynamic changes, this embodiment introduces a certain randomness into the existing user preference item groups, so as to increase the user's selection range, so that the user's selection is not too limited to the current Within the range of preference information, it adapts to the actual situation of the environment and the dynamic variability of user preferences. Thereby, the items whose scores are greater than the preset scoring threshold and whose trust degree is greater than the preset trust degree threshold, and multiple new items randomly sampled in the search space, form a dominant item group D. The new items added to the dominant item group D may or may not contain user preferences, and are random, which increases the diversity of the item group. The proportion of new projects in the advantageous project group D does not exceed 30%. In this embodiment, the new projects account for 10% of the total number of projects in the advantageous project group D.
由于新项目是在搜索空间随机采样的,当前用户u可能对其作出了评价,也可能没有评价。如果当前用户u对新项目没有评价,则采用当前用户u的相似用户u′对该新项目的文本评论作为用户u对该新项目的评价;如果用户u的多个相似用户均对该新项目作出评价,则选择其中与用户u相似度最大的用户的评价。 如果当前用户u的相似用户均没有对该新项目作出评价,用户u对该新项目的评价采用随机赋值的方式。Since new items are randomly sampled in the search space, the current user u may or may not have rated them. If the current user u has no comments on the new item, the text comments on the new item by similar users u' of the current user u are used as the evaluation of the new item by user u; if multiple similar users of user u all share the new item When making an evaluation, the evaluation of the user with the greatest similarity to user u is selected. If the similar users of the current user u do not evaluate the new item, the user u's evaluation of the new item adopts the method of random assignment.
用户u的相似用户为与用户u存在共同评分项目,且相似度大于预设的相似度阈值的用户。对于与用户u存在共同评分项目的用户u′,u′≠u,u和u′的相似度Sim(u,u′)为:Similar users of user u are users who have a common rating item with user u and whose similarity is greater than a preset similarity threshold. For user u' that has a common rating item with user u, u'≠u, the similarity Sim(u, u') of u and u' is:
其中I
u,u′表示用户u和u′均评分的项目集合;R
ux′为用户u对I
u,u′中的项目x′的评分,R
u′x′为用户u′对x′的评分;
为用户u对已评价的所有项目的平均评分;
为用户u′对已评价的所有项目的平均评分。
where I u,u' represents the set of items scored by both users u and u'; R ux' is the user u's rating on the item x' in I u, u' , and R u'x' is the user u' to x'rating; is the average rating of all items evaluated by user u; is the average rating of all items evaluated for user u'.
优势项目群体D构成集合S,S={(u,x
i,C
i,T
i,G
i)},其中x
i∈D,C
i为项目x
i的类别标签向量,长度为类别总数n
1;C
i中每个元素c
ij为二值变量;c
ij=1表示项目x
i具有第j类标签,j=1,2,L,n
1;且不同类别标签之间非互斥,一个项目可以同时存在多个类别标签。T
i为用户对项目x
i文本评论的向量化表示,长度为n
2;G
i为项目x
i的图像特征向量化表示,长度为n
3;i=1,2,L,|D|,|D|表示D中的项目数量。
The dominant item group D constitutes a set S, S={(u, x i , C i , T i , G i )}, where x i ∈ D, C i is the category label vector of item x i , and the length is the total number of categories n 1 ; each element c ij in C i is a binary variable; c ij =1 indicates that item x i has the j-th class label, j=1, 2, L, n 1 ; and the labels of different classes are not mutually exclusive, Multiple category labels can exist for an item at the same time. T i is the vectorized representation of the text comments of the user on the item xi , the length is n 2 ; G i is the vectorized representation of the image feature of the item xi , the length is n 3 ; i=1,2,L,|D|, |D| represents the number of items in D.
向量C
i、T
i、G
i组合为一个长度为Ф的向量Ψ
i,构成项目x
i的原始决策向量,其每一个元素ψ
in为项目x
i的决策分量,Ф=n
1+n
2+n
3,n=1,2,…,Ф。
The vectors C i , T i , and G i are combined into a vector Ψ i with a length of Ф, which constitutes the original decision vector of the item xi , and each element ψ in is the decision component of the item xi , Ф=n 1 +n 2 +n 3 , n=1, 2, . . . , Φ.
步骤3、构建融合注意力机制的用户偏好感知模型,如图2所示,该模型基于深度置信网络(Deep Belief Network,DBN),该模型由三层受限玻尔兹曼机(Restricted Boltzmann Machine,RBM)组成,其中第一层受限玻尔兹曼机RBM1的可见层包括第一组可见单元v
1、第二组可见单元v
2和第三组可见单元v
3,隐藏层为h
1;其中第一组可见单元v
1有n
1个单元,各单元为二值变量;第二组和第三组可见单元v
2和v
3分别有n
2和n
3个单元,各单元均为实数变量;h
1作为可见层,与隐藏层h
2构成第二层受限玻尔兹曼机RBM2;h
2作为可见层,与隐藏层h
3构成第三层受限玻尔兹曼机RBM3。h
1、h
2、h
3分别有M
1、M
2和M
3个 隐单元,各隐单元均为实数变量;对于各RBM,隐单元数目选取为可见单元总数的0.8-1.2倍,本实施例中,设置为0.8倍。由此,h
1中隐单元的数目M
1为:
Ф=n
1+n
2+n
3,
为向上取整运算;h
2中隐单元的数目M
2为:
h
3中隐单元的数目M
3为:
融合注意力机制的用户偏好感知模型的参数为θ={θ
1,θ
2,θ
3}={w
1,a
1,b
1,w
2,a
2,b
2,w
3,a
3,b
3},其中,{w
1,a
1,b
1}、{w
2,a
2,b
2}和{w
3,a
3,b
3}分别表示RBM1、RBM2、RBM3的模型参数,w
τ表示第τ层RBM可见单元与隐单元之间的连接权重;a
τ和b
τ分别表示第τ层RBM可见单元和隐单元的偏置;τ∈{1,2,3}。
Step 3. Construct a user preference perception model fused with the attention mechanism, as shown in Figure 2, the model is based on the Deep Belief Network (DBN), and the model consists of a three-layer Restricted Boltzmann Machine (Restricted Boltzmann Machine). , RBM), wherein the visible layer of the first layer of restricted Boltzmann machine RBM1 includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , and the hidden layer is h 1 ; The first group of visible unit v1 has n1 units, and each unit is a binary variable; the second and third groups of visible units v2 and v3 have n2 and n3 units respectively, and each unit is Real variable; h 1 as the visible layer, and the hidden layer h 2 form the second-layer Restricted Boltzmann Machine RBM2; h 2 as the visible layer, and the hidden layer h 3 form the third-layer Restricted Boltzmann Machine RBM3 . h 1 , h 2 , and h 3 respectively have M 1 , M 2 and M 3 hidden units, and each hidden unit is a real variable; for each RBM, the number of hidden units is selected to be 0.8-1.2 times the total number of visible units. In the example, it is set to 0.8 times. Thus, the number M 1 of hidden units in h 1 is: Φ=n 1 +n 2 +n 3 , is an upward rounding operation; the number M 2 of hidden units in h 2 is: The number M 3 of hidden units in h 3 is: The parameters of the user preference perception model fused with the attention mechanism are θ={θ 1 ,θ 2 ,θ 3 }={w 1 ,a 1 ,b 1 ,w 2 ,a 2 ,b 2 ,w 3 ,a 3 , b 3 }, where {w 1 ,a 1 ,b 1 }, {w 2 ,a 2 ,b 2 } and {w 3 ,a 3 ,b 3 } represent the model parameters of RBM1, RBM2, RBM3, respectively, w τ represents the connection weight between the visible unit and the hidden unit of the τ-th layer RBM; a τ and b τ represent the bias of the visible unit and the hidden unit of the τ-th layer RBM, respectively; τ ∈ {1, 2, 3}.
利用优势项目群体D,采用对比散度学习算法对融合注意力机制的用户偏好感知模型中的第一层受限玻尔兹曼机RBM1进行训练,获得其模型参数θ
1={w
1,a
1,b
1}。此步骤中只对RBM1进行训练,可以认为是对RBM1的预训练,后续步骤中会对RBM1、RBM2、RBM3再次逐层进行训练。项目x
i的决策向量Ψ
i是由C
i、T
i、G
i组合而成,而C
i、T
i、G
i包含的用户偏好信息不同,如类别标签向量C
i的长度n
1通常小于项目的图像特征向量化表示G
i的长度n
3;如果对项目的决策向量中每个分量平等对待,将导致包含信息量较多的数据淹没含偏好信息较少的数据,而这类含偏好信息较少的数据对于构建用户偏好感知模型是有益补充,不容忽视。因而,本发明考虑结合各数据类型表示的信息熵,利用权重调整各类多源异构数据输入到用户偏好感知模型可见层神经单元的分量,保证各类型数据都能够对于用户偏好感知模型的构建产生有效贡献。
Using the dominant project group D, the contrastive divergence learning algorithm is used to train the first-layer restricted Boltzmann machine RBM1 in the user preference perception model fused with the attention mechanism, and its model parameters θ 1 ={w 1 ,a 1 ,b 1 }. In this step, only RBM1 is trained, which can be considered as pre-training of RBM1. In subsequent steps, RBM1, RBM2, and RBM3 will be trained layer by layer again. The decision vector Ψ i of item x i is composed of C i , T i , and G i , and C i , T i , and G i contain different user preference information. For example, the length n 1 of the category label vector C i is usually less than The image feature vectorization of the item represents the length n 3 of G i ; if each component in the decision vector of the item is treated equally, the data containing more information will flood the data containing less preference information, and this kind of preference Data with less information is a useful supplement for building user preference perception models and cannot be ignored. Therefore, the present invention considers the information entropy represented by each data type, and uses weights to adjust the components of various types of multi-source heterogeneous data input to the visible layer neural units of the user preference perception model, so as to ensure that all types of data can contribute to the construction of the user preference perception model. make an effective contribution.
第一层RBM模型训练完成后,当给定隐单元状态时,各可见单元的激活状态条件独立,某项目x
i的向量表示[C
i,T
i,G
i]输入可见层,其第一组、第二组和第三组可见单元的激活概率分别为:
After the training of the first layer of RBM model is completed, when the state of the hidden unit is given, the activation state of each visible unit is independent, and the vector of an item x i represents [C i , T i , G i ] input to the visible layer, its first The activation probabilities of the visible units in the group, the second group, and the third group are:
其中,a
1,j、a
1,k和a
1,l分别表示第一组、第二组和第三组可见单元偏置,a
1,j, a
1,k,a
1,l组合为a
1,j=1,2,L,n
1,k=1,2,…,n
2,l=1,2,…,n
3。
Among them, a 1,j , a 1,k and a 1,l represent the first, second and third group of visible unit offsets, respectively, a 1,j , a 1,k , a 1,l are combined as a 1 , j=1,2,L,n 1 ,k=1,2,...,n 2 ,l=1,2,...,n 3 .
根据信息熵公式:
计算各类多源异构数据的信息熵,
According to the information entropy formula: Calculate the information entropy of various multi-source heterogeneous data,
项目类别标签的信息熵为:The information entropy of the item category label is:
文本评论向量的信息熵为:The information entropy of the text review vector is:
项目图像特征向量的信息熵为:The information entropy of the item image feature vector is:
其中c
ij表示项目x
i的类别标签向量C
i的第j个元素,p(c
ij)表示RBM1中对应于项目类别标签向量表示的第j个元素的可见单元激活概率;
where c ij represents the j-th element of the category label vector C i of the item x i , and p(c ij ) represents the visible unit activation probability corresponding to the j-th element represented by the item category label vector in RBM1;
t
ik表示用户u对项目x
i文本评论向量化表示T
i的第k个元素,p(t
ik)表示RBM1中对应于用户文本评论向量表示的第k个元素的可见单元激活概率;
t ik represents user u’s textual comments on item xi i to represent the k-th element of T i , p(t ik ) represents the visible unit activation probability corresponding to the k-th element represented by the user text comment vector in RBM1;
g
il表示,p(g
il)表示项目x
i的图像特征向量化表示G
i的第l个元素,p(g
il)表示RBM1中对应于项目图像特征向量表示的第l个元素的可见单元激活概率;
g il represents, p(g il ) represents the image feature vectorization of item x i represents the lth element of G i , p(g il ) represents the visible unit in RBM1 corresponding to the lth element represented by the item image feature vector activation probability;
其次,进一步计算各类信息熵占总信息熵的比例作为权重因子:Secondly, the proportion of various information entropy to total information entropy is further calculated as a weight factor:
其中H(x
i)=H(C
i)+H(T
i)+H(G
i);
Wherein H(x i )=H(C i )+H(T i )+H(G i );
当给定可见单元状态时,即将向量C
i、T
i、G
i组合而构成项目x
i的决策向量Ψ
i输入v
1、v
2、v
3中各可见单元时,隐藏层h
1中各隐单元的激活状态条件独立,第m
1个隐单元的激活概率为:
When the state of the visible unit is given, that is, the decision vector Ψ i of the item x i is formed by combining the vectors C i , T i , and G i into the visible units in v 1 , v 2 , and v 3 , each unit in the hidden layer h 1 The activation states of the hidden units are conditionally independent, and the activation probability of the m1th hidden unit is:
其中,m
1=1,2,…,M
1,
为h
1中第m
1个隐单元的偏置;v
1j为RMB1第一组可见单元v
1中第j个可见单元的状态,即C
i第j个元素的值;v
2k为RMB1第二组可见单元v
2中第k个可见单元的状态,即Τ
i第k个元素的值;v
3lRMB1第三组可见单元v
3中第l个可见单元的状态,即G
i第l个元素的值;
为w
1中的元素值,表示RBM1中第n个可见单元与第m
1个隐单元之间的连接权重,n=1,2,…,Ф;
表示隐层h
1中第m
1个隐单元的状态;σ(x)=1/(1+exp(-x))是sigmoid激活函数。
Among them, m 1 =1,2,...,M 1 , is the bias of the m1th hidden unit in h1 ; v1j is the state of the jth visible unit in the first group of visible units v1 of RMB1 , that is, the value of the jth element of C i ; v2k is the second value of RMB1 The state of the k-th visible unit in the group visible unit v 2 , that is, the value of the k-th element of Τ i ; the state of the l-th visible unit in the third group of visible units v 3 of v 31 RMB1, that is, the l-th element of G i the value of; is the element value in w 1 , indicating the connection weight between the nth visible unit and the m1th hidden unit in RBM1, n=1,2,...,Ф; represents the state of the m1th hidden unit in the hidden layer h1; σ(x)= 1 /( 1 +exp(-x)) is the sigmoid activation function.
当给定隐单元状态时,各可见单元的激活状态亦条件独立,第n个可见单元的激活概率为:When the hidden unit state is given, the activation state of each visible unit is also conditionally independent, and the activation probability of the nth visible unit is:
其中a
1,n表示可见层中第n个可见单元的偏置。
where a 1,n represents the bias of the nth visible unit in the visible layer.
RBM1训练完成后,根据式(5)可获取项目x
i对应的各隐单元的状态,进而可获得用户对于优势项目群体D中各项目的各决策分量的偏好程度,即可见层单元激活概率,作为注意力权重系数at
n(x
i):
After the training of RBM1 is completed, the state of each hidden unit corresponding to item x i can be obtained according to formula (5), and then the user's preference for each decision component of each item in the dominant project group D can be obtained, that is, the activation probability of the visible layer unit, As the attention weight coefficient at n (x i ):
其中
表示Ψ
i作为RBM1可见层各可见单元状态时,隐藏层h
1中第m
1个隐单元的状态;at
n(x
i)表示项目x
i各决策分量ψ
in的注意力权重,体现了自适应的特性。
in Represents Ψ i as the state of each visible unit in the visible layer of RBM1, the state of the m 1 hidden unit in the hidden layer h 1 ; at n ( xi ) represents the attention weight of each decision component ψ in of item x i , which reflects the self adaptive characteristics.
将注意力权重系数at
n(x
i)作为项目x
i各决策分量的权重系数,对优势项目群体D中项目x
i进行基于注意力机制的编码,编码后表示为x
ati:
Taking the attention weight coefficient at n ( xi ) as the weight coefficient of each decision component of the item xi , the item xi in the dominant item group D is coded based on the attention mechanism, and expressed as x ati after coding:
x
ati=Ψ
i+at
n(x
i)×Ψ
i (12)
x ati =Ψ i +at n (x i )×Ψ i (12)
其中i=1,2,L,|D|;where i=1,2,L,|D|;
将x
ati输入预训练后的RBM1,得到可见单元激活概率V
RBM1(x
ati):
Input x ati into the pre-trained RBM1 to get the visible unit activation probability V RBM1 (x ati ):
其中x
atn′为x
ati的第n′个元素。
where x atn' is the n'th element of x ati .
式(9)实际是将隐单元激活概率和可见单元激活概率进行了嵌套,即:Equation (9) actually nests the activation probability of the hidden unit and the activation probability of the visible unit, namely:
利用获得的RBM1模型中可见单元激活概率V
RBM1(x
ati)和文献:Li J,Wang Y,Mcauley J.Time Interval Aware Self-Attention for Sequential Recommendation.In:WSDM'20:The Thirteenth ACM International Conference on Web Search and Data Mining.ACM,2020.中所提自注意力机制,由RBM1可见单元激活概率V
RBM1(x
ati)进行自注意力机制运算,动态学习项目个体的用户偏好注意力权重向量A(x
ati):
Use the visible unit activation probability V RBM1 (x ati ) in the obtained RBM1 model and the literature: Li J, Wang Y, Mcauley J. Time Interval Aware Self-Attention for Sequential Recommendation. In: WSDM'20: The Thirteenth ACM International Conference on The self-attention mechanism proposed in Web Search and Data Mining.ACM, 2020. uses the RBM1 visible unit activation probability V RBM1 (x ati ) to perform the self-attention mechanism operation, and dynamically learns the individual user preference attention weight vector A ( x ati ):
A(x
ati)=softmax(a(V
RBM1(x
ati),w
1)) (14)
A(x ati )=softmax(a(V RBM1 (x ati ),w 1 )) (14)
其中,softmax()函数保证所有权重系数之和为1。函数a(V
RBM1(x
ati),w
1)衡量了项目x
i相对于用户偏好特征的注意力权重系数,计算如下:
Among them, the softmax() function guarantees that the sum of all weight coefficients is 1. The function a(V RBM1 (x ati ),w 1 ) measures the attention weight coefficient of item xi relative to user preference features, and is calculated as follows:
a(V
RBM1(x
ati),w
1)=V
RBM1(x
ati)·(w
1)
T (15)
a(V RBM1 (x ati ), w 1 )=V RBM1 (x ati )·(w 1 ) T (15)
结合用户偏好注意力权重向量A(x
ati)和项目x
i的原始决策向量C
i,T
i,G
i,生成融合注意力机制的项目决策向量:
Combining the user preference attention weight vector A(x ati ) and the original decision vectors C i , T i , G i of the item xi , generate the item decision vector fused with the attention mechanism:
x
i′=A(x
ati)×Ψ
i (16)
x i ′=A(x ati )×Ψ i (16)
利用融合注意力机制的项目决策向量x
i′构成训练集,对DBN中的RBM1、RBM2、RBM3模型进行逐层训练,首先训练RBM1,得到参数{w
1,a
1,b
1};将b
1传递进RBM2中的a
2,在此基础上训练RBM2,获得优化参数{w
2,a
2,b
2};将b
2传递进RBM3中的a
3,在此基础上训练RBM3,获得优化参数{w
3,a
3,b
3};从而 使得DBN网络中的三层RBM模型相互影响、相互关联,形成一个网络整体。训练完成后获得融合注意力机制的基于DBN的用户偏好感知模型及其优化模型参数θ。
Using the item decision vector x i ' of the fusion attention mechanism to form a training set, the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer. First, the RBM1 is trained to obtain parameters {w 1 , a 1 , b 1 }; 1 pass into a 2 in RBM2, train RBM2 on this basis, and obtain optimization parameters {w 2 , a 2 , b 2 }; pass b 2 into a 3 in RBM3, train RBM3 on this basis, and obtain optimization parameters {w 3 , a 3 , b 3 }; thus, the three-layer RBM models in the DBN network influence and correlate with each other, forming a network as a whole. After the training is completed, the DBN-based user preference perception model fused with the attention mechanism and its optimized model parameters θ are obtained.
此处的DBN的模型训练方法是一种改进的基于注意力机制的DBN模型训练方法,目的是为了更好的利用自适应权重信息抽取用户偏好特征,将注意力集中于重要的特征,更贴切的表达实际应用场景中各项目不同类型的属性决策分量对于用户偏好特征的影响,更加精细的表达用户偏好特征。The DBN model training method here is an improved DBN model training method based on the attention mechanism. The purpose is to better use the adaptive weight information to extract user preference features, focus on important features, and be more appropriate. It expresses the influence of different types of attribute decision components of each item on user preference characteristics in practical application scenarios, and expresses user preference characteristics more precisely.
步骤4、根据已训练好的融合注意力机制的基于DBN的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x): Step 4. According to the trained DBN-based user preference perception model and its model parameters that integrate the attention mechanism, establish and construct a distribution estimation probability model P(x) based on user preference:
P(x)=[P(ψ
1),P(ψ
2),L,P(ψ
n),L,P(ψ
Ф)] (17)
P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Ф )] (17)
其中(ψ
1,ψ
2,…,ψ
n,…,ψФ)为项目x的原始决策向量,P(ψ
n)表示用户对于项目的第n个决策分量的偏好概率,其计算如下:
where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψФ) is the original decision vector of the item x, and P(ψ n ) represents the user’s preference probability for the nth decision component of the item, which is calculated as follows:
首先根据优势项目群体D计算基于用户偏好的概率分布模型p(x):First, calculate the probability distribution model p(x) based on user preference according to the dominant project group D:
p(x)为Ф维向量,其第n个元素p(ψ
n)为用户偏好项目第n个决策分量的激活概率;对p(ψ
n)进行下界约束,约束后的值为用户偏好的项目第n个决策分量的概率P(ψ
n),即:
p(x) is a Ф-dimensional vector, and its n-th element p(ψ n ) is the activation probability of the n-th decision component of the user preference item; a lower bound constraint is applied to p(ψ n ), and the constrained value is the user preference The probability P(ψ n ) of the nth decision component of the item, namely:
ε为预设的下界阈值,本实施例中ε=0.1,即对于根据式(18)计算出的激活概率小于0.1的决策分量,将其激活概率值设为0.1;该约束考虑了决策分量激活概率较小时,以一定概率值随机采样该决策分量,以增强生成种群的多样性,防止进化优化算法过早收敛而错失最优解。ε is the preset lower bound threshold. In this embodiment, ε=0.1, that is, for the decision component whose activation probability calculated according to formula (18) is less than 0.1, the activation probability value is set to 0.1; this constraint considers the activation of the decision component When the probability is small, the decision component is randomly sampled with a certain probability value to enhance the diversity of the generated population and prevent the evolutionary optimization algorithm from prematurely converging and missing the optimal solution.
步骤5、设定种群大小N,利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法(Estimation of Distribution Algorithms,EDA)生成N个新个体,每个个体为一个项目;第v个新个体的类别标签向量
的设置步骤如下:
Step 5. Set the population size N, use the distribution based on user preference to estimate the probability model P(x), and use the distribution estimation algorithm (Estimation of Distribution Algorithms, EDA) to generate N new individuals, each individual is an item; vth class label vector for new individuals The setting steps are as follows:
(5.1)令v=1;(5.1) Let v=1;
(5.2)生成[0,1]之间的随机数z;如果z≤P(ψ
j=1),则第v个新个体的类别标签向量
的第j个元素为1,否则为0;
(5.2) Generate a random number z between [0, 1]; if z≤P(ψ j =1), then the class label vector of the vth new individual The jth element of is 1, otherwise it is 0;
(5.3)令v加一,重复步骤(5.2),直至v>N;(5.3) add one to v, and repeat step (5.2) until v>N;
步骤6、在搜索空间中选择与N个新个体类别标签向量
相似度最高的N个项目,构成待推荐项目集合S
u;本实施例中,采用欧氏距离作为相似度计算,即两向量之间的欧氏距离越小,二者相似度越高;
Step 6. Select and N new individual category label vectors in the search space The N items with the highest similarity constitute the item set S u to be recommended; in this embodiment, the Euclidean distance is used as the similarity calculation, that is, the smaller the Euclidean distance between the two vectors, the higher the similarity between the two;
步骤7、计算待推荐项目集合S
u中各项目的适应值:
Step 7. Calculate the fitness value of each item in the item set Su to be recommended:
本发明中,采用基于能量函数来计算项目的适应值,对待推荐项目集合S
u中的项目x
*,其适应值
的计算如下:
In the present invention, the fitness value of the item is calculated based on the energy function, and the fitness value of the item x * in the recommended item set S u is treated. is calculated as follows:
其中,
和
分别表示待推荐项目集合S
u中项目能量函数的最大值和最小值;
为项目x
*的能量函数(x
*∈S
u),其计算如下:
in, and respectively represent the maximum and minimum value of the item energy function in the item set Su to be recommended; is the energy function (x * ∈ S u ) of item x * , which is calculated as:
其中a
1,n表示RBM1可见层中第n个可见单元的偏置,
为项目x
*的第n个决策分量,
为h
1中第m
1个隐单元的偏置,
为w
1中的元素值,表示RBM1中第n个可见单元与第m
1个隐单元之间的连接权重。
where a 1,n represents the bias of the nth visible unit in the visible layer of RBM1, is the nth decision component of item x * , is the bias of the m1th hidden unit in h1 , is the element value in w 1 , indicating the connection weight between the nth visible unit and the m1th hidden unit in RBM1.
步骤8、选择S
u中适应值最高的前TopN个项目作为搜索结果,TopN<N。
Step 8. Select the top TopN items with the highest fitness value in Su as the search result, TopN<N.
由于多源异构用户生成内容的动态演化特性和用户兴趣偏好的不确定性,在个性化进化搜索过程的早期阶段,优势项目群体D中包含的用户偏好信息不够充足,因而基于此训练的用户偏好感知模型抽取的用户偏好特征较粗略。随着用户交互式搜索过程的推进和用户行为动态演变,根据当前用户最近的评价数据,更新优势项目群体D,再次训练融合注意力机制的用户偏好感知模型,动态更新提取的用户偏好特征,及时跟踪用户偏好变化;同时,更新基于用户偏好的分布估计概率模型P(x),有效引导个性化进化搜索的前进方向,帮助用户尽快搜寻到用户满意解,顺利完成复杂环境下个性化搜索任务。Due to the dynamic evolution characteristics of multi-source heterogeneous user-generated content and the uncertainty of user interest preferences, in the early stage of the personalized evolution search process, the user preference information contained in the dominant item group D is not sufficient, so users trained based on this The user preference features extracted by the preference-aware model are relatively rough. With the advancement of the user interactive search process and the dynamic evolution of user behavior, according to the recent evaluation data of the current user, update the dominant project group D, retrain the user preference perception model integrated with the attention mechanism, and dynamically update the extracted user preference features. Track user preference changes; at the same time, update the distribution estimation probability model P(x) based on user preferences to effectively guide the direction of personalized evolutionary search, help users find user-satisfying solutions as soon as possible, and successfully complete personalized search tasks in complex environments.
本实施例还公开了实现上述个性化搜索方法的融合注意力机制的个性化搜索系统,如图3所示,包括:This embodiment also discloses a personalized search system that realizes the above-mentioned personalized search method and integrates the attention mechanism, as shown in FIG. 3 , including:
用户生成内容获取模块1,用于收集并获取用户u生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化, 项目图像进行特征提取,获取特征向量;User-generated content acquisition module 1, used to collect and acquire user-generated content, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and comments from other users. The usefulness evaluation score of the evaluation made by the user u; vectorize the text comments, extract the feature of the item image, and obtain the feature vector;
优势项目群体构建模块2,用于将用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目组成含用户偏好的优势项目群体D;The advantageous project group building module 2 is used to form the advantageous project group D containing the user's preference with the projects whose user score is greater than the preset score threshold and the trust degree is greater than the preset trust degree threshold;
用户偏好感知模型构建与训练模块3,用于根据步骤3构建并训练融合注意力机制的用户偏好感知模型;所述模型基于深度置信网络,由三层受限玻尔兹曼机组成,其中第一层受限玻尔兹曼机的可见层包括第一组可见单元v
1、第二组可见单元v
2和第三组可见单元v
3,隐藏层为h
1;h
1作为可见层,与隐藏层h
2构成第二层受限玻尔兹曼机;h
2作为可见层,与隐藏层h
3构成第三层受限玻尔兹曼机;所述融合注意力机制的用户偏好感知模型的参数为θ={θ
1,θ
2,θ
3}={w
1,a
1,b
1,w
2,a
2,b
2,w
3,a
3,b
3};
The user preference perception model construction and training module 3 is used to construct and train the user preference perception model fused with the attention mechanism according to step 3; the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, in which the first The visible layer of a restricted Boltzmann machine includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , and the hidden layer is h 1 ; The hidden layer h 2 constitutes the second-layer restricted Boltzmann machine; h 2 serves as the visible layer, and the hidden layer h 3 constitutes the third-layer restricted Boltzmann machine; the user preference perception model of the fusion attention mechanism The parameters of θ={θ 1 ,θ 2 ,θ 3 }={w 1 ,a 1 ,b 1 ,w 2 ,a 2 ,b 2 ,w 3 ,a 3 ,b 3 };
基于用户偏好的分布估计概率模型构建模块4,用于根据已训练好的融合注意力机制的基于深度置信网络的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x):The distribution estimation probability model building module 4 based on user preference is used to build a user preference-based distribution estimation probability model P( x):
P(x)=[P(ψ
1),P(ψ
2),L,P(ψ
n),L,P(ψ
Ф)] (17)
P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Ф )] (17)
其中(ψ
1,ψ
2,…,ψ
n,…,ψ
Ф)为项目x的原始决策向量,P(ψ
n)表示用户对于项目的第n个决策分量的偏好概率;
where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψ Ф ) is the original decision vector of item x, and P(ψ n ) represents the user’s preference probability for the nth decision component of the item;
种群生成模块5,用于利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法生成N个新个体,每个个体为一个项目,并设置每个新个体的类别标签向量,N为预设的种群大小;The population generation module 5 is used to estimate the probability model P(x) by using the distribution based on the user preference, use the distribution estimation algorithm to generate N new individuals, each individual is an item, and set the category label vector of each new individual, N is the preset population size;
待推荐项目集合构建模块6,用于在搜索空间中选择与N个新个体类别标签向量
相似度最高的N个项目,构成待推荐项目集合S
u;
Item set to be recommended building module 6, used to select and N new individual category label vectors in the search space The N items with the highest similarity constitute a set of items to be recommended S u ;
适应值计算模块7,用于根据步骤7计算待推荐项目集合S
u中各项目的适应值;
The fitness value calculation module 7 is used to calculate the fitness value of each item in the item set Su to be recommended according to step 7;
搜索结果选择模块8,用于选择S
u中适应值最高的前TopN个项目作为搜索结果,TopN<N。
The search result selection module 8 is used to select the top TopN items with the highest fitness value in Su as the search result, TopN<N.
Claims (10)
- 融合注意力机制的个性化搜索方法,其特征在于,包括:The personalized search method fused with attention mechanism is characterized by including:步骤1、收集并获取用户u生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化,项目图像进行特征提取,获取特征向量;Step 1. Collect and obtain the content generated by user u, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and the evaluation of user u by other users. Usefulness evaluation score; vectorize text comments, extract features from item images, and obtain feature vectors;步骤2、将用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目组成含用户偏好的优势项目群体D;D中的项目构成集合S,S={(u,x i,C i,T i,G i)},其中x i∈D,C i为项目x i的类别标签向量,T i为用户对项目x i文本评论的向量化表示,G i为项目x i的图像特征向量化表示,i=1,2,L,|D|,|D|表示D中的项目数量; Step 2. The items whose user score is greater than the preset score threshold and whose trust degree is greater than the preset trust degree threshold are formed into an advantageous project group D containing the user's preference; the items in D constitute a set S, S={(u, x i , C i ,T i ,G i )}, where x i ∈ D, C i is the category label vector of item x i , T i is the vectorized representation of the user's textual comments on item x i , and G i is the image of item x i Feature vectorized representation, i=1, 2, L, |D|, |D| represents the number of items in D;步骤3、构建融合注意力机制的用户偏好感知模型,所述模型基于深度置信网络,由三层受限玻尔兹曼机组成,其中第一层受限玻尔兹曼机的可见层包括第一组可见单元v 1、第二组可见单元v 2和第三组可见单元v 3,隐藏层为h 1;h 1作为可见层,与隐藏层h 2构成第二层受限玻尔兹曼机;h 2作为可见层,与隐藏层h 3构成第三层受限玻尔兹曼机;所述融合注意力机制的用户偏好感知模型的参数为θ={θ 1,θ 2,θ 3}={w 1,a 1,b 1,w 2,a 2,b 2,w 3,a 3,b 3}; Step 3. Build a user preference perception model fused with an attention mechanism. The model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, wherein the visible layer of the first layer of restricted Boltzmann machines includes the first layer of restricted Boltzmann machines. A group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 as the visible layer, and the hidden layer h 2 constitute the second layer of restricted Boltzmann machine; h 2 as the visible layer, and the hidden layer h 3 constitute the third-layer restricted Boltzmann machine; the parameters of the user preference perception model of the fusion attention mechanism are θ={θ 1 , θ 2 , θ 3 }={w 1 ,a 1 ,b 1 ,w 2 ,a 2 ,b 2 ,w 3 ,a 3 ,b 3 };利用优势项目群体D,采用对比散度学习算法对融合注意力机制的用户偏好感知模型中的第一层受限玻尔兹曼机进行训练,获得其模型参数θ 1={w 1,a 1,b 1}; Using the dominant project group D, the contrastive divergence learning algorithm is used to train the first-layer restricted Boltzmann machine in the user preference perception model fused with the attention mechanism, and its model parameters θ 1 ={w 1 ,a 1 ,b 1 };第一层RBM模型训练完成后,当给定隐单元状态时,各可见单元的激活状态条件独立,某项目x i的向量表示[C i,T i,G i]输入可见层,其第一组、第二组和第三组可见单元的激活概率分别为: After the training of the first layer of RBM model is completed, when the state of the hidden unit is given, the activation state of each visible unit is independent, and the vector of an item x i represents [C i , T i , G i ] input to the visible layer, its first The activation probabilities of the visible units in the group, the second group, and the third group are:其中,a 1,j、a 1,k和a 1,l分别表示第一组、第二组和第三组可见单元偏置; Among them, a 1,j , a 1,k and a 1,l represent the first group, the second group and the third group of visible unit offsets, respectively;计算各类多源异构数据的信息熵,项目类别标签的信息熵为:Calculate the information entropy of various multi-source heterogeneous data, the information entropy of the item category label is:文本评论向量的信息熵为:The information entropy of the text review vector is:项目图像特征向量的信息熵为:The information entropy of the item image feature vector is:其中c ij表示项目x i的类别标签向量C i的第j个元素,p(c ij)表示RBM1中对应于项目类别标签向量表示的第j个元素的可见单元激活概率; where c ij represents the j-th element of the category label vector C i of the item x i , and p(c ij ) represents the visible unit activation probability corresponding to the j-th element represented by the item category label vector in RBM1;t ik表示用户u对项目x i文本评论向量化表示T i的第k个元素,p(t ik)表示RBM1中对应于用户文本评论向量表示的第k个元素的可见单元激活概率; t ik represents user u’s textual comments on item xi i to represent the k-th element of T i , p(t ik ) represents the visible unit activation probability corresponding to the k-th element represented by the user text comment vector in RBM1;g il表示,p(g il)表示项目x i的图像特征向量化表示G i的第l个元素,p(g il)表示RBM1中对应于项目图像特征向量表示的第l个元素的可见单元激活概率; g il represents, p(g il ) represents the image feature vectorization of item x i represents the lth element of G i , p(g il ) represents the visible unit in RBM1 corresponding to the lth element represented by the item image feature vector activation probability;其次,计算各类信息熵占总信息熵的比例作为权重因子:Secondly, calculate the proportion of various types of information entropy to the total information entropy as a weight factor:其中H(x i)=H(C i)+H(T i)+H(G i); Wherein H(x i )=H(C i )+H(T i )+H(G i );将向量C i、T i、G i组合构成项目x i的决策向量Ψ i输入v 1、v 2、v 3中各可见单元时,隐藏层h 1中各隐单元的激活状态条件独立,第m 1个隐单元的激活概率为: Combining the vectors C i , T i , and G i to form the decision vector Ψ i of the item x i is input to each visible unit in v 1 , v 2 , and v 3 , the activation state of each hidden unit in the hidden layer h 1 is independent, and the first The activation probability of m 1 hidden unit is:其中,m 1=1,2,…,M 1, 为h 1中第m 1个隐单元的偏置;v 1j为RMB1第一组可见单元v 1中第j个可见单元的状态;v 2k为RMB1第二组可见单元v 2中第k个可见单元的状态;v 3lRMB1第三组可见单元v 3中第l个可见单元的状态; 为w 1中的元素值,表示RBM1中第n个可见单元与第m 1个隐单元之间的连接权重,n=1,2,…,Φ; 表示隐层h 1中第m 1个隐单元的状态;σ(x)=1/(1+exp(-x))是 sigmoid激活函数; Among them, m 1 =1,2,...,M 1 , is the bias of the m1th hidden unit in h1 ; v1j is the state of the jth visible unit in the first group of visible units v1 of RMB1 ; v2k is the kth visible unit in the second group of visible units v2 of RMB1 The state of the unit; the state of the lth visible unit in the third group of visible units v3 of v 3l RMB1; is the element value in w 1 , indicating the connection weight between the nth visible unit and the m1th hidden unit in RBM1, n= 1 , 2,...,Φ; Represents the state of the m1th hidden unit in the hidden layer h1; σ(x)= 1 /( 1 +exp(-x)) is the sigmoid activation function;RBM1训练完成后,根据式(9)获取项目x i对应的各隐单元的状态,进而获得用户对于优势项目群体D中各项目的各决策分量的偏好程度,即可见层单元激活概率,作为注意力权重系数at n(x i): After the training of RBM1 is completed, the state of each hidden unit corresponding to item x i is obtained according to formula (9), and then the user's preference for each decision component of each item in the dominant item group D is obtained, that is, the activation probability of visible layer unit, as attention Force weight coefficient at n (x i ):其中 表示Ψ i作为RBM1可见层各可见单元状态时,隐藏层h 1中第m 1个隐单元的状态;at n(x i)表示项目x i各决策分量ψ in的注意力权重; in Represents Ψ i as the state of each visible unit in the visible layer of RBM1, the state of the m 1 hidden unit in the hidden layer h 1 ; at n ( xi ) represents the attention weight of each decision component ψ in of item x i ;将注意力权重系数at n(x i)作为项目x i各决策分量的权重系数,对优势项目群体D中项目x i进行基于注意力机制的编码,编码后表示为x ati: Taking the attention weight coefficient at n ( xi ) as the weight coefficient of each decision component of the item xi , the item xi in the dominant item group D is coded based on the attention mechanism, and expressed as x ati after coding:x ati=Ψ i+at n(x i)×Ψ i (12) x ati =Ψ i +at n (x i )×Ψ i (12)将x ati输入预训练后的RBM1,得到可见单元激活概率V RBM1(x ati): Input x ati into the pre-trained RBM1 to get the visible unit activation probability V RBM1 (x ati ):其中x atn′为x ati的第n′个元素; where x atn' is the n'th element of x ati ;由RBM1可见单元激活概率V RBM1(x ati)进行自注意力机制运算,动态学习项目个体的用户偏好注意力权重向量A(x ati): The self-attention mechanism operation is performed by the visible unit activation probability V RBM1 (x ati ) of RBM1, and the user preference attention weight vector A(x ati ) of the dynamic learning project individual is:A(x ati)=softmax(a(V RBM1(x ati),w 1)) (14) A(x ati )=softmax(a(V RBM1 (x ati ),w 1 )) (14)其中,softmax()函数保证所有权重系数之和为1;函数a(V RBM1(x ati),w 1)衡量了项目x i相对于用户偏好特征的注意力权重系数,计算如下: Among them, the softmax() function ensures that the sum of all weight coefficients is 1; the function a(V RBM1 (x ati ),w 1 ) measures the attention weight coefficient of item xi relative to user preference features, and is calculated as follows:a(V RBM1(x ati),w 1)=V RBM1(x ati)·(w 1) T (15) a(V RBM1 (x ati ), w 1 )=V RBM1 (x ati )·(w 1 ) T (15)结合用户偏好注意力权重向量A(x ati)和项目x i的原始决策向量C i,T i,G i,生成融合注意力机制的项目决策向量: Combining the user preference attention weight vector A(x ati ) and the original decision vectors C i , T i , G i of the item xi , generate the item decision vector fused with the attention mechanism:x i′=A(x ati)×Ψ i (16) x i ′=A(x ati )×Ψ i (16)利用融合注意力机制的项目决策向量x i′构成训练集,对DBN中的RBM1、 RBM2、RBM3模型进行逐层训练,训练完成后获得融合注意力机制的基于深度置信网络的用户偏好感知模型及其优化模型参数θ; The item decision vector x i ′ fused with the attention mechanism is used to form a training set, and the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer. Its optimized model parameter θ;步骤4、根据已训练好的融合注意力机制的基于深度置信网络的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x):Step 4. According to the trained user preference perception model based on the deep belief network and the model parameters of the fusion attention mechanism, establish and construct a distribution estimation probability model P(x) based on user preference:P(x)=[P(ψ 1),P(ψ 2),L,P(ψ n),L,P(ψ Φ)] (17) P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Φ )] (17)其中(ψ 1,ψ 2,…,ψ n,…,ψ Φ)为项目x的原始决策向量,P(ψ n)表示用户对于项目的第n个决策分量的偏好概率; where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψ Φ ) is the original decision vector of item x, and P(ψ n ) represents the user’s preference probability for the nth decision component of the item;步骤5、设定种群大小N,利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法生成N个新个体,每个个体为一个项目;第v个新个体的类别标签向量 (v=1,2,L,N)的设置步骤如下: Step 5. Set the population size N, use the distribution based on user preference to estimate the probability model P(x), and use the distribution estimation algorithm to generate N new individuals, each individual is an item; the category label vector of the vth new individual (v=1,2,L,N) The setting steps are as follows:(5.1)令v=1;(5.1) Let v=1;(5.2)生成[0,1]之间的随机数z;如果z≤P(ψ j=1),则第v个新个体的类别标签向量 的第j个元素为1,否则为0; (5.2) Generate a random number z between [0, 1]; if z≤P(ψ j =1), then the class label vector of the vth new individual The jth element of is 1, otherwise it is 0;(5.3)令v加一,重复步骤(5.2),直至v>N;(5.3) add one to v, and repeat step (5.2) until v>N;步骤6、在搜索空间中选择与N个新个体类别标签向量 相似度最高的N个项目,构成待推荐项目集合S u; Step 6. Select and N new individual category label vectors in the search space The N items with the highest similarity constitute a set of items to be recommended S u ;步骤7、计算待推荐项目集合S u中各项目的适应值 Step 7. Calculate the fitness value of each item in the item set Su to be recommended其中, 和 分别表示待推荐项目集合S u中项目能量函数的最大值和最小值; 为项目x *的能量函数,x *∈S u,其计算如下: in, and respectively represent the maximum and minimum value of the item energy function in the item set Su to be recommended; is the energy function of item x * , x * ∈ S u , which is calculated as:步骤8、选择S u中适应值最高的前TopN个项目作为搜索结果,TopN<N; Step 8. Select the top N items with the highest fitness value in Su as the search result, TopN <N;随着用户交互式搜索过程的推进和用户行为动态演变,根据当前用户最近的评价数据,更新优势项目群体D,再次训练融合注意力机制的用户偏好感知模型,动态更新提取的用户偏好特征,同时,更新基于用户偏好的分布估计概率模型P(x)。With the advancement of the user's interactive search process and the dynamic evolution of user behavior, according to the current user's recent evaluation data, the dominant item group D is updated, the user preference perception model fused with the attention mechanism is retrained, and the extracted user preference features are dynamically updated. , update the estimated probability model P(x) based on the distribution of user preferences.
- 根据权利要求1所述的融合注意力机制的个性化搜索方法,其特征在于,所述优势项目群体D中还包括占比为η的新项目,所述新项目通过在搜索空间随机采样得到。The personalized search method incorporating an attention mechanism according to claim 1, wherein the advantageous item group D further includes a new item with a proportion of n, and the new item is obtained by random sampling in the search space.
- 根据权利要求2所述的融合注意力机制的个性化搜索方法,其特征在于,如果当前用户u对新项目没有评价,则采用当前用户u的相似用户u′对该新项目的文本评论作为用户u对该新项目的评价;如果用户u的多个相似用户均对该新项目作出评价,则选择其中与用户u相似度最大的用户的评价;如果当前用户u的相似用户均没有对该新项目作出评价,用户u对该新项目的评价采用随机赋值的方式。The personalized search method fused with attention mechanism according to claim 2, wherein if the current user u has no comments on the new item, the text comment on the new item by the similar user u' of the current user u is used as the user u's evaluation of the new item; if multiple similar users of user u have evaluated the new item, select the evaluation of the user with the greatest similarity with user u; The project is evaluated, and the user u's evaluation of the new project adopts the method of random assignment.
- 根据权利要求3所述的融合注意力机制的个性化搜索方法,其特征在于,用户u的相似用户为与用户u存在共同评分项目,且相似度大于预设的相似度阈值的用户;对于与用户u存在共同评分项目的用户u′,u′≠u,u和u′的相似度Sim(u,u′)为:The personalized search method fused with attention mechanism according to claim 3, characterized in that, similar users of user u are users who have a common scoring item with user u, and the similarity is greater than a preset similarity threshold; User u has a user u' with a common rating item, u'≠u, the similarity Sim(u, u') of u and u' is:其中I u,u′表示用户u和u′均评分的项目集合;R ux′为用户u对I u,u′中的项目x′的评分,R u′x′为用户u′对x′的评分; 为用户u对已评价的所有项目的平均评分; 为用户u′对已评价的所有项目的平均评分。 where I u,u' represents the set of items scored by both users u and u'; R ux' is the user u's rating on the item x' in I u, u' , and R u'x' is the user u' to x'rating; is the average rating of all items evaluated by user u; is the average rating of all items evaluated for user u'.
- 根据权利要求1所述的融合注意力机制的个性化搜索方法,其特征在于,所述对DBN中的RBM1、RBM2、RBM3模型进行逐层训练,具体为:The personalized search method fused with the attention mechanism according to claim 1, wherein the RBM1, RBM2, and RBM3 models in the DBN are trained layer by layer, specifically:首先训练RBM1,得到参数{w 1,a 1,b 1};将b 1传递进RBM2中的a 2,在此基础上训练RBM2,获得优化参数{w 2,a 2,b 2};将b 2传递进RBM3中的a 3,在此基础上训练RBM3,获得优化参数{w 3,a 3,b 3}。 First train RBM1 to obtain parameters {w 1 , a 1 , b 1 }; pass b 1 into a 2 in RBM2, train RBM2 on this basis, and obtain optimized parameters {w 2 , a 2 , b 2 }; b 2 is passed into a 3 in RBM3, and RBM3 is trained on this basis to obtain optimized parameters {w 3 , a 3 , b 3 }.
- 根据权利要求1所述的融合注意力机制的个性化搜索方法,其特征在于,所述用户偏好的项目第n个决策分量的概率P(ψ n)的计算为: The personalized search method fused with attention mechanism according to claim 1, wherein the calculation of the probability P(ψ n ) of the nth decision component of the item preferred by the user is:首先根据优势项目群体D计算基于用户偏好的概率分布模型p(x):First, calculate the probability distribution model p(x) based on user preference according to the dominant project group D:p(x)为Φ维向量,其第n个元素p(ψ n)为用户偏好项目第n个决策分量的激活概率;对p(ψ n)进行下界约束,约束后的值为用户偏好的项目第n个决策分量的 概率P(ψ n),即: p(x) is a Φ-dimensional vector, and its n-th element p(ψ n ) is the activation probability of the n-th decision component of the user preference item; the lower bound is constrained on p(ψ n ), and the constrained value is the user's preference The probability P(ψ n ) of the nth decision component of the item, namely:ε为预设的下界阈值。ε is a preset lower bound threshold.
- 根据权利要求1所述的融合注意力机制的个性化搜索方法,其特征在于,所述三层受限玻尔兹曼机中,每一层受限玻尔兹曼机中隐藏层隐单元数目为可见层中可见单元数目的0.8-1.2倍。The personalized search method fused with attention mechanism according to claim 1, wherein, in the three-layer restricted Boltzmann machine, the number of hidden layer hidden units in each layer of restricted Boltzmann machine 0.8-1.2 times the number of visible cells in the visible layer.
- 根据权利要求2所述的融合注意力机制的个性化搜索方法,其特征在于,新项目在优势项目群体D中的占比η<30%。The personalized search method fused with attention mechanism according to claim 2, wherein the proportion of new items in the dominant item group D is η<30%.
- 根据权利要求1所述的融合注意力机制的个性化搜索方法,其特征在于,所述步骤6采用欧氏距离作为相似度计算,即两向量之间的欧氏距离越小,二者相似度越高。The personalized search method fused with attention mechanism according to claim 1, characterized in that, in step 6, Euclidean distance is used as similarity calculation, that is, the smaller the Euclidean distance between two vectors, the greater the similarity between the two vectors. higher.
- 融合注意力机制的个性化搜索系统,其特征在于,包括:The personalized search system integrating attention mechanism is characterized in that it includes:用户生成内容获取模块,用于收集并获取用户u生成内容,所述用户生成内容包括用户u已评价的所有项目、对每个项目的评分和文本评论、每个项目的图像、其他用户对用户u所做评价的有用性评价得分;将文本评论进行向量化,项目图像进行特征提取,获取特征向量;The user-generated content acquisition module is used to collect and acquire user-generated content, which includes all items that user u has evaluated, ratings and text comments for each item, images of each item, and user-generated content from other users. u The usefulness evaluation score of the evaluation; vectorize the text comment, extract the feature of the item image, and obtain the feature vector;优势项目群体构建模块,用于将用户评分大于预设评分阈值且信任度大于预设信任度阈值的项目组成含用户偏好的优势项目群体D;The advantageous project group building module is used to form the advantageous project group D with user preference of the projects whose user score is greater than the preset score threshold and whose trust degree is greater than the preset trust degree threshold;用户偏好感知模型构建与训练模块,用于构建并训练融合注意力机制的用户偏好感知模型;所述模型基于深度置信网络,由三层受限玻尔兹曼机组成,其中第一层受限玻尔兹曼机的可见层包括第一组可见单元v 1、第二组可见单元v 2和第三组可见单元v 3,隐藏层为h 1;h 1作为可见层,与隐藏层h 2构成第二层受限玻尔兹曼机;h 2作为可见层,与隐藏层h 3构成第三层受限玻尔兹曼机;所述融合注意力机制的用户偏好感知模型的参数为θ={θ 1,θ 2,θ 3}={w 1,a 1,b 1,w 2,a 2,b 2,w 3,a 3,b 3}; The user preference perception model construction and training module is used to construct and train a user preference perception model fused with an attention mechanism; the model is based on a deep belief network and consists of three layers of restricted Boltzmann machines, of which the first layer is restricted The visible layer of the Boltzmann machine includes the first group of visible units v 1 , the second group of visible units v 2 and the third group of visible units v 3 , the hidden layer is h 1 ; h 1 is used as the visible layer, and the hidden layer h 2 Constitute the second-layer restricted Boltzmann machine; h 2 as the visible layer, and the hidden layer h 3 form the third-layer restricted Boltzmann machine; the parameter of the user preference perception model of the fusion attention mechanism is θ ={θ 1 ,θ 2 ,θ 3 }={w 1 ,a 1 ,b 1 ,w 2 ,a 2 ,b 2 ,w 3 ,a 3 ,b 3 };基于用户偏好的分布估计概率模型构建模块,用于根据已训练好的融合注意力机制的基于深度置信网络的用户偏好感知模型及其模型参数,建立构建基于用户偏好的分布估计概率模型P(x):The distribution estimation probability model building module based on user preference is used to build a user preference-based distribution estimation probability model P(x ):P(x)=[P(ψ 1),P(ψ 2),L,P(ψ n),L,P(ψ Φ)] (17) P(x)=[P(ψ 1 ),P(ψ 2 ),L,P(ψ n ),L,P(ψ Φ )] (17)其中(ψ 1,ψ 2,…,ψ n,…,ψ Φ)为项目x的原始决策向量,P(ψ n)表示用户对于项目的第n个决策分量的偏好概率; where (ψ 1 ,ψ 2 ,…,ψ n ,…,ψ Φ ) is the original decision vector of item x, and P(ψ n ) represents the user’s preference probability for the nth decision component of the item;种群生成模块,用于利用基于用户偏好的分布估计概率模型P(x),采用分布估计算法生成N个新个体,每个个体为一个项目,并设置每个新个体的类别标签 向量,N为预设的种群大小;The population generation module is used to estimate the probability model P(x) based on the distribution based on user preferences, use the distribution estimation algorithm to generate N new individuals, each individual is an item, and set the category label vector of each new individual, N is preset population size;待推荐项目集合构建模块,用于在搜索空间中选择与N个新个体类别标签向量 相似度最高的N个项目,构成待推荐项目集合S u; The building block of the item set to be recommended is used to select and N new individual category label vectors in the search space The N items with the highest similarity constitute a set of items to be recommended S u ;适应值计算模块,用于计算待推荐项目集合S u中各项目的适应值; The fitness value calculation module is used to calculate the fitness value of each item in the item set Su to be recommended;搜索结果选择模块,用于选择S u中适应值最高的前TopN个项目作为搜索结果,TopN<N。 The search result selection module is used to select the top TopN items with the highest fitness value in Su as the search result, TopN<N.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022578858A JP7393060B2 (en) | 2021-04-14 | 2022-03-28 | Personalized search method and search system combining attention mechanism |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110399302.0 | 2021-04-14 | ||
CN202110399302.0A CN113127737B (en) | 2021-04-14 | 2021-04-14 | Personalized search method and search system integrating attention mechanism |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022218139A1 true WO2022218139A1 (en) | 2022-10-20 |
Family
ID=76776325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/083375 WO2022218139A1 (en) | 2021-04-14 | 2022-03-28 | Personalized search method and search system combined with attention mechanism |
Country Status (3)
Country | Link |
---|---|
JP (1) | JP7393060B2 (en) |
CN (1) | CN113127737B (en) |
WO (1) | WO2022218139A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117783051A (en) * | 2024-02-28 | 2024-03-29 | 西安尚展信息科技有限公司 | Methane gas leakage detection method based on multi-sensor data fusion |
CN118398217A (en) * | 2024-07-01 | 2024-07-26 | 广元市中心医院 | Multimode fusion hemodialysis data analysis method |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113127737B (en) * | 2021-04-14 | 2021-09-14 | 江苏科技大学 | Personalized search method and search system integrating attention mechanism |
CN113987261B (en) * | 2021-11-08 | 2023-07-18 | 烟台大学 | Video recommendation method and system based on dynamic trust perception |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040034652A1 (en) * | 2000-07-26 | 2004-02-19 | Thomas Hofmann | System and method for personalized search, information filtering, and for generating recommendations utilizing statistical latent class models |
CN111291261A (en) * | 2020-01-21 | 2020-06-16 | 江西财经大学 | Cross-domain recommendation method integrating label and attention mechanism and implementation system thereof |
CN111339428A (en) * | 2020-03-25 | 2020-06-26 | 江苏科技大学 | Interactive personalized search method based on limited Boltzmann machine drive |
CN112328900A (en) * | 2020-11-27 | 2021-02-05 | 北京工业大学 | Deep learning recommendation method integrating scoring matrix and comment text |
CN113127737A (en) * | 2021-04-14 | 2021-07-16 | 江苏科技大学 | Personalized search method and search system integrating attention mechanism |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7693827B2 (en) * | 2003-09-30 | 2010-04-06 | Google Inc. | Personalization of placed content ordering in search results |
-
2021
- 2021-04-14 CN CN202110399302.0A patent/CN113127737B/en active Active
-
2022
- 2022-03-28 JP JP2022578858A patent/JP7393060B2/en active Active
- 2022-03-28 WO PCT/CN2022/083375 patent/WO2022218139A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040034652A1 (en) * | 2000-07-26 | 2004-02-19 | Thomas Hofmann | System and method for personalized search, information filtering, and for generating recommendations utilizing statistical latent class models |
CN111291261A (en) * | 2020-01-21 | 2020-06-16 | 江西财经大学 | Cross-domain recommendation method integrating label and attention mechanism and implementation system thereof |
CN111339428A (en) * | 2020-03-25 | 2020-06-26 | 江苏科技大学 | Interactive personalized search method based on limited Boltzmann machine drive |
CN112328900A (en) * | 2020-11-27 | 2021-02-05 | 北京工业大学 | Deep learning recommendation method integrating scoring matrix and comment text |
CN113127737A (en) * | 2021-04-14 | 2021-07-16 | 江苏科技大学 | Personalized search method and search system integrating attention mechanism |
Non-Patent Citations (2)
Title |
---|
BAO LIN, SUN XIAOYAN, CHEN YANG, GONG DUNWEI, ZHANG YONGWEI: "Restricted Boltzmann Machine-driven Interactive Estimation of Distribution Algorithm for personalized search", KNOWLEDGE-BASED SYSTEMS, ELSEVIER, AMSTERDAM, NL, vol. 200, 1 July 2020 (2020-07-01), AMSTERDAM, NL , pages 106030, XP055977628, ISSN: 0950-7051, DOI: 10.1016/j.knosys.2020.106030 * |
BAO LIN; SUN XIAOYAN; GONG DUNWEI; ZHANG YONG; XU BIAO: "Enhanced Interactive Estimation of Distribution Algorithms with Attention Mechanism and Restricted Boltzmann Machine", 2020 IEEE CONGRESS ON EVOLUTIONARY COMPUTATION (CEC), IEEE, 19 July 2020 (2020-07-19), pages 1 - 9, XP033820019, DOI: 10.1109/CEC48606.2020.9185740 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117783051A (en) * | 2024-02-28 | 2024-03-29 | 西安尚展信息科技有限公司 | Methane gas leakage detection method based on multi-sensor data fusion |
CN118398217A (en) * | 2024-07-01 | 2024-07-26 | 广元市中心医院 | Multimode fusion hemodialysis data analysis method |
Also Published As
Publication number | Publication date |
---|---|
JP7393060B2 (en) | 2023-12-06 |
JP2023530370A (en) | 2023-07-14 |
CN113127737A (en) | 2021-07-16 |
CN113127737B (en) | 2021-09-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109299396B (en) | Convolutional neural network collaborative filtering recommendation method and system fusing attention model | |
CN108804689B (en) | Question-answering platform-oriented label recommendation method integrating user hidden connection relation | |
WO2022218139A1 (en) | Personalized search method and search system combined with attention mechanism | |
CN108363753B (en) | Comment text emotion classification model training and emotion classification method, device and equipment | |
CN111563164B (en) | Specific target emotion classification method based on graph neural network | |
CN109145112A (en) | A kind of comment on commodity classification method based on global information attention mechanism | |
CN110263257B (en) | Deep learning based recommendation method for processing multi-source heterogeneous data | |
CN108229582A (en) | Entity recognition dual training method is named in a kind of multitask towards medical domain | |
CN110489567B (en) | Node information acquisition method and device based on cross-network feature mapping | |
CN111581520A (en) | Item recommendation method and system based on item importance in session | |
CN109508385B (en) | Character relation analysis method in webpage news data based on Bayesian network | |
CN111949885B (en) | Personalized recommendation method for scenic spots | |
CN108388654B (en) | Sentiment classification method based on turning sentence semantic block division mechanism | |
CN112256866A (en) | Text fine-grained emotion analysis method based on deep learning | |
Sadr et al. | Convolutional neural network equipped with attention mechanism and transfer learning for enhancing performance of sentiment analysis | |
CN112364236A (en) | Target object recommendation system, method and device, and data processing method and device | |
Devipriya et al. | Deep learning sentiment analysis for recommendations in social applications | |
CN113987167A (en) | Dependency perception graph convolutional network-based aspect-level emotion classification method and system | |
CN114417851A (en) | Emotion analysis method based on keyword weighted information | |
CN113535949A (en) | Multi-mode combined event detection method based on pictures and sentences | |
CN116467443A (en) | Topic identification-based online public opinion text classification method | |
CN114218457B (en) | False news detection method based on forwarding social media user characterization | |
Moholkar et al. | Lioness adapted GWO-based deep belief network enabled with multiple features for a novel question answering system | |
WO2021189583A1 (en) | Restricted boltzmann machine-driven interactive personalized search method | |
CN112560440A (en) | Deep learning-based syntax dependence method for aspect-level emotion analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22787368 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2022578858 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22787368 Country of ref document: EP Kind code of ref document: A1 |