Personalized book recommendation method and system based on reader behavior data analysis

By extracting and fusion of reader book borrowed content data and borrowed behavior data, generating multi-source feature vectors, and performing feature embedding and borrowed recommendation restoration mapping, the problem of low book recommendation accuracy and conversion rate in the existing technology is solved, and the problem of low book recommendation accuracy and conversion rate in realization More efficient personalized recommendations.

CN119493885AActive Publication Date: 2025-02-21BEIJING ZHENGZE SCHOOL

Patent Information

Application Number
CN202411461462.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-02-21
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

The prior art is difficult to accurately capture the dynamic changes and inherent patterns of readers' borrowing behavior, resulting in limited accuracy and conversion rates of book recommendations.

Method used

By obtaining reader book borrowed content data and borrowed behavior data, content feature vectors and behavior feature vectors are extracted, dynamic feature extraction and feature fusion are performed, multi-source feature vectors are generated, and personalized borrowed recommendations are generated through feature embedding and borrowed recommendation restore mapping. information.

Benefits of technology

It improves the accuracy and conversion rate of book recommendations, enhances the user experience, and can better meet readers' needs for personalized and intelligent recommendation services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493885A_ABST
    Figure CN119493885A_ABST
Patent Text Reader

Abstract

The invention provides a personalized book recommendation method and system based on reader behavior data analysis, and the method comprises the steps: carrying out the dynamic feature extraction of a content feature vector based on the obtained content feature vector corresponding to the book borrowing content data of a reader and the obtained behavior feature vector of the borrowing behavior data corresponding to the book borrowing content data of the reader; therefore, the dynamic and continuous borrowing content features in the book borrowing content data of the reader are obtained, and the characterization effect of the dynamic feature vector of the content data is improved. Fusing the behavior feature vector and the dynamic feature vector of the content data to obtain a multi-source feature vector, performing feature embedding on the multi-source feature vector to obtain a multi-source integration embedding vector, and further performing borrowing recommendation reduction mapping and reasoning on the multi-source integration embedding vector to obtain borrowing recommendation information corresponding to the book borrowing content data of the reader. The recommendation precision can be improved, the conversion rate is increased, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and more specifically, to a personalized book recommendation method and system based on reader behavior data analysis. Background Art

[0002] With the rapid development of information technology and the advent of the digital age, library management systems and digital library platforms play an increasingly important role in book lending services. These systems not only greatly improve the efficiency of book management, but also provide users with a more convenient and personalized borrowing experience. However, while enjoying the convenience brought by digitalization, how to better understand and analyze readers' borrowing behavior in order to provide more accurate book recommendation services has become a key issue that needs to be solved in the library field.

[0003] Traditional book recommendation methods often rely on simple statistical information or rule-based recommendation algorithms. Although these methods can improve the relevance of recommendations to a certain extent, they are difficult to accurately capture the dynamic changes and internal patterns of readers' borrowing behaviors, resulting in limited accuracy and conversion rate of recommendations. Especially in the face of massive book resources and diversified reader needs, traditional methods seem to be unable to meet readers' needs for personalized and intelligent recommendation services. In recent years, with the rapid development of big data, machine learning and deep learning technologies, new possibilities have been provided for the optimization of book recommendation systems. By mining and analyzing the implicit information in readers' borrowing content data and borrowing behavior data, readers' interest preferences and borrowing habits can be more deeply understood, and a more accurate recommendation list can be generated. At present, although some book recommendation methods based on machine learning have been proposed, most of these methods focus on the analysis and processing of static features, ignoring the temporal and dynamic nature of borrowing content data. Summary of the invention

[0004] The purpose of the present invention is to provide a personalized book recommendation method and system based on reader behavior data analysis. This application is implemented as follows:

[0005] In a first aspect, the present application provides a personalized book recommendation method based on reader behavior data analysis, comprising: obtaining reader book borrowing content data and borrowing behavior data corresponding to the reader book borrowing content data, wherein the reader book borrowing content data includes book borrowing content data collected at multiple time nodes; obtaining a content feature vector corresponding to the reader book borrowing content data, and obtaining a behavior feature vector corresponding to the borrowing behavior data; performing dynamic feature extraction on the content feature vector to obtain a content data dynamic feature vector corresponding to the reader book borrowing content data, and fusing the content data dynamic feature vector and the behavior feature vector to obtain a multi-source feature vector; performing feature embedding on the multi-source feature vector to obtain a multi-source integrated embedding vector, and performing borrowing recommendation restoration mapping on the multi-source integrated embedding vector to obtain borrowing recommendation information matching the reader book borrowing content data.

[0006] In a second aspect, the present application provides a computer system comprising: one or more processors; a memory; one or more computer programs; wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method as described above is implemented.

[0007] The beneficial effects of the present application include at least: based on obtaining the content feature vector corresponding to the reader's book borrowing content data and the behavior feature vector corresponding to the borrowing behavior data of the reader's book borrowing content data, the present application can extract dynamic features from the content feature vector to obtain the dynamic and continuous borrowing content features in the reader's book borrowing content data, and increase the representation effect of the dynamic feature vector of the content data. The behavior feature vector and the dynamic feature vector of the content data are fused to obtain a multi-source feature vector, and the multi-source feature vector is feature embedded to obtain a multi-source integrated embedding vector, and then based on the borrowing recommendation restoration mapping of the multi-source integrated embedding vector, the borrowing recommendation information corresponding to the reader's book borrowing content data is inferred to increase the accuracy of the recommendation, increase the conversion rate, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0009] Figure 1 This is a flowchart of a personalized book recommendation method based on reader behavior data analysis provided in an embodiment of the present application.

[0010] Figure 2 It is a schematic diagram of the composition of a computer system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0011] The execution subject of the personalized book recommendation method based on reader behavior data analysis in this application is a computer system, including but not limited to servers, personal computers, laptops, tablet computers, smart phones, etc. Figure 1 As shown, the method includes:

[0012] Step S100: obtaining reader book borrowing content data and borrowing behavior data corresponding to the reader book borrowing content data, wherein the reader book borrowing content data includes book borrowing content data collected at multiple time points.

[0013] In step S100, the computer system can automatically capture the reader's book borrowing records through an integrated library management system (LMS) or a digital library platform. These records are usually stored in a database and contain the reader's unique identifier (such as student number, membership number, etc.), borrowed book information (such as ISBN, book title, author, etc.) and specific timestamps of borrowing and returning.

[0014] In a sample data table structure, a reader information table and a borrowing record table may be included. For details, please refer to the following example:

[0015] Reader information table (readers):

[0016] reader_id (INT, primary key): reader unique identifier; name (VARCHAR): reader's name; email (VARCHAR): reader's email address...

[0017] Borrow record table (borrow_records):

[0018] record_id (INT, primary key): borrowing record unique identifier; reader_id (INT, foreign key): reader unique identifier; book_isbn (VARCHAR): book ISBN code; borrow_date (DATETIME): borrowing date; return_date (DATETIME, can be empty): return date...

[0019] In step S100, the computer system traverses the borrowing record table and extracts the book borrowing content data of each reader. These data are not limited to a single borrowing event, but include all borrowing records of readers at different time nodes, forming a time series data set.

[0020] In a sample borrowing content data, assume that the borrowing record of reader A (reader_id is 1) is as follows:

[0021] Borrowing record 1: ISBN = '978-3-16-148410-0', title = 'Machine Learning', borrowing date = '2023-01-01', return date = '2023-01-15';

[0022] Borrowing record 2: ISBN = '978-0-321-62836-4', title = 'Deep Learning', borrowing date = '2023-02-01', return date = '2023-02-10';

[0023] ...(More borrowing records)

[0024] These records reflect the reading interests and preferences of reader A at different time points, and are an important basis for subsequent analysis. In addition to the borrowed content itself, the computer system also focuses on behavioral data related to borrowing activities, which helps to deeply understand readers' borrowing habits and behavioral patterns.

[0025] In an example of borrowing behavior data, for example, the following contents may be included:

[0026] Borrowing frequency: counts the number of times each reader borrows books within a certain period of time. For example, reader A borrowed 5 books in the first quarter of 2023, an average of about 1.67 books per month.

[0027] Borrowing duration: Calculate the borrowing duration of each book. For example, in the above example, the borrowing duration of the book "Machine Learning" is 15 days, and that of "Deep Learning" is 10 days.

[0028] Borrowing time preference: Analyzing the time distribution of borrowing behavior, such as the comparison of borrowing volume on weekdays and weekends, can reveal whether readers' reading habits are affected by work / study schedules.

[0029] Timely return: Assess whether readers tend to return books on time, which may be related to readers' sense of responsibility, reading speed, or urgency of book needs.

[0030] Since the borrowing content data changes dynamically over time, the computer system needs to pay special attention to the time attribute of the data. In step S100, the system will sort the borrowing records in chronological order and divide the borrowing content data into multiple time nodes, each of which represents a specific time period (such as month, quarter, year, etc.).

[0031] For example, as an example of time node division, the following division method can be used:

[0032] Monthly division: divide readers' borrowing records by month and generate a snapshot of borrowing content data every month.

[0033] Quarter division: Considering the cyclical nature of academic activities, the system can also be divided into quarters to better match the semester system.

[0034] For example, for reader A, the system can generate the following time node dataset:

[0035] First quarter of 2023: Contains all borrowing data within this quarter, including the above borrowing record 1 and borrowing record 2.

[0036] Second quarter of 2023: Contains data on all books borrowed by reader A in the second quarter.

[0037] After collecting the original borrowing content data and behavior data, the computer system needs to perform data cleaning and preprocessing to ensure the effectiveness and accuracy of subsequent analysis. This may include removing duplicate records, filling in missing values, converting data types, etc.

[0038] Step S200: obtaining a content feature vector corresponding to the reader's book borrowing content data, and obtaining a behavior feature vector corresponding to the borrowing behavior data.

[0039] In step S200, the computer system extracts a content feature vector and a behavior feature vector with representative meaning from the reader's book borrowing content data and borrowing behavior data collected in step S100. The content feature vector is intended to capture key information in the book borrowing content data so as to subsequently analyze the reader's reading interests and preferences. The computer system can use text processing, natural language processing (NLP) technology, and possible machine learning models to implement this process.

[0040] First, the computer system performs text preprocessing on the borrowed book titles, authors, and even abstracts (if available). This includes steps such as removing stop words, stemming, and lemmatization to reduce the diversity of vocabulary while retaining sufficient semantic information.

[0041] Next, the system uses NLP technology or machine learning models to convert text data into numerical features. Common methods include bag-of-words model, TF-IDF weighting, word embedding, etc.

[0042] Bag of Words model example: Treat each book as a document and build a vocabulary containing all unique words. For each book, generate a vector where each element corresponds to the number of occurrences of a word in the vocabulary (or the number of occurrences after TF-IDF weighting).

[0043] For example, if the vocabulary is ["machine learning", "deep learning", "mathematics", "physics"], the bag-of-words model vector of a book may be [1,1,0,0], indicating that the words "machine learning" and "deep learning" appear in the book, but "mathematics" and "physics" do not appear.

[0044] Word embedding example: Use a pre-trained word embedding model (such as Word2Vec, GloVe) to convert each word into a vector of fixed dimension. Then, the vectors of all words in a book can be converted into a content feature vector of the book by averaging, summing, or more complex aggregation methods (such as attention mechanisms).

[0045] Assuming a 300-dimensional word embedding model is used, the content feature vector of each book will be a point in this 300-dimensional space, obtained by some aggregation of all the word vectors in the book.

[0046] For more advanced content feature extraction, computer systems can also use topic modeling techniques, such as Latent Dirichlet Allocation (LDA) to identify latent topics in documents. Each topic can be viewed as a probability distribution of a set of related words, and each book can be represented as a mixed distribution of these topics. Suppose three topics are identified through the LDA model: Topic 1 (about machine learning), Topic 2 (about deep learning), and Topic 3 (about physics). Each book is represented as a probability distribution of these three topics, such as [0.6, 0.3, 0.1], indicating that 60% of the book content is related to machine learning, 30% is related to deep learning, and 10% is related to physics.

[0047] The behavioral feature vector is used to capture the patterns and regularities in readers’ borrowing behavior, such as borrowing frequency, borrowing duration, preferred time period, etc. These features not only help to understand readers’ reading behavior, but also reveal their potential needs and preferences.

[0048] Borrowing frequency: Calculate the number of times a reader borrows books within a certain time window as an element in the behavior feature vector. For example, if reader A borrowed 5 books in the past month, the borrowing frequency feature value is 5.

[0049] Borrowing duration: Count the borrowing duration of each book, and possibly calculate statistics such as the average and median as features. For example, if the average borrowing duration of reader A is 14 days and the median is 10 days, both values ​​can be used as elements in the feature vector.

[0050] Borrowing time analysis: Analyze readers’ borrowing behavior in different time periods (such as morning, afternoon, and evening) to identify peak borrowing times. By counting the number of borrowings in each time period, a time period preference feature vector is constructed.

[0051] For example, reader A borrows books significantly more often at night than at other times, so his behavior feature vector may contain a high value indicating a preference for borrowing books at night.

[0052] For more complex behavioral pattern recognition, computer systems can use machine learning models (such as recurrent neural networks (RNNs) and long short-term memory (LSTMs)) to analyze borrowing sequence data and capture the temporal dependencies and long-term trends in borrowing behavior. Using LSTM networks to model readers' borrowing record sequences, the output of the network can be a fixed-length vector that represents the overall characteristics of readers' borrowing behavior. This vector captures the temporal dynamics and potential patterns in borrowing sequences.

[0053] After extracting the content feature vector and the behavior feature vector, the computer system may need to standardize these vectors to ensure comparability between different features. Standardization methods include normalization, standardization (Z-score), etc. The specific choice depends on the nature of the feature and the needs of subsequent analysis.

[0054] Step S300: extract dynamic features from the content feature vector to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data, and fuse the content data dynamic feature vector with the behavior feature vector to obtain a multi-source feature vector.

[0055] In step S300, the computer system is committed to mining deeper dynamic features from the content feature vector to capture the trends and patterns of readers' borrowing content over time. These dynamic features not only reflect the evolution of readers' reading interests, but also provide a richer information basis for subsequent personalized recommendations. At the same time, the system also integrates these dynamic features with the behavior feature vector to form a multi-source feature vector to more comprehensively characterize readers' reading behavior and preferences.

[0056] First, the computer system performs time series analysis on the content feature vector. Since the borrowed content data is collected in chronological order, the content feature vector itself contains the characteristics of a time series. The system can use time series analysis methods, such as ARIMA (autoregressive integrated moving average model), seasonal decomposition, etc., to extract trend terms, seasonal terms, and random terms in the feature vector.

[0057] In the book recommendation scenario, deep learning models can also be used to process time series data, such as recurrent neural networks (RNNs) and their variants (such as LSTM and GRU). These models can capture long-term dependencies in sequence data and are very suitable for handling dynamic changes in borrowed content.

[0058] Assume that the feature vectors of each reader's borrowed content are arranged in chronological order into a sequence, where the feature vector of each time step is aggregated by the word embedding vectors of the borrowed books at that time step. The system builds an LSTM network, takes the sequence data as input, and passes information through the hidden state of the network to capture the changing trend of the borrowed content over time. The output of the LSTM network can be a vector of fixed length, representing the dynamic characteristics of the entire borrowed content sequence. This vector not only contains the subject information of the borrowed content, but also reflects how these themes evolve over time.

[0059] In actual operation, the extraction of dynamic features involves the following steps:

[0060] Data preprocessing: Standardize or normalize the content feature vector sequence to ensure the stability and convergence of model training.

[0061] Model construction: Select a suitable deep learning framework (such as TensorFlow, PyTorch) and LSTM network structure. Set hyperparameters such as the number of network layers, number of hidden units, and activation function.

[0062] Training process: Use historical borrowing data as the training set, optimize the network weights through the back propagation algorithm, and minimize the prediction error (such as mean square error MSE).

[0063] Feature extraction: After training is completed, the new borrowing content feature vector sequence is input into the LSTM network to obtain the output vector as a dynamic feature.

[0064] After extracting the dynamic features, the computer system also needs to fuse them with the behavior feature vector extracted in step S200. Since the two feature vectors may have different dimensions and scales, feature scaling or dimensionality reduction processing is usually required before fusion.

[0065] Feature scaling example: Scale the dynamic feature vector and the behavioral feature vector to the same scale using methods such as min-max normalization or Z-score normalization.

[0066] Feature fusion methods: for example, concatenation, weighted sum, dot product, etc. In the book recommendation scenario, concatenation is the most direct and commonly used method. It simply concatenates the dynamic feature vector and the behavioral feature vector to form a longer feature vector.

[0067] Through the above steps, the computer system obtains the dynamic feature vector and behavior feature vector of the reader's borrowed content. Next, the system merges these two feature vectors to form a multi-source feature vector.

[0068] Assume that the dimension of the dynamic feature vector is d1 and the dimension of the behavioral feature vector is d2. After concatenation and fusion, the dimension of the multi-source feature vector will be d1+d2.

[0069] Dynamic feature vector example: [0.2, 0.3, -0.1, ...] (output of LSTM network, indicating the dynamic change of borrowed content)

[0070] Example of behavioral feature vector: [5, 14, 0.6] (representing borrowing frequency, average borrowing duration, and evening borrowing preference score, respectively)

[0071] The fused multi-source feature vector is: [0.2, 0.3, -0.1, ..., 5, 14, 0.6].

[0072] This multi-source feature vector not only contains the dynamic changes in readers' borrowing content (such as switching from science fiction novels to economics books), but also reflects the readers' borrowing behavior characteristics (such as high borrowing frequency, preference for long-term borrowing, and preference for evening reading).

[0073] Through the application of time series analysis and deep learning models, the computer system can extract dynamic features from the borrowed content data and capture the evolving trend of readers' reading interests. At the same time, combined with the fusion processing of behavioral feature vectors, the system forms a multi-source feature vector, providing more comprehensive and in-depth data support for subsequent recommendation algorithms.

[0074] Step S400: embedding the multi-source feature vectors to obtain the multi-source integrated embedding vectors, performing borrowing recommendation restoration mapping on the multi-source integrated embedding vectors, and obtaining borrowing recommendation information matching the reader's book borrowing content data.

[0075] In step S400, the computer system further processes the multi-source feature vector generated in step S300, and finally generates borrowing recommendation information that is highly matched with the reader's book borrowing content data through two key steps of feature embedding and borrowing recommendation restoration mapping.

[0076] Feature embedding is a technique that converts high-dimensional, sparse input features into low-dimensional, dense representations, which helps improve the performance and efficiency of machine learning models. In the book recommendation scenario, the computer system uses feature embedding technology to convert multi-source feature vectors into a more compact and expressive multi-source integrated embedding vector.

[0077] The computer system first designs an embedding layer, which contains multiple learnable embedding matrices, each of which corresponds to a feature domain in the multi-source feature vector (such as a dynamic feature domain, a behavioral feature domain, etc.). The dimension and initialization method of the embedding matrix are determined according to the specific task and data characteristics.

[0078] For each feature in the multi-source feature vector, the computer system indexes it into the corresponding embedding matrix and extracts the corresponding embedding vector. These embedding vectors not only reduce the dimension of the original features, but also capture the complex relationship between the features through the learning process of the embedding layer.

[0079] After obtaining the embedding vectors of all features, the computer system uses concatenation, weighted sum or other aggregation strategies to integrate these vectors into a multi-source integrated embedding vector. This vector integrates the dynamic borrowing content characteristics and behavioral characteristics of readers, providing a rich information basis for subsequent recommendations.

[0080] For example, suppose the multi-source feature vector is composed of the dynamic feature vector [0.2, 0.3, -0.1] and the behavioral feature vector [5, 14, 0.6], that is, [0.2, 0.3, -0.1, 5, 14, 0.6]. The computer system designs two embedding matrices, one for dynamic features (3×4) and the other for behavioral features (3×2). Through the mapping of the embedding layer, two embedding vectors are obtained, such as the dynamic feature embedding vector [0.5, -0.2, 0.1, 0.3] and the behavioral feature embedding vector [0.8, -0.1]. After splicing these two vectors, the multi-source integrated embedding vector [0.5, -0.2, 0.1, 0.3, 0.8, -0.1] is obtained.

[0081] After obtaining the multi-source integrated embedding vector, the computer system maps it to specific borrowing recommendation information. This process usually involves one or more machine learning models that can predict the list of books that readers may be interested in based on their feature embedding vectors.

[0082] According to specific needs and data characteristics, the computer system can choose different recommendation models, such as collaborative filtering, content-based recommendation, deep neural network, etc. In complex scenarios, the combination of multiple models can often achieve better recommendation results. Use historical borrowing data as a training set to train the recommendation model. During the training process, the computer system optimizes the model parameters by minimizing the loss function (such as cross entropy loss, mean square error, etc.) so that the model can accurately predict the reader's borrowing preferences. After the training is completed, the multi-source integrated embedding vector is input into the recommendation model, and the model outputs a series of recommended book IDs or titles. These recommendation information is generated based on the reader's personalized characteristics and is intended to meet their potential borrowing needs. For example, suppose that the computer system uses a recommendation model based on a deep neural network. The model contains multiple fully connected layers and a softmax output layer to generate a probability distribution of the book recommendation list. The multi-source integrated embedding vector [0.5, -0.2, 0.1, 0.3, 0.8, -0.1] is input into the model. After multiple layers of nonlinear transformation, the softmax layer outputs a probability vector, such as [0.1, 0.3, 0.5, 0.1]. This vector represents the probability of readers borrowing four popular books in the current library. Based on this probability vector, the computer system can select the book with the highest probability as the recommendation result, which is the third book.

[0083] As an implementation mode, step S200, obtaining a content feature vector corresponding to the reader's book borrowing content data, may include:

[0084] Step S210: Split the reader's book borrowing content data into time periods to obtain a borrowing content time series set, decompose each sub-book borrowing content data in the borrowing content time series set into multiple data units corresponding to a uniform time length, and obtain a data unit set corresponding to each sub-book borrowing content data in the borrowing content time series set.

[0085] Step S210 is intended to organize the reader's book borrowing content data in an orderly manner according to the time dimension, so as to facilitate the subsequent analysis of the trend and pattern of the reader's borrowing behavior over time. The specific operations performed by the computer system in this step can be described in detail as follows:

[0086] First, the computer system retrieves the reader's book borrowing content data from the database or data warehouse. These data usually contain detailed information about each borrowing, such as borrowing date, return date, book information, etc. These data are arranged in chronological order, reflecting the borrowing activities of readers at different time points. Next, the computer system divides the borrowing content data into time periods according to the preset time period division rules. The choice of time period depends on the specific needs of the analysis and the availability of data. For example, if the goal of the analysis is to observe the changes in readers' borrowing preferences in different seasons, you can choose quarters as the time period; if you are concerned about fluctuations in borrowing behavior in the short term, you may choose months or weeks as the time period.

[0087] After determining the time period division, the computer system traverses the entire borrowing content data set and allocates it to the corresponding time period according to the date information of the borrowing record. In this way, the borrowing records in each time period constitute a sub-book borrowing content data set, that is, an element in the borrowing content time series set.

[0088] Then, in order to further refine the analysis granularity, the computer system further divides each sub-book borrowing content data set into multiple data units of uniform time length. The length of these data units depends on the analysis requirements and data characteristics. For example, if the month is selected as the time period, and the analysis needs to be refined to the weekly level, the borrowing records of each month can be divided into four data units of equal length (assuming that the number of days in each month can be approximated to four weeks).

[0089] During the segmentation process, the computer system may need to convert and calculate the dates of the borrowing records to determine the data unit to which each record belongs. For records that span data units (e.g., borrowing starts in one data unit and is returned in the next data unit), the system may need to allocate them to the corresponding data unit according to certain rules (e.g., allocation by borrowing date or return date).

[0090] Finally, after splitting the time periods and dividing the data units, the computer system obtained the time series set of borrowed content and the data unit set corresponding to the borrowed content data of each sub-book. These data unit sets record the borrowing activities of readers at different time points in an orderly manner with a unified time length as the unit, providing a structured data foundation for subsequent feature extraction and analysis.

[0091] For example, suppose that the analysis is about reader A's borrowing behavior in the first quarter of 2023. Select month as the time period division rule, and further divide the borrowing records of each month into four-week data units (assuming that each month is about four weeks). The computer system first retrieves all borrowing records of reader A from January to March 2023, and classifies them into the three months of the first quarter, forming three sub-book borrowing content data sets. Then, for each monthly subset, the computer system divides it by week. For example, for the borrowing records in January, the system assigns them to the data units of weeks 1 to 4 according to the borrowing date. If the borrowing date of a borrowing record is between January 1 and January 7, it is classified into the data unit of week 1; if it is between January 8 and January 14, it is classified into week 2, and so on.

[0092] Through such processing, the computer system finally obtains an ordered time series set of borrowing content, in which the borrowing records in each time period (month) are further subdivided into four data units (weeks), preparing for subsequent feature extraction and borrowing behavior analysis.

[0093] Step S220: Based on the data unit set corresponding to the sub-book borrowing content data X contained in the borrowing content time series set, obtain the to-be-processed content feature vector corresponding to the sub-book borrowing content data X, and load the to-be-processed content feature vector into the content embedding layer in the target recommendation information determination network; wherein X is not greater than the number of sub-book borrowing content data corresponding to the borrowing content time series set.

[0094] In step S220, the computer system first focuses on each sub-book borrowing content data X in the borrowing content time series set. X represents a set of reader borrowing records in a specific time period, and these records may contain information such as the borrowed book title, author, publication year, borrowing date, and return date. The system needs to extract features that can characterize the reader's borrowing behavior and content preference in this time period based on this information.

[0095] In order to obtain the feature vector of the content to be processed, the computer system can use a variety of methods, including but not limited to text processing, statistical analysis, topic modeling, etc. The specific method used depends on the characteristics of the data, the purpose of the analysis, and the requirements of the subsequent recommendation algorithm.

[0096] For example, suppose the system uses a text processing-based method to extract features. First, the system will perform word segmentation on the book title of each borrowing record in X, splitting the title into several vocabulary units. Then, the system can use methods such as the bag-of-words model or TF-IDF weighting to calculate the frequency or importance of each word in X.

[0097] The system builds a vocabulary for all unique words in the borrowed content time series collection and generates a vocabulary frequency vector for each borrowing record in X. For example, if the vocabulary contains ["machine learning", "deep learning", "science fiction", "history books"], and a borrowing record in X is "machine learning and deep learning", the corresponding vocabulary frequency vector is [1,1,0,0], indicating that "machine learning" and "deep learning" each appear once, while "science fiction" and "history books" do not appear.

[0098] In order to more accurately reflect the importance of the vocabulary in X, the system can use TF-IDF weighting. TF (term frequency) measures the frequency of a vocabulary in a single borrowing record, while IDF (inverse document frequency) measures the general importance of a vocabulary in a time series set of borrowing content. By calculating the product of TF and IDF, the system can obtain the TF-IDF value of each vocabulary and generate a weighted vocabulary frequency vector based on it. After extracting the vocabulary frequency vectors of all borrowing records, the system can aggregate them to form the content feature vector to be processed corresponding to the sub-book borrowing content data X. The aggregation method can be a simple summation or average, or a more complex weighted aggregation (such as giving different weights according to the freshness of the borrowing time or the borrowing frequency).

[0099] Finally, the computer system loads the feature vector of the content to be processed into the content embedding layer in the target recommendation information determination network. The content embedding layer is usually a pre-trained neural network layer that can map high-dimensional, sparse text feature vectors into low-dimensional, dense vector space while retaining the semantic relationship between the original features. This process helps improve the efficiency and accuracy of subsequent recommendation algorithms.

[0100] Step S230: embedding the feature vector of the content to be processed based on the content embedding layer to obtain the sub-content feature vector corresponding to the sub-book borrowing content data X.

[0101] In step S230, the computer system inputs the to-be-processed content feature vector generated in step S220 into the content embedding layer in the target recommendation information determination network. The content embedding layer is usually a pre-trained neural network layer, which can map high-dimensional, sparse text feature vectors into low-dimensional, dense vector space by learning semantic relationships in a large amount of text data, while retaining key information between the original features.

[0102] The content embedding layer may contain multiple neurons, each of which corresponds to a dimension in the embedding space. When the content feature vector to be processed is input into the embedding layer, it will perform matrix multiplication with the weight matrix in the embedding layer and may be nonlinearly transformed by an activation function (such as ReLU, Tanh, etc.) to produce a new feature representation.

[0103] For example, suppose the feature vector of the content to be processed is a sparse vector of length N, represented by v = [v1, v2, ..., v N ], where v i Represents the occurrence of the i-th word in the vocabulary in the sub-book borrowing content data X (such as TF-IDF value). The weight matrix of the content embedding layer is W∈R D×N , where D is the target dimension of the embedding vector, which is usually much smaller than N to achieve dimensionality reduction and compression of features.

[0104] When the content feature vector v to be processed is input into the content embedding layer, the system performs the following calculations:

[0105] e=Wv;where, is the calculated sub-content feature vector. This vector is the embedding representation of the original feature vector v of the content to be processed in the low-dimensional space, which captures the core semantic information of the borrowed content in X. To further introduce nonlinearity, the system may pass e through an activation function, such as ReLU: relu =max0,e. It should be noted that not all content embedding layers use activation functions, which depends on the specific model design and training objectives. Through this step, the computer system successfully converts the feature vector of the content to be processed into a sub-content feature vector. The sub-content feature vector not only has a lower dimension, which is convenient for subsequent processing, but also can more effectively capture the semantic information of the borrowed content, providing a more accurate feature representation for personalized book recommendations. It is worth noting that the weight matrix W in the content embedding layer is usually pre-trained on a large-scale text dataset to ensure that it can capture the common semantic patterns in the text data. However, in some cases, these pre-trained weights can also be fine-tuned as part of the overall training process of the recommendation system to adapt to the specific needs of a specific field (such as book recommendations).

[0106] Step S240: The sub-content feature vectors corresponding to the borrowing content data of each sub-book in the borrowing content time series set are merged into a content feature vector corresponding to the reader's book borrowing content data.

[0107] In step S240, the computer system has generated corresponding sub-content feature vectors for each sub-book borrowing content data X through the previous steps (especially step S230). These sub-content feature vectors each capture the semantic information of the reader's borrowing content in different time periods. In order to form a comprehensive reader reading feature representation, the system needs to merge these sub-feature vectors into an overall content feature vector.

[0108] The fusion process can adopt a variety of strategies, depending on the nature of the feature vector, the analysis requirements, and the requirements of the subsequent recommendation algorithm. Common fusion methods include weighted averaging, concatenation, attention mechanism, etc. Each method has its applicable scenarios and advantages and disadvantages.

[0109] For example, suppose the borrowing content time series set contains T sub-book borrowing content data, each data corresponds to a sub-content feature vector e t , where t = 1, 2, ..., T. The system first assigns a weight w to each sub-feature vector t , these weights can be determined based on a variety of factors such as the importance of the time period, borrowing frequency, reading time, etc. Then, the system calculates the weighted average vector as the final content feature vector:

[0110]

[0111] Among them, f is the fused content feature vector, which integrates the information of all sub-feature vectors and adjusts them according to the weights. If the system believes that recent borrowing behavior better reflects the reader's current interests, then the recent sub-feature vectors can be given higher weights. Another strategy is to assign weights based on borrowing frequency or reading time, that is, sub-feature vectors with more borrowing times or longer reading time get higher weights.

[0112] For example, if the subsequent recommendation algorithm is capable of processing high-dimensional feature vectors, or the system hopes to retain as much original information as possible, a splicing fusion method can be used. That is, simply splice all sub-content feature vectors into a longer vector in sequence. In practical applications, the computer system will select a suitable fusion method based on specific needs and scenarios. Regardless of which method is used, the purpose is to generate a comprehensive, compact and expressive content feature vector for subsequent personalized book recommendations. Through the fusion operation of step S240, the computer system successfully integrates multiple sub-content feature vectors in the borrowing content time series set into a single content feature vector, providing strong data support for the subsequent recommendation algorithm.

[0113] As an implementation manner, step S230, performing feature embedding on the feature vector of the content to be processed based on the content embedding layer to obtain the sub-content feature vector corresponding to the sub-book borrowing content data X, may include:

[0114] Step S231: Based on the information focusing unit in the content embedding layer outputting the information focusing feature vector corresponding to the to-be-processed content feature vector, the to-be-processed content feature vector and the information focusing feature vector are merged into a content merged feature vector;

[0115] Step S232: Obtain the transformation matrix and displacement array corresponding to the feedforward neural network in the content embedding layer, determine the content transformation feature vector corresponding to the sub-book borrowing content data X based on the displacement array and the scalar product between the transformation matrix and the content merge feature vector, and merge the content merge feature vector and the content transformation feature vector into the sub-content feature vector corresponding to the sub-book borrowing content data X.

[0116] In step S231, the computer system first uses the information focusing unit in the content embedding layer (such as the self-attention mechanism or the attention layer in the Transformer structure) to process the feature vector of the content to be processed to output an information focusing feature vector. This feature vector can capture the most important or relevant information part of the feature vector of the content to be processed. Subsequently, the system fuses the original feature vector of the content to be processed with the information focusing feature vector to generate a content merged feature vector. This process aims to enhance the expression of key information in the feature vector while retaining the integrity of the original feature vector. The information focusing unit is usually implemented based on the attention mechanism, which allows the model to dynamically adjust the weights of different parts to pay more attention to the important information in the input feature vector. In the Transformer model, the self-attention mechanism is a typical example. It generates a new feature representation by calculating the similarity score (i.e., attention weight) between each element in the input sequence and other elements, and then weighted summing the elements in the sequence according to these weights.

[0117] For example, suppose the feature vector of the content to be processed is v = [v1, v2, ..., v N ], where N is the dimension of the feature vector. The information focusing unit first calculates an attention weight matrix A∈R N×N , where each element a ij represents the attention weight of the i-th feature element to the j-th feature element. These weights can be calculated by dot product, scaled dot product or other similarity functions.

[0118] Then, the information focusing unit uses the attention weight matrix to perform weighted summation on the original feature vectors to generate the information focusing feature vector f attn :f attn =Av. Finally, the system combines the original feature vector v with the information focused feature vector f attn The fusion is performed to generate a content merge feature vector c. The fusion method can be a simple weighted sum or splicing, depending on the needs of subsequent processing. For example, if the weighted sum method is used, then: fc = αv + 1 - αf attn , where α is a hyperparameter or a learnable weight used to balance the contribution of the original feature vector and the information-focused feature vector.

[0119] In step S232, the computer system uses the feedforward neural network (FNN) in the content embedding layer to further transform and compress the content merge feature vector. The feedforward neural network maps the input features to a new feature space through a series of linear transformations and nonlinear activation functions to generate a content transformation feature vector. Then, the system fuses the content merge feature vector and the content transformation feature vector to generate the final sub-content feature vector. This process aims to enhance the expressiveness of the feature vector by adding nonlinear transformations and reduce computational complexity and overfitting risks through feature compression.

[0120] A feedforward neural network usually contains multiple hidden layers, each of which consists of multiple neurons. Each neuron receives the output of the previous layer as input and generates output through weighted summation and activation function. In the content embedding layer, the role of the feedforward neural network is to deeply process the content merged feature vector and extract higher-level feature representations. The weights (transformation matrix) and biases (displacement array) of the feedforward neural network are learned through the training process. During the training process, the system calculates the difference between the predicted results and the actual results based on the loss function (such as cross entropy loss, mean square error, etc.), and updates the network weights and biases through the back-propagation algorithm to minimize the loss function value. For example, suppose the content merged feature vector is c = [c1, c2, ..., c M ], where M is the dimension of the feature vector (which may be different from the dimension N of the original feature vector). The feedforward neural network first transforms c through the first linear layer (fully connected layer): fz = W1c + b1; where is the weight matrix (transformation matrix) of the first linear layer, is the corresponding bias vector (displacement array), and z is the transformed intermediate feature vector with dimension P. The system then activates z through a nonlinear activation function (such as ReLU). Next, if the feedforward neural network contains multiple hidden layers, the above linear transformation and nonlinear activation process is repeated until the required feature dimension or complexity is reached. Finally, the system maps the output of the hidden layer to the target dimension through the last linear layer to generate the content transformation feature vector f ffn =W L a L +b L ; where L is the last layer of the feedforward neural network, is the weight matrix of this layer, is the bias vector, a L is the activation output of the last hidden layer, f ffn is the content transformation feature vector, whose dimension is K. The system combines the content merging feature vector c and the content transformation feature vector f ffnFusion is performed to generate the sub-content feature vector e x The fusion method can be weighted sum, concatenation or other customized fusion strategies. For example, if the weighted sum method is adopted and it is assumed that the dimensions of the two are the same (or the dimensions can be matched in some way), then: x =βc+(1-β)f ffn ; Where β is a hyperparameter or a learnable weight used to balance the contribution of the content merging feature vector and the content conversion feature vector. Through the above two steps (S231 and S232), the computer system successfully converts the feature vector of the content to be processed into a more compact and information-rich sub-content feature vector. This feature vector not only captures the important information in the original features, but also enhances the expression ability through nonlinear transformation and feature compression, providing strong data support for subsequent personalized book recommendations.

[0121] As an implementation manner, step S231, based on the information focusing unit in the content embedding layer, outputs the information focusing feature vector corresponding to the feature vector of the content to be processed, including:

[0122] Step S2311: obtaining a mapping weight matrix corresponding to the information focusing unit in the content embedding layer, and mapping the to-be-processed content feature vector into a first search array, a first anchor array, and a first result array based on the mapping weight matrix of the information focusing unit;

[0123] Step S2312: performing a scalar product calculation on the flip array of the first search array and the first anchor array to obtain an intermediate weighted matrix and obtain the number of array columns corresponding to the first search array;

[0124] Step S2313: normalize the ratio between the intermediate weighted matrix and the square root of the number of array columns to obtain a first focusing weighted matrix, and determine the information focusing feature vector corresponding to the content feature vector to be processed based on the dot product between the first focusing weighted matrix and the first result array.

[0125] In step S2311, the computer system first obtains the mapping weight matrix corresponding to the information focusing unit in the content embedding layer. This matrix is ​​the core component of the information focusing unit, which contains the weight information for mapping the input feature vector to three different spaces: query, anchor, and result. These spaces correspond to the three key components in the self-attention mechanism, which work together on the input feature vector to achieve information focusing and weighting. For example, assuming that the feature vector of the content to be processed is v = [v1, v2, ..., V N ], where N is the dimension of the feature vector. The information focusing unit in the content embedding layer has three mapping weight matrices: W q , W k, W v , which are used to generate query vectors, anchor vectors and result vectors respectively. In practical applications, these mapping weight matrices W q , W k , W v They are learned through the model training process. They can automatically adjust to optimize overall performance according to the needs of specific tasks (such as personalized book recommendations).

[0126] In step S2312, the computer system uses the query vector and the anchor vector to calculate the attention weight, which simulates the distribution of attention of humans to different information points when reading. Specifically, the system first calculates the scalar product (or dot product) between the query vector and the anchor vector (or its flipped form), and then applies the softmax function (or similar normalization function) to convert the result into a probability distribution form as the attention weight.

[0127] To calculate the attention weights, the system first calculates the dot product between the query vector q and the anchor vector k. However, in the self-attention mechanism, the anchor vector is "flipped" (actually achieved by matrix transposition) so that it can be batched with the query vector. But here, for the sake of simplicity, it is assumed that the anchor vector has been processed in some way so that it can be directly dot-producted with the query vector.

[0128] Assume that we already have a processed anchor vector, denoted as ktrans. Then, calculate the dot product of the query vector and the anchor vector: score ij =q i ·ktran s,j ;

[0129] Among them, score ij represents the dot product score (i.e., “attention score”) between the i-th query element and the j-th anchor element, which measures the similarity or correlation between the two.

[0130] In order to convert the attention score into a probability distribution form (i.e., attention weight), the system can apply the softmax function:

[0131]

[0132] Among them, α ij represents the attention weight from the i-th query element to the j-th anchor element. The softmax function ensures that the sum of all weights is 1, thus achieving the normalization of the probability distribution.

[0133] In practice, since the exponential operation in the softmax function may cause numerical stability problems (especially when the score values ​​are very large or very small), some techniques are used to avoid these problems, such as subtracting the maximum value of the score or using a more stable logarithmic softmax function. However, in a typical implementation of the self-attention mechanism, the above calculation process is performed in parallel for all query-anchor pairs to form a complete attention weight matrix (or "attention map"). But in the simplified description of this step, only the calculation process between a single query element and all anchor elements is shown. For the sake of completeness, it should be noted that in the self-attention mechanism, the query vector, anchor vector and result vector are usually generated from the same input feature vector (after different linear transformations). This means that in actual calculations, the attention weights between each element in the input feature vector and other elements are actually calculated.

[0134] In step S2313, the computer system performs a weighted sum operation on the result vector using the attention weights calculated in the previous step to generate an information focus feature vector. Using the attention weight matrix A calculated in step S2312 = [α ij ](where each element α ij represents the attention weight from the i-th query element to the j-th anchor element), the system performs a weighted sum operation on the result vector v′: f attn =Av′; here, f attn It is the information focusing feature vector corresponding to the feature vector v of the content to be processed. It is obtained by weighted summing each element in the result vector according to its corresponding attention weight, thus realizing the focusing and weighting of information.

[0135] Information focusing feature vector f attn It not only contains all the information in the original feature vector v (although it is obtained through linear transformation and weighted summation), but also emphasizes those feature elements that are most relevant to the current query through the attention mechanism. In the scenario of personalized book recommendation, this means that the system can pay more attention to the book features that best match the reader's current borrowing preferences, thereby generating more accurate recommendation results.

[0136] As an implementation mode, in step S200, obtaining a behavior feature vector corresponding to the borrowing behavior data includes:

[0137] Step S210': decompose the borrowing behavior data into T constituent data items, and obtain implicit representations of data items corresponding to the T constituent data items; T≥1;

[0138] Step S220': based on the behavior semantics of the T component data items in the borrowing behavior data, obtaining the semantic implicit representations corresponding to the T component data items respectively;

[0139] Step S230': based on the time series distribution of the T component data items in the borrowing behavior data, obtaining the implicit representation of the time series distribution corresponding to the T component data items respectively;

[0140] Step S240': fusing the data item implicit representation, the semantic implicit representation and the temporal distribution implicit representation to obtain a behavior feature vector to be processed corresponding to the borrowing behavior data;

[0141] Step S250': loading the behavior feature vector to be processed into the behavior embedding layer in the target recommendation information determination network, and performing feature embedding on the behavior feature vector to be processed based on the behavior embedding layer to obtain the behavior feature vector corresponding to the borrowing behavior data.

[0142] In step S210', the computer system decomposes the borrowing behavior data into T constituent data items, and obtains the implicit representations of the data items corresponding to these constituent data items. For example, assuming that T is 5, it means that the system decomposes the borrowing behavior data of a certain reader into five data items, each of which can be a specific borrowing behavior, such as the number of times a book is borrowed, the borrowing time, the type of borrowed book, etc. For the number of times a book is borrowed, its data item implicit representation may be a vector, such as [3,0,2,1,0], where the numbers represent the different borrowing times in different time periods.

[0143] After obtaining the basic implicit representation of the data item, step S220' further mines the behavioral semantics of each data item in the borrowing behavior data and generates a corresponding semantic implicit representation. Behavioral semantics refers to the deep meaning or purpose carried by the data item and related to the reader's borrowing behavior. Behavioral semantics refers to the meaning or motivation behind the behavior. For example, if a reader frequently borrows science fiction books, the system may deduce the behavioral semantics that the reader is interested in science fiction themes. Accordingly, the system generates a semantic implicit representation for each behavioral data item. If in the above example, the borrowing behavior is associated with science fiction books, then the semantic implicit representation of the behavior data item may be a vector, such as [0.8, 0.2, 0.1, 0.05, 0.05], where each number represents the correlation score between the borrowing behavior and different types of books.

[0144] In order to capture these behavioral semantics, the system can generate semantic implicit representations using the following methods:

[0145] Rule-based mapping: Define a set of rules to map different types of books to predefined semantic categories (such as entertainment, education, professional, etc.).

[0146] Topic modeling: Using topic modeling techniques such as LDA (Latent Dirichlet Allocation), the topic distribution is extracted from the borrowed book content as a semantic implicit representation.

[0147] Knowledge graph: Build or utilize the existing knowledge graph in the book field, and map book types into a low-dimensional vector space through graph embedding technology (such as Node2Vec and Deep Walk).

[0148] Suppose the system uses a rule-based mapping method to map "novel" to the "entertainment" category and assigns it a semantic implicit representation vector [0.8, 0.2, 0] (assuming that this is a three-dimensional vector space, representing the three dimensions of entertainment, education, and professionalism).

[0149] Next, in step S230', the computer system obtains the implicit representation of the temporal distribution corresponding to each of the five component data items based on their temporal distribution in the borrowing behavior data. Temporal distribution refers to the distribution of borrowing behavior over time. For example, the system will analyze whether a reader borrows books more frequently on weekends than on weekdays. For the implicit representation of temporal distribution, the system may generate another vector, such as [0.7, 0.15, 0.05, 0.05, 0.05], where the numbers represent the probability distribution of borrowing behavior in different time periods. The temporal information in the borrowing behavior data is crucial to understanding the readers' borrowing habits and behavior patterns. In this step, the computer system analyzes the temporal distribution of the data items in the borrowing behavior data to generate an implicit representation of the temporal distribution. This representation can capture the dynamic changes and periodic laws of readers' borrowing behavior.

[0150] To generate an implicit representation of a time series distribution, the system can use the following methods:

[0151] Time series analysis: Use time series analysis methods such as ARIMA and seasonal decomposition to extract trend items, seasonal items, and random items of borrowing behavior.

[0152] Recurrent Neural Network (RNN): Use RNN variants such as LSTM and GRU to model the borrowing time series and capture the long-term dependencies and periodic changes of borrowing behavior.

[0153] Discrete Fourier Transform (DFT): Convert the borrowed time series from the time domain to the frequency domain and extract its spectral features as an implicit representation of the time series distribution.

[0154] Assume that the system uses a simple statistical method to generate an implicit representation of the time series distribution, calculate the borrowing frequency of readers in different months (or quarters), and convert it into a normalized frequency distribution vector. For example, if a reader borrowed 3 times in the first quarter, 5 times in the second quarter, 4 times in the third quarter, and 2 times in the fourth quarter, the corresponding implicit representation vector of the time series distribution may be [0.2, 0.33, 0.27, 0.13] (normalized).

[0155] In step S240', the computer system fuses the data item implicit representation, semantic implicit representation and temporal distribution implicit representation generated in steps S210', S220' and S230' to form a comprehensive behavior feature vector to be processed. This fusion process aims to integrate various information to more accurately characterize the borrowing behavior characteristics of readers.

[0156] For example, suppose that we already have the following three implicit representations: data item implicit representation (taking book type as an example): [0.8 (entertainment), 0.2 (education), 0 (professional)]; semantic implicit representation (also taking book type as an example, but based on different generation methods): [0.75 (fiction), 0.2 (non-fiction), 0.05 (other)]; time series distribution implicit representation: [0.2, 0.33, 0.27, 0.13]. The system can use a variety of fusion strategies to generate the behavior feature vector to be processed, such as concatenation, weighted sum, or automatic fusion using a deep learning model.

[0157] After obtaining the behavior feature vector to be processed, the computer system loads it into the behavior embedding layer in the target recommendation information determination network for further processing. The behavior embedding layer is a pre-trained neural network layer that can map the high-dimensional, sparse behavior feature vector to be processed into a low-dimensional, dense vector space while retaining key behavior feature information. For example, the behavior embedding layer usually contains multiple learnable parameters (such as weight matrices and bias terms), which are optimized during the training process to adapt to specific recommendation tasks. When the behavior feature vector to be processed is input into the behavior embedding layer, it is first multiplied by the weight matrix of the embedding layer and nonlinearly transformed by an activation function (such as ReLU, Tanh, etc.).

[0158] As an implementation mode, step S300, extracting dynamic features from the content feature vector to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data, may include:

[0159] Step S310: embedding the time series feature of the content feature vector to obtain the time series embedding feature vector corresponding to the content feature vector, and fusing the content feature vector and the time series embedding feature vector into content representation information;

[0160] Step S320: obtaining a preset dynamic feature vector having the same dimension as the behavior feature vector, and loading the preset dynamic feature vector and content representation information into a dynamic feature processing layer in the target recommendation information determination network;

[0161] Step S330: Based on the dynamic feature processing layer and the content representation information, the preset dynamic feature vector is adjusted and optimized to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data.

[0162] In step S310, the computer system performs temporal feature embedding processing on the content feature vector, with the purpose of introducing the change information in the time dimension into the feature vector. Subsequently, the original content feature vector is fused with the temporal embedding feature vector to generate content representation information. This process helps to capture the dynamic change characteristics of the content borrowed by readers.

[0163] Temporal feature embedding usually involves encoding time information into a feature vector in some way. In the book recommendation scenario, since the borrowing content data is collected in chronological order, time series analysis methods can be used to extract temporal features. A simple method is to convert the timestamp into an encodable form, such as converting the date into a combination of year, month, and day, or using the difference in days from a fixed starting point (such as the system launch time) to the current borrowing date as the time code. Another more advanced method is to use a time embedding matrix. Each row of this matrix represents an embedded representation of a time point (or time period). By looking up the matrix, the timestamp of each borrowing record can be mapped to a low-dimensional embedding vector.

[0164] For example, suppose a reader borrows multiple books within a period of time, and the borrowing time of each book is recorded. The content feature vector c has been generated by the previous steps (such as step S230), representing the static features of the content borrowed by the reader.

[0165] Now, we need to embed the temporal features of c. Assume that we use the temporal embedding matrix E∈R T×d , where T is the number of time points and d is the dimension of the embedding vector. For each book borrowed by a reader, the corresponding embedding vector in E is found according to the borrowing time and used as the temporal embedding feature of the book borrowing record.

[0166] If we assume that the reader's borrowing records are arranged in chronological order, and each borrowing record is associated with a timestamp t i (i=1,2,...,N, where N is the total number of borrowing records), then for each borrowing record, the temporal embedding vector e can be retrieved from E ti .

[0167] Then, the temporal embedding vectors of all borrowing records are aggregated in some form (such as averaging, weighted sum, or attention mechanism) to obtain the temporal embedding feature vector t of the entire borrowing sequence.

[0168] After obtaining the temporal embedding feature vector t, it is fused with the original content feature vector c to generate content representation information r. The fusion method can be simple concatenation, weighted sum, or automatic fusion using a deep learning model.

[0169] r = [c; t] or r = αc + (1-α) t

[0170] Among them, [;] represents the vector concatenation operation, and α is a hyperparameter or a learnable weight.

[0171] In step S320, the computer system first generates a preset dynamic feature vector with the same dimension as the behavior feature vector. This vector serves as the starting point for dynamic feature processing, and its initial value can be random, generated based on some heuristic rules, or learned from training data. Then, this preset dynamic feature vector is loaded into the dynamic feature processing layer in the target recommendation information determination network together with the content representation information.

[0172] The way to generate the preset dynamic feature vector depends on the specific application scenario and requirements. A simple method is to randomly initialize a vector with the same dimension as the behavior feature vector and optimize it in the subsequent training process. Another method is to use prior knowledge or heuristic rules to set the initial value. In more complex scenarios, the preset dynamic feature vector may be obtained through some form of pre-training process. For example, an autoencoder can be used to perform unsupervised learning on a large amount of borrowing history data to obtain a low-dimensional representation that can capture the dynamic changes of borrowing content as a preset dynamic feature vector. The dynamic feature processing layer is a key component in the target recommendation information determination network. It is responsible for generating the final content data dynamic feature vector based on the input content representation information and the preset dynamic feature vector. This layer usually contains multiple neural network layers (such as fully connected layers, recurrent neural network layers, etc.), as well as possible attention mechanisms or gating mechanisms to enhance the dynamic processing capabilities of the model.

[0173] During the loading process, the computer system passes the preset dynamic feature vector and content representation information as input to the dynamic feature processing layer and initializes the parameters of the layer (such as weights and biases). These parameters will be adjusted in the subsequent training process to optimize the model performance.

[0174] In step S330, the computer system uses the dynamic feature processing layer to adjust and optimize the preset dynamic feature vector to generate a content data dynamic feature vector corresponding to the reader's book borrowing content data. This process involves the calculation of multiple neural network layers, the application of nonlinear activation functions, and the use of possible attention mechanisms or gating mechanisms.

[0175] The dynamic feature processing layer usually contains multiple neural network layers, each of which performs a specific computational task. For example, the fully connected layer performs a linear transformation on the input features; the recurrent neural network layer (such as LSTM or GRU) can capture long-term dependencies in the input sequence; and the attention mechanism allows the model to dynamically focus on different parts of the input sequence when generating output.

[0176] In the book recommendation scenario, the dynamic feature processing layer may first perform preliminary processing on the input features through one or more fully connected layers, and then use the recurrent neural network layer to capture the temporal changes in the borrowed content. The attention mechanism can be used to give different weights to different borrowing records when generating the final feature vector.

[0177] In order to introduce nonlinear factors and enhance the expressiveness of the model, a nonlinear activation function is applied after each neural network layer in the dynamic feature processing layer. Common activation functions include ReLU, Tanh, and Sigmoid. These functions can map the results of linear transformations to a nonlinear output space, allowing the model to learn more complex feature representations.

[0178] Assume that LSTM is used as the core component of the dynamic feature processing layer. LSTM is a special recurrent neural network structure that overcomes the gradient vanishing or gradient exploding problems that traditional RNNs are prone to when training long sequences by introducing three "gates" (forget gate, input gate, and output gate).

[0179] In the book recommendation scenario, the content representation information r can be used as the input sequence of LSTM (although r itself may not be a sequence of data, it can be regarded as a sequence containing only one time step here), and the preset dynamic feature vector can be used as the initial hidden state and unit state of LSTM.

[0180] The LSTM network then updates its hidden state and cell state based on the content of r and the information passed through the gating mechanism. After the LSTM processes the entire input sequence (actually only one time step in this example), the final hidden state can be used as the content data dynamic feature vector d.

[0181] Through a series of operations such as temporal feature embedding, content representation information generation, preset dynamic feature vector loading, and dynamic feature processing layer adjustment and optimization, the dynamic feature vector of content data corresponding to the reader's book borrowing content data was successfully generated. This process not only captures the static characteristics of the borrowed content, but also introduces the change information of the time dimension, thereby more comprehensively reflecting the reader's borrowing preferences and behavior patterns.

[0182] As an implementation mode, the content feature vector includes S sub-content feature vectors, S≥1; based on this, step S310, embedding the content feature vector with time series features to obtain a time series embedding feature vector corresponding to the content feature vector, may specifically include:

[0183] Step S311: obtaining the distribution positions of the S sub-content feature vectors in the reader's book borrowing content data, and decomposing the distribution positions of the S sub-content feature vectors into even-numbered distribution positions and odd-numbered distribution positions;

[0184] Step S312: performing a first embedding operation (such as sine) on the even-number distribution position in the content feature vector to obtain a first embedding result corresponding to the even-number distribution position;

[0185] Step S313: performing a second embedding operation on the singular distribution position in the content feature vector to obtain a second embedding result corresponding to the singular distribution position;

[0186] Step S314: Determine the first embedding result and the second embedding result as the temporal embedding feature vector corresponding to the content feature vector.

[0187] In step S311, the computer system first identifies the distribution position of each sub-content feature vector in the content feature vector. These sub-content feature vectors usually represent the characteristics of the borrowed content of the reader in different time periods. The system needs to arrange these sub-vectors in chronological order according to the timestamp of the borrowing record and determine their relative positions in the entire borrowing period.

[0188] Since borrowing records may not be evenly distributed (for example, borrowing is frequent in certain time periods and less frequent in other time periods), the system needs a mechanism to distinguish these different time periods. In this embodiment, the system chooses a simple but effective method: decomposing the distribution position of the sub-content feature vector into an even distribution position and an odd distribution position. This decomposition may be based on some attribute of the timestamp (such as year, month, day of the week, etc.), but a more direct way may be to simply divide the timeline into alternating even and odd intervals. For example, suppose reader A borrows multiple books in a year, and the system generates 12 sub-content feature vectors by month (representing the borrowing content characteristics of each month). These vectors are arranged in chronological order: v1, v2,…, v12.

[0189] The system first determines the time position (i.e., month) of each sub-vector. Then, depending on whether the month is odd or even, these vectors are assigned to even and odd distribution positions. For example, vectors for January, March, May, July, September, and November are assigned to odd distribution positions, while vectors for February, April, June, August, October, and December are assigned to even distribution positions.

[0190] In step S312, the computer system performs a first embedding operation on the sub-content feature vectors assigned to even-numbered distribution positions. This embedding operation is intended to encode time information into the feature vector in a specific manner so as to subsequently capture the temporal changes of the borrowed content.

[0191] In this embodiment, the first embedding operation is selected as a sine function. The sine function is a periodic function whose value varies between [-1, 1] and has good smoothness and predictability. These characteristics make the sine function a suitable choice for time series embedding because it can reflect the changes in time in a continuous and predictable way.

[0192] In order to apply the sine function to the temporal embedding of the sub-content feature vector, the system needs to define a time scale (such as month, week, etc.) and a period (such as a year, a borrowing period, etc.). Then, for each sub-vector assigned to an even-numbered distribution position, the system calculates the sine value of its corresponding time point and combines this value with the original sub-vector in some way (such as weighting, splicing, etc.). For example, continuing the previous example, assume that the selected time scale is month and the period is one year. For sub-vectors assigned to even-numbered distribution positions (such as vectors for February, April, ..., December), the system calculates the relative positions of these months in the year (such as February is the 2nd month, April is the 4th month, and so on), and converts these positions to normalized timestamps from 0 to 1 (for example, by dividing by 12). The system then applies the sine function to each normalized timestamp to generate a sine value. This sine value can be combined with the corresponding sub-content feature vector as part of the time embedding. The specific combination method can be a simple splicing: for each sub-vector v of an even-numbered month i (where i is an even-numbered month), generating a new embedding vector e i =[v i ; sin(θ i )], where θ i It is the value of the normalized timestamp corresponding to the month converted to radians.

[0193] In practical applications, the sine value can be used as a form of weight or offset to adjust or enhance certain elements in the original feature vector.

[0194] Similar to step S312, step S313 involves performing a second embedding operation on the sub-content feature vector assigned to a singular distribution position. However, unlike the first embedding operation, the second embedding operation selects another function (such as a cosine function) to encode time information.

[0195] The cosine function is similar to the sine function and is also a periodic function, but it is 90 degrees out of phase with the sine function. This means that when the sine function reaches its maximum value, the cosine function is zero, and vice versa. By using both sine and cosine functions for timing embedding, the system can capture richer timing change patterns.

[0196] Similar to sine embedding, the system first determines the time positions of the sub-content feature vectors assigned to singular distribution positions. Then, the cosine function is applied to these time positions to generate embedding values. These values ​​are then combined with the original sub-vectors in some way to form new embedding vectors. For example, continuing with the previous example, for sub-vectors assigned to singular distribution positions (such as vectors for January, March,..., November), the system calculates the relative positions of these months in the year and converts these positions to normalized timestamps. Then, the cosine function is applied to each normalized timestamp to generate a cosine value. Similar to sine embedding, this cosine value can be combined with the original sub-vector in some way. For consistency (although it may not be necessary in practical applications), the splicing method is adopted again: for each sub-vector v of an odd month j (where j is an odd month), generating a new embedding vector e j =[v j ; cos(θ j )], where θ j It is the value of the normalized timestamp corresponding to the month converted to radians.

[0197] In step S314, the computer system combines all the embedding vectors generated in steps S312 and S313 (whether sine embedding or cosine embedding) to form a final temporal embedding feature vector. This vector will contain all the information of the original content feature vector as well as the temporal variation information introduced by the sine and cosine functions.

[0198] The choice of combination strategy depends on the specific application scenario and requirements. A simple approach is to simply concatenate all embedded vectors together to form a longer vector. However, this approach may cause the vector dimension to increase dramatically and contain a lot of redundant information.

[0199] To overcome these problems, the system can adopt more complex combination strategies such as weighted averaging, principal component analysis (PCA) dimensionality reduction, or autoencoder compression, etc. These methods can reduce the dimension and redundancy of the vector while retaining key information.

[0200] To simplify the explanation, we use the concatenation strategy as an example of combination: Assume that 6 sub-content feature vectors are assigned to even-numbered distribution positions and sinusoidally embedded to generate 6 new embedding vectors (denoted as e2, e4, …, e 12 ), the other 6 sub-vectors are assigned to singular distribution positions and cosine embedded to generate another 6 embedding vectors (denoted as e1, e3, …, e 11 ). The system simply concatenates these embedding vectors together to form the final temporal embedding feature vector [e1,e2,…,e 11 ,e 12 ].

[0201] By embedding the content feature vector with time series features (especially using sine and cosine functions to perform different embedding operations on sub-vectors with even and odd distribution positions), the computer system successfully generated a time series embedded feature vector containing rich time series change information. This vector not only retains all the information of the original content feature vector, but also enhances the feature representation capability by introducing changes in the time dimension. In subsequent steps, this time series embedded feature vector will be used together with the behavior feature vector to generate personalized book recommendation results to meet the diverse needs of readers. It should also be noted that although the present embodiment uses sine and cosine functions as examples of embedding operations, in actual applications the system can select other types of periodic functions or more complex embedding strategies according to specific needs to achieve time series feature embedding.

[0202] As an implementation mode, the dynamic feature processing layer in the target recommendation information determination network includes A cross-weighted focusing units and A internal weighted focusing units, and the A cross-weighted focusing units and the A internal weighted focusing units are alternately arranged, and A≥1; based on this, step S330, based on the dynamic feature processing layer and the content representation information, adjusts and optimizes the preset dynamic feature vector to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data, which may specifically include:

[0203] Step S331: Obtain the execution feature of the Yth cross-weight focusing unit in the dynamic feature processing layer;

[0204] Step S332: if Y=1, the execution feature of the Yth cross-weighted focusing unit includes content representation information and a preset dynamic feature vector;

[0205] Step S333: if Y≠1, the execution characteristics of the Yth cross-weight focusing unit include the content representation information and the output of the Y-1th internal weight focusing unit, Y≤A;

[0206] Step S334: obtaining the first weighted array, the second weighted array and the third weighted array corresponding to the Yth cross-weight focusing unit, performing a dot product calculation on the first weighted array and the output of the Y-1th internal weighted focusing unit to obtain a second search array;

[0207] Step S335: performing a scalar product calculation on the second weighted array and the content representation information to obtain a second anchor array, and performing a scalar product calculation on the third weighted array and the content representation information to obtain a second result array;

[0208] Step S336: Determine the output of the Yth cross-weight focusing unit based on the second search array, the second anchor array, and the second result array;

[0209] Step S337: Load the output of the Yth cross-weight focusing unit to the Yth internal weight focusing unit in the dynamic feature processing layer, and perform internal focusing feature embedding on the output of the Yth cross-weight focusing unit based on the Yth internal weight focusing unit to obtain the output of the Yth internal weight focusing unit;

[0210] Step S338: Determine the output of the Ath internal weight focusing unit in the dynamic feature processing layer as the content data dynamic feature vector corresponding to the reader's book borrowing content data.

[0211] In step S331, the computer system first locates the Yth cross-weight focusing unit in the dynamic feature processing layer and prepares to obtain the feature input required for its execution. The cross-weight focusing unit is one of the core components in the dynamic feature processing layer. It is responsible for calculating the attention weight based on the input features and weighting and focusing the features accordingly. For example, assuming that the dynamic feature processing layer contains 3 cross-weight focusing units (A=3) and 3 internal weight focusing units, focus on the second cross-weight focusing unit (Y=2). According to step S331, the system needs to obtain the execution characteristics of the unit.

[0212] If Y = 1, the execution feature will include content representation information (denoted as r) and a preset dynamic feature vector (denoted as d init ). However, in this example, Y = 2, so this condition does not apply.

[0213] If Y≠1, the execution feature includes the content representation information r and the output of the Y-1th internal weight focusing unit (in this case, the output of the 1st internal weight focusing unit, denoted as o1).

[0214] Steps S332 to S333: Determine the execution characteristics according to the value of Y.

[0215] Since Y=2, according to step S333, the execution features of the second cross-weight focusing unit include the content representation information r and the output o1 of the first internal weight focusing unit. These features will be passed as input to the second cross-weight focusing unit for subsequent calculation and weight allocation.

[0216] After obtaining the execution features, the second cross-weight focusing unit will use the first weighted array defined internally (denoted as ) is scalar-multiplied with the output o1 of the first internal weight focusing unit to generate the second search array (denoted as Q Y ). This step simulates the “query” process in the self-attention mechanism, preparing for subsequent attention weight calculations through weighted sum transformations.

[0217] The calculation process is, for example:

[0218] in, is the query weight matrix specific to the Yth cross-weight focusing unit.

[0219] Next, the second cross-weight focusing unit uses its internal second weight array (denoted as ) and the third weighted array (denoted as ) and the content representation information r to perform a scalar product calculation to generate the second anchor array (denoted as K Y ) and the second result array (denoted as V Y ). This process simulates the key-value pair generation in the self-attention mechanism, where the anchor array is used to calculate the attention weights and the result array is weighted summed according to these weights.

[0220] Calculation process example:

[0221] With the second search array, the second anchor array, and the second result array, the second cross-weighted focusing unit can calculate the attention weights and perform a weighted summation of the features in the second result array according to these weights to generate its output (denoted as o' Y ). This process usually involves the application of a softmax function to ensure that the sum of the attention weights is 1.

[0222] The output o' of the second cross-weight focusing unit Y It is then loaded into the second internal weight focusing unit for further processing. The internal weight focusing unit is responsible for embedding the internal focused features of the output of the cross weight focusing unit to enhance its representation ability and prepare for the next round of cross weight focusing calculation (if any).

[0223] Internal weight-focused feature embedding usually involves the calculation of a series of neural network layers, including fully connected layers, activation functions (such as ReLU, Tanh, etc.), and possible normalization layers (such as Batch Normalization). The role of these layers is to perform nonlinear transformation and feature extraction on the input features to generate more representative outputs.

[0224] Finally, when all cross-weight focusing units and internal weight focusing units in the dynamic feature processing layer are executed in sequence, the system determines the output of the last internal weight focusing unit as the content data dynamic feature vector corresponding to the reader's book borrowing content data (denoted as d final ). In this example, since the dynamic feature processing layer contains 3 units (A=3), d final will be the output of the 3rd internal weight focusing unit.

[0225] Through the above steps, the computer system uses the dynamic feature processing layer to adjust and optimize the preset dynamic feature vectors, generating more representative content data dynamic feature vectors. This process involves complex attention mechanisms, neural network calculations, and multi-level feature embedding and transformation. The cross-weighted focusing units and internal weighted focusing units in the dynamic feature processing layer achieve in-depth analysis and understanding of the borrowed content data through alternating arrangement and collaborative work.

[0226] The dynamic feature vector of content data not only reflects the static features of the content borrowed by readers (such as book types, author preferences, etc.), but also captures the dynamic patterns of these features changing over time. By combining these dynamic features with the behavioral feature vector, the system can more accurately predict readers' potential borrowing needs and generate personalized book recommendation lists based on them. This helps improve the accuracy of recommendations and user satisfaction, thereby promoting the effective use of book resources and improving readers' reading experience.

[0227] As an implementation mode, step S400, embedding the multi-source feature vectors to obtain the multi-source integrated embedding vectors, performing borrowing recommendation restoration mapping on the multi-source integrated embedding vectors, and obtaining borrowing recommendation information matching the reader's book borrowing content data, may include:

[0228] Step S410: Load the multi-source feature vector into the multi-source embedding layer in the target recommendation information determination network, perform forward and backward feature embedding on the multi-source feature vector based on the multi-source embedding layer, and obtain a multi-source integrated embedding vector;

[0229] Step S420: loading the multi-source integrated embedding vector into the recommendation mapping restoration layer in the target recommendation information determination network, performing weighted information fusion on the multi-source integrated embedding vector based on the recommendation mapping restoration layer, and obtaining a focused weighted fusion vector;

[0230] Step S430: incrementally generate the focused weighted fusion vector to obtain a recommendation confidence array, and determine borrowing recommendation information that matches the reader's book borrowing content data based on the recommendation confidence array.

[0231] In step S410, the computer system loads the multi-source feature vectors into the multi-source embedding layer in the target recommendation information determination network. The multi-source embedding layer is responsible for forward and backward feature embedding (also known as bidirectional encoding) of these feature vectors to capture the contextual relationship and long-term dependency between features. Bidirectional encoding ensures that the model considers both forward and backward information when processing sequence data, thereby improving the accuracy and richness of feature representation.

[0232] In computer systems, bidirectional feature embedding is usually implemented through models such as bidirectional recurrent neural networks (BiRNN) or bidirectional long short-term memory networks (BiLSTM). These models consist of two independent RNN or LSTM layers, one processing the forward part of the input sequence and the other processing the reverse part. Finally, the hidden states of the two directions are merged to generate a bidirectionally encoded output.

[0233] For example, suppose that the multi-source feature vector is formed by concatenating the content feature vector c and the behavior feature vector b, that is, f = [c; b]. The computer system loads this multi-source feature vector into the multi-source embedding layer, which is composed of a BiLSTM network.

[0234] The forward LSTM processes the forward part of the input sequence (i.e., from left to right) to generate a series of forward hidden states. The backward LSTM processes the reverse part of the input sequence (i.e., from right to left) to generate a series of backward hidden states. For each time step t, the forward hidden state and the backward hidden state are merged in some form (such as concatenation, summation, or weighted average) to obtain a bidirectional hidden state. The bidirectional hidden states of all time steps are further processed (such as through pooling layers, attention mechanisms, or simple average / max pooling) to generate the final multi-source integrated embedding vector e. In this process, the BiLSTM network is able to capture the dependencies between the context in the multi-source feature vector and encode this information into the multi-source integrated embedding vector.

[0235] After obtaining the multi-source integrated embedding vector, the computer system loads it into the recommendation mapping reduction layer for weighted information fusion. The recommendation mapping reduction layer is responsible for combining and optimizing the different features in the multi-source integrated embedding vector according to a specific fusion strategy and weight distribution mechanism to generate a focused weighted fusion vector. This vector will serve as the input for subsequent recommendation generation.

[0236] Weighted information fusion can be achieved through a variety of methods, including simple weighted average, attention mechanism, factorization machine, etc. In computer systems, the choice of this method usually depends on the characteristics of the data, the requirements of the recommendation task, and the complexity of the model. For example, suppose that the recommendation mapping reduction layer adopts the attention mechanism to achieve weighted information fusion. The attention mechanism allows the model to dynamically adjust the weights of different features in the fusion process to highlight important features and suppress unimportant features.

[0237] First, the recommended mapping reduction layer may generate a query vector q, which is used as a reference point for the attention mechanism to calculate the weights of each part in the multi-source integrated embedding vector. For each part in the multi-source integrated embedding vector e (such as the bidirectional hidden state at each time step), the similarity between it and the query vector q is calculated (such as dot product, cosine similarity, etc.), and the attention weight is obtained by normalizing it through the softmax function. The attention weight is used to perform a weighted summation of each part in the multi-source integrated embedding vector to obtain a focused weighted fusion vector.

[0238] After generating the focused weighted fusion vector, the computer system uses an incremental generation (also known as autoregressive generation) strategy to predict borrowing recommendation information. Incremental generation allows the model to gradually build a recommendation list, predicting one recommendation item at a time and adjusting subsequent predictions based on previous predictions. This approach can capture the dependencies between recommendation items and generate a more coherent and ordered recommendation list.

[0239] Incremental generation is usually implemented through a sequence-to-sequence (Seq2Seq) model, a Transformer model, or an RNN-based decoder. These models are able to receive a focused weighted fusion vector as input and gradually generate representations of recommended items (such as book IDs, titles, or feature vectors). For example, suppose the recommendation system uses an RNN-based decoder to implement incremental generation. The decoder receives the focused weighted fusion vector as the initial hidden state and starts to gradually generate representations of recommended items.

[0240] At each step, the decoder predicts the representation of the next recommendation item based on the current hidden state and the previous output (if any). This representation may be a distribution vector that represents the recommendation probability of different books. Sample a recommendation item from the predicted distribution (such as selecting the book with the highest probability through the argmax operation), or use a more complex search strategy (such as beam search) to find the optimal recommendation sequence. For each recommendation item representation generated by the decoder, its corresponding recommendation confidence (such as predicted probability) can be calculated, and these confidences can be combined into a recommendation confidence array. Based on the recommendation confidence array, select several recommendations with the highest confidence as the final borrowing recommendation information. This information may include the book's ID, title, author, summary, etc. for display to readers.

[0241] Through this process, the computer system can generate personalized borrowing recommendation information based on the reader's borrowing behavior and content preferences. These recommendations not only take into account the reader's historical borrowing records, but also optimize and improve the recommendation process through a variety of technical means such as feature embedding, bidirectional encoding, weighted information fusion and incremental generation. The final recommendation list will be more in line with the reader's interests and needs, thereby improving the accuracy of the recommendation and user satisfaction.

[0242] The embodiment of the present application also provides a training process of the target recommendation information determination network, which may specifically include the following steps:

[0243] Step S10: Obtaining reader book borrowing content training data and borrowing behavior training data and training borrowing recommendation information corresponding to the reader book borrowing content training data;

[0244] Step S20: Based on the initial recommendation information, determine that the content embedding layer in the network outputs a sample content feature vector corresponding to the reader's book borrowing content training data, and based on the initial recommendation information, determine that the behavior embedding layer in the network outputs a sample behavior feature vector corresponding to the borrowing behavior training data; wherein the content embedding layer and the behavior embedding layer are obtained by training based on multiple content behavior data tuples, and a content behavior data tuple includes a sub-book borrowing content training data and a borrowing behavior data;

[0245] Step S30: obtaining a focus shielding matrix in an initial dynamic feature processing layer included in the initial recommendation information determination network, extracting dynamic features from the sample content feature vector based on the focus shielding matrix and the cross-weight focusing unit and the internal weight focusing unit in the initial dynamic feature processing layer, obtaining a sample dynamic feature vector, and fusing the sample dynamic feature vector with the sample behavior feature vector into a sample multi-source feature vector;

[0246] Step S40: Based on the initial recommendation information, the initial multi-source embedding layer in the network is determined to embed the sample multi-source feature vector to obtain a sample integrated embedding vector, and based on the initial recommendation information, the initial recommendation mapping reduction layer in the network is determined to output a borrowing recommendation information prediction confidence array corresponding to the sample integrated embedding vector; the borrowing recommendation information prediction confidence array is used to characterize the prediction confidence corresponding to each component data item in the training borrowing recommendation information;

[0247] Step S50: Based on the focus masking matrix, the borrowing recommendation information prediction confidence array and the training borrowing recommendation information, the parameters of the initial dynamic feature processing layer, the initial multi-source embedding layer and the initial recommendation mapping restoration layer are adjusted, and the initial recommendation information determination network containing the adjusted parameters is determined as the target recommendation information determination network.

[0248] In the development of a personalized book recommendation system, it is crucial to train an efficient and accurate target recommendation information determination network. The embodiment of the present application provides a detailed training process, which aims to enable the network to accurately capture the dynamic changes of readers' borrowing behavior and content preferences through continuous iteration and optimization, thereby generating high-quality borrowing recommendations.

[0249] In step S10, the computer system first collects and prepares the data sets required for training. These data sets include reader book borrowing content training data, corresponding borrowing behavior training data, and training borrowing recommendation information. These data are the basis for subsequent training processes, and they will be used to build and verify the performance of the recommendation information determination network. For example, reader book borrowing content training data: suppose there is a database containing a large number of reader borrowing records, and these records cover the book information borrowed by different readers in different time periods. In order to train the network, it is necessary to extract a part of these records as training data. For example, the borrowing records of all readers in the past year can be selected as the training set.

[0250] Corresponding to the borrowing content data, the borrowing behavior data records the reader's borrowing frequency, borrowing duration, return status and other specific behavior information. These data are crucial for understanding readers' borrowing habits and preferences.

[0251] The training recommendation information is manually annotated based on the borrowing content data and borrowing behavior data or mined from historical data. It represents the list of books that the system should recommend given the borrowing records and behavior characteristics. In practical applications, this recommendation information may come from librarians' expert knowledge, reader feedback, or statistical analysis of historical borrowing data.

[0252] In step S20, the computer system uses the initial recommendation information to determine the content embedding layer and the behavior embedding layer in the network, and converts the borrowing content training data and the borrowing behavior training data into sample content feature vectors and sample behavior feature vectors, respectively. These two embedding layers are pre-trained, and they can capture the intrinsic characteristics of the data and map them into a low-dimensional vector space.

[0253] Before training the initial recommendation information determination network, the content embedding layer and the behavior embedding layer are usually pre-trained through unsupervised learning or supervised learning of a large number of content behavior data pairs. Each pair consists of a sub-book borrowing content training data and a borrowing behavior data. By continuously optimizing the weights of the embedding layer, the system can learn how to convert raw data into meaningful feature vectors.

[0254] For example, the content embedding layer: For each borrowing record, the book title, author and other information, the content embedding layer generates the corresponding vector representation by looking up the pre-trained word embedding matrix or using a deep learning model (such as convolutional neural network CNN, recurrent neural network RNN, etc.). These vectors capture key features of the book content, such as the theme and style.

[0255] For borrowing behavior data, the behavior embedding layer converts raw values ​​such as borrowing frequency and borrowing duration into feature vectors through a series of transformations (such as fully connected layers, activation functions, etc.). These vectors reflect readers' borrowing habits and preferences.

[0256] In step S30, the computer system uses the initial recommendation information to determine that the dynamic feature processing layer in the network performs dynamic feature extraction on the sample content feature vector. The dynamic feature processing layer includes a cross-weight focusing unit and an internal weight focusing unit, which weight and transform the feature vector through an attention mechanism and a multi-layer neural network to capture the dynamic relationship and temporal changes between features. The extracted sample dynamic feature vector is then fused with the sample behavior feature vector into a sample multi-source feature vector.

[0257] The focused masking matrix is ​​a sparse matrix used to guide the assignment of attention weights during dynamic feature extraction. It is often used to handle invalid positions in sequence data (such as padding positions) or information that needs to be ignored (such as information at future time points). In the book recommendation scenario, the focused masking matrix may be used to ensure that the model does not "see" future borrowing records when predicting. For example, the cross-weight focusing unit in the dynamic feature processing layer first calculates the attention weights based on the content feature vector and the focused masking matrix. These weights reflect the importance of different time steps or feature dimensions. The internal weight focusing unit then performs weighted summation and transformation of the feature vector according to these weights to generate a sample dynamic feature vector.

[0258] The extracted sample dynamic feature vector and sample behavior feature vector are fused through concatenation, weighted sum or attention mechanism. The fused sample multi-source feature vector contains both the dynamic change information of the content and the static feature information of the behavior.

[0259] In step S40, the computer system uses the initial recommendation information to determine that the multi-source embedding layer in the network embeds the sample multi-source feature vector to generate a sample integrated embedding vector. Then, the recommendation mapping reduction layer outputs a borrowing recommendation information prediction confidence array based on the sample integrated embedding vector. This array reflects the system's prediction confidence for each book in the recommendation list.

[0260] For example, the multi-source embedding layer may contain multiple neural network layers (such as fully connected layers, convolutional layers, etc.), which further process and transform the sample multi-source feature vector to enhance its feature expression ability. Through the application of multiple layers of nonlinear transformation and activation functions, the multi-source embedding layer can generate a more representative sample integrated embedding vector.

[0261] The recommendation mapping reduction layer receives the sample integrated embedding vector as input, and gradually generates an array of prediction confidences of borrowing recommendation information through a series of transformations (such as decoders, autoregressive models, etc.). In this process, the system may use strategies such as greedy search and beam search to optimize the generation order and quality of the recommendation list.

[0262] In step S50, the computer system adjusts and optimizes the parameters of the dynamic feature processing layer, the multi-source embedding layer, and the recommendation mapping restoration layer in the initial recommendation information determination network according to the focus masking matrix, the borrowing recommendation information prediction confidence array, and the training borrowing recommendation information. The network weights and bias terms are updated by minimizing the loss function (such as cross entropy loss, mean square error loss, etc.) so that the prediction results output by the network are closer to the actual training borrowing recommendation information. After multiple iterations of training, the initial recommendation information determination network containing the adjusted parameters is determined as the target recommendation information determination network.

[0263] During the training process, the computer system calculates the gradient of the loss function with respect to the network parameters through the back-propagation algorithm, and uses an optimization algorithm (such as gradient descent, Adam, etc.) to update these parameters to minimize the loss function value. For example, in each iteration, the computer system first calculates the loss value between the prediction confidence array of the borrowing recommendation information output by the current network and the training borrowing recommendation information. Then, the gradient of the network parameters is calculated based on the loss value, and these parameters are updated using the optimization algorithm. This process is repeated many times until the stopping condition is met (such as reaching the preset number of iterations, the loss value is lower than a certain threshold, etc.).

[0264] After sufficient training, the initial recommendation information determination network containing the adjusted parameters will become the target recommendation information determination network. This network can accurately capture the dynamic changes of readers' borrowing behavior and content preferences, and generate high-quality borrowing recommendation information to meet readers' personalized needs. In actual applications, the target network will be deployed in a production environment for real-time recommendation services.

[0265] In one embodiment, step S30, based on the focus shielding matrix and the cross-weight focusing unit and the internal weight focusing unit in the initial dynamic feature processing layer, extracts dynamic features from the sample content feature vector to obtain the sample dynamic feature vector, including:

[0266] Step S31: obtaining a sample preset dynamic feature vector having the same dimension as the sample behavior feature vector, performing a scalar product calculation on the sample preset dynamic feature vector and a first mapping array corresponding to a cross-weight focusing unit in an initial dynamic feature processing layer, and obtaining a third search array;

[0267] Step S32: performing a dot product calculation on the sample content feature vector and the second mapping array corresponding to the cross-weight focusing unit in the initial dynamic feature processing layer to obtain a third anchor array, and performing a dot product calculation on the sample content feature vector and the third mapping array corresponding to the cross-weight focusing unit in the initial dynamic feature processing layer to obtain a third result array;

[0268] Step S33: determining a cross-focus weight vector associated with the sample content feature vector based on the third search array, the third anchor array and the third result array;

[0269] Step S34: performing a nonlinear transformation on the focus shielding matrix to obtain a focus activation vector, and determining the multiplication result of the focus activation vector and the cross-focus weight vector as the output of the cross-weight focusing unit in the initial dynamic feature processing layer;

[0270] Step S35: Load the output of the cross-weight focusing unit in the initial dynamic feature processing layer into the internal weight focusing unit in the initial dynamic feature processing layer, and perform internal focusing feature embedding on the output of the cross-weight focusing unit in the initial dynamic feature processing layer based on the internal weight focusing unit in the initial dynamic feature processing layer to obtain a sample dynamic feature vector corresponding to the sample content feature vector.

[0271] In step S31, the computer system first generates a sample preset dynamic feature vector that is consistent with the dimension of the sample behavior feature vector. This vector serves as the starting point for dynamic feature extraction, and its initial value can be random, generated based on some heuristic rules, or pre-learned from training data. Subsequently, the system performs a scalar product calculation on this preset dynamic feature vector and the first mapping array corresponding to the cross-weighted focusing unit in the initial dynamic feature processing layer to generate a third search array. For example, assuming that the dimension of the sample behavior feature vector is D, the sample preset dynamic feature vector d preset ∈R D is initialized to a vector of all zeros (or a vector generated according to some strategy). At the same time, the cross-weight focusing unit has a first mapping array W q ∈R D×M , where M is the dimension of the third search array (which may be different from D). The calculation process is as follows: Q =W q d preset .

[0272] Here, Q∈RM This is the third search array, which contains the query information used for subsequent attention weight calculation.

[0273] After obtaining the third search array, the computer system continues to perform a scalar product calculation on the sample content feature vector and the second mapping array and the third mapping array corresponding to the cross-weighted focusing unit to generate a third anchor array and a third result array. These two arrays play the roles of "key" and "value" respectively in the subsequent attention weight calculation.

[0274] For example, suppose the sample content feature vector is c∈R N , where N is the dimension of the sample content feature vector. The cross-weighted focusing unit has two mapping arrays: the second mapping array W k ∈R N×K Used to generate the third anchor array, the third mapping array W v ∈R N×V Used to generate the third result array. The calculation process is as follows: K =W k c,V=W v c;

[0275] Here, K∈R K is the third anchor array, V∈R V is the third result array. In practical applications, K and V may be equal to M or may not be equal, depending on the specific design and implementation.

[0276] After obtaining the third search array, the third anchor array and the third result array, the computer system uses these arrays to calculate the cross-focus weight vector associated with the sample content feature vector. This weight vector reflects the importance of different positions (or feature dimensions) in the dynamic feature extraction process.

[0277] For example, the calculation of the cross-focus weight vector usually involves the core steps of the attention mechanism: calculating the similarity (or "score") between the search array and the anchor array, and normalizing it through the softmax function. The specific calculation process is as follows:

[0278] First, the score array (also called “raw attention scores”) is calculated:

[0279]

[0280] Among them, d k is the dimension of the anchor array (key vector), which is used to scale the dot product result to prevent the gradient from vanishing or exploding. Then, the softmax function is applied for normalization:

[0281] α=softmax(scores)

[0282] Here, α∈R K is the cross-focus weight vector. Each element α i It represents the importance of the i-th anchor position (or feature dimension) in the dynamic feature extraction process.

[0283] In step S34, the computer system performs a nonlinear transformation on the focus shielding matrix (such as activation by a sigmoid function or a ReLU function) to obtain a focus activation vector. This focus activation vector is then multiplied by the cross-focus weight vector to determine the output of the cross-weight focus unit. The focus shielding matrix is ​​used to introduce additional constraints or preferences in the attention weight calculation process.

[0284] For example, suppose the focus masking matrix is ​​M∈R M×K , which may be a sparse matrix of 0s and 1s, used to mask out certain anchor positions that do not need to be paid attention to. In practical applications, M may not be directly used as input for calculation, but may affect the distribution of attention weights in some way (such as element-by-element multiplication with the cross-focus weight vector). To simplify the explanation, assume that M is nonlinearly transformed here (although this may not be common in practice):

[0285] f A =σ(M);

[0286] Where σ is a nonlinear transformation function (e.g., sigmoid function, or other function). However, it is more common to use M directly as a masking matrix without performing a nonlinear transformation. To fit the description of the original step, temporarily ignore this and assume that there is a virtual focus activation vector (if M is used directly as a mask, this step can be considered as A=M).

[0287] The cross-focus weight vector is then multiplied with the focus activation vector (or a masking matrix is ​​applied) and weighted summed with the third result array to get the output of the cross-weight focusing unit:

[0288] fo cross =A⊙αV;

[0289] Here, ⊙ represents an element-wise multiplication (if A is the focused activation vector after sigmoid transformation, this step is actually weighting; if A is a masking matrix, this step is applying masking). cross ∈R V This is the output of the cross-weight focusing unit.

[0290] Finally, the computer system loads the output of the cross-weight focusing unit to the internal weight focusing unit in the initial dynamic feature processing layer. The internal weight focusing unit is responsible for further transforming and embedding the output of the cross-weight focusing unit to enhance its characterization ability and generate a sample dynamic feature vector. For example, the internal weight focusing unit may include multiple neural network layers (such as fully connected layers, convolutional layers, recurrent neural network layers, etc.), which perform deep processing on the input features through a series of nonlinear transformations and activation functions. However, in the context of this embodiment, more attention is paid to how to achieve feature embedding through internal focusing. It is assumed that the internal weight focusing unit includes one or more fully connected layers and corresponding activation functions (such as ReLU).

[0291] Through the implementation of the above step S30, the computer system successfully uses the focus shielding matrix, the cross-weight focusing unit and the internal weight focusing unit to extract dynamic features from the sample content feature vector. This process not only captures the temporal changes and intrinsic patterns in the sample content feature vector, but also enhances the representation ability of the features through the attention mechanism and the internal focus feature embedding. The final generated sample dynamic feature vector will be used as one of the inputs of the subsequent steps for further feature fusion and generation of borrowing recommendation information. During the entire training process, these steps will be continuously iterated and optimized to ensure the accuracy and effectiveness of the recommendation model.

[0292] In one embodiment, step S50, based on the focus masking matrix, the borrowing recommendation information prediction confidence array and the training borrowing recommendation information, adjusts the parameters of the initial dynamic feature processing layer, the initial multi-source embedding layer and the initial recommendation mapping restoration layer, and determines the initial recommendation information determination network including the adjusted parameters as the target recommendation information determination network, including:

[0293] Step S51: taking the absolute sum of each matrix unit in the focus shielding matrix as the focus shielding activation value, and determining the multiplication result between the focus shielding activation value and the supervision parameter variable as the focus supervision value corresponding to the initial dynamic feature processing layer;

[0294] Step S52: determining the incremental error associated with the initial recommendation mapping reduction layer based on the amount of training data of the reader's book borrowing content and the prediction confidence of each component data item in the training borrowing recommendation information in the borrowing recommendation information prediction confidence array;

[0295] Step S53: Add the focused supervision value and the incremental error to obtain the initial recommendation information to determine the combined error corresponding to the network;

[0296] Step S54: Based on the merge error, the parameters of the initial dynamic feature processing layer, the initial multi-source embedding layer and the initial recommendation mapping restoration layer are debugged in a loop, and the debugging is ended when the merge error reaches the set debugging cutoff requirement, and the content embedding layer, the behavior embedding layer and the initial dynamic feature processing layer, the initial multi-source embedding layer, and the initial recommendation mapping restoration layer at the end are determined as the target recommendation information determination network.

[0297] In step S51, the computer system first calculates the absolute sum (i.e., the sum of the absolute values) of each matrix unit in the focus shielding matrix, and uses this value as the focus shielding activation value. Then, the focus shielding activation value is multiplied by a supervision parameter (usually a sparse constraint parameter) to obtain the focus supervision value corresponding to the initial dynamic feature processing layer. The focus supervision value is used to guide the model to focus on important feature dimensions during the training process, while ignoring or suppressing unimportant feature dimensions.

[0298] For example, assuming the focusing masking matrix M∈R m×n is a sparse matrix used to mask out unnecessary locations during dynamic feature extraction. Each element m in the matrix ij represents the shielding relationship between the i-th time step or feature dimension and the j-th position. ij = 0, it means that the jth position is masked at the ith time step or feature dimension; if m ij =0, it means that the position is reserved. The process of calculating the focus mask activation value can be expressed as:

[0299] Among them, |m ij ∣ represents the matrix element m ij The absolute value of .

[0300] Next, the focused mask activation value is multiplied by the supervision parameter λ (a positive scalar) to obtain the focused supervision value: s =λ×f a ;

[0301] In practical applications, the choice of the supervisory parameter λ depends on the requirements of the specific task and the complexity of the model. A larger λ value will strengthen the constraint on the focus masking matrix, making the model pay more attention to the retained positions; while a smaller λ value will weaken this constraint and give the model more degrees of freedom.

[0302] In step S52, the computer system calculates the incremental error (i.e., autoregressive error) associated with the initial recommendation mapping reduction layer according to the number of training data of the reader's book borrowing content and the prediction confidence of each component data item in the training borrowing recommendation information in the borrowing recommendation information prediction confidence array. The incremental error reflects the degree of difference between the model prediction result and the actual training data, and is one of the goals that need to be minimized in the model optimization process.

[0303] For example, suppose the training borrowing recommendation information contains T samples, each sample corresponds to a recommendation list, and the list contains L possible recommended items. For each sample, the model outputs a prediction confidence array p of length L. t =[p t1 ,p t2 ,…,p tL ], where p ti Indicates the prediction confidence of the i-th recommendation item in the t-th sample. At the same time, the training borrowing recommendation information also provides a true label array y of length L t =[y t1 ,y t2 ,…,y tL ], where y ti ∈{0,1} indicates whether the i-th recommendation item in the t-th sample is a true recommendation item (1 for yes, 0 for no). Then, the loss values ​​of all samples are averaged or summed to obtain the incremental error of the entire training set. In practical applications, the calculation method of incremental error may vary depending on the specific task and dataset. In addition to cross entropy loss, other types of loss functions such as mean square error and hinge loss can also be used.

[0304] In step S53, the computer system adds the focused supervision value calculated in step S51 to the incremental error calculated in step S52 to obtain the combined error corresponding to the initial recommendation information determination network. The combined error is the total loss function in the model optimization process, which is used to guide the adjustment and optimization of the parameters.

[0305] In practical applications, the specific form of the merged error may vary depending on the model structure and optimization goal. However, in any case, the merged error should be able to fully reflect the performance of the model during the training process and guide the model to optimize in the expected direction.

[0306] In step S54, the computer system performs cyclic debugging on the parameters of the initial dynamic feature processing layer, the initial multi-source embedding layer, and the initial recommendation mapping restoration layer based on the merging error. The debugging process usually involves the application of optimization algorithms such as gradient descent, stochastic gradient descent, and Adam. In each iteration, the system updates the value of the parameter according to the gradient information of the merging error to reduce the merging error and improve the prediction performance of the model. When the merging error reaches the set debugging cutoff requirement (such as reaching a preset number of iterations, the merging error is less than a certain threshold, etc.), the debugging process ends. At this point, the content embedding layer, behavior embedding layer, initial dynamic feature processing layer, initial multi-source embedding layer, and initial recommendation mapping restoration layer containing the adjusted parameters will be determined as the target recommendation information determination network.

[0307] When the debugging process is over, the target recommendation information obtained will determine that the network will have better prediction performance and generalization ability. This network can accurately capture the dynamic changes of readers' borrowing behavior and content preferences, and generate borrowing recommendation information that meets the readers' personalized needs. In actual applications, the target network will be deployed in the production environment for real-time recommendation services, providing readers with a more convenient and efficient book borrowing experience.

[0308] In one embodiment, step S52, based on the amount of training data of the reader's book borrowing content and the prediction confidence of each component data item in the training borrowing recommendation information in the borrowing recommendation information prediction confidence array, determines the incremental error associated with the initial recommendation mapping reduction layer, including:

[0309] Step S521: obtaining the prediction confidence corresponding to each component data item in the training borrowing recommendation information in the borrowing recommendation information prediction confidence array, performing logarithmic calculation on the prediction confidence corresponding to each component data item in the training borrowing recommendation information, and obtaining the logarithmic confidence corresponding to each component data item in the training borrowing recommendation information;

[0310] Step S522: Add the logarithmic confidences corresponding to the various component data items in the training borrowing recommendation information to obtain the combined logarithmic confidences corresponding to the reader's book borrowing content training data, and determine the incremental error associated with the initial recommendation mapping restoration layer based on the ratio between the combined logarithmic confidences and the number of reader's book borrowing content training data.

[0311] In step S521, the computer system first obtains the prediction confidence corresponding to each component data item in the training borrowing recommendation information from the borrowing recommendation information prediction confidence array. The prediction confidence array is generated by the initial recommendation mapping reduction layer based on the reader's book borrowing content training data, which reflects the model's prediction confidence level for each recommendation item. Then, the system performs logarithmic calculations on these prediction confidences to obtain the corresponding logarithmic confidences. Logarithmic transformation is a commonly used mathematical transformation method, which can compress or expand the scale of the original data to make the data distribution more uniform, which is conducive to subsequent calculations and processing.

[0312] For example, suppose the training borrowing recommendation information contains three recommended items, each corresponding to a different book. The initial recommendation mapping reduction layer generates a prediction confidence array of length 3 for each training sample. For example, for a certain training sample, its prediction confidence array is [p1, p2, p3] = [0.7, 0.2, 0.1], where p1, p2, and p3 represent the confidence of the model's prediction of the three recommended items corresponding to the sample.

[0313] Next, the computer system performs logarithmic calculations on each prediction confidence. The logarithmic calculation can choose natural logarithm (with base e) or common logarithm (with base 10). Here, the natural logarithm is taken as an example: ln(p1) = ln(0.7), ln(p2) = ln(0.2), ln(p3) = ln(0.1);

[0314] The logarithmic confidence array obtained after calculation is [ln(p1),ln(p2),ln(p3)]. It should be noted that since the domain of the logarithmic function is a positive number, the prediction confidence must be greater than 0. In practical applications, if the prediction confidence is very small (close to 0), you can avoid numerical problems in logarithmic calculation by adding a small positive number (such as 10-9).

[0315] In step S522, the computer system first sums the logarithmic confidences of all training samples calculated in step S521 to obtain the combined logarithmic confidence corresponding to the reader's book borrowing content training data. Then, this combined logarithmic confidence is proportional to the number of reader's book borrowing content training data (i.e., the number of training samples) to determine the incremental error associated with the initial recommendation mapping reduction layer. The incremental error reflects the average prediction performance of the model on the entire training set and is an important indicator in the model optimization process.

[0316] However, it should be noted that directly summing the log confidence and calculating the ratio does not directly correspond to the traditional loss function (such as cross entropy loss, mean square error loss, etc.). In practical applications, the calculation of incremental error may be more complicated and closely related to the specific task requirements and model structure. Therefore, in the following explanation, I will provide a more practical incremental error calculation method, which combines the concepts of log-likelihood function and average loss.

[0317] For example, in order to more accurately reflect the prediction performance of the model, a calculation method similar to the log-likelihood function can be used to evaluate the degree of fit of the model to the training data. Assume that each component data item in the training borrowing recommendation information is a binary label (0 or 1), indicating whether the corresponding recommendation item is a true recommendation item. At the same time, assume that the prediction confidence output by the model can be interpreted as the probability that the recommendation item is true. For each training sample, its log-likelihood value can be calculated. Then, the sum of the log-likelihood values ​​of all training samples is calculated, and the negative value is taken (because maximizing the log-likelihood is equivalent to minimizing the negative log-likelihood), and the negative log-likelihood loss is obtained.

[0318] In summary, the incremental error calculation in step S52 is a complex and critical process, which involves multiple mathematical concepts and technical means such as logarithmic transformation, likelihood function, loss function, etc. In practical applications, appropriate loss functions and optimization algorithms can be selected according to specific task requirements and model structures, and a recommendation model with excellent performance can be obtained through repeated iterative training.

[0319] The present application embodiment provides a computer system, such as Figure 2 As shown, the computer system 100 includes: a processor 101 and a memory 103. The processor 101 and the memory 103 are connected, such as through a bus 102. Optionally, the computer system 100 may also include a transceiver 104. It should be noted that in actual applications, the transceiver 104 is not limited to one, and the structure of the computer system 100 does not constitute a limitation on the embodiments of the present application.

[0320] An embodiment of the present application provides a computer system. The computer system in the embodiment of the present application includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors. When the one or more programs are executed by the processor, the method provided by the embodiment of the present application is implemented.

Claims

1. A personalized book recommendation method based on reader behavior data analysis, characterized in that: include: Acquire reader book borrowing content data and borrowing behavior data corresponding to the reader book borrowing content data, wherein the reader book borrowing content data includes book borrowing content data collected at multiple time points; Obtaining a content feature vector corresponding to the reader's book borrowing content data, and obtaining a behavior feature vector corresponding to the borrowing behavior data; Performing dynamic feature extraction on the content feature vector to obtain a content data dynamic feature vector corresponding to the reader's book borrowing content data, and fusing the content data dynamic feature vector with the behavior feature vector to obtain a multi-source feature vector; Feature embedding is performed on the multi-source feature vector to obtain a multi-source integrated embedding vector, and borrowing recommendation restoration mapping is performed on the multi-source integrated embedding vector to obtain borrowing recommendation information matching the reader's book borrowing content data.

2. The method according to claim 1, characterized in that The step of obtaining the content feature vector corresponding to the reader's book borrowing content data includes: Splitting the reader's book borrowing content data into time periods to obtain a borrowing content time series set, decomposing each sub-book borrowing content data in the borrowing content time series set into a plurality of data units corresponding to a uniform time length, and obtaining a data unit set corresponding to each sub-book borrowing content data in the borrowing content time series set; Based on the data unit set corresponding to the sub-book borrowing content data X contained in the borrowing content time series set, obtaining the to-be-processed content feature vector corresponding to the sub-book borrowing content data X, and loading the to-be-processed content feature vector into the content embedding layer in the target recommendation information determination network; wherein X is not greater than the number of sub-book borrowing content data corresponding to the borrowing content time series set; Based on the content embedding layer, feature embedding is performed on the feature vector of the content to be processed to obtain a sub-content feature vector corresponding to the sub-book borrowing content data X; The sub-content feature vectors corresponding to the borrowing content data of each sub-book in the borrowing content time series set are merged into the content feature vector corresponding to the reader's book borrowing content data.

3. The method according to claim 2, characterized in that The step of embedding the feature vector of the content to be processed based on the content embedding layer to obtain the sub-content feature vector corresponding to the sub-book borrowing content data X includes: Based on the information focusing unit in the content embedding layer outputting the information focusing feature vector corresponding to the to-be-processed content feature vector, the to-be-processed content feature vector and the information focusing feature vector are merged into a content merging feature vector; Obtain a transformation matrix and a displacement array corresponding to the feedforward neural network in the content embedding layer, determine a content transformation feature vector corresponding to the sub-book lending content data X based on the displacement array and the scalar product between the transformation matrix and the content merged feature vector, and fuse the content merged feature vector and the content transformation feature vector into a sub-content feature vector corresponding to the sub-book lending content data X.

4. The method according to claim 3, characterized in that The outputting of the information focusing feature vector corresponding to the feature vector of the content to be processed based on the information focusing unit in the content embedding layer includes: Obtaining a mapping weighting matrix corresponding to the information focusing unit in the content embedding layer, and mapping the to-be-processed content feature vector into a first search array, a first anchor array, and a first result array based on the mapping weighting matrix of the information focusing unit; Performing a scalar product calculation on the flip array of the first search array and the first anchor array to obtain an intermediate weighted matrix, and obtaining the number of array columns corresponding to the first search array; A first focusing weighting matrix is ​​obtained by normalizing the ratio between the intermediate weighting matrix and the square root of the number of columns of the array, and an information focusing feature vector corresponding to the feature vector of the content to be processed is determined based on the dot product between the first focusing weighting matrix and the first result array.

5. The method according to claim 1, characterized in that The obtaining of the behavior feature vector corresponding to the borrowing behavior data includes: Decomposing the borrowing behavior data into T component data items, and obtaining implicit representations of data items corresponding to the T component data items; T≥1; Based on the behavior semantics of the T component data items in the borrowing behavior data, obtaining the semantic implicit representations respectively corresponding to the T component data items; Based on the time series distribution of the T component data items in the borrowing behavior data, obtaining implicit representations of the time series distributions corresponding to the T component data items respectively; The data item implicit representation, the semantic implicit representation and the temporal distribution implicit representation are integrated to obtain a behavior feature vector to be processed corresponding to the borrowing behavior data; The behavior feature vector to be processed is loaded into a behavior embedding layer in a target recommendation information determination network, and feature embedding is performed on the behavior feature vector to be processed based on the behavior embedding layer to obtain a behavior feature vector corresponding to the borrowing behavior data.

6. The method according to claim 1, characterized in that The step of extracting dynamic features from the content feature vector to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data includes: Performing temporal feature embedding on the content feature vector to obtain a temporal embedding feature vector corresponding to the content feature vector, and fusing the content feature vector and the temporal embedding feature vector into content representation information; Acquire a preset dynamic feature vector that is consistent with the dimension of the behavior feature vector, and load the preset dynamic feature vector and the content representation information into a dynamic feature processing layer in a target recommendation information determination network; Based on the dynamic feature processing layer and the content representation information, the preset dynamic feature vector is adjusted and optimized to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data.

7. The method according to claim 6, characterized in that The dynamic feature processing layer in the target recommendation information determination network includes A cross-weight focusing units and A internal weight focusing units, and the A cross-weight focusing units and the A internal weight focusing units are alternately arranged, and A≥1; The step of adjusting and optimizing the preset dynamic feature vector based on the dynamic feature processing layer and the content representation information to obtain the content data dynamic feature vector corresponding to the reader's book borrowing content data includes: Obtaining the execution feature of the Yth cross-weight focusing unit in the dynamic feature processing layer; If Y=1, the execution characteristics of the Yth cross-weight focusing unit include the content representation information and the preset dynamic feature vector; If Y≠1, the execution characteristics of the Yth cross-weight focusing unit include the content representation information and the output of the Y-1th internal weight focusing unit, Y≤A; Obtaining a first weighted array, a second weighted array, and a third weighted array corresponding to the Y-th cross-weight focusing unit, and performing a scalar product calculation on the first weighted array and the output of the Y-1-th internal weight focusing unit to obtain a second search array; Performing a scalar product calculation on the second weighted array and the content representation information to obtain a second anchor array, and performing a scalar product calculation on the third weighted array and the content representation information to obtain a second result array; Determine an output of the Yth cross-weight focusing unit based on the second search array, the second anchor array, and the second result array; Loading the output of the Yth cross-weight focusing unit to the Yth internal weight focusing unit in the dynamic feature processing layer, and performing internal focusing feature embedding on the output of the Yth cross-weight focusing unit based on the Yth internal weight focusing unit to obtain the output of the Yth internal weight focusing unit; The output of the Ath internal weight focusing unit in the dynamic feature processing layer is determined as the content data dynamic feature vector corresponding to the reader's book borrowing content data.

8. The method according to claim 1, characterized in that The step of embedding the multi-source feature vector to obtain a multi-source integrated embedding vector, and performing borrowing recommendation restoration mapping on the multi-source integrated embedding vector to obtain borrowing recommendation information matching the reader's book borrowing content data includes: Loading the multi-source feature vector into a multi-source embedding layer in a target recommendation information determination network, and performing forward and backward feature embedding on the multi-source feature vector based on the multi-source embedding layer to obtain a multi-source integrated embedding vector; Loading the multi-source integrated embedding vector into the recommendation mapping restoration layer in the target recommendation information determination network, and performing weighted information fusion on the multi-source integrated embedding vector based on the recommendation mapping restoration layer to obtain a focused weighted fusion vector; The focused weighted fusion vector is incrementally generated to obtain a recommendation confidence array, and borrowing recommendation information matching the reader's book borrowing content data is determined based on the recommendation confidence array.

9. The method according to claims 1 to 8, characterized in that: The method further comprises: Obtaining reader book borrowing content training data and borrowing behavior training data and training borrowing recommendation information corresponding to the reader book borrowing content training data; Based on the initial recommendation information, the content embedding layer in the network is determined to output the sample content feature vector corresponding to the reader's book borrowing content training data, and based on the initial recommendation information, the behavior embedding layer in the network is determined to output the sample behavior feature vector corresponding to the borrowing behavior training data; The content embedding layer and the behavior embedding layer are obtained by training based on a plurality of content behavior data tuples, wherein a content behavior data tuple includes a sub-book borrowing content training data and a borrowing behavior data; Obtaining a focus shielding matrix in an initial dynamic feature processing layer included in the initial recommendation information determination network, performing dynamic feature extraction on the sample content feature vector based on the focus shielding matrix and a cross-weight focusing unit and an internal weight focusing unit in the initial dynamic feature processing layer to obtain a sample dynamic feature vector, and fusing the sample dynamic feature vector with the sample behavior feature vector into a sample multi-source feature vector; Based on the initial recommendation information, the initial multi-source embedding layer in the network is used to embed the sample multi-source feature vector to obtain a sample integrated embedding vector, and based on the initial recommendation mapping reduction layer in the network, the initial recommendation information is used to output a borrowing recommendation information prediction confidence array corresponding to the sample integrated embedding vector; the borrowing recommendation information prediction confidence array is used to characterize the prediction confidence corresponding to each component data item in the training borrowing recommendation information; Based on the focus masking matrix, the borrowing recommendation information prediction confidence array and the training borrowing recommendation information, the parameters of the initial dynamic feature processing layer, the initial multi-source embedding layer and the initial recommendation mapping restoration layer are adjusted, and the initial recommendation information determination network containing the adjusted parameters is determined as the target recommendation information determination network.

10. A computer system, characterized in that: include: one or more processors; Memory; one or more computer programs; The one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more computer programs are executed by the processors, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Object recommendation system and method, electronic equipment and storage medium

    CN111695960A

  • Book recommendation method and device, computer equipment and readable storage medium

    CN114896500A

  • Book borrowing method and system based on digital human

    CN117035245A

  • Data acquisition method based on intelligent book recommendation system

    CN117056575A

  • Library data processing method and device, electronic equipment and storage medium

    CN118093660A

Cited By

  • Intelligent analysis method and system for multi-source book data, terminal and storage medium

    CN120471357A

  • Smart library reading promotion management method based on knowledge graph

    CN120525698A

  • Intelligent book recommendation method and device, medium and product

    CN121256022A