A method, apparatus, device, and storage medium for course resource recommendation based on an improved state-space model.

By improving the state-space model to process user course resource data, an efficient and accurate course recommendation list is generated, solving the problems of high computational cost and noise interference in traditional methods, and achieving more efficient and accurate course resource recommendation.

CN120744242BActive Publication Date: 2025-10-31湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511197310.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-10-31
Estimated Expiration
2045-08-26

AI Technical Summary

Technical Problem

Traditional course recommendation methods are computationally expensive when dealing with long sequences, and noise in user behavior interferes with the learning of true preferences, affecting recommendation accuracy.

Method used

User course resource data is collected, and interactive sequences are generated by time-series grouping and splicing. After data preprocessing, the data is mapped to a low-dimensional vector space. An improved state-space model using the frequency domain filtering module and the Mamba module is used for modeling, matching candidate course resources, and generating a recommendation list.

Benefits of technology

It reduces computational complexity, accurately captures user interests, and improves the efficiency and accuracy of course resource recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744242B_ABST
    Figure CN120744242B_ABST
Patent Text Reader

Abstract

This application discloses a course resource recommendation method, apparatus, device, and medium based on an improved state space model, relating to the field of learning resource recommendation technology. The method includes: collecting user course resource data, obtaining an interaction sequence and preprocessing it, mapping the user interaction sequence to a low-dimensional vector space, inputting it into an improved state space model to obtain target interest courses, matching them with a set of candidate course resources, calculating a recommendation score, and generating a recommendation list. This reduces computational complexity, accurately captures user interests, and improves the efficiency and accuracy of course resource recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of learning resource recommendation technology, and in particular to a method, apparatus, device, and storage medium for course resource recommendation based on an improved state-space model. Background Technology

[0002] Traditional course recommendation methods often employ Transformer-based models, such as SASRec and BERT4Rec. These models effectively model short-term and long-term dependencies between user behaviors through multi-head self-attention mechanisms, capturing sequence relevance to obtain corresponding course resource information. However, the self-attention calculation in traditional Transformer models involves the similarity dot product of all terms, leading to a sharp increase in training and inference costs when handling long sequences, making efficient deployment in large-scale online systems difficult. Furthermore, user behavior sequences inevitably contain a significant amount of noise, such as ad-hoc clicks, test browsing, and negative feedback, which do not reflect the user's true interests. However, traditional Transformer models assign non-zero weights to all past terms in their self-attention mechanism, causing noise to interfere with the learning of true preferences, thus affecting recommendation accuracy. Therefore, there is an urgent need for a course resource recommendation method to improve both efficiency and accuracy. Summary of the Invention

[0003] The main objective of this application is to provide a course resource recommendation method, apparatus, device, and storage medium based on an improved state-space model, aiming to solve the technical problem of how to improve the efficiency and accuracy of course resource recommendation.

[0004] To achieve the above objectives, this application proposes a course resource recommendation method based on an improved state-space model, including:

[0005] Collect users' course resource data;

[0006] Based on the course resource data, a course resource interaction sequence is obtained by processing it through time-series grouping and splicing.

[0007] The course resource interaction sequence is preprocessed to obtain the user interaction sequence;

[0008] The user interaction sequence is mapped to a low-dimensional vector space to obtain the target course feature sequence;

[0009] The target course feature sequence is input into a preset improved state space model to obtain the target interest course. The preset improved state space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module is used to perform Fourier transform on the target course feature sequence to obtain a time domain signal. The Mamba module is used to perform state space modeling on the time domain signal. The optimization module includes a normalization layer and a feedforward network layer.

[0010] A recommendation score is obtained by matching the target interest courses with the candidate course resource set, wherein the candidate course resource set is obtained by filtering the candidate course resources that meet the conditions from the total course resource set through preset filtering rules;

[0011] Based on the recommendation scores, recommended courses are output to generate a course recommendation list.

[0012] In one embodiment, the step of processing the course resource data through time-series grouping and concatenation to obtain a course resource interaction sequence includes:

[0013] User behavior data is extracted from the course resource data, including click data, browsing data, favorites data, and learning time data.

[0014] The user behavior data is grouped and aggregated by user ID to generate initial interaction records;

[0015] Perform a removal operation on the initial interaction record to obtain the removed interaction record;

[0016] The removed interaction records are segmented according to a preset time window to generate multiple interaction sub-sequences;

[0017] The multiple interaction subsequences are deduplicated according to the course resource ID to obtain the target interaction subsequence;

[0018] The target interaction subsequences are concatenated in chronological order to obtain the course resource interaction sequence.

[0019] In one embodiment, the step of mapping the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence includes:

[0020] Construct an embedding table for course resources, where each row in the embedding table corresponds to a low-dimensional embedding vector of a course resource;

[0021] The course resource ID in the user interaction sequence is searched in the embedding table to obtain the corresponding low-dimensional embedding vector.

[0022] The low-dimensional embedding vectors are arranged in the order of the user interaction sequence to form an initial course feature sequence;

[0023] The initial course feature sequence is normalized to obtain a normalized initial course feature sequence.

[0024] Apply regularization to the normalized initial course feature sequence to obtain a regularized initial course feature sequence;

[0025] The regularized initial course feature sequence is denoised to obtain the denoised initial course feature sequence.

[0026] The initial course feature sequence after noise reduction is used as the target course feature sequence.

[0027] In one embodiment, the step of inputting the target course feature sequence into a preset improved state space model to obtain the target interest course includes:

[0028] The target course feature sequence is input into the frequency domain filtering module in the preset improved state space model for processing to obtain the frequency domain filtered course feature sequence.

[0029] The frequency-domain filtered course feature sequence is input into the Mamba module in the preset improved state-space model to perform sequence modeling using the selective state-space mechanism, thereby obtaining sequence dependency features.

[0030] By alternately stacking multiple frequency domain filtering modules and Mamba modules, multiple frequency domain filtered course feature sequences and multiple sequence dependency features are obtained respectively;

[0031] The sequence dependency features are fused with the frequency-domain filtered course feature sequence to obtain enhanced course features;

[0032] The enhanced course features are normalized and transformed using a feedforward network to obtain the target interest course.

[0033] In one embodiment, the step of inputting the frequency-domain filtered course feature sequence into the Mamba module of a preset improved state-space model to perform sequence modeling using a selective state-space mechanism to obtain sequence dependency features includes:

[0034] Initialize the state parameters of the Mamba module, which include an initial state vector and a state transition matrix. The initial state vector is determined based on the course feature sequence after frequency domain filtering, and the state transition matrix is ​​used to describe the dynamic relationship between states.

[0035] The current state vector is obtained by processing the course feature sequence after frequency domain filtering and the initial state vector through the Mamba module.

[0036] The current state vector is linearly transformed using the state transition matrix to obtain the intermediate state vector.

[0037] The intermediate state vector is processed by a nonlinear activation function to obtain the updated state vector;

[0038] The updated state vector is mapped to sequence-dependent features through an output equation, which is obtained by combining a control input matrix and an observation matrix. The control input matrix is ​​used to adjust the influence of the input state vector, and the observation matrix is ​​used to map the state vector to sequence-dependent features.

[0039] In one embodiment, the step of matching the target interest courses and the candidate course resource set to obtain a recommendation score includes:

[0040] Obtain the embedding vector of each course resource in the candidate course resource set to form a candidate course resource embedding matrix;

[0041] The target interest course feature vector is obtained based on the target interest course;

[0042] Perform a vector dot product operation on the feature vector of the target interest course and the embedding vector of the candidate course resource to obtain the original matching score vector of each candidate course resource;

[0043] The original matching score vector is subjected to a numerical transformation operation to obtain a standardized recommendation score;

[0044] The candidate course resources are sorted in descending order based on the standardized recommendation scores to obtain the recommendation scores.

[0045] In one embodiment, the step of outputting recommended courses based on the recommendation score to generate a course recommendation list includes:

[0046] Obtain user's historical interaction data;

[0047] Based on the recommended scores, all candidate course resources are globally sorted from high to low to obtain a sorted list of course resources.

[0048] Select the preset number of course resources with the highest scores from the sorted list of course resources to generate an initial recommendation set;

[0049] Based on the user's historical interaction data and the initial recommendation set, the course resources that the user has already learned or has confirmed that they are not interested in are filtered to obtain an optimized recommendation set;

[0050] The course resources in the optimized recommendation set are reordered according to the recommendation scores to obtain the target recommendation sequence;

[0051] The course resource information in the target recommendation sequence is formatted to generate a course recommendation list.

[0052] Furthermore, to achieve the above objectives, this application also proposes a course resource recommendation device based on an improved state-space model, wherein the course resource recommendation device based on the improved state-space model includes:

[0053] The data acquisition module is used to collect users' course resource data;

[0054] The acquisition module is used to process the course resource data by time-series grouping and splicing to obtain the course resource interaction sequence;

[0055] The processing module is used to preprocess the course resource interaction sequence to obtain the user interaction sequence;

[0056] The sequence acquisition module is used to map the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence.

[0057] The feature extraction module is used to input the target course feature sequence into a preset improved state space model to obtain the target interest course. The preset improved state space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module is used to perform Fourier transform on the target course feature sequence to obtain a time domain signal. The Mamba module is used to perform state space modeling on the time domain signal. The optimization module includes a normalization layer and a feedforward network layer.

[0058] The matching module is used to match the target interest courses and the candidate course resource set to obtain a recommendation score, wherein the candidate course resource set is obtained by filtering the candidate course resources that meet the conditions from the total course resource set through preset filtering rules;

[0059] The results module is used to output recommended courses based on the recommendation scores and generate a course recommendation list.

[0060] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the course resource recommendation method based on the improved state-space model described above.

[0061] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the course resource recommendation method based on the improved state-space model described above.

[0062] This application collects user course resource data, obtains interaction sequences, preprocesses them, maps the user interaction sequences to a low-dimensional vector space, inputs them into an improved state space model to obtain target interest courses, matches them with a set of candidate course resources, calculates recommendation scores, and generates a recommendation list. This reduces computational complexity, accurately captures user interests, and improves the efficiency and accuracy of course resource recommendation. Attached Figure Description

[0063] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0064] Figure 1 This is a flowchart illustrating the first embodiment of the course resource recommendation method based on the improved state-space model of this application;

[0065] Figure 2 This is a diagram of the pre-set improved state space model framework of the first embodiment of the course resource recommendation method based on the improved state space model in this application;

[0066] Figure 3 This is a flowchart illustrating the second embodiment of the course resource recommendation method based on the improved state-space model of this application;

[0067] Figure 4 This is a flowchart illustrating the third embodiment of the course resource recommendation method based on the improved state-space model of this application;

[0068] Figure 5 This is a schematic diagram of the module structure of the course resource recommendation device based on the improved state space model, which is the first embodiment of the course resource recommendation method based on the improved state space model of this application.

[0069] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the course resource recommendation method based on the improved state-space model in the embodiments of this application.

[0070] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0071] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0072] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0073] Traditional course recommendation methods often employ Transformer-based models, such as SASRec and BERT4Rec. These models effectively model short-term and long-term dependencies between user behaviors through multi-head self-attention mechanisms, capturing sequence relevance to obtain corresponding course resource information. However, the self-attention calculation in traditional Transformer models involves the similarity dot product between all terms, resulting in O(L²) time and space complexity, where L is the sequence length. This leads to a sharp increase in training and inference costs when processing long sequences, making efficient deployment in large-scale online systems difficult. Furthermore, user behavior sequences inevitably contain a large amount of noise, such as temporary clicks, test browsing, and negative feedback, which do not reflect the user's true interests. However, traditional Transformer models assign non-zero weights to all past terms in their self-attention mechanisms, causing noise information to interfere with the learning of true preferences, thus affecting recommendation accuracy.

[0074] Therefore, this application proposes a course resource recommendation method based on an improved state-space model to solve the above problems. The main solution of this application embodiment is as follows: collect user course resource data; obtain course resource interaction sequences based on course resource data; perform data preprocessing on the course resource interaction sequences to obtain user interaction sequences; map the user interaction sequences to a low-dimensional vector space to obtain target course feature sequences; input the target course feature sequences into a preset improved state-space model to obtain target interest courses, wherein the preset improved state-space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module is used to perform Fourier transform on the initial course features to obtain time-domain signals, and the Mamba module is used to perform state-space modeling on the time-domain signals; match the target interest courses with a set of candidate course resources to obtain a recommendation score, wherein the set of candidate course resources is obtained by filtering qualified candidate course resources from the total course resource set through preset filtering rules; output recommended courses based on the recommendation score to generate a course recommendation list.

[0075] Based on the above, this application also provides a course resource recommendation method based on an improved state-space model, referring to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the course resource recommendation method based on the improved state-space model of this application. In this embodiment, the course resource recommendation method based on the improved state-space model includes steps S10 to S70:

[0076] Step S10: Collect the user's course resource data.

[0077] It's important to note that the collected course resource data encompasses user interactions with various course resources, such as the number of clicks, viewing duration, favorites, and comments for specific courses. This interaction data helps the system gain a deeper understanding of users' interest in different courses and their learning needs. By analyzing this data, user behavior profiles can be constructed, thereby uncovering users' potential interests and learning goals. For example, if a user frequently browses and studies courses in a particular field and spends a significant amount of time on related courses, it can be determined that the user has a high level of interest in that field and may wish to pursue further learning.

[0078] Furthermore, to ensure data quality and usability, the collected course resource data undergoes preprocessing. Preprocessing includes data cleaning, noise reduction, and normalization to remove invalid or erroneous data records, eliminate noise interference, and convert the data into a format suitable for subsequent processing. For example, user learning time data is normalized to a uniform range to facilitate comparison and analysis with other data. Through these preprocessing steps, the system obtains high-quality user interaction sequence data, providing a reliable data foundation for subsequent recommendation model training and recommendation result generation. Simultaneously, time series analysis is performed on user behavior data to capture dynamic changes in user interests. For example, by analyzing the frequency and duration of user access to course resources across different time periods, short-term fluctuations and long-term trends in user interests can be identified. This time series analysis helps the system adjust recommended content in a timely manner to adapt to changes in user interests, thereby providing more timely and personalized recommendation services.

[0079] Step S20: Based on the course resource data, process it by time-series grouping and splicing to obtain the course resource interaction sequence.

[0080] It should be noted that the specific step S20 includes: extracting user behavior data based on course resource data. Specifically, this involves obtaining user course resource data from the learning platform. This data covers user behavior data on the platform, including click data, browsing data, favorites data, and learning duration data. For example, click data can reflect a user's level of interest in the course, browsing data can show the depth of a user's exploration of the course content, favorites data indicates a user's long-term interest in the course, and learning duration data directly reflects a user's engagement in learning the course content. Next, the user behavior data is grouped and aggregated by user ID to generate initial interaction records. Specifically, this user behavior data is grouped and aggregated by user ID to generate initial interaction records for each user. The initial interaction records are the original records of user interactions with course resources, containing information such as user clicks, browsing, favorites, and learning duration for different courses. Following this, a filtering operation is performed on the initial interaction records to obtain filtered interaction records. Specifically, the filtering operation includes removing invalid data, abnormal data (such as extremely short browsing durations or repeated clicks), and incomplete records. For example, if a user's browsing time is too short, it might just be a mistaken click, and such records will be removed to ensure the accuracy and reliability of the interaction records. Then, the removed interaction records are segmented according to a preset time window, generating multiple interaction sub-sequences. Specifically, the time window setting can be determined based on the user's learning habits and platform usage patterns. For example, daily interaction behavior can be divided into several time periods, each time period being an interaction sub-sequence. This segmentation method can better capture user behavior patterns and interest changes across different time periods. The multiple interaction sub-sequences are then deduplicated according to the course resource ID to obtain the target interaction sub-sequence. Specifically, the purpose of deduplication is to remove duplicate records of the same course across different time periods, retaining the user's most recent interaction with that course. For example, if a user browses the same course multiple times in a day, the system will only retain the last browsing record to avoid duplicate information affecting subsequent recommendation algorithms. Finally, the target interaction sub-sequences are concatenated in chronological order to obtain the course resource interaction sequence. Specifically, the deduplicated interaction sub-sequences are concatenated in chronological order to obtain the complete course resource interaction sequence. This sequence not only preserves the chronological order of user behavior but also reflects the user's interest changes and learning path across different time periods. Through this processing method, the system can generate high-quality course resource interaction sequences, providing accurate, complete, and time-series-characteristic input for subsequent recommendation algorithms.

[0081] The above steps enable the extraction of high-quality course resource interaction sequences from complex course resource data. This data not only clearly reflects user behavior patterns and interests but also provides rich contextual information for recommendation systems, thereby enabling more personalized and accurate course recommendation services.

[0082] Step S30: Perform data preprocessing on the course resource interaction sequence to obtain the user interaction sequence.

[0083] It should be noted that the collected course resource interaction sequences undergo data cleaning. This process includes removing duplicate interaction records, filtering out invalid or abnormal data points (such as extremely short browsing durations or abnormally high ratings), and filling in missing values. For example, if a user's course browsing duration record is zero, it will be considered invalid data and removed; if a user's rating for a course exceeds the normal range, the system will mark it as abnormal data and process it accordingly.

[0084] Next, the cleaned data undergoes normalization. Normalization is the process of transforming data with different features to the same scale, which is crucial for subsequent model training and recommendation calculations. For example, learning time can range from a few seconds to several hours, while ratings may be between 1 and 5. Through normalization, these features will be transformed into a uniform range (such as 0 to 1), allowing the model to better process and compare this data.

[0085] Furthermore, the system will extract and enhance features from the normalized data. For example, the system may extract new features based on user behavior frequency, course category, and learning duration to enrich the data's expressive power. Simultaneously, the system will perform time-series analysis on user behavior data to capture dynamic changes in user interests. For instance, by analyzing user interaction behavior across different time periods, the system can identify short-term fluctuations and long-term trends in user interests.

[0086] Finally, the preprocessed data was organized into user interaction sequences. Each user interaction sequence contains the user's interaction behaviors with the course resources at different time periods. These behaviors are arranged in chronological order, forming a complete time series. The user interaction sequences not only preserve the chronological order of user behaviors but also reflect the user's interests and learning paths at different time periods.

[0087] The above preprocessing steps can transform the original course resource interaction sequence into a high-quality user interaction sequence, providing reliable, accurate, and time-series-characteristic input data for subsequent recommendation algorithms.

[0088] Step S40: Map the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence.

[0089] It's important to note that the specific steps are as follows: In this stage, each course resource is assigned a unique ID, a process typically handled by the embedding layer. The embedding layer is not a pre-trained model but is dynamically updated during model training. This means that the low-dimensional vectors in the embedding layer are continuously adjusted as training progresses to better capture user behavior features and preferences. The embedding layer assigns an initial random low-dimensional vector to each course resource; these vectors are unoptimized at the start of training. As the model trains, the vectors in the embedding layer are updated based on the gradient of the loss function through backpropagation. This update mechanism allows the vectors to gradually learn richer feature representations, thus more accurately reflecting user preferences for different course resources. An embedding table of course resources is constructed, with each row corresponding to a low-dimensional embedding vector for a course resource. These vectors not only capture the essential features of the course content but also reflect, to some extent, the similarities or differences between different courses. Next, based on the user interaction sequence... The course resource ID is looked up in the embedding table to obtain the corresponding low-dimensional embedding vector. This process is actually a table lookup operation, specifically represented as follows:

[0090]

[0091] in, For table lookup operations, matrix Each row corresponds to a course resource ID. The low-dimensional embedding vectors transform the user's actual interaction behavior into a form that the machine learning model can understand. Next, the low-dimensional embedding vectors are arranged in the order of the user interaction sequence to form the initial course feature sequence. After finding all corresponding embedding vectors, they are arranged in the chronological order of user interactions to form the initial course feature sequence. Then, the initial course feature sequence is normalized to obtain the normalized initial course feature sequence. Finally, regularization is applied to the normalized initial course feature sequence to obtain the regularized initial course feature sequence, specifically represented as follows:

[0092]

[0093] Dropout, a temporary dropout operation, randomly sets the elements of matrix E to zero with probability p (p<1), which helps the neural network model learn. LayerNorm, a layer normalization operation, standardizes the features of all dimensions within each time step (i.e., each row vector), eliminating numerical scale differences between different dimensions, accelerating convergence, and improving training robustness. After dropout and layer normalization, a robust user course interaction sequence representation is obtained. Finally, the regularized initial course feature sequence is denoised to obtain a denoised initial course feature sequence, which is used as the target course feature sequence. Specifically, the denoising process aims to remove outliers or noise points from the feature sequence. This noise may originate from abnormal user behavior or data collection errors. For example, smoothing algorithms or anomaly detection algorithms are used to identify and remove these noise points, resulting in a more robust feature sequence. Ultimately, the denoised initial course feature sequence is used as the target course feature sequence. This sequence not only preserves the temporal order of the user interaction sequence but also enhances the expressive power of the features through low-dimensional embedding vectors. Each vector in the target course feature sequence contains rich semantic information, which can more accurately reflect users' interest and preferences for courses.

[0094] Step S50: Input the target course feature sequence into the preset improved state space model to obtain the target interest course.

[0095] It should be noted that, as Figure 2The diagram shows a pre-defined improved state-space model framework. This model includes a frequency domain filtering module, a Mamba module, and an optimization module, which can effectively process course feature sequences and accurately capture user interests. The frequency domain filtering module performs a Fourier transform on the initial course features to obtain a time-domain signal, and the target course feature sequence is input into the frequency domain filtering module. This layer performs a Fourier transform on the initial course features, converting the time-domain signal into a frequency-domain signal. The Fourier transform can decompose complex time-domain signals into sinusoidal components of different frequencies, thus revealing the frequency characteristics of the signal. In the frequency domain, the high-frequency part of the signal usually corresponds to rapidly changing details, while the low-frequency part corresponds to the basic trend of the signal. By analyzing the frequency-domain signal, the main components and noise components in the signal can be more clearly identified. Simultaneously, in the frequency domain filtering module, the system uses learnable frequency domain filter weights to filter the frequency-domain signal. These filter weights can be automatically learned through the training process to adapt to different data characteristics and noise patterns. The filter's role is to suppress high-frequency noise components while retaining low-frequency signal components. In this way, random noise and outliers in user behavior data can be removed, thereby improving signal quality and stability. After frequency domain filtering, the signal is converted back to the time domain, resulting in a filtered time-domain signal. This process is called the inverse Fourier transform. The inverse Fourier transform recombines the frequency domain signal into a time-domain signal, preserving the characteristics of the filtered signal. At this point, the time-domain signal has removed most of the noise interference and can more accurately reflect the user's behavior patterns and interests.

[0096] Secondly, the Mamba module is used for state-space modeling of time-domain signals. Mamba is a sequence modeling module based on a state-space model, used to perform state-space modeling of time-domain signals. A state-space model is a mathematical model used to describe the dynamic changes of a system's state. In the Mamba module, the system state is updated through discretized state update equations, which can capture long-term dependencies in the sequence. The Mamba module utilizes the characteristics of the state-space model to model user behavior sequences, thereby extracting the dynamic changes in user interests. In the Mamba module, the state update at each time step is based on the current input signal and the state at the previous time step. The state update equations combine the transition matrix and the control input matrix, effectively capturing the time dependencies and dynamic changes in the sequence. In this way, the Mamba module can model the evolution of user interests, thus providing a more accurate basis for subsequent recommendations.

[0097] Finally, the output of the Mamba module enters the optimization module, which includes a normalization layer and a feedforward network layer. The optimization module further processes the output of the Mamba module to generate the final target interest curriculum. The optimization module typically includes an activation function and an output mapping function to convert the output of the Mamba module into a representation of the target interest curriculum. The activation function can be non-linear, such as ReLU or sigmoid functions, to introduce non-linear characteristics and enhance the model's expressive power. The output mapping function maps the processed signal to scores or probability distributions of the target interest curriculum, thereby determining the curriculum that the user is most interested in.

[0098] Step S60: Match the target interest courses with the candidate course resource set to obtain a recommendation score.

[0099] It should be noted that the aforementioned set of candidate course resources is obtained by filtering qualified candidate course resources from the total set of course resources using preset filtering rules. This process is accomplished through preset filtering rules, which can be set based on various factors such as course category, difficulty level, user ratings, and course duration. For example, if the target interest course belongs to the "Computer Science" category and has an "Intermediate" difficulty level, the system may filter out courses of the same category and difficulty level as candidate resources. Furthermore, high-quality courses can be further filtered based on indicators such as user ratings and completion rates to ensure the quality of the candidate course resource set.

[0100] Next, the target interest courses are matched with the set of candidate course resources. The matching process is based on the feature vectors of the target interest courses and the embedding vectors of the candidate course resources. Specifically, the system calculates the similarity between the feature vectors of the target interest courses and the embedding vectors of each candidate course resource, typically using methods such as dot product or cosine similarity. For example, dot product can measure the correlation between two vectors, while cosine similarity can measure the angular difference between two vectors, thus reflecting their degree of similarity.

[0101] To further optimize the matching results, the matching scores are normalized. Normalization adjusts the scores to a uniform range (e.g., 0-1) to facilitate comparison and ranking, resulting in a recommendation score. The normalized score more intuitively reflects the degree of match between candidate courses and courses reflecting the user's target interests. For example, a candidate course with a score of 0.9 may better match a user's interests than a candidate course with a score of 0.6. This step ensures the diversity and relevance of the recommendation results, while providing users with the course selections most suited to their interests.

[0102] Step S70: Output the recommended courses based on the recommendation scores to generate a course recommendation list.

[0103] It should be noted that all candidate courses are ranked based on the calculated recommendation scores. These scores are obtained through a matching process between the target interest courses and the set of candidate course resources, reflecting the relevance of each candidate course to the user's interests. Higher scores indicate that the candidate course better matches the user's interests and preferences. The system sorts the candidate courses from highest to lowest recommendation score, ensuring that the top of the recommendation list contains the courses the user is most likely to be interested in.

[0104] Further, step S70 includes: First, acquiring user historical interaction data, including past course browsing records, learning duration, ratings, and collection behavior, reflecting the user's learning habits and interests. Next, globally sorting all candidate course resources from highest to lowest recommendation score to obtain a sorted list of course resources. Then, selecting a preset number of course resources with the highest scores from the sorted list to generate an initial recommendation set. The preset number of recommendations can be adjusted according to actual needs and user experience to balance the diversity and accuracy of recommendations. Subsequently, filtering course resources that the user has already learned or has confirmed as uninteresting based on the user's historical interaction data and the initial recommendation set to obtain an optimized recommendation set. Specifically, automatically removing course resources that the user has already completed or explicitly marked as uninteresting to avoid duplicate recommendations or ineffective interruptions, thereby generating the optimized recommendation set. The course resources in the optimized recommendation set are then reordered according to their recommendation scores to obtain the target recommendation sequence. This reordering ensures that the optimized recommendations remain highly relevant while removing duplicate or irrelevant recommendations. Finally, the course resource information in the target recommendation sequence is formatted to generate a course recommendation list. Specifically, formatting involves extracting basic course information (such as course name, description, and duration) and presenting it to the user in a user-friendly manner. For example, on a learning platform, the recommendation list can be displayed on the user's personal homepage or learning path page, allowing users to quickly access and select courses of interest.

[0105] To further enhance user experience, recommended courses are personalized in their presentation and display. Each recommended course not only displays basic information such as course name, description, and duration, but also includes a reason for recommendation. This reason can be generated based on user interests, learning history, or the course's unique selling points. For example, if a user shows a strong interest in "data analysis," the reason might emphasize the course's advantages in improving data analysis skills. Furthermore, the recommendation list is dynamically adjusted based on user feedback. If a user clicks, saves, or rates a recommended course, this feedback is incorporated into the subsequent recommendation model to further optimize the results. This dynamic adjustment mechanism ensures that the recommendation system continuously adapts to changes in user interests over time, providing more accurate recommendations.

[0106] Finally, the generated course recommendation list is output in a user-friendly manner. The recommendation list can be presented to users in the form of a webpage, mobile application interface, or email. For example, on a learning platform, the recommendation list can be displayed on the user's personal homepage or learning path page, allowing users to quickly access and select courses of interest.

[0107] This embodiment collects user course resource data, obtains interaction sequences, preprocesses them, maps the user interaction sequences to a low-dimensional vector space, inputs them into an improved state-space model to obtain target interest courses, matches them with a set of candidate course resources, calculates recommendation scores, and generates a recommendation list. This method effectively filters noise, reduces computational complexity, and improves the efficiency and accuracy of course resource recommendation.

[0108] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 The course resource recommendation method based on the improved state-space model, step S50, further includes steps S201 to S205:

[0109] Step S201: The target course feature sequence is input into the frequency domain filtering module in the preset improved state space model for processing to obtain the frequency domain filtered course feature sequence.

[0110] It should be noted that the frequency domain filtering module, as a key component in improving the state-space model, processes the target course feature sequence, effectively removing noise and enhancing signal stability. The core operation of the frequency domain filtering module is the Fourier transform, which converts a time-domain signal into a frequency-domain signal. The Fourier transform decomposes complex time-domain signals into sinusoidal components of different frequencies, thus revealing the signal's frequency characteristics. In the frequency domain, the high-frequency components of a signal typically correspond to rapidly changing details, while the low-frequency components correspond to the signal's fundamental trends. By analyzing the frequency-domain signal, the main components and noise components in the signal can be identified more clearly.

[0111] Further, step S201 includes: performing a frequency domain transformation on the target course feature sequence using a Fourier transform to obtain the original frequency domain features. Specifically, a Fourier transform is performed on the target course feature sequence. The Fourier transform is a mathematical method for converting a time-domain signal into a frequency-domain signal, capable of decomposing complex time-domain signals into sinusoidal components of different frequencies. This process reveals the frequency characteristics of the signal, allowing the separation of high-frequency noise and low-frequency signal components. In the frequency domain, the high-frequency component typically corresponds to rapidly changing details, while the low-frequency component corresponds to the basic trend of the signal. Through the Fourier transform, the target course feature sequence is converted into the original frequency domain features. Then, the original frequency domain features are weighted based on complex filter weights to obtain filtered frequency domain features. Specifically, the original frequency domain features are weighted. This process utilizes learnable complex filter weights to weight the frequency domain signal to suppress high-frequency noise components and retain low-frequency signal components. The complex filter weights can be automatically learned through a training process to adapt to different data characteristics and noise patterns. The filter weights are adjusted according to the frequency distribution of the frequency domain features, resulting in lower weights for high-frequency components and higher weights for low-frequency components. In this way, the system can effectively remove random noise and outliers from user behavior data, thereby improving signal quality and stability. For example, if a user's behavior sequence contains brief, irrelevant clicks, these actions typically manifest as high-frequency noise in the frequency domain, which can be effectively suppressed using complex filter weights. Finally, the filtered frequency domain features are restored to the time domain using an inverse Fourier transform, yielding the frequency-domain filtered course feature sequence. Specifically, after weighting, the filtered frequency domain features are restored to the time domain signal using an inverse Fourier transform. The inverse Fourier transform recombines the frequency domain signal into a time domain signal, preserving the characteristics of the filtered signal. At this point, the time domain signal has removed most of the noise interference and can more accurately reflect user behavior patterns and interests. The time domain signal after the inverse Fourier transform is the frequency-domain filtered course feature sequence. This sequence not only preserves the temporal order of the user interaction sequence but also enhances the expressive power and stability of the features through frequency domain filtering. Ultimately, the system obtains a frequency-domain filtered sequence of course features. Each vector in this sequence contains rich semantic information, which can more accurately reflect users' interests and preferences for courses. The frequency-domain filtered course feature sequence not only removes noise interference but also retains the main features of user behavior, enabling subsequent modeling and recommendation to more accurately capture the dynamic changes in user interests.

[0112] Step S202: Input the frequency domain filtered course feature sequence into the Mamba module in the preset improved state space model to perform sequence modeling using the selective state space mechanism, and obtain sequence dependency features.

[0113] It should be noted that the specific steps are as follows: First, the state parameters of the Mamba module are initialized. These parameters include an initial state vector and a state transition matrix. The initial state vector is determined based on the frequency-domain filtered course feature sequence, while the state transition matrix describes the dynamic relationship between states. It is a learnable parameter matrix capable of capturing the time dependencies in the sequence. During model training, the state transition matrix is ​​automatically adjusted based on the data to better adapt to user behavior patterns. Next, the frequency-domain filtered course feature sequence and the initial state vector are processed by the Mamba module to obtain the current state vector. Specifically, the Mamba module receives the frequency-domain filtered course feature sequence as input and processes it in conjunction with the initial state vector. At each time step, the Mamba module updates the current state vector based on the current input feature vector and the state vector from the previous time step. This process is implemented through a state update equation, which combines the input feature vector and the previous state vector to dynamically reflect changes in user interest. Subsequently, the current state vector is linearly transformed using the state transition matrix to obtain an intermediate state vector. Specifically, at each time step, the Mamba module uses a state transition matrix to linearly transform the current state vector, obtaining an intermediate state vector. The state transition matrix maps the current state vector to a new state space, thereby capturing the dynamic changes between states. This linear transformation process is the core of the state-space model, effectively modeling long-term dependencies in a sequence. Then, the intermediate state vector is processed by a nonlinear activation function to obtain an updated state vector. Specifically, the Mamba module applies a nonlinear activation function to the intermediate state vector. Commonly used nonlinear activation functions include ReLU, Sigmoid, or Tanh. Nonlinear activation functions introduce nonlinear characteristics, enabling the model to better capture complex dynamic changes. After processing with the nonlinear activation function, the intermediate state vector is transformed into an updated state vector, which more accurately reflects the user's interest state at the current time step. Finally, the updated state vector is mapped to sequence dependency features through an output equation, which is based on a combination of the control input matrix and the observation matrix. Specifically, the Mamba module maps the updated state vector to sequence dependency features through the output equation. The output equation combines the control input matrix and the observation matrix. The control input matrix adjusts the influence of the input features, while the observation matrix maps the state vector to the final output features. The role of the output equation is to transform the state vector into feature vectors that reflect the user's interest dependencies; these feature vectors will serve as important inputs for subsequent recommendation calculations.

[0114] Through the steps described above, the Mamba module can effectively model the frequency-domain filtered course feature sequence, capture the dynamic changes in user interests, and generate feature vectors that reflect the dependencies of user interests.

[0115] Step S203: By alternately stacking multiple frequency domain filtering modules and Mamba modules, multiple frequency domain filtered course feature sequences and multiple sequence dependency features are obtained respectively.

[0116] It should be noted that by alternately stacking multiple frequency domain filtering modules and Mamba modules, the model can progressively remove noise while capturing dynamic changes in user interest. The course feature sequence processed by each layer of frequency domain filtering modules serves as the input to the next layer of Mamba modules, while the sequence dependency features generated by each layer of Mamba modules serve as the input to the next layer of frequency domain filtering modules. For each layer... Through Fourier transform, the target course feature sequence is converted into the original frequency domain features, specifically represented as follows:

[0117]

[0118] FFT stands for Fast Fourier Transform, which maps a fixed-length time sequence to a frequency domain representation of real-imaginary composite components. Indicates the index in the frequency domain. This indicates the index within the batch, in single-batch processing. The default value is 1. This represents the dimension of the embedding vector. The length of the target course feature sequence is given, yielding the frequency domain feature representation of the target course feature sequence. Then, the original frequency domain features are weighted based on the complex filter weights to obtain the filtered frequency domain features, specifically expressed as follows:

[0119]

[0120] in To perform frequency component analysis in the frequency domain and channel dimension The learnable complex filter weights on the frequency spectrum are used to weight the original spectrum, thereby suppressing or enhancing signals in specific frequency bands and filtering noise. The filtered frequency domain features are then reconstructed in the time domain using an inverse Fourier transform to obtain the frequency domain filtered frequency feature sequence, specifically represented as:

[0121]

[0122] Here, IFFT stands for Inverse Fast Fourier Transform, which transforms frequency domain features back into the time domain. The Mamba module uses state-space model-based sequence operators to efficiently model time-domain signals. The filtered frequency domain features are input into the modeling equation to obtain sequence-dependent features, specifically represented as:

[0123]

[0124] Where Mamba represents the Mamba module. This is the final output of the current layer.

[0125] This multi-layered stacking structure can progressively enhance the expressive power of features, ultimately generating high-quality feature sequences. These sequences can more comprehensively reflect user behavior patterns and interests, providing richer information for subsequent recommendations.

[0126] Step S204: The sequence dependency features are fused with the frequency domain filtered course feature sequence to obtain enhanced course features.

[0127] It should be noted that the frequency-domain filtered course feature sequence is concatenated with the sequence dependency features to form a higher-dimensional feature vector. The concatenated feature vector incorporates the stability of the frequency-domain filtered course feature sequence and the dynamism of the sequence dependency features, enabling the model to more comprehensively reflect user behavior patterns and interests.

[0128] Next, the concatenated feature vectors are weighted. The weighting coefficients can be automatically learned during training to adapt to different data characteristics and user behavior patterns. For example, if a certain feature has a greater impact on the recommendation results, the system will automatically assign it a higher weight. This weighting process further optimizes the fusion effect, enabling the model to better capture the dynamic changes and long-term dependencies in user interests.

[0129] To improve computational efficiency, the weighted feature vectors undergo dimensionality reduction. Dimensionality reduction can be achieved through Principal Component Analysis (PCA) or other dimensionality reduction techniques, retaining the principal components of the feature vectors and removing redundant information to obtain the processed feature vectors. The processed feature vectors are not only more compact but also improve the model's computational efficiency, enabling the model to generate recommendation results faster.

[0130] To further enhance the expressive power of features, the processed feature vectors are processed using nonlinear activation functions to obtain enhanced course features. Nonlinear activation functions introduce nonlinear characteristics, enabling the model to better capture complex dynamic changes. For example, activation functions such as ReLU, Sigmoid, or Tanh can be used. These activation functions not only enhance the expressive power of features but also improve the model's generalization ability, allowing the model to better adapt to different user behavior patterns.

[0131] The above series of processes generate enhanced course features, which can more accurately reflect users' interests and preferences, providing high-quality input for subsequent recommendation algorithms.

[0132] Step S205 involves normalizing the enhanced course features and performing feedforward network transformation to obtain the target interest course.

[0133] It should be noted that the characteristics of the enhanced courses are normalized, specifically represented as follows:

[0134]

[0135] in, This represents the normalization function. Normalization adjusts the length of the feature vector to a uniform scale, typically normalizing it to a unit vector (length 1). This process ensures that different features have the same scale in subsequent calculations, thus avoiding computational bias caused by differences in feature length. Normalized feature vectors are not only more stable but also improve the computational efficiency and accuracy of the model.

[0136] Next, the normalized enhanced course features are input into a feedforward network for transformation. A feedforward network is a simple neural network structure that performs non-linear transformations on input features, further enhancing their expressive power. Feedforward networks typically contain multiple layers of neurons, each layer introducing non-linear characteristics through an activation function. For example, activation functions such as ReLU, Sigmoid, or Tanh can be used. These activation functions not only enhance the expressive power of features but also improve the model's generalization ability, enabling it to better adapt to different user behavior patterns. In a feedforward network, each layer of neurons performs a weighted sum of the input features and performs a non-linear transformation through an activation function, specifically as follows:

[0137]

[0138] in, , The weight matrix is ​​a learnable matrix. The activation function is a Gaussian Error Linear Unit (GELU). This nonlinear transformation captures the complex relationships between features, enabling the model to more accurately reflect user interests and preferences. The output of the feedforward network is the feature representation of the target interest courses. These feature representations more accurately reflect user interests and preferences, providing high-quality input for subsequent recommendation algorithms. Finally, the target interest courses are generated based on the output of the feedforward network. This process is accomplished by calculating the similarity between the feature representation of the target interest courses and the candidate course resource set. Similarity can be calculated using methods such as dot product or cosine similarity, ultimately yielding a recommendation score for each candidate course. Based on the recommendation scores, the pre-defined number of recommendations with the highest scores is selected as the final recommendation result.

[0139] This embodiment removes noise through frequency domain filtering, models sequence dependencies using the Mamba module, alternately stacks multiple layers to enhance feature representation, fuses features to improve information richness, and uses normalization and feedforward networks to generate target interest courses. It effectively filters noise, accurately models the dynamic changes in user interests, improves recommendation accuracy and efficiency, and provides users with personalized course recommendations.

[0140] Based on the first embodiment of this application, in the third embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 4 The course resource recommendation step S60 based on the improved state-space model further includes steps S301 to S305:

[0141] Step S301: Obtain the embedding vector of each course resource in the candidate course resource set to form a candidate course resource embedding matrix.

[0142] It should be noted that the above steps first filter out a set of candidate course resources that meet the criteria from the total set of course resources. This filtering process is based on preset filtering rules, such as course category, difficulty level, user rating, and course duration. These rules ensure the quality and relevance of the candidate course resource set, making the recommendations more aligned with the user's interests and learning needs.

[0143] Next, for each course resource in the candidate course resource set, its embedding vector is obtained. The embedding vector is generated using a pre-trained embedding model that captures the semantic information and features of the course resource. For example, information such as the course category, difficulty level, content topic, and user ratings are encoded into the embedding vector. The embedding model is typically a deep learning model, such as Word2Vec, GloVe, or BERT, which can convert the text descriptions, tags, and other information of the course resource into low-dimensional vector representations. These vectors not only preserve the main features of the course resource but also capture the similarity between courses through vector operations.

[0144] Finally, the embedding vectors of each candidate course resource are arranged sequentially to form a candidate course resource embedding matrix. Each embedding vector is a row of the matrix, and each column of the embedding matrix corresponds to a dimension of the embedding vector. The candidate course resource embedding matrix is ​​a two-dimensional matrix, where each row represents a feature representation of a candidate course resource. This matrix not only contains rich semantic information about the candidate course resources but also enables efficient subsequent recommendation calculations through matrix operations.

[0145] Step S302: Obtain the feature vector of the target interest courses based on the target interest courses.

[0146] It's important to note that generating corresponding feature vectors based on the target interest courses typically involves multi-dimensional analysis of these courses, including course content, user behavior data, and contextual information. For example, the system might consider factors such as course category, difficulty level, user ratings, and learning duration, all of which collectively constitute the multi-dimensional features of the target interest courses.

[0147] Next, the system transforms these multi-dimensional features into low-dimensional feature vectors using an embedding model. An embedding model is a deep learning model that maps complex course features to a low-dimensional space while preserving the semantic similarity between courses. For example, models such as Word2Vec, GloVe, or BERT can convert course text descriptions, tags, and other information into low-dimensional vector representations. These vectors not only retain the main features of the courses but also capture the similarities between courses through vector operations.

[0148] To further optimize the quality of feature vectors, the generated feature vectors are normalized. Normalization adjusts the length of the vectors to a uniform scale, typically normalizing them to unit vectors (length 1). This step ensures that different feature vectors have the same scale in subsequent calculations, thus avoiding computational biases caused by differences in vector length. Normalized feature vectors are not only more stable but also improve the computational efficiency and accuracy of the model.

[0149] Finally, the normalized feature vector is used as the feature vector for the target interest course. This feature vector not only contains rich semantic information but also enables efficient subsequent recommendation calculations through vector operations. For example, by calculating the similarity between the target interest course feature vector and the candidate course resource embedding matrix, the system can quickly generate recommendation results.

[0150] Step S303: Perform a vector dot product operation on the feature vector of the target interest course and the embedding vector of the candidate course resources to obtain the original matching score vector of each candidate course resource.

[0151] It's important to note that the first step is to obtain the feature vector of the target interest course. This feature vector is obtained by embedding and normalizing the multi-dimensional features of the target interest course, accurately reflecting the user's current interests and preferences. The target interest course feature vector is a low-dimensional vector representation containing rich semantic information. Next, the embedding vector of each course resource in the candidate course resource set is obtained. These embedding vectors are also generated through a pre-trained embedding model, capturing the semantic features of each candidate course resource. The candidate course resource embedding vectors form an embedding matrix, where each row corresponds to the feature representation of a candidate course resource. Then, to evaluate the relevance of each candidate course resource to the target interest course, a vector dot product operation is performed between the target interest course feature vector and the embedding vector of each candidate course resource. The vector dot product operation is a commonly used similarity calculation method that measures the linear correlation between two vectors. Specifically, the vector dot product operation calculates the sum of the element-wise products of the two vectors, resulting in a scalar value. This scalar value reflects the similarity between the two vectors; a larger value indicates a higher similarity.

[0152] Finally, the original matching score vector for each candidate course resource is obtained through a vector dot product operation. The original matching score vector is a one-dimensional vector, where each element corresponds to the matching score of a candidate course resource. These matching scores reflect the relevance of each candidate course resource to the target interest course, providing an accurate basis for subsequent recommendation and ranking.

[0153] Step S304: Perform a numerical transformation operation on the original matching score vector to obtain the standardized recommendation score.

[0154] It should be noted that, firstly, the system calculates the original matching score vector for each candidate course resource. These scores are obtained by performing a vector dot product operation between the target interest course feature vector and the candidate course resource embedding vector, reflecting the relevance of each candidate course to the user's interests. However, the range of the original matching scores may vary depending on different feature vectors and calculation methods, which may lead to inconsistencies in the recommendation results.

[0155] To ensure the comparability and stability of the recommended scores, the system performs a numerical transformation operation on the original matching score vector. The purpose of this numerical transformation is to adjust the original matching scores to a uniform range, typically choosing [0, 1] or [-1, 1] as the target range. Common numerical transformation methods include normalization and standardization. Through this numerical transformation, the system converts the original matching score vector into a standardized recommended score vector. Each score in the standardized recommended score vector falls within a uniform range, possessing the same scale and distribution characteristics. This allows for direct comparison of scores between different candidate course resources, improving the stability and reliability of the recommendation results.

[0156] Step S305: Sort the candidate course resources in descending order according to the standardized recommendation scores to obtain the recommendation scores.

[0157] It's important to note that candidate course resources are sorted in descending order based on their standardized recommendation scores. This descending order sorts the resources from highest to lowest score, placing those most relevant to the user's interests at the top. This process is implemented using simple sorting algorithms, such as quicksort or mergesort, which can quickly sort large datasets. During the sorting process, the system generates a sorted list of candidate course resources. The position of each resource in the list is determined by its standardized recommendation score. This sorted list not only clearly demonstrates the relevance of the candidate course resources but also provides users with ordered recommendation options.

[0158] This embodiment obtains the embedding vector of each course resource in the candidate course resource set, forming an embedding matrix. Then, a feature vector is generated based on the target interest course. Next, the original matching score vector of each candidate course resource is calculated through vector dot product operation, and a standardized recommendation score is obtained through numerical transformation. Finally, a recommendation list is generated by sorting the recommendation scores in descending order, improving recommendation accuracy and user experience.

[0159] Based on the first embodiment of this application, this application also provides a course resource recommendation device based on an improved state-space model. Please refer to... Figure 5 The device includes:

[0160] The data acquisition module 10 is used to collect users' course resource data.

[0161] The acquisition module 20 is used to process course resource data by time-series grouping and splicing to obtain the course resource interaction sequence.

[0162] Processing module 30 is used to preprocess the course resource interaction sequence to obtain the user interaction sequence.

[0163] The sequence acquisition module 40 is used to map the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence.

[0164] The feature extraction module 50 is used to input the target course feature sequence into a preset improved state space model to obtain the target interest course. The preset improved state space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module is used to perform Fourier transform on the initial course features to obtain the time domain signal. The Mamba module is used to perform state space modeling on the time domain signal. The optimization module includes a normalization layer and a feedforward network layer.

[0165] The matching module 60 is used to match target interest courses with a set of candidate course resources to obtain a recommendation score. The set of candidate course resources is obtained by filtering the candidate course resources that meet the conditions from the total set of course resources through preset filtering rules.

[0166] Result module 70 is used to output recommended courses based on the recommendation scores and generate a course recommendation list.

[0167] The course resource recommendation device based on an improved state-space model provided in this application, employing the course resource recommendation method based on an improved state-space model in the above embodiments, can solve the technical problem of how to improve the efficiency and accuracy of course resource recommendation. Compared with the prior art, the beneficial effects of the course resource recommendation device based on an improved state-space model provided in this application are the same as the beneficial effects of the course resource recommendation method based on an improved state-space model provided in the above embodiments, and other technical features in the course resource recommendation device based on an improved state-space model are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.

[0168] In one embodiment, the acquisition module 20 is further configured to extract user behavior data based on course resource data, wherein the user behavior data includes click data, browsing data, collection data, and learning duration data; group and aggregate the user behavior data by user ID to generate initial interaction records; perform a removal operation on the initial interaction records to obtain removed interaction records; segment the removed interaction records according to a preset time window to generate multiple interaction sub-sequences; perform deduplication processing on the multiple interaction sub-sequences according to course resource ID to obtain target interaction sub-sequences; and concatenate the target interaction sub-sequences in chronological order to obtain a course resource interaction sequence.

[0169] In one embodiment, the sequence acquisition module 40 is further configured to construct an embedding table of course resources, where each row of the embedding table corresponds to a low-dimensional embedding vector of a course resource; search the embedding table according to the course resource ID in the user interaction sequence to obtain the corresponding low-dimensional embedding vector; arrange the low-dimensional embedding vectors in the order of the user interaction sequence to form an initial course feature sequence; normalize the initial course feature sequence to obtain a normalized initial course feature sequence; apply regularization to the normalized initial course feature sequence to obtain a regularized initial course feature sequence; denoise the regularized initial course feature sequence to obtain a denoised initial course feature sequence; and use the denoised initial course feature sequence as the target course feature sequence.

[0170] In one embodiment, the feature extraction module 50 is further configured to process the target course feature sequence by inputting it into a frequency domain filtering module in a preset improved state space model to obtain a frequency domain filtered course feature sequence; input the frequency domain filtered course feature sequence into a Mamba module in the preset improved state space model to perform sequence modeling using a selective state space mechanism to obtain sequence dependency features; obtain multiple frequency domain filtered course feature sequences and multiple sequence dependency features by alternately stacking multiple frequency domain filtering modules and Mamba modules respectively; fuse the sequence dependency features with the frequency domain filtered course feature sequences to obtain enhanced course features; and perform normalization processing and feedforward network transformation on the enhanced course features to obtain the target interest course.

[0171] In one embodiment, the feature extraction module 50 is further configured to initialize the state parameters of the Mamba module, the state parameters including an initial state vector and a state transition matrix. The initial state vector is determined based on the frequency-domain filtered course feature sequence, and the state transition matrix is ​​used to describe the dynamic relationship between states. Based on the frequency-domain filtered course feature sequence and the initial state vector, the Mamba module processes the data to obtain the current state vector. The state transition matrix is ​​used to perform a linear transformation on the current state vector to obtain an intermediate state vector. The intermediate state vector is processed by a nonlinear activation function to obtain an updated state vector. The updated state vector is mapped to sequence-dependent features through an output equation, the output equation being obtained based on a combination of a control input matrix and an observation matrix. The control input matrix is ​​used to adjust the influence of the input state vector, and the observation matrix is ​​used to map the state vector to sequence-dependent features.

[0172] In one embodiment, the matching module 60 is further configured to obtain the embedding vector of each course resource in the candidate course resource set to form a candidate course resource embedding matrix; obtain the target interest course feature vector based on the target interest course; perform a vector dot product operation on the target interest course feature vector and the candidate course resource embedding vector to obtain the original matching score vector of each candidate course resource; perform a numerical transformation operation on the original matching score vector to obtain a standardized recommendation score; and sort the candidate course resources in descending order based on the standardized recommendation score to obtain a recommendation score.

[0173] In one embodiment, the result module 70 is further configured to: acquire user historical interaction data; globally sort all candidate course resources from high to low according to recommendation scores to obtain a sorted list of course resources; select a preset number of course resources with the highest scores from the sorted list of course resources to generate an initial recommendation set; filter course resources that the user has already learned or confirmed as not interested in based on the user's historical interaction data and the initial recommendation set to obtain an optimized recommendation set; reorder the course resources in the optimized recommendation set according to recommendation scores to obtain a target recommendation sequence; and format the course resource information in the target recommendation sequence to generate a course recommendation list.

[0174] This application provides a course resource recommendation device based on an improved state-space model. The course resource recommendation device based on the improved state-space model includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the course resource recommendation method based on the improved state-space model in the above embodiment 1.

[0175] The following is for reference. Figure 6 This document illustrates a structural schematic diagram of a course resource recommendation device based on an improved state-space model, suitable for implementing embodiments of this application. The course resource recommendation device based on an improved state-space model in these embodiments may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 6 The course resource recommendation device based on the improved state-space model shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0176] like Figure 6 As shown, the course resource recommendation device based on the improved state-space model may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in the read-only memory 1002 (ROM) or a program loaded from the storage device 1003 into the random access memory 1004 (RAM). The RAM 1004 also stores various programs and data required for the operation of the course resource recommendation device based on the improved state-space model. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the curriculum resource recommendation device based on an improved state-space model to wirelessly or wiredly communicate with other devices to exchange data. Although various curriculum resource recommendation devices based on improved state-space models are shown in the figures, it should be understood that implementation or possession of all of them is not required. More or fewer of them may be implemented alternatively.

[0177] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable storage medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0178] The course resource recommendation device based on an improved state-space model provided in this application, employing the course resource recommendation method based on an improved state-space model in the above embodiments, can solve the technical problem of how to improve the efficiency and accuracy of course resource recommendation. Compared with the prior art, the beneficial effects of the course resource recommendation device based on an improved state-space model provided in this application are the same as the beneficial effects of the course resource recommendation method based on an improved state-space model provided in the above embodiments, and other technical features in this course resource recommendation device based on an improved state-space model are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.

[0179] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

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

[0181] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the course resource recommendation method based on the improved state-space model in the above embodiments.

[0182] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible storage medium containing or storing a program that can be executed by instructions, used by a device, or used in conjunction with it. The program code contained on the computer-readable storage medium may be transmitted using any suitable storage medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0183] The aforementioned computer-readable storage medium may be included in a course resource recommendation device based on an improved state-space model; or it may exist independently and not be assembled into a course resource recommendation device based on an improved state-space model.

[0184] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a course resource recommendation device based on an improved state-space model, enable the device to write computer program code for performing the operations of this application in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0185] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using dedicated hardware-based implementations that perform the specified functions or operations, or can be implemented using a combination of dedicated hardware and computer instructions.

[0186] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0187] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described course resource recommendation method based on an improved state-space model. This addresses the technical problem of improving the efficiency and accuracy of course resource recommendation. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the course resource recommendation method based on an improved state-space model provided in the above embodiments, and will not be elaborated upon here.

[0188] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the course resource recommendation method based on the improved state-space model described above.

[0189] The computer program product provided in this application can solve the technical problem of how to improve the efficiency and accuracy of course resource recommendation. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the course resource recommendation method based on the improved state space model provided in the above embodiments, and will not be repeated here.

[0190] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A course resource recommendation method based on an improved state-space model, characterized in that, include: Collect users' course resource data; Based on the course resource data, a course resource interaction sequence is obtained by processing it through time-series grouping and splicing. The course resource interaction sequence is preprocessed to obtain the user interaction sequence; The user interaction sequence is mapped to a low-dimensional vector space to obtain the target course feature sequence; The target course feature sequence is input into a preset improved state space model to obtain the target interest course. The preset improved state space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module is used to perform Fourier transform on the target course feature sequence to obtain a time domain signal. The Mamba module is used to perform state space modeling on the time domain signal. The optimization module includes a normalization layer and a feedforward network layer. A recommendation score is obtained by matching the target interest courses with the candidate course resource set, wherein the candidate course resource set is obtained by filtering the candidate course resources that meet the conditions from the total course resource set through preset filtering rules; Based on the recommendation scores, recommended courses are output to generate a course recommendation list; The step of inputting the target course feature sequence into a preset improved state space model to obtain the target interest course includes: The target course feature sequence is input into the frequency domain filtering module in the preset improved state space model for processing to obtain the frequency domain filtered course feature sequence. The frequency-domain filtered course feature sequence is input into the Mamba module in the preset improved state-space model to perform sequence modeling using the selective state-space mechanism, thereby obtaining sequence dependency features. By alternately stacking multiple frequency domain filtering modules and Mamba modules, multiple frequency domain filtered course feature sequences and multiple sequence dependency features are obtained respectively; The sequence dependency features are fused with the frequency-domain filtered course feature sequence to obtain enhanced course features; The enhanced course features are normalized and transformed using a feedforward network to obtain the target interest course.

2. The method as described in claim 1, characterized in that, The step of processing the course resource data through time-series grouping and concatenation to obtain the course resource interaction sequence includes: User behavior data is extracted from the course resource data, including click data, browsing data, favorites data, and learning time data. The user behavior data is grouped and aggregated by user ID to generate initial interaction records; Perform a removal operation on the initial interaction record to obtain the removed interaction record; The removed interaction records are segmented according to a preset time window to generate multiple interaction sub-sequences; The multiple interaction subsequences are deduplicated according to the course resource ID to obtain the target interaction subsequence; The target interaction subsequences are concatenated in chronological order to obtain the course resource interaction sequence.

3. The method as described in claim 1, characterized in that, The step of mapping the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence includes: Construct an embedding table for course resources, where each row in the embedding table corresponds to a low-dimensional embedding vector of a course resource; The course resource ID in the user interaction sequence is searched in the embedding table to obtain the corresponding low-dimensional embedding vector. The low-dimensional embedding vectors are arranged in the order of the user interaction sequence to form an initial course feature sequence; The initial course feature sequence is normalized to obtain a normalized initial course feature sequence. Apply regularization to the normalized initial course feature sequence to obtain a regularized initial course feature sequence; The regularized initial course feature sequence is denoised to obtain the denoised initial course feature sequence. The initial course feature sequence after noise reduction is used as the target course feature sequence.

4. The method as described in claim 1, characterized in that, The step of inputting the frequency-domain filtered course feature sequence into the Mamba module of a preset improved state-space model to perform sequence modeling using a selective state-space mechanism to obtain sequence dependency features includes: Initialize the state parameters of the Mamba module, which include an initial state vector and a state transition matrix. The initial state vector is determined based on the course feature sequence after frequency domain filtering, and the state transition matrix is ​​used to describe the dynamic relationship between states. The current state vector is obtained by processing the course feature sequence after frequency domain filtering and the initial state vector through the Mamba module. The current state vector is linearly transformed using the state transition matrix to obtain the intermediate state vector. The intermediate state vector is processed by a nonlinear activation function to obtain the updated state vector; The updated state vector is mapped to sequence-dependent features through an output equation, which is obtained by combining a control input matrix and an observation matrix. The control input matrix is ​​used to adjust the influence of the input state vector, and the observation matrix is ​​used to map the state vector to sequence-dependent features.

5. The method as described in claim 1, characterized in that, The step of matching the target interest courses and the candidate course resource set to obtain a recommendation score includes: Obtain the embedding vector of each course resource in the candidate course resource set to form a candidate course resource embedding matrix; The target interest course feature vector is obtained based on the target interest course; Perform a vector dot product operation on the feature vector of the target interest course and the embedding vector of the candidate course resource to obtain the original matching score vector of each candidate course resource; The original matching score vector is subjected to a numerical transformation operation to obtain a standardized recommendation score; The candidate course resources are sorted in descending order based on the standardized recommendation scores to obtain the recommendation scores.

6. The method as described in claim 1, characterized in that, The step of outputting recommended courses based on the recommendation score to generate a course recommendation list includes: Obtain user's historical interaction data; Based on the recommended scores, all candidate course resources are globally sorted from high to low to obtain a sorted list of course resources. Select the preset number of course resources with the highest scores from the sorted list of course resources to generate an initial recommendation set; Based on the user's historical interaction data and the initial recommendation set, the course resources that the user has already learned or has confirmed that they are not interested in are filtered to obtain an optimized recommendation set; The course resources in the optimized recommendation set are reordered according to the recommendation scores to obtain the target recommendation sequence; The course resource information in the target recommendation sequence is formatted to generate a course recommendation list.

7. A course resource recommendation device based on an improved state-space model, characterized in that, The device includes: The data acquisition module is used to collect users' course resource data; The acquisition module is used to process the course resource data by time-series grouping and splicing to obtain the course resource interaction sequence; The processing module is used to preprocess the course resource interaction sequence to obtain the user interaction sequence; The sequence acquisition module is used to map the user interaction sequence to a low-dimensional vector space to obtain the target course feature sequence. A feature extraction module is used to input the target course feature sequence into a preset improved state space model to obtain a target interest course. The preset improved state space model includes a frequency domain filtering module, a Mamba module, and an optimization module. The frequency domain filtering module performs a Fourier transform on the target course feature sequence to obtain a time-domain signal. The Mamba module performs state-space modeling on the time-domain signal. The optimization module includes a normalization layer and a feedforward network layer. The module is also used to process the target course feature sequence input into the frequency domain filtering module in the preset improved state space model to obtain a frequency-domain filtered course feature sequence. The frequency-domain filtered course feature sequence is then input into the Mamba module in the preset improved state space model to perform sequence modeling using a selective state-space mechanism, obtaining sequence dependency features. Multiple frequency-domain filtered course feature sequences and multiple sequence dependency features are obtained by alternately stacking multiple frequency-domain filtered modules and Mamba modules. The sequence dependency features are fused with the frequency-domain filtered course feature sequences to obtain enhanced course features. The enhanced course features are then normalized and transformed using a feedforward network to obtain the target interest course. The matching module is used to match the target interest courses and the candidate course resource set to obtain a recommendation score, wherein the candidate course resource set is obtained by filtering the candidate course resources that meet the conditions from the total course resource set through preset filtering rules; The results module is used to output recommended courses based on the recommendation scores and generate a course recommendation list.

8. A course resource recommendation device based on an improved state-space model, characterized in that, The device includes: a memory, a processor, and a course resource recommendation program based on an improved state-space model stored on the memory and running on the processor, the course resource recommendation program based on the improved state-space model being configured to implement the steps of the course resource recommendation method based on an improved state-space model as described in any one of claims 1-6.

9. A storage medium, characterized in that, The storage medium stores a course resource recommendation program based on an improved state-space model. When the course resource recommendation program based on the improved state-space model is executed by the processor, it implements the steps of the course resource recommendation method based on an improved state-space model as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Charging pile charging charge prediction method, system and device based on Internet of Things

    CN118572699A

  • Epilepsy prediction method based on adaptive space-time attention and dynamic fusion network

    CN119344751A