Library book intelligent recommendation system based on artificial intelligence

CN122594899APending Publication Date: 2026-08-18JIANGSU FOOD & PHARMA SCI COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610874806.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-17
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0003]本发明的目的在于提供一种能够对用户借阅行为的时间动态性进行精细建模、并主动发掘用户隐性阅读需求的图书馆书籍智能推荐系统,以克服现有静态推荐模型对兴趣迁移不敏感及难以触达用户潜在阅读倾向的问题

Benefits of technology

[0011]By inputting historical borrowing behavior data into a temporal attention network, dynamic interest vectors for users under different time windows are generated. A multi-head self-attention mechanism is used to calculate the dependency weights between different borrowed books within the same time window, enabling the model to automatically identify which borrowing records have a greater influence on determining current interests. Even borrowing behaviors that are far apart in time can be assigned higher attention weights and aggregated into the interest representation as long as they semantically resonate with recent behaviors. This temporal attention-based processing method overcomes the long-distance information decay problem in recurrent neural networks when processing long sequences. The resulting dynamic interest vectors can precisely depict the transformation and fluctuation of user interests across different natural weeks, making the interest representation no longer a general static vector, but a continuously evolving sequence over time, thus providing more accurate temporally localized interest basis for subsequent recommendations. When performing cluster analysis to process the dynamic interest vectors, a density-based clustering algorithm is used to identify the interest cluster centers with the highest interest vector clustering density from the user's short-term interest matrix, and these are used to extract the user's latent demand features. This method, independent of a pre-specified number of clusters, automatically discovers densely populated regions of arbitrary shapes naturally formed in the distribution of interest vectors. It includes book categories that frequently co-occur in borrowing records but have not yet been explicitly accessed by the user within the scope of implicit demand association. The resulting implicit demand features are not a simple replication of the user's historical behavior, but rather potential reading tendencies derived from the dense distribution trends of interest vectors, specifically targeting candidate books in the library that the user has not yet borrowed. By performing similarity matching between these implicit demand features and the semantic embedding vectors of candidate books, the recommendation results can be expanded from types familiar to the user to areas they may be interested in but have not yet explored, effectively avoiding the problem of homogenization in the recommendation list.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122594899A_ABST
    Figure CN122594899A_ABST
Patent Text Reader

Abstract

The application discloses a library book intelligent recommendation system based on artificial intelligence, which comprises a data acquisition module, a user borrowing time, a borrowing book type and an interval duration are collected; an interest modeling module, historical borrowing data are input into a time sequence attention network to generate a dynamic interest vector under different time windows; a demand mining module, clustering analysis is conducted on the dynamic interest vector to extract user implicit demand characteristics; a preliminary generation module, a preliminary recommendation list is generated based on the similarity of the implicit demand characteristics and a candidate book semantic embedding vector; a heat rearrangement module, a borrowing time decay function is introduced to dynamically update a heat sequence, the preliminary list is reordered and the final result is output. The application can more accurately capture user interest evolution and mine potential reading demand, and improve the personalization and timeliness of library book recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence recommendation technology, specifically to an intelligent library book recommendation system based on artificial intelligence. Background Technology

[0002] Library users' borrowing behavior data is fundamental to understanding and predicting their reading needs. Extracting truly dynamic and evolving interest representations from massive historical borrowing records is a key challenge for achieving accurate recommendations. Current technologies, such as conventional collaborative filtering or content-based recommendation methods, typically treat users' historical interactions as static, unordered sets, ignoring the temporal dependencies inherent in borrowing behavior. This approach fails to distinguish between shifts in user interests at different times. For example, a user might borrow introductory books at the beginning of a semester and then switch to in-depth research materials at the end. Static models easily mix interests from different stages, leading to recommendations that lag behind the user's current reading direction. Furthermore, existing technologies have shortcomings. On one hand, while most deep learning-based recommendation models incorporate sequence modeling, simply using recurrent neural networks or ordinary pooling operations to aggregate user history makes it difficult to effectively capture the potential semantic relationships between borrowing events that are far apart in a long sequence. This results in user interest vectors that are not sharp enough in representing recent key interests and fail to reflect fluctuations in user interests across different time windows. On the other hand, traditional methods, when generating recommendation lists, generally focus on explicit interest patterns already exhibited by users, failing to discover implicit reading needs that users are not yet consciously aware of. These implicit needs often point to candidate books in the library that users have not yet borrowed. The lack of effective mining methods leads to recommendation results being limited to the comfort zone of users' past borrowing types, failing to broaden users' reading horizons. Focusing on these issues, the core problem to be solved lies in how to model the temporal dynamic characteristics of borrowing behavior to obtain a more accurate representation of user interests, and how to extract implicit needs associated with unknown candidate books from the distribution structure of historical interests. Summary of the Invention

[0003] The purpose of this invention is to provide a library book intelligent recommendation system that can accurately model the temporal dynamics of users' borrowing behavior and proactively discover users' implicit reading needs, so as to overcome the problems of existing static recommendation models being insensitive to interest transfer and having difficulty reaching users' potential reading tendencies.

[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides an intelligent library book recommendation system based on artificial intelligence, including a data acquisition module, an interest modeling module, a demand mining module, an initial ranking generation module, and a popularity re-ranking module. The data acquisition module is used to collect historical borrowing behavior data of users in the library, the historical borrowing behavior data including borrowing time, borrowed book type, and the interval between two consecutive borrowings. As a preferred embodiment, the borrowing record table of users is read from the database of the library management system. The borrowing record table includes a borrowing serial number, user identifier, book identifier, and borrowing date field for each borrowing; the Chinese Library Classification (CLC) number of each borrowed book is queried from the book information table according to the book identifier field, and the first one or two levels of the CLC number are taken as the borrowed book type; the borrowing record table is grouped according to the user identifier, and within each user group, it is sorted in ascending order by borrowing date, and the difference in borrowing date between two adjacent borrowing records is calculated, and this difference is taken as the interval between two consecutive borrowings. The data obtained through the above method can reflect users' preferences for book categories and capture borrowing frequency and rhythm, providing rich temporal behavioral basis for subsequent dynamic interest modeling. The interest modeling module inputs the historical borrowing behavior data into a pre-trained temporal attention network to generate dynamic interest vectors for users in different time windows. Preferably, the borrowing time is divided into multiple consecutive time windows according to natural weeks, and the sequence of book type identifiers borrowed by the user is recorded in each time window; the book type identifier sequence is mapped to an initial embedding vector sequence, and each vector in the initial embedding vector sequence corresponds to a borrowed book; position encoding is applied to the initial embedding vector sequence, and the position encoding represents the borrowing order of each borrowed book in its respective time window; the initial embedding vector sequence with position encoding is input into the encoder of the temporal attention network, and the encoder calculates the dependency weights between different borrowed books through a multi-head self-attention mechanism; the weighted vector output by the encoder is averaged and pooled according to the time window to obtain the dynamic interest vector corresponding to each time window.

[0005] A further preferred implementation of the multi-head self-attention mechanism is as follows: For each initial embedding vector sequence within a time window, a query vector, key vector, and value vector are generated for each initial embedding vector. These vectors are mapped through three different fully connected layers. Each query vector is then multiplied by all key vectors in the same sequence. The result of the multiplication is divided by a scaling factor and processed by a normalized exponential function to obtain an attention weight matrix. The attention weight matrix is ​​then weighted and summed with the corresponding value vectors to generate the self-attention output for each initial embedding vector. The self-attention outputs from multiple attention heads are concatenated and subjected to a linear transformation to obtain the weighted vector output by the encoder. The temporal attention network utilizes multi-head self-attention to fully capture the deep relationships between different borrowed books within the same time window, enabling the generated dynamic interest vectors to accurately represent users' changing reading preferences over different time periods, overcoming the problem that traditional static interest modeling cannot reflect interest drift. The demand mining module performs cluster analysis on the dynamic interest vectors to extract the implicit demand features of users at the current moment. These implicit demand features are associated with candidate books in the library that have not been borrowed by the user.

[0006] As a preferred approach, all dynamic interest vectors of the user within the first few time windows are concatenated to form a short-term interest matrix. A density-based clustering algorithm is then applied to the short-term interest matrix to identify the interest cluster centers with the highest interest vector aggregation. These interest cluster centers represent the topic areas that the user is currently most interested in. The Euclidean distance between the interest cluster centers and the category vectors of each candidate book in the library is calculated, and candidate books with a distance less than a preset threshold are selected as books associated with implicit needs. The category features of books that the user has not borrowed are extracted from the books associated with implicit needs. The category features are then normalized after vector summation to obtain the implicit need features. Preferably, the density-based clustering algorithm is the DBSCAN algorithm, whose specific steps are as follows: Set a neighborhood radius parameter and a minimum number of points parameter. The neighborhood radius parameter is used to determine the adjacency range of interest vectors, and the minimum number of points parameter is used to determine the threshold for core interest vectors; traverse each interest vector in the user's short-term interest matrix, calculate the number of neighbor vectors within the neighborhood radius of each interest vector, and mark interest vectors with a number of neighbor vectors greater than or equal to the minimum number of points parameter as core vectors; starting from any unvisited core vector, recursively group all density-reachable vectors of that core vector into the same interest cluster, where density-reachable vectors refer to interest vectors that can be connected through a series of adjacent core vectors; calculate the geometric center of all interest vectors in each interest cluster, and select the geometric center of the interest cluster containing the most vectors as the interest cluster center.

[0007] Preferably, the neighborhood radius parameter is adaptively determined based on the standard deviation of the interest vector distribution, which can adapt to the density of different user interest distributions. Clustering-based demand mining can automatically extract implicit but highly relevant reading needs from users' recent borrowing behavior, thereby guiding the system to discover novel books that users may be interested in, improving the diversity and surprise of recommendations. The initial ranking generation module generates a preliminary recommendation list based on the similarity between the implicit demand features and the semantic embedding vectors of candidate books. Preferably, the title and abstract text of each candidate book in the library are segmented, and the segmentation results are input into a pre-trained language model to extract the semantic embedding vector of each candidate book; the cosine similarity between the implicit demand features and the semantic embedding vector of each candidate book is calculated, and the cosine similarity is used as the matching score; the candidate books are sorted from high to low according to the matching score, and the top-ranked candidate books are selected to generate the preliminary recommendation list. The preferred method for semantic embedding vector extraction is as follows: Stop word filtering is performed on the title and abstract texts of each candidate book to remove function words and punctuation marks without actual semantic function; the filtered title and abstract texts are concatenated into a string in sequence, and sub-word segmentation is performed on the string to generate a sub-word token sequence; the sub-word token sequence is input into a bidirectional encoder representation model based on a transformer, and the average value of the hidden state vectors of all tokens output from the last layer of the model is taken as the preliminary semantic vector of the candidate book; length normalization is performed on the preliminary semantic vector to obtain the semantic embedding vector of each candidate book.

[0008] Through deep semantic matching, the similarity calculation between implicit demand features and book semantic embedding vectors can overcome the limitations of simple category matching, accurately measuring the degree of fit between candidate books and users' deep reading needs from a semantic understanding perspective. The popularity reordering module reorders the books in the initial recommendation list according to the borrowing popularity sequence, which is dynamically updated based on the borrowing time decay function, and outputs the final recommendation result.

[0009] Preferably, the total number of times each book in the library has been borrowed over the past few days is counted, and the date of the most recent borrowing is recorded. For each book, a time decay factor is calculated based on the difference between the date of the most recent borrowing and the current date; the time decay factor decreases as the difference increases. The total number of times each book has been borrowed is multiplied by the time decay factor to obtain the current borrowing popularity value for each book. All books in the preliminary recommendation list are reordered in descending order according to the current borrowing popularity value, and the reordered list is output as the final recommendation result. More preferably, the time decay function is set to an exponential decay form, with the base of the exponential decay form being a natural constant, and the difference between the date of the most recent borrowing (where the exponent is negative) and the current date being divided by a half-life parameter. The half-life parameter is set to a preset fixed number of days, which is determined based on the median of the borrowing cycle distribution of the library's historical borrowing data. For each book, the total number of times it has been borrowed is multiplied by the time decay factor to obtain the current borrowing popularity value. Popularity reordering dynamically combines a preliminary recommendation list with semantically relevant data on group borrowing activity, ensuring that the final recommendation results satisfy users' personalized implicit needs while also taking into account the actual popularity and timeliness of the books, thereby enhancing the overall attractiveness and borrowability of the recommendation list.

[0010] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0011] By inputting historical borrowing behavior data into a temporal attention network, dynamic interest vectors for users under different time windows are generated. A multi-head self-attention mechanism is used to calculate the dependency weights between different borrowed books within the same time window, enabling the model to automatically identify which borrowing records have a greater influence on determining current interests. Even borrowing behaviors that are far apart in time can be assigned higher attention weights and aggregated into the interest representation as long as they semantically resonate with recent behaviors. This temporal attention-based processing method overcomes the long-distance information decay problem in recurrent neural networks when processing long sequences. The resulting dynamic interest vectors can precisely depict the transformation and fluctuation of user interests across different natural weeks, making the interest representation no longer a general static vector, but a continuously evolving sequence over time, thus providing more accurate temporally localized interest basis for subsequent recommendations. When performing cluster analysis to process the dynamic interest vectors, a density-based clustering algorithm is used to identify the interest cluster centers with the highest interest vector clustering density from the user's short-term interest matrix, and these are used to extract the user's latent demand features. This method, independent of a pre-specified number of clusters, automatically discovers densely populated regions of arbitrary shapes naturally formed in the distribution of interest vectors. It includes book categories that frequently co-occur in borrowing records but have not yet been explicitly accessed by the user within the scope of implicit demand association. The resulting implicit demand features are not a simple replication of the user's historical behavior, but rather potential reading tendencies derived from the dense distribution trends of interest vectors, specifically targeting candidate books in the library that the user has not yet borrowed. By performing similarity matching between these implicit demand features and the semantic embedding vectors of candidate books, the recommendation results can be expanded from types familiar to the user to areas they may be interested in but have not yet explored, effectively avoiding the problem of homogenization in the recommendation list. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0013] Figure 1 This is a schematic diagram of the structure of an AI-based intelligent book recommendation system for libraries;

[0014] Figure 2 This is a flowchart of the historical borrowing behavior data collection and processing process;

[0015] Figure 3 This is the flowchart for the interest modeling module.

[0016] Figure 4 This is a flowchart of the implicit requirement mining process based on DBSCAN clustering and vector distance;

[0017] Figure 5 This is the flowchart for the initial sorting generation module;

[0018] Figure 6 This is the flowchart for the heat ranking module;

[0019] Figure 7 These are probability density curves of borrowing intervals for different types of books.

[0020] Figure 8 It is a distribution diagram of the Euclidean distance between the user's short-term interest vector and the candidate book category vector. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0022] See Figure 1 This invention provides an intelligent library book recommendation system based on artificial intelligence, comprising: a data acquisition module for collecting historical borrowing behavior data of users in the library, the historical borrowing behavior data including borrowing time, type of book borrowed, and interval between two consecutive borrowings; an interest modeling module for inputting the historical borrowing behavior data into a pre-trained temporal attention network to generate dynamic interest vectors of users under different time windows; a demand mining module for performing cluster analysis on the dynamic interest vectors to extract the implicit demand features of users at the current moment, the implicit demand features being associated with candidate books in the library that have not been borrowed by users; an initial ranking generation module for generating a preliminary recommendation list based on the similarity between the implicit demand features and the semantic embedding vectors of the candidate books; and a popularity re-ranking module for re-ranking the books in the preliminary recommendation list according to a borrowing popularity sequence, the borrowing popularity sequence being dynamically updated based on a borrowing time decay function, and outputting the final recommendation result.

[0023] Example 1:

[0024] In specific implementation, please refer to Figure 2The data acquisition module establishes a communication connection with the library management system's database and reads the user's borrowing record table using Structured Query Language. The borrowing record table contains multiple fields: a borrowing serial number, a user identifier, a book identifier, and a borrowing date. The borrowing serial number serves as the primary key to uniquely identify a borrowing transaction. The user identifier records the identity code of the user performing the borrowing operation. The book identifier records the unique code of the borrowed book, and the borrowing date records the date the borrowing occurred.

[0025] The data acquisition module retrieves the corresponding bibliographic metadata for each borrowed book from the book information table based on the book identifier field. The book information table stores the correspondence between the book identifier field and the Chinese Library Classification (CLC) number field, where the CLC number value is a complete classification code string conforming to the Chinese Library Classification. For each CLC number retrieved, the data acquisition module extracts the first-level or first-two-level class identifier from the CLC number string as the borrowed book type. In one implementation, the system selects the number of extraction levels through configuration parameters: when the configuration parameter indicates extraction of the first level, the first character of the CLC number string is extracted as the borrowed book type; when the configuration parameter indicates extraction of the first two levels, the first two characters of the CLC number string are extracted as the borrowed book type. The borrowed book type represents the major or sub-subject category of the borrowed book in the form of a category code.

[0026] The data acquisition module groups all borrowing records in the borrowing record table according to the value of the user identifier field, grouping borrowing records with the same user identifier field value into the same user group. Within each user group, the data acquisition module sorts the borrowing records in ascending order according to the value of the borrowing date field, placing the earliest borrowing record at the beginning of the user group sequence and the latest borrowing record at the end. For the sorted user group sequence, the data acquisition module extracts the borrowing date field value of every two adjacent borrowing records and calculates the difference between the borrowing dates. This calculated difference is used as the interval between two consecutive borrowings. The expression for calculating the interval is:

[0027]

[0028] in, This indicates that the user has completed the first... The borrowing behavior and the completion of the first The interval between borrowing transactions is expressed in days. This indicates the user's position in the user group sequence. The borrowing date field can be set to the value of each borrowing record; This indicates the user's position in the user group sequence. The borrowing date field of a borrowing record can take the following values. When the value is the first record in the user group sequence, there is no previous borrowing record, so the interval duration is not calculated.

[0029] After the above processing, the data acquisition module obtains each user's historical borrowing behavior data. This data consists of three categories: borrowing time, type of book borrowed, and the interval between two consecutive borrowings. Specifically, the borrowing time is the value of the borrowing date field in the borrowing record; the type of book borrowed is determined by the first or second level of the Chinese Library Classification (CLC) category; and the interval is given by the difference between adjacent borrowing dates.

[0030] See Figure 7 The figure shows the probability density distribution curves of borrowing intervals for different categories of books. The horizontal axis represents the interval between two consecutive borrowing acts, in days, ranging from 0 days to 200 days; the vertical axis represents the probability density value of the corresponding interval. In the legend, the five curves correspond to categories A, B, C, D, and E of books, respectively, and different line types are used to distinguish them for easy identification.

[0031] As can be seen from the figure, the probability density curve of the borrowing interval for Category A books shows a clear peak, which occurs at about 6 days and the peak probability density reaches above 0.11. After that, the curve drops rapidly, and the probability density approaches zero after 50 days. This indicates that users borrow Category A books more frequently, and most consecutive borrowing intervals are concentrated in a relatively short period of time.

[0032] The peak of the probability density curve for Category B books is located at approximately 15 days, with a peak probability density of about 0.045. The curve exhibits a relatively broad peak, indicating that the borrowing intervals for Category B books are mostly distributed in short to medium durations, showing a certain borrowing frequency and periodicity, but are more dispersed compared to Category A books.

[0033] The peak of the probability density curve for Category C books is around 18 days, with a peak probability density of about 0.03. The peak is relatively flat and slowly decays after 50 days, indicating that the borrowing interval for Category C books is of medium length and that user borrowing behavior is relatively evenly distributed.

[0034] The probability density curve of Category D books shows a low and smooth shape, with a peak value below 0.015. The interval duration is relatively evenly distributed, and there is a low probability density over a long period of time, indicating that the borrowing interval of Category D books is relatively long and there is no obvious concentration trend.

[0035] The probability density curve of Category E books is relatively flat overall, and the probability density value is the lowest, fluctuating around 0.005. This indicates that the borrowing interval of Category E books is extremely dispersed, and users' borrowing behavior does not have obvious periodicity or concentration.

[0036] This figure reflects the statistical characteristics of the interval between two consecutive borrowings in the user's historical borrowing behavior data in Example 1. It reveals the differences in the time interval of borrowing behavior for different types of books, and provides basic data support for the calculation of the median of the borrowing cycle and the time decay function parameters in the popularity reordering module. This ensures that the system can reasonably set the half-life parameter and time window length according to the actual borrowing characteristics of different types of books, thereby improving the accuracy of the recommendation system and the user experience.

[0037] Example 2:

[0038] In specific implementation, please refer to Figure 3 The interest modeling module receives historical borrowing behavior data output by the data acquisition module. This data includes borrowing time, borrowed book type, and the interval between two consecutive borrowings. The interest modeling module divides all values ​​of the borrowing time field according to the start and end dates of the natural week, forming multiple continuous time windows. In one implementation, the start and end dates of the natural week are defined as Monday at midnight and Sunday at midnight. For each time window, the interest modeling module iterates through all borrowing records made by the user within that time window, extracts the borrowed book type identifier corresponding to each record, and arranges them according to the chronological order of the borrowing date field values, generating a sequence of borrowed book type identifiers, denoted as the book type identifier sequence corresponding to one time window.

[0039] The interest modeling module assigns a fixed-dimensional initial embedding vector to each borrowed book type identifier, forming an embedding vector lookup table. The number of rows in the embedding vector lookup table is the total number of all possible borrowed book type identifier categories, and the number of columns is the preset embedding vector dimension, which is set to 256 dimensions. The module reads the initial embedding vector corresponding to each borrowed book type identifier in the book type identifier sequence from the embedding vector lookup table, converting the book type identifier sequence into an initial embedding vector sequence. Each vector in the initial embedding vector sequence corresponds to a borrowed book.

[0040] The interest modeling module applies positional encoding to the initial embedding vector sequence. This positional encoding represents the borrowing order of each borrowed book within its respective time window. The positional encoding is generated using alternating sine and cosine encoding, and its calculation expression is as follows:

[0041]

[0042] in, Indicates the position in the coding matrix located at the th The first borrowing slot The positional encoding values ​​are taken in each dimension; This indicates the borrowing sequence number of the book within its respective time window. The value range is an integer starting from 1, and the maximum value does not exceed the maximum number of books that can be borrowed within a single time window; An index variable representing the positional encoding dimension number. The value range is from 0 to Integers; This represents the total number of dimensions in the positional encoding. The value of is consistent with the dimension of the initial embedding vector, and is set to 256. The initial embedding vector sequence with positional encoding is obtained by adding the initial embedding vector element by element to the positional encoding at the corresponding position.

[0043] The interest modeling module inputs the initial embedding vector sequence with position encoding into the encoder of the temporal attention network. The temporal attention network employs a transformer-based encoder section, comprising multiple stacked encoder sublayers. Each encoder sublayer consists of a multi-head self-attention sublayer and a feedforward fully connected sublayer, connected via residual connections and layer normalization operations. Within the multi-head self-attention sublayer, for the initial embedding vector sequence with position encoding within an input time window, each vector in the sequence is mapped to generate a query vector, a key vector, and a value vector through three different fully connected layers. The weight matrices of the three fully connected layers are all of dimension 1. There is no bias term.

[0044] Perform a dot product operation between each query vector and all key vectors in the same sequence, then divide the dot product result by a scaling factor, where the scaling factor is a value that can be any value in the sequence. , This represents the working dimension of each attention head. The value is The quotient divided by the number of attention heads. In one implementation, the number of attention heads is set to 8, therefore... The value is 32, and the scaling factor is... The scaled dot product result is processed by a normalized exponential function to obtain the attention weight matrix. The attention weight matrix is ​​then weighted and summed with the corresponding value vectors to generate the self-attention output of each initial embedding vector under a single attention head. The self-attention outputs of multiple attention heads are concatenated along the last dimension to obtain the concatenated result, which is then mapped back through a linear transformation layer. The dimension of the weight matrix of the linear transformation layer is... There is no bias term. The output of the linear transform layer is the weighted vector of the multi-head self-attention sublayer in this encoder sublayer. The weighted vector is fed into the feedforward fully connected sublayer after residual connection and layer normalization. The feedforward fully connected sublayer contains two fully connected layers, and the output dimension of the first fully connected layer is set to... The activation function is a Gaussian error linear unit function; the output dimension of the second fully connected layer is set to... It does not contain an activation function. The output of the feedforward fully connected sublayer is then processed through residual connections and layer normalization to obtain the final output of the encoder sublayer.

[0045] The encoder of the temporal attention network consists of six stacked encoder sub-layers, with the output of each sub-layer serving as the input to the next. The weighted vector output of the last encoder sub-layer is the output sequence of the encoder corresponding to the current time window.

[0046] The interest modeling module performs average pooling on the weighted vectors output by the encoder, categorized by time windows. Specifically, it calculates the arithmetic mean of each dimension of all vectors in the output sequence to obtain the dynamic interest vector corresponding to each time window. The dynamic interest vector has the same dimension as the weighted vectors output by the encoder, both being 256-dimensional. Through this processing, the interest modeling module obtains the user's dynamic interest vector sequence under different time windows.

[0047] Example 3:

[0048] In specific implementation, please refer to Figure 4 The demand mining module obtains the dynamic interest vectors of users under different time windows output by the interest modeling module. Starting from the current moment, it selects several time windows backward, with the number of selected time windows set to 4. The dynamic interest vectors corresponding to the 4 time windows are concatenated along the vector dimension to form the user short-term interest matrix. The number of rows in the user short-term interest matrix is ​​4, which is the number of selected time windows, and the number of columns is 256, which is the dimension of each dynamic interest vector. Each row of the user short-term interest matrix corresponds to the dynamic interest vector under one time window.

[0049] The demand mining module uses a density-based clustering algorithm, specifically the DBSCAN algorithm, to perform cluster analysis on the user's short-term interest matrix. The neighborhood radius parameter of the DBSCAN algorithm... The standard deviation of the interest vector distribution is adaptively determined and calculated as follows: all interest vectors in the user's short-term interest matrix are flattened into a set of one-dimensional numerical values, and the standard deviation and neighborhood radius parameters of the one-dimensional numerical set are calculated. The value is the standard deviation multiplied by a preset scale factor, which is 0.5. Set the minimum number of points. Minimum number of points parameter The threshold used to determine the core interest vector, the minimum number of points parameter The value is set to 3, based on the fact that the user's short-term interest matrix contains 4 interest vectors, and the minimum number of points parameter is set accordingly. Setting it to 3 ensures that the density-reachable interest clusters contain at least the vast majority of interest vectors.

[0050] Iterate through each interest vector in the user's short-term interest matrix, and for each interest vector, calculate the neighborhood radius parameter. The number of neighbor vectors within the range, where a neighbor vector is defined as the vector whose Euclidean distance to the currently traversed interest vector is less than the neighborhood radius parameter. Other interest vectors. The number of neighbor vectors must be greater than or equal to the minimum number of points parameter. The interest vector is labeled as the core vector, and the number of neighbor vectors is less than the minimum number of points parameter. The interest vector is labeled as a non-core vector.

[0051] After labeling the core vectors, starting from any unvisited core vector in the user's short-term interest matrix, perform a density-reachable expansion operation. The originating core vector is then assigned to a newly created interest cluster, and the neighborhood radius parameter of the originating core vector is searched. For all neighbor vectors within the range, add these neighbor vectors to the interest cluster to which the core vector belongs. For each neighbor vector added to the interest cluster, determine whether it is itself a core vector: if it is, continue recursively adding neighbor vectors to the interest cluster based on the neighborhood radius parameter. All density-reachable vectors within the range are grouped into the same interest cluster. A density-reachable vector is an interest vector that can be connected to a series of adjacent core vectors; that is, it uses the neighborhood overlap relationship between core vectors as a transmission path to indirectly establish connections to other interest vectors in the current interest cluster. This recursive expansion process is repeated until no new core vectors can be grouped into an interest cluster.

[0052] After completing the density reachability expansion of an interest cluster, a new starting core vector is selected from the remaining unvisited core vectors. This process of creating new interest clusters and density reachability expansion is repeated until all core vectors have been visited. The geometric center of all interest vectors within each interest cluster is calculated by taking the arithmetic mean of all interest vectors within the cluster along their respective dimensions. The geometric center of the interest cluster containing the most interest vectors is selected as the interest cluster center. This center represents the user's currently most interested topic area, and its vector dimension is the same as that of a single dynamic interest vector, which is 256 dimensions.

[0053] The demand mining module retrieves metadata for all candidate books in the library. All candidate books refer to all books in the library's collection that have not been borrowed by the user. The library management system's book information table stores a category vector for each candidate book. This category vector is mapped from the Chinese Library Classification (CLC) number, and its dimension is consistent with the vector dimension of the interest cluster center, which is 256 dimensions. The complete CLC number encoding string is input into a pre-trained text embedding model. The text embedding model outputs the corresponding fixed-dimensional representation vector as the category vector.

[0054] The demand mining module calculates the Euclidean distance between the centers of interest clusters and the category vectors of each candidate book in the library. The expression for calculating the Euclidean distance is:

[0055]

[0056] in, Represents the center vector of the interest cluster Category vectors of candidate books The Euclidean distance between them; The center vector of the interest cluster is determined by the geometric center of the interest cluster that contains the most interest vectors; This represents the category vector corresponding to a candidate book. Represents the center vector of the interest cluster In the The component values ​​in each dimension The value of is an integer ranging from 1 to 256; Represents the category vector of candidate books In the The component values ​​in each dimension The value of is an integer ranging from 1 to 256.

[0057] The calculated Euclidean distance is compared with a preset threshold of 0.35. Candidate books with an Euclidean distance less than the preset threshold are selected as books associated with implicit demand. Category features of books not borrowed by the user are extracted from these books. The category vectors corresponding to all extracted category features are summed, and the summed vector is then L2 normalized to obtain the implicit demand features. The vector dimension of the implicit demand features is 256, and the L2 norm of the implicit demand features after L2 normalization is 1.

[0058] See Figure 8, in the figure, the abscissa represents the Euclidean distance between the interest cluster center vector and the candidate book category vector, with a value range from 0 to 1.2, and the ordinate represents the probability density within the corresponding Euclidean distance interval. The Euclidean distance probability density curves of five categories of books, namely major category A, major category B, major category C, major category D, and major category E, are plotted in the figure, and at the same time, a vertical dotted line of the preset threshold 0.35 is marked.

[0059] As can be seen from the figure, the Euclidean distance probability density of major category A mainly concentrates in the interval of 0.1 to 0.35, and reaches the peak around 0.25, indicating that the candidate books of major category A are densely distributed near the interest cluster center, and their similarity to the user's interest is relatively high. The peak of the probability density curve of major category B is located around about 0.35, and the density distribution is relatively concentrated, and the Euclidean distance of some books slightly exceeds the preset threshold. The peaks of the probability density curves of major category C and major category D are located near 0.4 and 0.6 respectively, and the overlapping part of the left side of the curve with the preset threshold 0.35 is small, indicating that there are fewer books in these two categories that are relatively close to the interest cluster center. The probability density distribution of major category E is relatively dispersed, and the peak appears at about 0.7, and the overall distance from the user's interest is far.

[0060] The preset threshold 0.35 is highlighted in the figure in the form of a vertical dotted line as the Euclidean distance critical value for screening books related to implicit needs. As shown in the figure, the Euclidean distances of books in major category A and some of major category B are less than this threshold, meeting the selection conditions for books related to implicit needs, while the Euclidean distances of most books in major category C, major category D, and major category E exceed this threshold and are not selected into the range of implicit need association.

[0061] To sum up, this figure reflects the probability distribution of the Euclidean distance between the candidate book category vector and the user interest cluster center vector in the demand mining module. By setting the preset Euclidean distance threshold 0.35, the screening of implicit need association for candidate books of different categories is realized, effectively identifying the book categories highly relevant to the user's current interest, and supporting subsequent intelligent recommendations based on the characteristics of implicit needs.

[0062] Example 4:

[0063] In the specific implementation, refer to Figure 5 , the preliminary sorting generation module reads the title text field and the abstract text field of each candidate book from the book information table of the library management system. Candidate books refer to the books in the library collection that the current user has not borrowed. Stop word filtering processing is performed on the title text and the abstract text respectively. The stop word filtering is performed by matching and deleting according to the pre-constructed stop word list. The stop word list includes common Chinese function words and punctuation marks, including "de", "le", "zai", "shi", "、", ",", and ".", etc. All the character sequences that appear in the stop word list in the title text and the abstract text are removed, and the filtered title text and the filtered abstract text are obtained.

[0064] In some embodiments, the source for constructing the stop word list is the general stop word set publicly available in the field of Chinese text mining, and library terms that appear frequently in library metadata but do not carry semantics are added. The purpose of removing stop words is to reduce redundant signals in the input text.

[0065] The initial arrangement generation module concatenates the filtered title text and the filtered abstract text in sequence into a string, and inserts a space character as a separator marker between the end of the title text and the beginning of the abstract text during concatenation. Sub-word segmentation processing is performed on the concatenated string. The sub-word segmentation processing uses a word-piece tokenizer配套 with the pre-trained bidirectional encoder representation model. The word-piece tokenizer divides the continuous text into a sequence of sub-word tokens based on the vocabulary. The vocabulary size is 30,000 sub-word units, which can cover the professional vocabulary that appears in common book titles and abstracts. After sub-word segmentation processing, a sequence composed of sub-word token identifiers is generated. A special classification token "[CLS]" is added to the head of the sub-word token sequence, and a special separator token "[SEP]" is added to the end of the sub-word token sequence corresponding to the title text and the end of the sub-word token sequence corresponding to the abstract text respectively, forming a complete input token sequence.

[0066] In a specific implementation, the input token sequence after adding special tokens is input into the Transformer-based bidirectional encoder representation model. The Transformer-based bidirectional encoder representation model adopts a stacked architecture of multiple Transformer encoder layers, and the total number of model layers is 12 encoder layers. Each encoder layer contains a multi-head self-attention sub-layer and a feed-forward fully connected sub-layer. A residual connection structure is adopted inside each sub-layer, and the input of the sub-layer is added to the output of the sub-layer and then the final output of the sub-layer is obtained through layer normalization operation. The multi-head self-attention sub-layer is configured with 8 attention heads, and the hidden layer dimension is set to 256 dimensions. The feed-forward fully connected sub-layer contains two fully connected layers. The first fully connected layer maps the input dimension to the intermediate layer dimension, and the intermediate layer dimension is set to 1024 dimensions, and the activation function uses the Gaussian error linear unit function; the second fully connected layer maps the intermediate layer dimension back to the hidden layer dimension of 256 dimensions without connecting to the activation function.

[0067] The transformer-based bidirectional encoder representation model was pre-trained before application. The pre-training phase employed a masked language model task and a next-sentence prediction task. The masked language model task involved randomly selecting 15% of the token positions in the input token sequence for masking. Of these masked positions, 80% were replaced with the special masked token "[MASK]", 10% were replaced with random tokens from the vocabulary, and 10% remained unchanged. The model then predicted the original token corresponding to the masked position based on the context. The next-sentence prediction task involved extracting sentence pairs from a large-scale Chinese book corpus. 50% of the sentence pairs were consecutive sentences, and 50% were randomly selected non-consecutive sentences. The model determined whether the input sentence pairs were consecutive. The pre-training corpus was collected from Chinese library cataloging data and publicly available Chinese book abstract datasets, covering millions of book entries. After pre-training, the model parameters were fixed and directly used to extract semantic features without further fine-tuning.

[0068] When extracting the semantic embedding vector of a candidate book, the processed input token sequence is fed into a transformer-based bidirectional encoder representation model for forward computation. The hidden state vector sequence output from the 12th layer encoder is taken; this sequence contains a 256-dimensional vector corresponding to each input token. The arithmetic mean of the hidden state vectors corresponding to all input tokens is calculated in each dimension, resulting in a 256-dimensional vector, which serves as the initial semantic vector for the candidate book. The initial semantic vector undergoes length normalization using L2 normalization, i.e., the L2 norm of the initial semantic vector is calculated, and the value of each component of the initial semantic vector in each dimension is divided by this L2 norm to obtain the semantic embedding vector of the candidate book. The L2 norm of the semantic embedding vector is 1.

[0069] Optionally, in the process of calculating the average of all hidden state vectors, the hidden state vectors corresponding to the special tokens “[CLS]” and “[SEP]” are excluded, and only the hidden state vectors of the actual sub-word tokens are averaged to more accurately represent the semantic content of the book text.

[0070] The initial ranking generation module receives the implicit demand feature vector output by the demand mining module. This implicit demand feature vector has 256 dimensions. It calculates the cosine similarity between the implicit demand feature vector and the semantic embedding vector of each candidate book, using this cosine similarity as the matching score. The expression for calculating cosine similarity is:

[0071]

[0072] in, Represents the feature vector of implicit demand semantic embedding vectors of candidate books The cosine similarity values ​​between them are as follows: The value of is a real number between -1 and 1; This represents the feature vector of implicit demand, and the dimension of the feature vector of implicit demand is... , The value is 256; Let represent the semantic embedding vector of a candidate book, where the dimension of the semantic embedding vector is . , The value is 256; Represents the feature vector of implicit demand In the The component values ​​in each dimension For the dimension index number, The value of is an integer from 1 to 256; The semantic embedding vector of the candidate books In the The component values ​​in each dimension The value range is an integer from 1 to 256.

[0073] In practice, all candidate books are sorted in descending order of matching score to form a sorted sequence. The top 20 candidate books with the highest matching scores in the sorted sequence are selected to form a preliminary recommendation list. The selection of 20 is based on the maximum number of items that can be displayed per page on the front-end display interface of the library recommendation system, which balances user browsing experience with recommendation diversity.

[0074] Example 5:

[0075] In specific implementation, please refer to Figure 6 The popularity re-ranking module receives the preliminary recommendation list output by the initial ranking generation module, which contains 20 book entries. The module then reads borrowing records from the library management system's database, which store the book identifier and borrowing date fields for each borrowing transaction. It calculates the total number of borrowings for each book in the preliminary recommendation list over the past 90 days. The 90-day statistical window length is set to balance recent user preference trends with data sparsity, using a quarter as the effective observation period for borrowing popularity. Specifically, the statistical method is as follows: using the current system date as the boundary, it looks back 90 calendar days as the statistical time period, filters borrowing records where the borrowing date field value falls within this period, and groups and counts them according to the book identifier to obtain the total number of borrowings for each book within the statistical time period. For books in the preliminary recommendation list that do not appear in the borrowing records within the statistical time period, the total number of borrowings is recorded as zero.

[0076] The popularity reordering module records the most recent borrowing date for each book in the initial recommendation list. If a book has at least one borrowing record in the library management system's borrowing log, the maximum value of the borrowing date field across all borrowing records for that book is taken as the most recent borrowing date. If a book has never been borrowed by any user, the most recent borrowing date is set to a preset default starting date, with a value of January 1, 1970.

[0077] The popularity reordering module sets the time decay function to exponential decay. The expression for the exponential decay function is:

[0078]

[0079] in, This represents the time decay factor, which is a real number between 0 and 1. When it is zero The value is 1, when When it approaches infinity Approaching 0; This represents the natural constant, approximately 2.71828. This represents the difference between the date of the most recent borrowing and the current date, in days. This is calculated by subtracting the date of the most recent borrowing from the current date. If the book has never been borrowed, then... This represents the difference in days between the current date and the default starting date. This represents the half-life parameter, in days. The value is a preset fixed number of days.

[0080] Half-life parameter The value of the median is determined based on the median of the borrowing cycle distribution in the library's historical borrowing data. The determination method is as follows: During the system deployment phase, all historical borrowing records are extracted from the library management system's database, grouped by user identifier, and sorted in ascending order by borrowing date within each group. The number of days between two consecutive borrowings for each user is calculated, and all intervals for all users are collected to form a complete borrowing interval set. The number of days in the complete borrowing interval set is then sorted in ascending order, and the median of the sorted sequence is taken as the median of the borrowing cycle distribution. When the number of elements in the complete borrowing interval set is odd, the median is the value of the middle element of the sorted sequence; when the number of elements in the complete borrowing interval set is even, the median is the arithmetic mean of the two middle elements of the sorted sequence. The calculated median number of days is then assigned to the half-life parameter. In one implementation, the median borrowing interval for all historical borrowing data in a library is 30 days, therefore the half-life parameter... The value is set to 30 days. (Half-life parameter) The value of 30 days means that the popularity value of a book decreases to half of its original value 30 days after the most recent borrowing.

[0081] The popularity reordering module multiplies the total number of historical borrowings by a time decay factor for each book in the initial recommendation list to obtain the current borrowing popularity value for that book. The current borrowing popularity value comprehensively reflects both the frequency of the book's historical borrowings and the recent borrowing time.

[0082] After obtaining the current borrowing popularity values ​​of all books in the initial recommendation list, the popularity reordering module reorders all books in the initial recommendation list in descending order according to their current borrowing popularity values. During the descending sorting process, if two books have the same current borrowing popularity value, their original order in the initial recommendation list is maintained. The reordered list of books is then output as the final recommendation result to the user interface.

[0083] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. An intelligent book recommendation system for libraries based on artificial intelligence, characterized in that: The system includes: The data acquisition module collects historical borrowing behavior data of users in the library. The historical borrowing behavior data includes borrowing time, type of book borrowed, and interval between two consecutive borrowings. The interest modeling module inputs the historical borrowing behavior data into a pre-trained temporal attention network to generate dynamic interest vectors for users in different time windows. The demand mining module performs cluster analysis on the dynamic interest vector to extract the implicit demand features of the user at the current moment. The implicit demand features are associated with candidate books in the library that have not been borrowed by the user. The initial ranking generation module generates a preliminary recommendation list based on the similarity between the implicit demand features and the semantic embedding vectors of the candidate books. The popularity reordering module reorders the books in the initial recommendation list according to the borrowing popularity sequence, which is dynamically updated based on the borrowing time decay function, and outputs the final recommendation result.

2. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 1, characterized in that, The step of collecting historical borrowing behavior data of users in the library, which includes borrowing time, type of book borrowed, and interval between two consecutive borrowings, specifically includes: The user's borrowing record table is read from the database of the library management system. The borrowing record table contains the borrowing serial number, user ID, book ID and borrowing date fields for each borrowing. Query the Chinese Library Classification number of each borrowed book from the book information table based on the book identifier field, and take the first one or two levels of the Chinese Library Classification number as the type of borrowed book. The borrowing record table is grouped according to user identifiers. Within each user group, the records are sorted in ascending order by borrowing date. The difference between the borrowing dates of two adjacent borrowing records is calculated, and the difference is used as the interval between two consecutive borrowings.

3. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 1, characterized in that, The step of inputting the historical borrowing behavior data into a pre-trained temporal attention network to generate dynamic interest vectors for users in different time windows specifically includes: The borrowing time is divided into multiple consecutive time windows according to the natural week, and the sequence of book type identifiers borrowed by the user is recorded in each time window; The book type identifier sequence is mapped to an initial embedding vector sequence, where each vector in the initial embedding vector sequence corresponds to a borrowed book. A positional encoding is applied to the initial embedded vector sequence, the positional encoding representing the borrowing order of each borrowed book within its respective time window; An initial embedding vector sequence with position encoding is input into the encoder of a temporal attention network, which calculates the dependency weights between different borrowed books through a multi-head self-attention mechanism. The weighted vector output by the encoder is averaged and pooled according to the time window to obtain the dynamic interest vector corresponding to each time window.

4. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 3, characterized in that, The step of performing cluster analysis on the dynamic interest vector to extract the latent demand features of the user at the current moment, and associating the latent demand features with candidate books in the library that have not been borrowed by the user, specifically includes: The user's dynamic interest vectors within the first few time windows are concatenated to form a short-term interest matrix. A density-based clustering algorithm is used on the user's short-term interest matrix to identify the interest cluster centers with the highest interest vector clustering degree. The interest cluster centers represent the topic areas that the user is currently most concerned about. Calculate the Euclidean distance between the center of the interest cluster and the category vector of each candidate book in the library, and select candidate books whose distance is less than a preset threshold as implicit demand-related books. Extract the category features of books that the user has not borrowed from the implicit demand-related books, and then normalize the category features by vector summation to obtain the implicit demand features.

5. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 4, characterized in that, The step of generating a preliminary recommendation list based on the similarity between the implicit demand features and the semantic embedding vectors of the candidate books specifically includes: The title and abstract text of each candidate book in the library are segmented into words, and the segmentation results are input into a pre-trained language model to extract the semantic embedding vector of each candidate book. Calculate the cosine similarity between the implicit demand features and the semantic embedding vector of each candidate book, and use the cosine similarity as the matching score; The candidate books are sorted from highest to lowest according to their matching scores, and the top few candidate books with the highest matching scores are selected to generate a preliminary recommendation list.

6. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 5, characterized in that, The step of reordering the books in the initial recommendation list according to the borrowing popularity sequence, wherein the borrowing popularity sequence is dynamically updated based on the borrowing time decay function, and outputting the final recommendation result specifically includes: Count the total number of times each book in the library has been borrowed over the past few days and record the date of the most recent borrowing. For each book, a time decay factor is calculated based on the difference between the date of the most recent borrowing and the current date, wherein the time decay factor decreases as the difference increases; Multiply the total number of times each book has been borrowed in history by the time decay factor to obtain the current borrowing popularity value of each book; Based on the current borrowing popularity value, all books in the initial recommendation list are reordered in descending order, and the reordered list is output as the final recommendation result.

7. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 3, characterized in that, The step of inputting the initial embedding vector sequence with position encoding into the encoder of the temporal attention network, wherein the encoder calculates the dependency weights between different borrowed books through a multi-head self-attention mechanism, specifically includes: For each time window, an initial embedding vector sequence is generated, and a query vector, a key vector, and a value vector are generated for each initial embedding vector. The query vector, key vector, and value vector are mapped through three different fully connected layers respectively. Perform a dot product operation between each query vector and all key vectors in the same sequence. Divide the dot product result by a scaling factor and then process it through a normalized exponential function to obtain the attention weight matrix. The attention weight matrix and the corresponding value vector are weighted and summed to generate the self-attention output for each initial embedding vector; The self-attention outputs of multiple attention heads are concatenated and then subjected to a linear transformation to obtain the weighted vector of the encoder output.

8. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 4, characterized in that, The step of using a density-based clustering algorithm on the user's short-term interest matrix to identify the centers of interest clusters with the highest interest vector aggregation, where each interest cluster center represents the user's currently most concerned topic area, specifically includes: Set a neighborhood radius parameter and a minimum number of points parameter, wherein the neighborhood radius parameter is used to determine the adjacency range of the interest vector, and the minimum number of points parameter is used to determine the threshold of the core interest vector; Traverse each interest vector in the user's short-term interest matrix, calculate the number of neighbor vectors within the neighborhood radius of each interest vector, and mark the interest vectors whose number of neighbor vectors is greater than or equal to the minimum number of points parameter as core vectors. Starting from any unvisited core vector, recursively group all density-reachable vectors of that core vector into the same interest cluster, where density-reachable vectors refer to interest vectors that can be connected through a series of adjacent core vectors; Calculate the geometric center of all interest vectors in each interest cluster, and select the geometric center of the interest cluster containing the most vectors as the interest cluster center.

9. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 5, characterized in that, The steps of segmenting the title and abstract text of each candidate book in the library, inputting the segmentation results into a pre-trained language model, and extracting the semantic embedding vector of each candidate book specifically include: Stop word filtering is performed on the title and abstract texts of each candidate book to remove function words and punctuation marks that have no actual semantic function; The filtered title text and summary text are concatenated into a string in sequence, and the string is then subjected to sub-word segmentation to generate a sub-word token sequence. The sub-word token sequence is input into the bidirectional encoder representation model based on the transformer, and the average value of the hidden state vectors of all tokens output by the last layer of the model is taken as the preliminary semantic vector of the candidate book. The initial semantic vector is subjected to length normalization to obtain the semantic embedding vector of each candidate book.

10. The method of an intelligent library book recommendation system based on artificial intelligence according to claim 1, characterized in that, The density-based clustering algorithm used in the cluster analysis is the DBSCAN algorithm, whose neighborhood radius parameter is adaptively determined based on the standard deviation of the interest vector distribution.