Personalized learning recommendation method, storage medium and device based on SaaS architecture
The personalized learning recommendation method on SaaS architecture addresses limitations in traditional systems by using improved momentum contrast models to analyze user data, enhancing recommendation accuracy and adaptability.
Patent Information
- Application Number
- CN202311667917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-07
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-12-07
AI Technical Summary
Traditional online education recommendation systems face limitations due to limited data sources, single recommendation strategies, and poor scalability, leading to inaccurate, non-personalized, and inefficient recommendations.
A personalized learning recommendation method based on SaaS architecture, utilizing historical learning data, improved momentum contrast models, and data-driven approaches to analyze user behavior and needs, incorporating features like one-hot encoding, time segmentation, and dynamic loss function calculations to enhance recommendation accuracy.
The method provides comprehensive and personalized recommendations by accurately capturing user interests and needs, improving scalability and resource utilization efficiency, and adapting to dynamic learning behaviors.
Smart Images

Figure CN117688237B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information recommendation, and in particular, relates to a personalized learning recommendation method, storage medium and device based on SaaS architecture. Background Art
[0002] With the continuous development and popularization of Internet technology, the education industry is undergoing unprecedented changes. The traditional education model has been impacted by online education. At present, online education systems usually use recommendation algorithms based on rules or collaborative filtering to recommend learning resources. Although this can meet the needs of users to a certain extent, it still has the following shortcomings:
[0003] (1) Limited data sources: Traditional recommendation algorithms mainly rely on users’ historical behavior data, ignoring other information about users, such as social networks, interests, etc., resulting in inaccurate and incomplete recommendation results.
[0004] (2) Single recommendation strategy: Traditional recommendation algorithms usually adopt fixed recommendation strategies and cannot be dynamically adjusted according to changes in user behavior and learning needs, resulting in a lack of personalization and flexibility in recommendation results.
[0005] (3) Poor scalability: Traditional recommendation algorithms are often limited by computing power and storage capacity when processing large-scale data, resulting in decreased recommendation efficiency and system performance. Summary of the invention
[0006] In view of the problems existing in the prior art, the present invention provides a personalized learning recommendation method, storage medium and device based on SaaS architecture.
[0007] To achieve the above technical objectives, the present invention adopts the following technical solution: a personalized learning recommendation method based on SaaS architecture, specifically comprising the following steps:
[0008] Step 1: Collect the user's historical learning data from the open education learning middle platform system based on SaaS architecture;
[0009] Step 2: Clean the collected historical learning data, remove duplicate, invalid and abnormal data, and then perform standardization to obtain the user's learning feature set;
[0010] Step 3: Divide the learning features of each user into positive samples and negative samples, and input the positive samples and negative samples of each user into the improved momentum contrast model for training in turn until the fusion loss function converges, thus completing the training of the improved momentum contrast model;
[0011] Step 4: Re-acquire the historical learning data of a certain user, clean it, remove duplicate, invalid and abnormal data, and then perform standardization to obtain the historical learning features of the user, input it into the trained improved momentum comparison model, and obtain learning recommendations.
[0012] Furthermore, the historical learning data includes: learning behavior sequence, learning performance and learning feedback information.
[0013] Furthermore, the standardization process in step 2 is as follows: for the numerical data in the historical learning data, normalization is performed; for the non-numeric category data in the historical learning data, each category is converted into a vector using one-hot encoding, and the element pointing to the category is recorded as 1 in the vector, and the remaining elements are recorded as 0; for the non-numeric time data in the historical learning data, the time segmentation method is used to split the time data into hours, minutes, and seconds, and then the hours, minutes, and seconds are normalized respectively.
[0014] Furthermore, step 3 includes the following sub-steps:
[0015] Step 3.1, initializing the parameters of the improved momentum contrast model, the parameters including: the weight matrix and bias term of the feature extraction encoder, the weight matrix, bias term and momentum update rate of the momentum encoder, the initialization queue, hyperparameters and temperature parameters;
[0016] Step 3.2: Input each user's positive and negative samples into the improved momentum contrast model in turn, take the query sample as the target, use the forward propagation method to update the parameters of the improved momentum contrast model, and calculate the fusion loss function;
[0017] Step 3.3: Repeat step 3.2 until the fusion loss function converges, completing the training of the improved momentum contrast model. Furthermore, the calculation process of the fusion loss function is:
[0018] L_total=α×L_SR+β×L_SSL+γ×L_MoCo
[0019] Among them, L_total represents the fusion loss function, L_SR represents the cross entropy loss function, α represents the weighting coefficient of L_SR; L_SSL represents the contrast SSL loss function, β represents the weighting coefficient of L_SSL; L_MoCo represents the momentum contrast SSL loss function, and γ represents the weighting coefficient of L_MoCo.
[0020] Furthermore, the calculation process of the cross entropy loss function L_SR is:
[0021] L_SR=-Σylog(p)+(1-y)log(1-p)
[0022] Among them, y represents the true label of the user's learning feature, the positive sample value is 1, and the negative sample value is 0; p represents the probability of the improved momentum contrast model predicting a positive sample.
[0023] Furthermore, the calculation process of the comparative SSL loss function L_SSL is:
[0024] A. Update the temperature parameter τ by combining the initial temperature parameter with the current training time step t and the cumulative training time step T:
[0025] τ=(1-t / T)×τ_0
[0026] Among them, τ_0 represents the initial temperature parameter;
[0027] B. During the training process of the improved momentum contrast model, negative samples are stored in the queue in sequence, and the encoding of the queue is updated:
[0028] k_queue[i]=δ*k_queue[i-1]+(1-δ)*k_new
[0029] Where k_queue[i] represents the encoding of the queue in the i-th iteration, δ represents the momentum update parameter, and k_new represents the encoding of the newly added queue in this iteration;
[0030] C. Calculate and compare the SSL loss function based on the positive samples, negative samples, and query samples combined with the updated temperature parameters and the encoding of the queue:
[0031]
[0032] Among them, q represents the encoding representation of the query sample, s represents the index of the stored negative sample queue, k_+ represents the encoding representation of the positive sample with the shortest Euclidean distance to the query sample, and k_s+ represents the encoding representation of the negative sample that is dissimilar to the query sample.
[0033] Furthermore, the calculation process of the momentum contrast SSL loss function L_MoCo is:
[0034]
[0035] Among them, h represents the encoded representation of the negative sample that is most similar to the query sample.
[0036] Furthermore, the present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the personalized learning recommendation method based on the SaaS architecture.
[0037] Furthermore, the present invention also provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the personalized learning recommendation method based on the SaaS architecture is implemented.
[0038] Compared with the prior art, the present invention has the following beneficial effects:
[0039] (1) The personalized learning recommendation method based on SaaS architecture of the present invention realizes centralized management of learning resources through SaaS architecture, and provides a unified resource exchange and sharing platform, so that different educational institutions can share resources, improve resource utilization efficiency, better explore users' potential interests and needs, and provide more comprehensive and personalized recommendations;
[0040] (2) The personalized learning recommendation method based on SaaS architecture of the present invention can more accurately analyze the user's learning behavior and needs through an improved momentum comparison model, thereby providing recommended content that is more in line with the user's interests and needs. Compared with traditional rule-based or collaborative filtering recommendation algorithms, this data-driven recommendation method can better capture the user's complex needs and dynamically changing learning behaviors, thereby improving the accuracy of recommendations. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 The flowchart of the personalized learning recommendation method based on SaaS architecture of the present invention. DETAILED DESCRIPTION
[0042] The technical solution of the present invention is further explained below in conjunction with the accompanying drawings.
[0043] like Figure 1 The flowchart of the personalized learning recommendation method based on SaaS architecture of the present invention is as follows:
[0044] Step 1. Collect users' historical learning data from the open education learning middle-office system based on the SaaS architecture. The open education learning middle-office system based on the SaaS architecture adopts cloud computing technology, which can be quickly deployed and expanded to meet the needs of different users. At the same time, the flexibility of the SaaS architecture enables the open education learning middle-office system to easily add new functions and adapt to new types of learning resources and learning goals. The SaaS architecture enables learning resources to be updated in real time to keep pace with the latest knowledge and skills. In addition, users can participate in resource construction through the interaction and feedback mechanism provided by the open education learning middle-office system, provide evaluations and suggestions for learning resources, promote continuous optimization of resources, reduce hardware and operation and maintenance costs, thereby improving resource utilization efficiency, better tapping users' potential interests and needs, and providing more comprehensive and personalized recommendations.
[0045] The historical learning data in the present invention includes: learning behavior sequence, learning performance and learning feedback information; collecting user's learning behavior sequence data, including: user's learning behavior records on the open education learning middle platform system, such as clicks, browsing, searching, watching videos and other behaviors, as well as learning time, learning frequency and other information. These data can be used to analyze the user's learning habits and preferences; obtaining the user's learning performance data from the school management system or the open education learning middle platform system, including test scores, homework scores, course scores, etc., these data can be used to evaluate the user's learning ability and level; through online surveys, questionnaires and other methods, collecting users' learning feedback data on the learning process and results, including: users' evaluation and suggestions on courses, teachers, learning resources, etc., these data can be used to evaluate users' learning satisfaction and needs.
[0046] Step 2: Clean the collected historical learning data, remove duplicate, invalid and abnormal data, and then standardize it to obtain the user's learning feature set, which helps to eliminate the impact of dimensions between different features and enables historical learning data to be compared on the same scale for subsequent data analysis and mining.
[0047] The standardization process in this step is as follows: for the numerical data in the historical learning data, normalization is performed; for the non-numerical category data in the historical learning data, one-hot encoding is used to convert each category into a vector, and the element pointing to the category in the vector is recorded as 1, and the remaining elements are recorded as 0. For example, for a gender feature, there are two categories, "male" and "female", which are converted into vectors [1,0] and [0,1] respectively; for the non-numerical time data in the historical learning data, the time segmentation method is used to split the time data into hours, minutes, and seconds, and then the hours, minutes, and seconds are normalized respectively.
[0048] Step 3: Divide each user's learning features into positive samples and negative samples, and input each user's positive samples and negative samples into the improved momentum contrast model for training in turn until the fusion loss function converges, completing the training of the improved momentum contrast model. The momentum contrast model stores historical learning data by maintaining a dynamic queue, thereby capturing the user's learning pattern and preference. In this process, the momentum contrast model is improved and optimized in combination with factors such as the user's learning ability and learning style to improve its accuracy and adaptability. The specific sub-steps include the following:
[0049] Step 3.1, initializing the parameters of the improved momentum contrast model, the parameters including: the weight matrix and bias term of the feature extraction encoder, the weight matrix, bias term and momentum update rate of the momentum encoder, the initialization queue, hyperparameters and temperature parameters;
[0050] Step 3.2: Input each user's positive and negative samples into the improved momentum contrast model in turn, take the query sample as the target, use the forward propagation method to update the parameters of the improved momentum contrast model, and calculate the fusion loss function;
[0051] Step 3.3, repeat step 3.2 until the fusion loss function converges, and the training of the improved momentum contrast model is completed. The calculation process of the fusion loss function in the present invention is:
[0052] L_total=α×L_SR+β×L_SSL+γ×L_MoCo
[0053] Among them, L_total represents the fusion loss function, L_SR represents the cross entropy loss function, α represents the weighting coefficient of L_SR; L_SSL represents the contrast SSL loss function, β represents the weighting coefficient of L_SSL; L_MoCo represents the momentum contrast SSL loss function, and γ represents the weighting coefficient of L_MoCo.
[0054] When calculating the fusion loss function L_total, the SR loss function, the contrast SSL loss function and the momentum contrast SSL loss function are linearly weighted and combined. At the same time, the weight coefficients α, β, and γ need to be dynamically adjusted according to the importance and difficulty of the task, which can better adapt to the complex needs of users and dynamically changing learning behaviors, and improve the accuracy of recommended learning. In addition, by using the fusion loss function, the present invention can more accurately analyze the learning behavior and needs of users, thereby providing recommended content that is more in line with the interests and needs of users. Compared with traditional rule-based or collaborative filtering recommendation algorithms, this data-driven recommendation method can better capture the complex needs and dynamically changing learning behaviors of users, and improve the accuracy of recommended learning.
[0055] The calculation process of the cross entropy loss function L_SR in the present invention is:
[0056] L_SR=-Σylog(p)+(1-y)log(1-p)
[0057] Among them, y represents the true label of the user's learning feature, the positive sample value is 1, and the negative sample value is 0; p represents the probability of the improved momentum contrast model predicting a positive sample.
[0058] In order to better control the concentration of the distribution, the method of dynamically adjusting the temperature parameter is used to improve the comparative SSL loss function L_SSL. The specific calculation process is:
[0059] A. Update the temperature parameter τ by combining the initial temperature parameter with the current training time step t and the cumulative training time step T:
[0060] τ=(1-t / T)×τ_0
[0061] Among them, τ_0 represents the initial temperature parameter;
[0062] B. During the training process of the improved momentum contrast model, negative samples are stored in the queue in sequence. In order to better update the representation in the queue, a more advanced update strategy based on model performance is adopted, and the momentum update parameter δ is used to control the update speed of the encoding representation in the queue. Therefore, the encoding of the update queue is:
[0063] k_queue[i]=δ*k_queue[i-1]+(1-δ)*k_new
[0064] Among them, k_queue[i] represents the encoding of the queue in the i-th iteration, δ represents the momentum update parameter, which is used to gradually reduce the weight of the old stored negative samples and gradually increase the weight of the newly stored negative samples to balance the proportion of historical information and real-time information; k_new represents the encoding of the newly added queue in this iteration. By fusing the new negative samples with the old negative samples, the historical negative sample information can be better retained and utilized, and the new data distribution can be adapted at the same time;
[0065] C. Calculate and compare the SSL loss function based on the positive samples, negative samples, and query samples combined with the updated temperature parameters and the encoding of the queue:
[0066]
[0067] Among them, q represents the encoding representation of the query sample, s represents the index of the stored negative sample queue, k_+ represents the encoding representation of the positive sample with the shortest Euclidean distance to the query sample, and k_s+ represents the encoding representation of the negative sample that is dissimilar to the query sample.
[0068] In order to make more effective use of negative sample information, in each training iteration, the negative sample most similar to the query sample is selected as the hard negative sample, and compared with the query sample for learning, which can better capture the user's complex needs and dynamically changing learning behavior, thereby improving the accuracy of recommendation learning. The momentum contrast SSL loss function is written as:
[0069]
[0070] Among them, h represents the encoded representation of the negative sample that is most similar to the query sample.
[0071] Step 4: Re-acquire the historical learning data of a certain user, clean it, remove duplicate, invalid and abnormal data, and then perform standardization to obtain the historical learning features of the user, input it into the trained improved momentum comparison model, and obtain learning recommendations.
[0072] The personalized learning recommendation method based on the SaaS architecture of the present invention provides users with personalized learning resource recommendations, with higher recommendation accuracy, richer recommendation content, more flexible recommendation strategy, more efficient resource utilization and stronger scalability; at the same time, it can also be dynamically adjusted and optimized according to user needs and preferences to improve user learning effects and satisfaction.
[0073] In a technical solution of the present invention, a computer-readable storage medium is also provided, storing a computer program, wherein the computer program enables a computer to execute the personalized learning recommendation method based on the SaaS architecture.
[0074] In a technical solution of the present invention, an electronic device is also provided, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the personalized learning recommendation method based on the SaaS architecture is implemented.
[0075] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.
[0076] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0077] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A personalized learning recommendation method based on SaaS architecture, characterized in that: The specific steps include: Step 1: Collect the user's historical learning data from the open education learning middle platform system based on SaaS architecture; Step 2: Clean the collected historical learning data, remove duplicate, invalid and abnormal data, and then perform standardization to obtain the user's learning feature set; Step 3: divide the learning features of each user into positive samples and negative samples, and input the positive samples and negative samples of each user into the improved momentum contrast model for training in turn until the fusion loss function converges, thus completing the training of the improved momentum contrast model; including the following sub-steps: Step 3.1, initializing the parameters of the improved momentum contrast model, the parameters including: the weight matrix and bias term of the feature extraction encoder, the weight matrix, bias term and momentum update rate of the momentum encoder, the initialization queue, hyperparameters and temperature parameters; Step 3.2: Input each user's positive and negative samples into the improved momentum contrast model in turn, take the query sample as the target, use the forward propagation method, update the parameters of the improved momentum contrast model, and calculate the fusion loss function: L_total=α×L_SR+β×L_SSL+γ×L_MoCo Among them, L_total represents the fusion loss function, L_SR represents the cross entropy loss function, α represents the weighting coefficient of L_SR; L_SSL represents the contrast SSL loss function, β represents the weighting coefficient of L_SSL; L_MoCo represents the momentum contrast SSL loss function, γ represents the weighting coefficient of L_MoCo; The calculation process of the cross entropy loss function L_SR is: L_SR=-Σylog(p)+(1-y)log(1-p) Where y represents the true label of the user's learning feature, the positive sample value is 1, and the negative sample value is 0; p represents the probability of the improved momentum contrast model predicting a positive sample; The calculation process of the comparative SSL loss function L_SSL is: A. Update the temperature parameter τ by combining the initial temperature parameter with the current training time step t and the cumulative training time step T: τ=(1-t / T)×τ_0 Among them, τ_0 represents the initial temperature parameter; B. During the training process of the improved momentum contrast model, negative samples are stored in the queue in sequence, and the encoding of the queue is updated: k_queue[i]=δ*k_queue[i-1]+(1-δ)*k_new Where k_queue[i] represents the encoding of the queue in the i-th iteration, δ represents the momentum update parameter, and k_new represents the encoding of the newly added queue in this iteration; C. Calculate and compare the SSL loss function based on the positive samples, negative samples, and query samples combined with the updated temperature parameters and the encoding of the queue: Where q represents the encoding representation of the query sample, s represents the index of the stored negative sample queue, k_+ represents the encoding representation of the positive sample with the shortest Euclidean distance to the query sample, and k_s+ represents the encoding representation of the negative sample that is dissimilar to the query sample; The calculation process of the momentum contrast SSL loss function L_MoCo is: Among them, h represents the encoding representation of the negative sample that is most similar to the query sample; Step 3.3: Repeat step 3.2 until the fusion loss function converges, completing the training of the improved momentum contrast model. Step 4: Re-acquire the historical learning data of a certain user, clean it, remove duplicate, invalid and abnormal data, and then perform standardization to obtain the historical learning features of the user, input it into the trained improved momentum comparison model, and obtain learning recommendations.
2. The personalized learning recommendation method based on SaaS architecture according to claim 1, characterized in that: The historical learning data includes: learning behavior sequence, learning performance and learning feedback information.
3. The personalized learning recommendation method based on SaaS architecture according to claim 2, characterized in that: The standardization process in step 2 is as follows: for the numerical data in the historical learning data, normalization is performed; for the non-numeric category data in the historical learning data, each category is converted into a vector using one-hot encoding, and the element pointing to the category in the vector is recorded as 1, and the remaining elements are recorded as 0; for the non-numeric time data in the historical learning data, the time segmentation method is used to split the time data into hours, minutes, and seconds, and then the hours, minutes, and seconds are normalized respectively.
4. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables a computer to execute the personalized learning recommendation method based on SaaS architecture as described in any one of claims 1 to 3.
5. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the personalized learning recommendation method based on the SaaS architecture as described in any one of claims 1 to 3 is implemented.
