A book recommendation method based on deep and wide model

By introducing the pre-trained language module and attention mechanism of the dual-tower architecture into the deep-broad model, the limitations of traditional book recommendation methods in data sparseness and cold start problems are solved, and the Chinese text features are effectively utilized, which significantly improves the accuracy of recommendations.

CN119474550BActive Publication Date: 2025-04-29JIANGXI NORMAL UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510047316.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-13
Publication Date
2025-04-29
Estimated Expiration
2045-01-13

AI Technical Summary

Technical Problem

Traditional book recommendation methods have limitations in the problems of sparse data and cold start, and they fail to effectively utilize a large number of Chinese text features in book information, resulting in low recommendation effect.

Method used

Based on the deep and broad model, a pre-trained language module with a dual-tower architecture is used to learn Chinese text information of readers and books, and the key interest weights in readers' historical borrowing are calculated through the attention mechanism, and the two are integrated to improve the capture ability of Chinese text features and the accuracy of personalized recommendations.

Benefits of technology

It significantly improves the ability to capture Chinese text features, enhances the accuracy of personalized recommendations, provides an effective deep learning recommendation method, and improves the recommendation effect in the field of book recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474550B_ABST
    Figure CN119474550B_ABST
Patent Text Reader

Abstract

The present invention discloses a book recommendation method based on a deep-wide model, the method comprising the following steps: constructing a data set, inputting the data set into two pre-trained language modules, obtaining the hidden state representation of the last layer of the two pre-trained language modules, averaging the hidden state representation of the last layer of the two pre-trained language modules, obtaining a comprehensive representation vector of the entire input, inputting the data set into an interest extraction module for processing, obtaining an embedded representation vector of the embedding layer, grouping and splicing the embedded representation vector of the embedding layer, obtaining the output of the interest extraction module, fusing the comprehensive representation vector of the entire input and the output of the interest extraction module, and obtaining the probability of the reader for the candidate borrowing book. The present invention adds an attention mechanism to the deep-wide model, and the attention mechanism dynamically assigns weights according to the impact of each behavior on the user's preference, thereby accurately identifying the user's key interests and significantly enhancing the recommendation capability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of book recommendation, and in particular to a book recommendation method based on a deep-wide model. Background Art

[0002] With the rapid development of modern society and the Internet, the problem of information explosion is becoming increasingly serious, and it has become difficult for users to quickly obtain the required content in the massive amount of information. Recommendation systems have emerged as a personalized information filtering tool and are widely used in e-commerce, social media, and content platforms. Traditional recommendation systems mainly rely on collaborative filtering algorithms to recommend items that users may be interested in by analyzing their historical behaviors or preferences. However, since the recommendation effect is highly dependent on the user's interaction records, traditional recommendation methods have obvious limitations in data sparsity and cold start problems.

[0003] As machine learning develops into deep learning, deep learning has made great progress in fields such as natural language processing and computer vision, and has gradually become an ideal tool for implementing recommendation algorithms in recommendation systems. Deep learning has powerful feature learning and fitting capabilities, which can not only realize the automatic extraction and learning of features in massive data, but also capture the deep relationship between users and items, thereby making more accurate and effective personalized recommendations to users.

[0004] The Wide & Deep model is a recommendation method that combines a linear model with a deep neural network. It uses a parallel model structure. On the Wide side, a linear model similar to logistic regression is used to play a memory role. On the Deep side, a multi-layer neural network is used to cross-feature and play a generalization role. The Wide & Deep model has both memory and generalization capabilities, and the recommendation effect is significant, but it still has the following shortcomings: 1) The Wide part requires manual feature engineering; 2) Feature mining is not comprehensive, and there is a lack of recognition and use of important feature information.

[0005] Although the application of deep learning recommendation technology in e-commerce and other fields is relatively mature, in the book recommendation scenario, traditional methods still dominate, with data sparsity and cold start problems, and books are usually recommended as single items, failing to effectively utilize the large number of Chinese text features contained in book information, and the recommendation effect is relatively low. To solve the above problems, the present invention proposes an improved algorithm for book recommendation scenarios based on the deep and wide model. On the Wide side, two pre-trained language modules are used to form a dual-tower architecture to learn the Chinese text information and global context of readers and books. On the Deep side of deep learning, the attention mechanism is used to calculate the key interest weights in the reader's historical borrowing. The fusion of the two not only improves the ability to capture Chinese text features, but also enhances the accuracy of personalized recommendations, providing an effective deep learning recommendation method for the field of book recommendation. Summary of the invention

[0006] In view of the deficiencies in the prior art, the present invention provides a book recommendation method based on a deep-wide model to solve the problems raised in the above background technology.

[0007] To achieve the above object, the present invention provides the following technical solution: a book recommendation method based on a deep-wide model, comprising the following steps:

[0008] Step S1: construct a data set, which consists of reader information, borrowing behavior, candidate borrowing and scenario information;

[0009] Step S2: Construct a deep-wide model, which consists of a comprehensive representation module, an interest extraction module, and a feature fusion module; the comprehensive representation module consists of two pre-trained language modules; the interest extraction module consists of a gated recurrent unit layer and an attention mechanism layer;

[0010] Step S3: The reader information, borrowing behavior, candidate borrowing and scenario information of the data set in step S1 are combined into two sentences, and the two sentences are input into two pre-trained language modules at word granularity to obtain the hidden state representation of the last layer of the two pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is average-pooled to obtain a comprehensive representation vector of the entire input;

[0011] Step S4: input the borrowing behavior and candidate borrowing into the embedding layer of the interest extraction module for processing to obtain the embedding representation vector of the embedding layer, group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and candidate borrowing, input the embedding representation vector of the i-th borrowing behavior into the gated recurrent unit layer for processing to obtain the hidden state of the i-th borrowing behavior, input the embedding representation vectors of the i-th borrowing behavior and candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing to obtain the output of the interest extraction module;

[0012] Step S5: The comprehensive representation vector of the entire input obtained in step S3 and the output of the interest extraction module obtained in step S4 are fused through the feature fusion module to obtain the probability of the reader for the candidate borrowing book.

[0013] Further, in step S1, a data set is constructed, and the specific process is as follows:

[0014] Step S11: extracting key features of readers from the library borrowing records, the key features including 'reader card number', 'reader type', 'reader unit', 'book title', 'book author', 'book standard number' and 'borrowing time'; and clearing illegal or missing data items;

[0015] Step S12: retain 2 to 11 borrowing records, the first 1 to 10 borrowing records are used as borrowing behaviors with multi-valued features, and the last borrowing record is used as a candidate borrowing record;

[0016] Step S13: The candidate borrowing book records actually borrowed by the readers are labeled as 1 as positive samples; the books not borrowed by the readers are regarded as candidate borrowing books and are labeled as 0 as negative samples, and a data set is constructed based on the positive samples and negative samples;

[0017] Step S14: The data set is represented as D={user, hist, cand, cont, label}; user represents the reader information, which includes 'reader card number', 'reader type', and 'reader unit'; hist represents borrowing behavior, which includes 'borrowed book title', 'borrowed book author', and 'borrowed book classification', and is a multi-value feature; cand represents candidate borrowing, which includes 'candidate book title', 'candidate book author', and 'candidate book classification'; cont represents scenario information, which includes 'actual borrowing times' and 'borrowing time'; label represents the real label of whether the reader actually borrows the candidate book.

[0018] Further, in step S3, a comprehensive representation vector of the entire input is obtained, and the specific process is as follows:

[0019] Step S31: Input the data set constructed in step S1 into the comprehensive representation module, and use the comprehensive representation module to splice the reader information and scene information of i samples in the data set into sentence 1, and splice the borrowing behavior and candidate borrowing of i samples in the data set into sentence 2, which is expressed as:

[0020] (1);

[0021] In the formula, is sentence 1 composed of the reader information and scene information in the i-th sample; is a separator; is the sentence 2 composed of the borrowing behavior and candidate borrowing in the i-th sample;

[0022] Step S32: Sentence 1 and Sentence 2 are grouped into word granularity and Represented, respectively input into two parallel pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is obtained and , expressed as:

[0023] (2);

[0024] (3);

[0025] In the formula, and They represent the 1st word granularity and the nth word granularity of sentence 1 respectively; and They represent the first hidden state and the nth hidden state of sentence 1 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 1; and They represent the first word granularity and the mth word granularity of sentence 2 respectively; and They represent the first hidden state and the mth hidden state of sentence 2 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 2;

[0026] Step S33: Represent the hidden states of the last layers of the two pre-trained language modules and Perform average pooling to obtain the comprehensive representation vector of the two sentences and , expressed as:

[0027] (4);

[0028] (5);

[0029] In the formula, The comprehensive representation vector representing sentence 1; represents average pooling; The comprehensive representation vector of sentence 2;

[0030] Step S34: The comprehensive representation vector of the two sentences and Concatenate to get the comprehensive representation vector of the entire input , expressed as:

[0031] (6);

[0032] In the formula, Represents a concatenation operation.

[0033] Further, in step S4, the output of the interest extraction module is obtained, and the specific process is as follows:

[0034] Step S41: Convert the borrowing behavior and the book title, book author and book category of the candidate borrowing into a dictionary integer index through label encoding, expressed as:

[0035] (7);

[0036] (8);

[0037] In the formula, express, and They are the label mapping dictionaries maintained by book titles, book authors, and book categories; Represents a key-value pair consisting of the nth book title and the nth integer index; Represents a key-value pair consisting of the nth book author and the nth integer index; Represents a key-value pair consisting of the nth book category and the nth integer index; , and Respectively represent the book title, book author and book category; , and Dictionary integer indexes representing the mapping of book titles, book authors, and book categories respectively;

[0038] Step S42: Input the dictionary integer index of the book title, book author and book category mapping into the embedding layer of the interest extraction module. The embedding layer maps the dictionary integer index of the book title, book author and book category mapping into a low-dimensional dense embedding vector through a neural network. The embedding representation vector of the embedding layer is expressed as:

[0039] (9);

[0040] In the formula, The embedding representation vector representing the embedding layer; The dictionary integer index representing the n-th book title, book author, and book category mapping is passed through the embedding layer to represent the embedding vector;

[0041] Step S43: Group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and the candidate borrowing, expressed as:

[0042] (10);

[0043] (11);

[0044] In the formula, The embedding representation vector representing the i-th borrowing behavior; Represents a splicing operation; The embedding representation vector of the book title representing the i-th borrowing behavior; The embedding representation vector of the book author representing the i-th borrowing behavior; The embedding representation vector of the book category representing the i-th borrowing behavior; The embedding representation vector representing the i-th candidate borrowing; The embedding representation vector representing the title of the i-th candidate borrowed book; The embedding representation vector representing the author of the i-th candidate borrowed book; The embedding representation vector representing the book category of the i-th candidate borrowing;

[0045] Step S44: The embedded representation vector of the i-th borrowing behavior is input into the gated recurrent unit layer as a multi-value feature to obtain the hidden state of the i-th borrowing behavior, which is expressed as:

[0046] (12);

[0047] In the formula, Represents the hidden state of the i-th borrowing behavior; represents a gated recurrent unit layer; Indicates the hidden state of the last borrowing behavior;

[0048] Step S45: Input the embedded representation vectors of the i-th borrowing behavior and the candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing. The process is as follows:

[0049] In the attention mechanism layer, the embedding representation vector of the i-th borrowing behavior is first and the embedding representation vector of the i-th candidate borrowing Perform outer product and difference operations to obtain the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weight of the i-th borrowing behavior is then embedded in the representation vector , the hidden state of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weights are concatenated and the concatenated result is input into the multi-layer perceptron of the activation function. Finally, the weight of the i-th borrowing behavior on the candidate item is obtained through the linear layer. , expressed as:

[0050] (13);

[0051] In the formula, represents a linear layer; represents the activation function;

[0052] The weight of the i-th borrowing behavior on the candidate item and the embedding representation vector of the i-th borrowing behavior Multiply them together to get the output of the interest extraction module , expressed as:

[0053] (14);

[0054] In the formula, Indicates the nth borrowing behavior.

[0055] Further, in step S5, the probability of the reader borrowing the candidate book is obtained, and the specific process is as follows:

[0056] The feature fusion layer of the feature fusion module converts the comprehensive representation vector of the entire input in step S3 into and the output of the interest extraction module in step S4 Fusion, combined with the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing , is imported into the multi-layer perceptron with activation function for training, and finally, after the activation function, the probability of the reader borrowing the candidate book is obtained. , expressed as:

[0057] (15);

[0058] (16);

[0059] In the formula, Represents the output result of the multi-layer perceptron; represents a multi-layer perceptron; Represents the activation function.

[0060] Compared with the existing technology, the present invention has the following beneficial effects:

[0061] (1) The present invention uses a pre-trained language module to establish semantic associations with new users and items through users and items associated with borrowing behaviors, and generates representations similar to new users and items in the vector space of the embedding layer, thereby alleviating the problem of poor performance of traditional recommendations when facing new users and items.

[0062] (2) The present invention adds an attention mechanism to the deep and wide model. The attention mechanism dynamically assigns weights according to the impact of each behavior on user preferences, thereby accurately identifying the user's key interests and significantly enhancing the recommendation ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0063] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0064] like Figure 1As shown, the present invention provides a technical solution: a book recommendation method based on a deep-wide model, the following steps:

[0065] Step S1: construct a data set, which consists of reader information, borrowing behavior, candidate borrowing and scenario information;

[0066] Step S2: Construct a deep-wide model, which consists of a comprehensive representation module, an interest extraction module, and a feature fusion module; the comprehensive representation module consists of two pre-trained language modules; the interest extraction module consists of a gated recurrent unit layer and an attention mechanism layer;

[0067] Step S3: The reader information, borrowing behavior, candidate borrowing and scenario information of the data set in step S1 are combined into two sentences, and the two sentences are input into two pre-trained language modules at word granularity to obtain the hidden state representation of the last layer of the two pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is average-pooled to obtain a comprehensive representation vector of the entire input;

[0068] Step S4: input the borrowing behavior and candidate borrowing into the embedding layer of the interest extraction module for processing to obtain the embedding representation vector of the embedding layer, group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and candidate borrowing, input the embedding representation vector of the i-th borrowing behavior into the gated recurrent unit layer for processing to obtain the hidden state of the i-th borrowing behavior, input the embedding representation vectors of the i-th borrowing behavior and candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing to obtain the output of the interest extraction module;

[0069] Step S5: The comprehensive representation vector of the entire input obtained in step S3 and the output of the interest extraction module obtained in step S4 are fused through the feature fusion module to obtain the probability of the reader for the candidate borrowing book.

[0070] Among them, the data set is constructed in step S1, and the specific process is as follows:

[0071] Step S11: extracting key features of readers from the library borrowing records, the key features including 'reader card number', 'reader type', 'reader unit', 'book title', 'book author', 'book standard number' and 'borrowing time'; and clearing illegal or missing data items;

[0072] Step S12: retain 2 to 11 borrowing records, the first 1 to 10 borrowing records are used as borrowing behaviors with multi-valued features, and the last borrowing record is used as a candidate borrowing record;

[0073] Step S13: The candidate borrowing book records actually borrowed by the readers are labeled as 1 as positive samples; the books not borrowed by the readers are regarded as candidate borrowing books and are labeled as 0 as negative samples, and a data set is constructed based on the positive samples and negative samples;

[0074] Step S14: The data set is represented as D={user, hist, cand, cont, label}; user represents the reader information, which includes 'reader card number', 'reader type', and 'reader unit'; hist represents borrowing behavior, which includes 'borrowed book title', 'borrowed book author', and 'borrowed book classification', and is a multi-value feature; cand represents candidate borrowing, which includes 'candidate book title', 'candidate book author', and 'candidate book classification'; cont represents scenario information, which includes 'actual borrowing times' and 'borrowing time'; label represents the real label of whether the reader actually borrows the candidate book.

[0075] Among them, in step S3, the comprehensive representation vector of the entire input is obtained, and the specific process is:

[0076] Step S31: Input the data set constructed in step S1 into the comprehensive representation module, and use the comprehensive representation module to splice the reader information and scene information of i samples in the data set into sentence 1, and splice the borrowing behavior and candidate borrowing of i samples in the data set into sentence 2, which is expressed as:

[0077] (1);

[0078] In the formula, is sentence 1 composed of the reader information and scene information in the i-th sample; is a separator; is the sentence 2 composed of the borrowing behavior and candidate borrowing in the i-th sample;

[0079] Step S32: Sentence 1 and Sentence 2 are grouped into word granularity and Represented, respectively input into two parallel pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is obtained and , expressed as:

[0080] (2);

[0081] (3);

[0082] In the formula, and They represent the 1st word granularity and the nth word granularity of sentence 1 respectively; and They represent the first hidden state and the nth hidden state of sentence 1 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 1; and They represent the first word granularity and the mth word granularity of sentence 2 respectively; and They represent the first hidden state and the mth hidden state of sentence 2 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 2;

[0083] Step S33: Represent the hidden states of the last layers of the two pre-trained language modules and Perform average pooling to obtain the comprehensive representation vector of the two sentences and , expressed as:

[0084] (4);

[0085] (5);

[0086] In the formula, The comprehensive representation vector representing sentence 1; represents average pooling; The comprehensive representation vector of sentence 2;

[0087] Step S34: The comprehensive representation vector of the two sentences and Concatenate to get the comprehensive representation vector of the entire input , expressed as:

[0088] (6);

[0089] In the formula, Represents a concatenation operation.

[0090] Among them, the output of the interest extraction module is obtained in step S4, and the specific process is:

[0091] Step S41: Convert the borrowing behavior and the book title, book author and book category of the candidate borrowing into a dictionary integer index through label encoding, expressed as:

[0092] (7);

[0093] (8);

[0094] In the formula, express, and They are the label mapping dictionaries maintained by book titles, book authors, and book categories; Represents a key-value pair consisting of the nth book title and the nth integer index; Represents a key-value pair consisting of the nth book author and the nth integer index; Represents a key-value pair consisting of the nth book category and the nth integer index; , and Respectively represent the book title, book author and book category; , and Dictionary integer indexes representing the mapping of book titles, book authors, and book categories respectively;

[0095] Step S42: Input the dictionary integer index of the book title, book author and book category mapping into the embedding layer of the interest extraction module. The embedding layer maps the dictionary integer index of the book title, book author and book category mapping into a low-dimensional dense embedding vector through a neural network. The embedding representation vector of the embedding layer is expressed as:

[0096] (9);

[0097] In the formula, The embedding representation vector representing the embedding layer; The dictionary integer index representing the n-th book title, book author, and book category mapping is passed through the embedding layer to represent the embedding vector;

[0098] Step S43: Group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and the candidate borrowing, expressed as:

[0099] (10);

[0100] (11);

[0101] In the formula, The embedding representation vector representing the i-th borrowing behavior; Represents a splicing operation; The embedding representation vector of the book title representing the i-th borrowing behavior; The embedding representation vector of the book author representing the i-th borrowing behavior; The embedding representation vector of the book category representing the i-th borrowing behavior; The embedding representation vector representing the i-th candidate borrowing; The embedding representation vector representing the title of the i-th candidate borrowed book; The embedding representation vector representing the author of the i-th candidate borrowed book; The embedding representation vector representing the book category of the i-th candidate borrowing;

[0102] Step S44: The embedded representation vector of the i-th borrowing behavior is input into the gated recurrent unit layer as a multi-value feature to obtain the hidden state of the i-th borrowing behavior, which is expressed as:

[0103] (12);

[0104] In the formula, Represents the hidden state of the i-th borrowing behavior; represents a gated recurrent unit layer; Indicates the hidden state of the last borrowing behavior;

[0105] Step S45: Input the embedded representation vectors of the i-th borrowing behavior and the candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing. The process is as follows:

[0106] In the attention mechanism layer, the embedding representation vector of the i-th borrowing behavior is first and the embedding representation vector of the i-th candidate borrowing Perform outer product and difference operations to obtain the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weight of the i-th borrowing behavior is then embedded in the representation vector , the hidden state of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weights are concatenated and the concatenated result is input into the multi-layer perceptron of the activation function. Finally, the weight of the i-th borrowing behavior on the candidate item is obtained through the linear layer. , expressed as:

[0107] (13);

[0108] In the formula, represents a linear layer; represents the activation function;

[0109] The weight of the i-th borrowing behavior on the candidate item and the embedding representation vector of the i-th borrowing behavior Multiply them together to get the output of the interest extraction module , expressed as:

[0110] (14);

[0111] In the formula, Indicates the nth borrowing behavior.

[0112] In step S5, the probability of the reader borrowing the candidate book is obtained, and the specific process is as follows:

[0113] The feature fusion layer of the feature fusion module converts the comprehensive representation vector of the entire input in step S3 into and the output of the interest extraction module in step S4 Fusion, combined with the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing , is imported into the multi-layer perceptron with activation function for training, and finally, after the activation function, the probability of the reader borrowing the candidate book is obtained. , expressed as:

[0114] (15);

[0115] (16);

[0116] In the formula, Represents the output result of the multi-layer perceptron; represents a multi-layer perceptron; Represents the activation function.

[0117] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A book recommendation method based on a deep-wide model, characterized in that: step: Step S1: construct a data set, which consists of reader information, borrowing behavior, candidate borrowing and scenario information; Step S2: Construct a deep-wide model, which consists of a comprehensive representation module, an interest extraction module, and a feature fusion module; the comprehensive representation module consists of two pre-trained language modules; the interest extraction module consists of a gated recurrent unit layer and an attention mechanism layer; Step S3: The reader information, borrowing behavior, candidate borrowing and scenario information of the data set in step S1 are combined into two sentences, and the two sentences are input into two pre-trained language modules at word granularity to obtain the hidden state representation of the last layer of the two pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is average-pooled to obtain a comprehensive representation vector of the entire input; Step S4: input the borrowing behavior and candidate borrowing into the embedding layer of the interest extraction module for processing to obtain the embedding representation vector of the embedding layer, group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and candidate borrowing and the embedding representation vector of the i-th candidate borrowing, input the embedding representation vector of the i-th borrowing behavior into the gated recurrent unit layer for processing to obtain the hidden state of the i-th borrowing behavior, input the embedding representation vector of the i-th borrowing behavior and candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing to obtain the output of the interest extraction module; In step S4, the output of the interest extraction module is obtained, and the specific process is as follows: Step S41: Convert the borrowing behavior and the book title, book author and book category of the candidate borrowing into a dictionary integer index through label encoding, expressed as: (7); (8); In the formula, express, and They are the label mapping dictionaries maintained by book titles, book authors, and book categories; Represents a key-value pair consisting of the nth book title and the nth integer index; Represents a key-value pair consisting of the nth book author and the nth integer index; Represents a key-value pair consisting of the nth book category and the nth integer index; , and Respectively represent the book title, book author and book category; , and Dictionary integer indexes representing the mapping of book titles, book authors, and book categories respectively; Step S42: Input the dictionary integer index of the book title, book author and book category mapping into the embedding layer of the interest extraction module. The embedding layer maps the dictionary integer index of the book title, book author and book category mapping into a low-dimensional dense embedding vector through a neural network. The embedding representation vector of the embedding layer is expressed as: (9); In the formula, The embedding representation vector representing the embedding layer; The dictionary integer index representing the n-th book title, book author, and book category mapping is passed through the embedding layer to represent the embedding vector; Step S43: Group and concatenate the embedding representation vectors of the embedding layer to obtain the embedding representation vectors of the i-th borrowing behavior and the candidate borrowing, expressed as: (10); (11); In the formula, The embedding representation vector representing the i-th borrowing behavior; Represents a splicing operation; The embedding representation vector of the book title representing the i-th borrowing behavior; The embedding representation vector of the book author representing the i-th borrowing behavior; The embedding representation vector of the book category representing the i-th borrowing behavior; The embedding representation vector representing the i-th candidate borrowing; The embedding representation vector representing the title of the i-th candidate borrowed book; The embedding representation vector representing the author of the i-th candidate borrowed book; The embedding representation vector representing the book category of the i-th candidate borrowing; Step S44: The embedded representation vector of the i-th borrowing behavior is input into the gated recurrent unit layer as a multi-value feature to obtain the hidden state of the i-th borrowing behavior, which is expressed as: (12); In the formula, Represents the hidden state of the i-th borrowing behavior; represents a gated recurrent unit layer; Indicates the hidden state of the last borrowing behavior; Step S45: Input the embedded representation vectors of the i-th borrowing behavior and the candidate borrowing and the hidden state of the i-th borrowing behavior into the attention mechanism layer for processing. The process is as follows: In the attention mechanism layer, the embedding representation vector of the i-th borrowing behavior is first and the embedding representation vector of the i-th candidate borrowing Perform outer product and difference operations to obtain the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weight of Then embed the representation vector of the i-th borrowing behavior , the hidden state of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing The attention weights are concatenated and the concatenated result is input into the multi-layer perceptron of the activation function. Finally, the weight of the i-th borrowing behavior on the candidate item is obtained through the linear layer. , expressed as: (13); In the formula, represents a linear layer; represents the activation function; The weight of the i-th borrowing behavior on the candidate item and the embedding representation vector of the i-th borrowing behavior Multiply them together to get the output of the interest extraction module , expressed as: (14); In the formula, Indicates the nth borrowing behavior; Step S5: The comprehensive representation vector of the entire input obtained in step S3 and the output of the interest extraction module obtained in step S4 are fused through the feature fusion module to obtain the probability of the reader for the candidate borrowing book.

2. The method for recommending books based on a deep-wide model according to claim 1, characterized in that: In step S1, a data set is constructed. The specific process is as follows: Step S11: extracting key features of readers from the library borrowing records, the key features including 'reader card number', 'reader type', 'reader unit', 'book title', 'book author', 'book standard number' and 'borrowing time'; and clearing illegal or missing data items; Step S12: retain 2 to 11 borrowing records, the first 1 to 10 borrowing records are used as borrowing behaviors with multi-valued features, and the last borrowing record is used as a candidate borrowing record; Step S13: setting the label of the candidate borrowed book record actually borrowed by the reader to 1 as a positive sample; Then, the books that have not been borrowed by readers are taken as candidate books and their labels are set to 0, which are used as negative samples. A data set is constructed based on positive samples and negative samples. Step S14: The data set is represented as D={user, hist, cand, cont, label}; user represents the reader information, which includes 'reader card number', 'reader type', and 'reader unit'; hist represents the borrowing behavior, which includes 'borrowed book title', 'borrowed book author', and 'borrowed book category', which is a multi-value feature; cand represents candidate borrowing, which includes 'candidate book title', 'candidate book author', and 'candidate book category'; cont represents scenario information, which includes 'actual borrowing times' and 'borrowing time'; label represents the real label of whether the reader actually borrows the candidate book.

3. The book recommendation method based on the deep-wide model according to claim 2, characterized in that: In step S3, the comprehensive representation vector of the entire input is obtained, and the specific process is as follows: Step S31: Input the data set constructed in step S1 into the comprehensive representation module, and use the comprehensive representation module to splice the reader information and scene information of i samples in the data set into sentence 1, and splice the borrowing behavior and candidate borrowing of i samples in the data set into sentence 2, which is expressed as: (1); In the formula, is sentence 1 composed of the reader information and scene information in the i-th sample; is a separator; is the sentence 2 composed of the borrowing behavior and candidate borrowing in the i-th sample; Step S32: Sentence 1 and Sentence 2 are grouped into word granularity and Represented, respectively input into two parallel pre-trained language modules, and the hidden state representation of the last layer of the two pre-trained language modules is obtained and , expressed as: (2); (3); In the formula, and They represent the 1st word granularity and the nth word granularity of sentence 1 respectively; and They represent the first hidden state and the nth hidden state of sentence 1 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 1; and They represent the first word granularity and the mth word granularity of sentence 2 respectively; and They represent the first hidden state and the mth hidden state of sentence 2 in the last layer of the pre-trained language module respectively; Represents the pre-trained language module for processing sentence 2; Step S33: Represent the hidden states of the last layers of the two pre-trained language modules and Perform average pooling to obtain the comprehensive representation vector of the two sentences and , expressed as: (4); (5); In the formula, The comprehensive representation vector representing sentence 1; represents average pooling; The comprehensive representation vector of sentence 2; Step S34: The comprehensive representation vector of the two sentences and Concatenate to get the comprehensive representation vector of the entire input , expressed as: (6); In the formula, Represents a concatenation operation.

4. The method for recommending books based on a deep-wide model according to claim 3, characterized in that: In step S5, the probability of the reader borrowing the candidate book is obtained, and the specific process is as follows: The feature fusion layer of the feature fusion module converts the comprehensive representation vector of the entire input in step S3 into and the output of the interest extraction module in step S4 Fusion, combined with the embedding representation vector of the i-th borrowing behavior and the embedding representation vector of the i-th candidate borrowing , is imported into the multi-layer perceptron with activation function for training, and finally, after the activation function, the probability of the reader borrowing the candidate book is obtained. , expressed as: (15); (16); In the formula, Represents the output result of the multi-layer perceptron; represents a multi-layer perceptron; Represents the activation function.

Citation Information

Patent Citations

  • Book recommendation method and device based on user borrowing behavior-interest prediction

    CN113590945A

  • Intelligent news recommendation method and system based on multi-interest characteristics of user

    CN114896510A

  • Prediction model generation method based on data processing

    CN116307082A

  • Lithium battery residual life probability prediction method based on time convolution attention mechanism

    CN116381517A

  • Book recommendation method based on graph attention algorithm

    CN117743684A