Collaborative filtering recommendation method and device, computer equipment and storage medium
By constructing a feature matrix and generating a collaborative filtering fusion model, combining user operation records, personalized recommendation course information is provided, and the problem that traditional collaborative filtering recommendation methods cannot meet the training needs of engineers at different profession levels is solved, and the effect of personalized recommendation and improving user participation is achieved.
Patent Information
- Application Number
- CN202510090622.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-06-13
AI Technical Summary
Traditional collaborative filtering recommendation methods cannot meet the diverse needs of engineers of different occupational levels in the simulation training process, especially the challenges caused by the different training needs of junior, intermediate and senior engineers.
Provide a collaborative filtering recommendation method, by obtaining user behavior data and course data, building feature matrix, analyzing the matrix to obtain recommendation candidates and hidden states, generating collaborative filtering fusion models, and inputting user operation records into the model to obtain personalized recommended course information.
This method can accurately analyze the preferences of the training and learning courses based on the user's operation records, generate a personalized recommendation list in real time, meet the specific learning needs of users, and improve the user's participation and stickiness in the system.
Smart Images

Figure CN120144879A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of simulation training, and particularly to a collaborative filtering recommendation method, apparatus, computer device, and storage medium. Background Art
[0002] With the advent of Industry 4.0, simulation training technology has become increasingly important in various industries. In the field of simulation training, the training needs of engineers at different professional levels (such as junior, intermediate, and senior engineers) vary. Junior engineers usually need to master basic knowledge and skills, such as the operation of common simulation tools and software; intermediate engineers need to have certain problem-solving abilities and be able to participate in simulation tasks in actual projects; senior engineers need in-depth professional knowledge and be able to conduct complex simulation analysis and optimization. Therefore, traditional collaborative filtering recommendation methods are gradually unable to meet the diverse needs of users during the learning process. Summary of the Invention
[0003] Based on this, in view of the above technical problems, it is necessary to provide a collaborative filtering recommendation method, apparatus, computer device, computer-readable storage medium, and computer program product that can recommend courses according to user operation records.
[0004] In a first aspect, this application provides a collaborative filtering recommendation method. The method includes:
[0005] Obtain the behavior data and course data of the user;
[0006] Construct a feature matrix according to the behavior data and the course data;
[0007] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0008] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0009] Input the operation record of the user into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0010] In one embodiment, clean the behavior data and the course data to obtain a cleaning result;
[0011] Use the behavior data in the cleaning result as columns and the course data as rows to construct a first feature matrix;
[0012] Use the course data in the cleaning result as columns and rows to construct a second feature matrix;
[0013] Construct a feature matrix according to the first feature matrix and the second feature matrix.
[0014] In one embodiment, the behavior data is arranged in chronological order to form a behavior sequence;
[0015] The sliding window technique is used to analyze the behavior sequence to extract temporal features;
[0016] The LSTM model is used to model the temporal features to obtain recommended candidates and hidden states.
[0017] In one embodiment, the course data is calculated by cosine similarity measurement to obtain course similarity;
[0018] According to the course similarity, a matrix is filled to construct a second feature matrix.
[0019] In one embodiment, the operation record is input into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates;
[0020] The dot product of the hidden state and the recommended candidates is calculated to obtain an attention score;
[0021] The attention score is normalized to obtain an attention weight;
[0022] The attention weight is weighted to obtain candidate courses;
[0023] According to the candidate courses, the corresponding recommended course information is obtained.
[0024] In one embodiment, the loss of the recommended course information is calculated to obtain a loss function;
[0025] According to the loss function, the collaborative filtering fusion model is iteratively updated.
[0026] In a second aspect, the present application also provides a collaborative filtering recommendation device. The device includes:
[0027] A data acquisition module, configured to acquire the behavior data and course data of a user;
[0028] A matrix construction module, configured to construct a feature matrix according to the behavior data and the course data;
[0029] A matrix analysis module, configured to analyze the feature matrix to obtain recommended candidates and hidden states;
[0030] A model generation module, configured to generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0031] A course recommendation module, configured to input the operation record of a user into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0032] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtain the user's behavior data and course data;
[0034] Construct a feature matrix according to the behavior data and the course data;
[0035] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0036] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0037] Input the user's operation record into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0038] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0039] Obtain the user's behavior data and course data;
[0040] Construct a feature matrix according to the behavior data and the course data;
[0041] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0042] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0043] Input the user's operation record into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0044] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0045] Obtain the user's behavior data and course data;
[0046] Construct a feature matrix according to the behavior data and the course data;
[0047] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0048] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0049] Record the user's operation records and input them into the collaborative filtering fusion model to obtain corresponding recommended course information.
[0050] The above-mentioned collaborative filtering recommendation method, device, computer device and storage medium collect behavior data and course data, collect and integrate the data to build a collaborative filtering fusion model to accurately analyze the user's training and learning course preferences. According to the trained model, a personalized recommendation list for the user is generated in real time, and the courses that best meet the user's needs are recommended to the user. Record the user's feedback on the recommended courses. By integrating different algorithms and technologies, it helps to meet the user's specific learning needs and improve the user's participation and stickiness in the system. Description of the Drawings
[0051] Figure 1 It is an application environment diagram of the collaborative filtering recommendation method in an embodiment;
[0052] Figure 2 It is a flowchart of the collaborative filtering recommendation method in an embodiment;
[0053] Figure 3 It is a schematic diagram of the TF-IDF algorithm steps of the collaborative filtering recommendation method in an embodiment;
[0054] Figure 4 It is a structural block diagram of the collaborative filtering recommendation device in an embodiment;
[0055] Figure 5 It is an internal structure diagram of a computer device in an embodiment. Detailed Embodiments
[0056] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application and are not used to limit the present application.
[0057] The collaborative filtering recommendation method provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or placed on the cloud or other network servers. The server 104 obtains the operation records of the user and inputs them into the collaborative filtering fusion model to obtain the corresponding recommended course information. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be instrument meters, sensor devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0058] In one embodiment, as Figure 2 shown, a collaborative filtering recommendation method is provided. Taking the server 104 in Figure 1 as an example, the method includes the following steps:
[0059] Step 202, obtain the behavior data and course data of the user.
[0060] Among them, the behavior data includes click records, course ratings, learning time, training occupations, completion status, etc. The course data includes course difficulty, teaching methods, etc.
[0061] Specifically, collecting the behavior data and course data of the user from the logs of the learning platform or through the operation records of the user can more comprehensively understand the user's needs and course situation.
[0062] Step 204, construct a feature matrix according to the behavior data and the course data.
[0063] Specifically, clean the behavior data and the course data to obtain a cleaning result; use the behavior data in the cleaning result as columns and the course data as rows to construct a first feature matrix; use the course data in the cleaning result as columns and rows to construct a second feature matrix; construct a feature matrix according to the first feature matrix and the second feature matrix.
[0064] Further, use the behavior data in the cleaning result as columns and the course data as rows, and place the user's interaction with the course in the corresponding cells to construct a first feature matrix. Among them, the course rating can be directly used with this value, while for the learning time or completion status, after processing using the binary method, it is filled into the corresponding cells. If there are missing values in the cells, set them to 0 to indicate no interaction.
[0065] Taking the course data in the cleaning result as columns and rows, constructing the second feature matrix includes: performing cosine similarity measurement calculation on the course data to obtain course similarity; filling the matrix according to the course similarity to construct the second feature matrix.
[0066] Specifically, taking the course data in the cleaning result as columns and rows, and the intersection as the course similarity, using cosine similarity measurement to calculate the similarity between courses. The calculation formula is as follows:
[0067]
[0068] Where A and B are two vectors. A·B is the dot product (inner product) of the vectors. ||A|| and ||B|| are the norms (norms) of the vectors.
[0069] Filling the matrix with the course similarity to construct the second feature matrix.
[0070] In one embodiment, as Figure 3 shown, using the weighted TF method, performing logarithmic transformation on some words in the behavior data and course data to reduce the excessive influence of words with too high frequencies; in addition, on this basis, using smoothing technology to introduce IDF calculation and introducing pseudo-counts in the IDF formula to avoid the situation where the denominator is zero. The improved algorithm process is as follows:
[0071] The first step: Cleaning the behavior data and course data, removing irrelevant characters such as special symbols and numbers.
[0072] The second step: Segmenting the text to separate words and phrases.
[0073] The third step: Excluding common useless words. Excluding common useless words can improve the accuracy.
[0074] The fourth step: TF calculation.
[0075]
[0076] The fifth step: IDF calculation.
[0077]
[0078] The sixth step: TF-IDF calculation.
[0079] TF-IDF(t) = TF(t) × IDF(t)
[0080] The seventh step: Outputting the processed result, that is, the cleaning result.
[0081] Step 206, analyzing the feature matrix to obtain recommended candidates and hidden states.
[0082] Specifically, arrange the behavior data in chronological order to form a behavior sequence; use the sliding window technique to analyze the behavior sequence and extract temporal features; use the LSTM model to model the temporal features to obtain recommended candidates and hidden states.
[0083] In one embodiment, due to different focuses on some information in different periods, the LSTM model is used to screen the short-term needs of users. The temporal features formed by arranging the behavior data in chronological order are input into the LSTM model for modeling, and recommended candidates and hidden states are output.
[0084] Step 208, generate a collaborative filtering fusion model according to the recommended candidates and the hidden states.
[0085] Specifically, input the operation record into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates; perform a dot product calculation on the hidden state and the recommended candidates to obtain an attention score; perform normalization processing on the attention score to obtain an attention weight; weight the attention weight to obtain candidate courses; obtain corresponding recommended course information according to the candidate courses to generate a collaborative filtering fusion model. Find the optimal result in the current situation, thereby improving the accuracy and efficiency of the model, which is not only based on global similarity but also meets the short-term and immediate needs of users.
[0086] Generating the collaborative filtering fusion model according to the recommended candidates and the hidden states includes: calculating the loss of the recommended course information to obtain a loss function; iteratively updating the collaborative filtering fusion model according to the loss function.
[0087] Specifically, use the cross-entropy loss function to calculate the error between the model output and the actual user feedback for the recommended course information to obtain a loss function, and backpropagate the loss value into the model through backpropagation, thereby continuously optimizing and iterating the weight values of each layer in the model, and iteratively updating the collaborative filtering fusion model. Enable the recommendation system to gradually improve its performance driven by user feedback. The ultimate goal is to generate personalized recommendation results that meet the real-time needs of users.
[0088] Step 210, input the operation record of the user into the collaborative filtering fusion model to obtain corresponding recommended course information.
[0089] In the above collaborative filtering recommendation method, by collecting behavioral data and course data, collecting and integrating the data to construct a collaborative filtering fusion model to accurately analyze the training course preferences of users, according to the trained model, generating a personalized recommendation list for users in real time, recommending the courses that best meet the user's needs to the users, recording the feedback of users on the recommended courses, and by integrating different algorithms and technologies, it helps to meet the specific learning needs of users and improve the participation and stickiness of users on the system.
[0090] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps do not necessarily need to be executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages do not necessarily need to be executed at the same time, but can be executed at different times. The execution order of these steps or stages does not necessarily need to be sequential, but can be executed alternately or alternately with at least a part of other steps or steps in other steps.
[0091] Based on the same inventive concept, an embodiment of the present application also provides a collaborative filtering recommendation device for implementing the above-mentioned collaborative filtering recommendation method. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the collaborative filtering recommendation device provided below can refer to the limitations on the collaborative filtering recommendation method in the above text, and will not be repeated here.
[0092] In one embodiment, as Figure 4 shown, a collaborative filtering recommendation device is provided, including: a data acquisition module 410, a matrix construction module 420, a matrix analysis module 430, a model generation module 440, and a course recommendation module 450, where:
[0093] The data acquisition module 410 is used to acquire the behavioral data and course data of users.
[0094] The matrix construction module 420 is used to construct a feature matrix according to the behavioral data and the course data.
[0095] The matrix analysis module 430 is used to analyze the feature matrix to obtain recommended candidates and hidden states.
[0096] The model generation module 440 is used to generate a collaborative filtering fusion model according to the recommended candidates and the hidden states.
[0097] The course recommendation module 450 is used to input the operation records of the user into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0098] The matrix construction module 420 is also used to clean the behavior data and the course data to obtain a cleaning result;
[0099] Use the behavior data in the cleaning result as columns and the course data as rows to construct a first feature matrix;
[0100] Use the course data in the cleaning result as columns and rows to construct a second feature matrix;
[0101] Construct a feature matrix according to the first feature matrix and the second feature matrix.
[0102] The matrix analysis module 430 is also used to arrange the behavior data in chronological order to form a behavior sequence;
[0103] Adopt the sliding window technique to analyze the behavior sequence and extract the time series features;
[0104] Use the LSTM model to model the time series features to obtain recommended candidates and hidden states.
[0105] The matrix analysis module 430 is also used to calculate the cosine similarity measure of the course data to obtain the course similarity;
[0106] Fill the matrix according to the course similarity to construct a second feature matrix.
[0107] The course recommendation module 450 is also used to input the operation records into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates;
[0108] Perform a dot product calculation on the hidden state and the recommended candidates to obtain an attention score;
[0109] Normalize the attention score to obtain an attention weight;
[0110] Weight the attention weight to obtain candidate courses;
[0111] Obtain the corresponding recommended course information according to the candidate courses.
[0112] The course recommendation module 450 is also used to calculate the loss of the recommended course information to obtain a loss function;
[0113] Iteratively update the collaborative filtering fusion model according to the loss function.
[0114] Each module in the above collaborative filtering recommendation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in or independent of a processor in a computer device in the form of hardware, or stored in a memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0115] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 5 shown. The computer device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store course recommendation data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a collaborative filtering recommendation method.
[0116] Those skilled in the art can understand that Figure 5 the structure shown in
[0117] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0118] Obtain the behavior data and course data of the user;
[0119] Construct a feature matrix according to the behavior data and the course data;
[0120] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0121] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0122] Input the operation record of the user into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0123] In one embodiment, when the processor executes the computer program, it also implements the following steps: Clean the behavior data and the course data to obtain a cleaning result;
[0124] Take the behavior data in the cleaning result as columns and the course data as rows to construct the first feature matrix;
[0125] Take the course data in the cleaning result as columns and rows to construct the second feature matrix;
[0126] Construct a feature matrix according to the first feature matrix and the second feature matrix.
[0127] In one embodiment, when the processor executes the computer program, the following steps are further implemented: arrange the behavior data in chronological order to form a behavior sequence;
[0128] Adopt the sliding window technique to analyze the behavior sequence and extract the temporal features;
[0129] Use the LSTM model to model the temporal features to obtain recommended candidates and hidden states.
[0130] In one embodiment, when the processor executes the computer program, the following steps are further implemented: perform cosine similarity measurement calculation on the course data to obtain the course similarity;
[0131] Fill the matrix according to the course similarity to construct the second feature matrix.
[0132] In one embodiment, when the processor executes the computer program, the following steps are further implemented: input the operation record into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates;
[0133] Perform dot product calculation on the hidden state and the recommended candidates to obtain the attention score;
[0134] Normalize the attention score to obtain the attention weight;
[0135] Weight the attention weight to obtain the candidate courses;
[0136] Obtain the corresponding recommended course information according to the candidate courses.
[0137] In one embodiment, when the processor executes the computer program, the following steps are further implemented: calculate the loss of the recommended course information to obtain the loss function;
[0138] Iteratively update the collaborative filtering fusion model according to the loss function.
[0139] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any one of the collaborative filtering recommendation methods in the above embodiments is implemented.
[0140] Obtain the user's behavior data and course data;
[0141] Construct a feature matrix based on the behavior data and the course data;
[0142] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0143] Generate a collaborative filtering fusion model based on the recommended candidates and the hidden states;
[0144] Input the user's operation record into the collaborative filtering fusion model to obtain the corresponding recommended course information.
[0145] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Clean the behavior data and the course data to obtain a cleaning result;
[0146] Use the behavior data in the cleaning result as columns and the course data as rows to construct a first feature matrix;
[0147] Use the course data in the cleaning result as columns and rows to construct a second feature matrix;
[0148] Construct a feature matrix based on the first feature matrix and the second feature matrix.
[0149] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Arrange the behavior data in chronological order to form a behavior sequence;
[0150] Analyze the behavior sequence using a sliding window technique to extract temporal features;
[0151] Use an LSTM model to model the temporal features to obtain recommended candidates and hidden states.
[0152] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Perform cosine similarity measurement calculation on the course data to obtain course similarity;
[0153] Fill the matrix according to the course similarity to construct a second feature matrix.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: Input the operation record into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates;
[0155] Perform a dot product calculation on the hidden state and the recommended candidates to obtain an attention score;
[0156] Normalize the attention score to obtain an attention weight;
[0157] Weight the attention weights to obtain candidate courses;
[0158] Obtain corresponding recommended course information according to the candidate courses.
[0159] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculate the loss of the recommended course information to obtain a loss function;
[0160] Iteratively update the collaborative filtering fusion model according to the loss function.
[0161] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0162] Obtain the behavior data and course data of the user;
[0163] Construct a feature matrix according to the behavior data and the course data;
[0164] Analyze the feature matrix to obtain recommended candidates and hidden states;
[0165] Generate a collaborative filtering fusion model according to the recommended candidates and the hidden states;
[0166] Input the operation record of the user into the collaborative filtering fusion model to obtain corresponding recommended course information.
[0167] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: clean the behavior data and the course data to obtain a cleaning result;
[0168] Use the behavior data in the cleaning result as columns and the course data as rows to construct a first feature matrix;
[0169] Use the course data in the cleaning result as columns and rows to construct a second feature matrix;
[0170] Construct a feature matrix according to the first feature matrix and the second feature matrix.
[0171] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: arrange the behavior data in chronological order to form a behavior sequence;
[0172] Adopt a sliding window technique to analyze the behavior sequence and extract temporal features;
[0173] Use an LSTM model to model the temporal features to obtain recommended candidates and hidden states.
[0174] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: performing a cosine similarity metric calculation on the course data to obtain a course similarity;
[0175] Filling a matrix according to the course similarity to construct a second feature matrix.
[0176] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: inputting the operation record into the collaborative filtering fusion model to obtain the hidden state and the recommended candidates;
[0177] Performing a dot product calculation on the hidden state and the recommended candidates to obtain an attention score;
[0178] Normalizing the attention score to obtain an attention weight;
[0179] Weighting the attention weight to obtain candidate courses;
[0180] Obtaining corresponding recommended course information according to the candidate courses.
[0181] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented: calculating a loss on the recommended course information to obtain a loss function;
[0182] Iteratively updating the collaborative filtering fusion model according to the loss function.
[0183] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0184] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.
[0185] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0186] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A collaborative filtering recommendation method, characterized in that: The method comprises: Obtain user behavior data and course data; constructing a feature matrix according to the behavior data and the course data; Analyze the feature matrix to obtain recommendation candidates and hidden states; generating a collaborative filtering fusion model according to the recommendation candidates and the latent state; The user's operation records are input into the collaborative filtering fusion model to obtain the corresponding recommended course information.
2. The method according to claim 1, characterized in that The constructing of a feature matrix according to the behavior data and the course data comprises: Cleaning the behavior data and the course data to obtain a cleaning result; The behavior data in the cleaning results are used as columns and the course data as rows to construct the first feature matrix; The course data in the cleaning results are used as columns and rows to construct the second feature matrix; A feature matrix is constructed according to the first feature matrix and the second feature matrix.
3. The method according to claim 2, characterized in that Analyzing the feature matrix to obtain recommendation candidates and hidden states includes: Arranging the behavior data in chronological order to form a behavior sequence; The behavior sequence is analyzed using a sliding window technique to extract time series features; The time series features are modeled using the LSTM model to obtain recommendation candidates and hidden states.
4. The method according to claim 2, characterized in that: The process of using the course data in the cleaning result as columns and rows to construct the second feature matrix includes: Perform cosine similarity measurement calculation on the course data to obtain course similarity; The matrix is filled according to the course similarities to construct a second feature matrix.
5. The method according to claim 1, characterized in that The generating of the collaborative filtering fusion model according to the recommendation candidate items and the hidden state comprises: Inputting the operation record into the collaborative filtering fusion model to obtain the hidden state and the recommendation candidate items; Performing a dot product calculation on the hidden state and the recommendation candidate to obtain an attention score; Normalizing the attention score to obtain an attention weight; Weighting the attention weights to obtain candidate courses; According to the candidate courses, corresponding recommended course information is obtained.
6. The method according to claim 1, characterized in that The generating of the collaborative filtering fusion model according to the recommendation candidate items and the hidden state comprises: Perform loss calculation on the recommended course information to obtain a loss function; The collaborative filtering fusion model is iteratively updated according to the loss function.
7. A collaborative filtering recommendation device, characterized in that: The device comprises: Data acquisition module, used to obtain user behavior data and course data; A matrix construction module, used for constructing a feature matrix according to the behavior data and the course data; A matrix analysis module, used to analyze the feature matrix to obtain recommendation candidates and latent states; A model generation module, used for generating a collaborative filtering fusion model according to the recommendation candidates and the latent state; The course recommendation module is used to input the user's operation records into the collaborative filtering fusion model to obtain the corresponding recommended course information.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Database interaction recommendation optimization method and device, equipment and storage medium
CN120448418A