Recommendation decision model training and course recommendation method and device, equipment and medium
By classifying and equalizing the sample courses, a target sample course dataset is formed, which solves the problems of low training efficiency and poor accuracy in existing technologies, and achieves more efficient and accurate course recommendation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-06
- Publication Date
- 2026-04-07
AI Technical Summary
Existing course recommendation models suffer from low training efficiency and poor accuracy, mainly due to the large amount of sample data and imbalanced sample problems.
By classifying the sample courses, multiple sample course datasets are formed. The model is trained in the initial sample course dataset that meets the training requirements. At the same time, some sample courses from the non-initial sample course dataset are added to the initial dataset to form the target sample course dataset for training the recommendation decision model.
This improves the training efficiency and accuracy of the recommendation decision model, ensuring that the model can recommend courses more accurately.
Smart Images

Figure CN117251727B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for training a recommendation decision model and recommending courses. Background Technology
[0002] With the development of internet technology, the online education industry has received widespread attention. In order to improve the user experience, online education service providers can recommend courses to users.
[0003] In related technologies, a recommendation decision model can be trained using a user's course learning history over a historical learning period, and then used to determine whether to recommend a particular course to the user. However, the course recommendation schemes provided in these technologies suffer from low training efficiency and poor accuracy in the recommendation results obtained from the trained recommendation decision model. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, and medium for training a recommendation decision model and recommending courses, which can improve the accuracy of course recommendation results determined by the acquired recommendation decision model. The technical solution of this disclosure is as follows:
[0005] According to a first aspect of this disclosure, a method for training a recommendation decision model is provided, comprising:
[0006] The sample features of multiple sample courses are classified to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses.
[0007] Determine the initial sample course dataset that meets the training requirements from the multi-class course dataset, and determine a portion of the sample courses from each non-initial sample course dataset;
[0008] The target sample course dataset is obtained by combining the sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset.
[0009] The recommendation decision model is trained based on the target sample course dataset to obtain the recommendation decision model.
[0010] According to a second aspect of this disclosure, a course recommendation method is provided, comprising:
[0011] The basic features of the course to be recommended and the user features of the target user are input into a pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended. The recommendation decision model is trained based on the recommendation decision model training method described in the first aspect.
[0012] If the recommended parameter value is greater than or equal to the recommended parameter threshold, the course to be recommended is sent to the target user's user terminal.
[0013] According to a third aspect of this disclosure, a training apparatus for a recommendation decision model is provided, comprising:
[0014] The classification module is configured to classify the sample features of multiple sample courses to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses.
[0015] The determination module is configured to determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and to determine a portion of the sample courses in each non-initial sample course dataset.
[0016] The combination module is configured to combine the sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset to obtain the target sample course dataset.
[0017] The training module is configured to train the recommendation decision model to be trained based on the target sample course dataset, thereby obtaining the recommendation decision model.
[0018] According to a fourth aspect of this disclosure, a course recommendation device is provided, comprising:
[0019] The acquisition module is configured to input the basic features of the course to be recommended and the user features of the target user into a pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended. The recommendation decision model is trained based on the recommendation decision model training method described in the first aspect.
[0020] The recommendation module is configured to send the course to be recommended to the target user's user terminal if the recommendation parameter value is greater than or equal to the recommendation parameter threshold.
[0021] According to a fifth aspect of this disclosure, an electronic device is provided, comprising:
[0022] Processor; and
[0023] Stored program memory,
[0024] The program includes instructions that, when executed by the processor, cause the processor to perform the method described in the first aspect or the second aspect.
[0025] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the method described in the first or second aspect.
[0026] The recommendation decision model training and course recommendation method, apparatus, device, and medium provided in this application embodiment, on the one hand, classify the acquired sample courses to obtain multi-class sample course datasets, and train the recommendation decision model on the initial sample course dataset that meets the training requirements in the multi-class course datasets, so as to reduce the amount of sample data used to train the decision recommendation model and improve training efficiency; on the other hand, in order to prevent the problem of sample imbalance in the selected initial sample course dataset, some sample courses from the non-initial sample course datasets of the multi-class sample course datasets are added to the initial sample course dataset to obtain the target sample course dataset for training the recommendation decision model. The recommendation decision model can be trained using sample data with more balanced sample types, thereby improving the accuracy of the course recommendation decision results of the trained recommendation decision model. Attached Figure Description
[0027] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0028] Figure 1 The illustration shows a schematic diagram of an implementation scenario of a course recommendation scheme according to an exemplary embodiment of the present disclosure;
[0029] Figure 2 A flowchart illustrating a recommendation decision model training method according to an exemplary embodiment of this disclosure is shown;
[0030] Figure 3 A flowchart illustrating another method for training a recommendation decision model, as exemplified in this disclosure, is shown.
[0031] Figure 4 A flowchart illustrating yet another method for training a recommendation decision model, as exemplified in this disclosure, is shown.
[0032] Figure 5 A flowchart illustrating an exemplary embodiment of the present disclosure is shown.
[0033] Figure 6 A schematic block diagram of a recommendation decision model training apparatus is shown, representing an exemplary embodiment of the present disclosure.
[0034] Figure 7 A schematic block diagram of another recommendation decision model training apparatus is shown, which is an exemplary embodiment of the present disclosure.
[0035] Figure 8 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown;
[0036] Figure 9A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation
[0037] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0038] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0039] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.
[0040] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0041] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0042] In related technologies, in the course recommendation scenario, a large amount of sample data in the sample dataset can be used to iteratively train the recommendation decision model to obtain the recommendation decision model. In the course recommendation stage, the trained recommendation decision model is used to determine whether a course needs to be recommended to the target user.
[0043] However, during the training of decision recommendation models, on the one hand, the amount of sample data in the sample dataset is usually large, and directly training the decision recommendation model using the sample dataset will consume a long time, resulting in low training efficiency of the recommendation decision model; on the other hand, the sample data in the obtained sample dataset has the problem of sample imbalance, which will lead to poor accuracy of the recommendation results of the trained recommendation decision model.
[0044] To overcome the above problems, this exemplary embodiment provides a method for training a recommendation decision model. By clustering the acquired sample courses to obtain multi-class sample course datasets, and selecting an initial sample course dataset that meets the training requirements from these datasets for training the recommendation decision model, the method can solve the problem of low training efficiency due to the large amount of sample data. Simultaneously, to address the potential imbalance problem in the selected initial sample course dataset, some sample courses from non-initial sample course datasets can be added to the initial sample course set to obtain a target sample course dataset. Using this target sample course dataset for recommendation decision model training can solve the problem of inaccurate recommendation results caused by sample imbalance.
[0045] Figure 1 A schematic diagram illustrating an implementation scenario of a course recommendation scheme according to an exemplary embodiment of this disclosure is shown. For example... Figure 1 As shown, in one optional implementation, scenario 100 includes a user terminal 101 and a server 102. The user terminal 101 is a terminal device used by a user to view courses, such as a smartphone, personal computer, tablet, or wearable device. The server 102 can be the server of an online education service provider. It should be understood that... Figure 1 The implementation scenario shown is only an example. In real-world scenarios, in addition to user devices and teaching resource servers, there may be other devices.
[0046] like Figure 1 As shown, the user equipment 101 can establish a communication link with the teaching resource server 102. For example, the user equipment 101 and the server 102 can be connected in the same wired or wireless network so that after the server 102 executes the recommendation decision model training method provided in the embodiments of this disclosure, the course recommendation method provided in the embodiments of this disclosure can be executed.
[0047] Figure 2 A flowchart illustrating an exemplary embodiment of the present disclosure of a recommendation decision model training method is shown. This method can be applied to a server, such as... Figure 2 As shown, the method in this embodiment of the disclosure may include:
[0048] Step S201: Classify the sample features of multiple sample courses to obtain a multi-class sample course dataset;
[0049] The sample characteristics of the sample courses include the basic characteristics of the sample courses and the user characteristics associated with the sample courses.
[0050] Step S202: Determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and determine a portion of the sample courses in each non-initial sample course dataset.
[0051] Step S203: Combine the sample courses in the initial sample course set with a portion of the sample courses in each non-initial sample course dataset to obtain the target sample course dataset.
[0052] Step S204: Train the recommendation decision model to be trained based on the target sample course dataset to obtain the recommendation decision model.
[0053] In summary, the recommendation decision model training method provided in this disclosure has two advantages. First, by classifying the acquired sample courses to obtain multi-class sample course datasets, the recommendation decision model is trained on an initial sample course dataset that meets the training requirements within the multi-class datasets. This reduces the amount of sample data used to train the recommendation model and improves training efficiency. Second, to prevent imbalance in the selected initial sample course dataset, some sample courses from the non-initial sample course datasets of the multi-class datasets are added to the initial sample course dataset to obtain a target sample course dataset for training the recommendation decision model. This allows for the use of more balanced sample data to train the recommendation decision model, thereby improving the accuracy of the course recommendation decision results obtained from the trained recommendation decision model.
[0054] The following are Figure 2 The specific implementation methods of each step in the illustrated embodiment are described in detail below:
[0055] In step S201, the server can classify the sample features of multiple sample courses to obtain a multi-class sample course dataset.
[0056] In this embodiment of the disclosure, the sample characteristics of the sample course include the basic characteristics of the sample course and the user characteristics associated with the sample course. The basic characteristics of the sample course are used to characterize the basic information of the sample course, such as the subject, subject classification, duration, lecturer, and / or popularity data. Popularity data can include likes, favorites, comments, and / or shares. The user characteristics associated with the sample course are used to characterize the sample user information that has viewed the sample course. The user characteristics of the sample user can include the sample user's basic information and the interaction information between the sample user and the sample course. The sample user's basic information can include the sample user's age, gender, occupation, and / or hobbies. The interaction information between the sample user and the sample course can include the sample user's viewing time, number of views, whether they shared the sample course, whether they favorited the sample course, and whether they commented on the sample course.
[0057] In one optional implementation, the process of classifying the sample features of multiple sample courses by the server to obtain a multi-class sample course dataset may include: the server processing the sample features of multiple sample courses based on a classification algorithm to obtain a multi-class sample course dataset. The classification algorithm can be determined based on actual needs, and this disclosure does not limit its application. For example, the classification algorithm may be a spectral clustering algorithm or a K-means clustering algorithm.
[0058] In step S202, the server can determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and determine a portion of the sample courses in each non-initial sample course dataset.
[0059] In this embodiment of the disclosure, some sample courses in each non-initial sample course dataset are negative samples. In the course recommendation scenario, negative samples are sample courses that are not recommended to sample users. The non-initial sample course dataset is the sample course dataset other than the initial sample course dataset in the multi-class sample course dataset.
[0060] In one alternative implementation, the process by which the server determines an initial sample course dataset that meets the training requirements from a multi-class course dataset may include: randomly selecting a sample course dataset from the multi-class course dataset, and determining the randomly selected sample course dataset as the initial sample course dataset that meets the training requirements.
[0061] In one optional implementation, the process by which the server determines the initial sample course dataset that meets the training requirements from the multi-class course dataset may include: determining the sample course dataset with the largest number of sample courses from the multi-class course dataset as the initial sample course dataset that meets the training requirements. Determining the sample course dataset with the largest amount of data from the multi-class course dataset as the initial sample course dataset that meets the training requirements can prevent excessive reduction of sample data, which could lead to low accuracy of the trained recommendation decision model, and improve the accuracy of the recommendation decision results of the trained recommendation decision model.
[0062] It should be noted that, in this embodiment of the disclosure, in order to facilitate the distinction between positive and negative samples, sample weights can be added to the sample courses after they are obtained. The sample weights characterize the probability that a sample course is a negative sample; the smaller the sample weight, the greater the probability that the sample course is a negative sample. Alternatively, the smaller the sample weight, the greater the probability that the sample course is a negative sample. The process of adding sample weights to the sample courses after obtaining them may include initializing multiple sample courses after obtaining them, so as to randomly assign sample weights to each sample course.
[0063] In one optional implementation, the smaller the sample weight, the greater the probability that the sample course is a negative sample. The process by which the server determines a subset of sample courses in each non-initial sample course dataset can include: sorting each sample course in each non-initial sample course dataset according to its sample weight in descending order, obtaining a sequence of sample courses associated with each non-initial sample course dataset; then, determining the number of samples to be selected associated with each non-initial sample course dataset based on the number of sample courses associated with it; and for each non-initial sample course dataset, selecting the required number of sample courses associated with it from the sequence of sample courses associated with it, in ascending order of sample weight, to obtain a subset of sample courses in each non-initial sample course dataset. On the one hand, determining the number of sample courses to be selected in each non-initial sample course dataset based on the sample data size in each non-initial sample course dataset can improve the rationality of the number of sample courses selected in each non-initial sample course dataset. On the other hand, sorting the sample courses based on their sample weights to obtain a sequence of sample courses, and then selecting a subset of sample courses from that sequence, can improve the speed of obtaining a subset of sample courses.
[0064] In one optional implementation, the smaller the sample weight, the greater the probability that the sample course is a negative sample. The process by which the server determines a subset of sample courses in each non-initial sample course dataset may include: identifying sample courses in each non-initial sample course dataset whose sample weight is less than a preset weight as a subset of sample courses. The preset weight can be determined based on actual needs, and this disclosure does not limit its selection.
[0065] In step S203, the server can combine the sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset to obtain the target sample course dataset.
[0066] In step S204, the server can train the recommendation decision model to be trained based on the target sample course dataset to obtain the recommendation decision model.
[0067] In this embodiment of the disclosure, the amount of positive samples and negative samples in the target sample course dataset is roughly equal. The recommendation decision model trained based on the target sample course dataset can determine more accurate course recommendation results. It is understood that, in a course recommendation scenario, positive samples are sample courses recommended to sample users.
[0068] In one alternative implementation, such as Figure 3 As shown, the process of a server training a recommendation decision model to be trained may include:
[0069] Step S301: Optimize the parameters of the recommendation decision model to be trained using the target sample course dataset to obtain the optimized recommendation decision model.
[0070] In this embodiment of the disclosure, the recommendation decision model to be trained can be any classification model, and this embodiment of the disclosure does not limit it. For example, the recommendation decision model to be trained can be a support vector machine (SVM) model or a decision tree model.
[0071] In one optional implementation, the process of optimizing the parameters of the training recommendation decision model using the target sample course dataset to obtain the optimized recommendation decision model may include: using Particle Swarm Optimization (PSO) as the training algorithm, optimizing the parameters of the training recommendation decision model within a first preset parameter range using the target sample course dataset to obtain an initial recommendation decision model; further, using Grid Search as the training algorithm, optimizing the parameters of the initial recommendation decision model within a second preset parameter range using the sample course dataset to obtain the optimized recommendation decision model, wherein the minimum value of the second preset parameter range is greater than the minimum value of the first preset parameter range, and the maximum value of the second preset parameter range is greater than the maximum value of the first preset parameter range. The first and second preset parameter ranges can be determined based on actual needs, and this embodiment does not limit this. During the optimization of the recommendation decision model, the advantages of continuous parameter selection in PSO and the advantages of Grid Search in accelerating model convergence and preventing model parameters from exceeding the search range can be utilized to obtain a recommendation decision model with better parameters.
[0072] In the case where the recommendation decision model to be trained is a support vector machine (SVM) model, the parameters of the SVM model include the penalty factor C and the radial basis function radius g. The server uses the Particle Swarm Optimization (PSO) algorithm as the training algorithm and optimizes the parameters of the recommendation decision model to be trained within a first preset parameter range using the target sample course dataset. The process of obtaining the initial recommendation decision model may include: initializing the parameters of the particle swarm, including the population size, number of iterations, search space dimension, maximum value of the first preset parameter range, minimum value of the first preset parameter range, and the velocity, position, self-learning factor, and social learning factor of each particle in the particle swarm; then, substituting the initial position value of each particle into the fitness function to obtain the fitness of each particle, where each particle represents multiple sample features of each target sample course; further, based on the fitness of each particle, calculating the individual optimal position and individual optimal fitness of each particle, as well as the population optimal position and population optimal fitness of the particle swarm; calculating the inertia weight based on the population optimal fitness and individual optimal fitness, and then... The algorithm updates the velocity and position of each particle by considering weights, self-learning factors, social learning factors, the individual optimal position of each particle, and the population optimal position of the particle swarm. Furthermore, it calculates the ratio of the individual optimal fitness of each particle at the current iteration number to the individual optimal fitness at the previous iteration number, compares this ratio with a predetermined threshold, and determines that the particle has successfully searched if its ratio is less than the predetermined threshold. Next, it calculates the Euclidean distance from the position of a successfully searched particle to the population optimal position, and averages the Euclidean distances of all successfully searched particles to obtain a distance threshold. It then checks whether the Euclidean distance from the position of each particle to the population optimal position is less than the distance threshold; if so, it performs a mutation operation on particles with distances less than the threshold. Finally, if the current iteration number is less than the set iteration number, it outputs the current population optimal position of the particle swarm and maps the population optimal position to the penalty factor C and the radial basis function radius g in the support vector machine.
[0073] In the case where the recommendation decision model to be trained is a support vector machine (SVM) model, the server uses the grid search algorithm as the training algorithm and optimizes the parameters of the initial recommendation decision model within a second preset parameter range using a sample course dataset. The process of obtaining the optimized recommendation decision model may include: selecting initial parameter values of the penalty factor C and the radial basis function kernel radius g within the second preset parameter range, and using a cross-validation algorithm to determine the classification accuracy when the model parameters of the initial recommendation decision model are the initial parameter values; selecting updated parameter values of the penalty factor C and the radial basis function kernel radius g within the second preset parameter range according to a preset step size, and using a cross-validation algorithm to determine the classification accuracy when the model parameters of the initial recommendation decision model are the updated parameter values, and repeating the process of determining the updated parameter values and the accuracy verification process. After at least traversing all selectable parameter values within the second preset parameter range, the parameter values of the penalty factor C and the radial basis function kernel radius g that are most associated with the classification accuracy are determined as the parameter values of the optimized recommendation decision model.
[0074] In one optional implementation, the process of optimizing the parameters of the training recommendation decision model using the target sample course dataset to obtain the optimized recommendation decision model may include: using particle swarm optimization as the training algorithm, optimizing the parameters of the training recommendation decision model using the target sample course dataset to obtain the optimized recommendation decision model. In this case, the particle swarm optimization algorithm selects model parameters continuously, which can improve the accuracy of the course recommendation results determined by the trained recommendation decision model.
[0075] Alternatively, a grid search algorithm can be used as the training algorithm to optimize the parameters of the recommendation decision model to be trained using the target sample course dataset, resulting in an optimized recommendation decision model. In this case, the grid search algorithm selects model parameters in a discrete manner, which can improve the training efficiency of the recommendation decision model.
[0076] Step S302: Using the adaptive enhancement algorithm as the training method, the parameters of the optimized recommendation decision model are further optimized using the target sample course dataset to obtain the recommendation decision model.
[0077] In this embodiment of the disclosure, an adaptive enhancement algorithm is introduced to perform secondary optimization on the parameters of the optimized recommendation decision model to obtain a recommendation decision model. This can improve the accuracy of the obtained recommendation decision model, so that the recommendation decision model can obtain more accurate course recommendation results in the course recommendation process.
[0078] In one optional implementation, the server uses an adaptive enhancement algorithm as the training method to perform secondary optimization on the parameters of the optimized recommendation decision model using the target sample course dataset. The process of obtaining the recommendation decision model may include: initializing the weights of each target sample course to obtain the initial sample weights of each target sample course; then, training the optimized recommendation decision model using each target sample course to obtain the weak classifier trained in the current iteration; further, if the classification error rate of the weak classifier is less than or equal to a first preset threshold, updating the weights of the weak classifier and the initial sample weights of each target sample course based on the classification error rate of the weak classifier, and performing the next iteration training until the classification error rate of the trained weak classifier is greater than the first preset threshold, or the number of model training iterations is greater than a preset iteration number threshold, to obtain the recommendation decision model; wherein, the initial sample weights of each target sample course can be the same, and the first preset threshold can be determined based on actual needs. This embodiment of the disclosure does not limit this, for example, the first preset threshold can be 0.5; during the training process of the decision recommendation model, the recommendation decision model can be trained with the overall characteristics of the target sample course data as the focus to obtain a recommendation decision model with stronger ability to identify the overall characteristics of the courses.
[0079] In one optional implementation, the server uses an adaptive enhancement algorithm as the training method to perform secondary optimization on the parameters of the optimized recommendation decision model using the target sample course dataset. The process of obtaining the recommendation decision model may include: initializing the initial feature weights of each sample feature of each target sample course; then, training the optimized recommendation decision model using each sample feature of each target sample course to obtain the weak classifier trained in the current iteration; further, if the classification error rate of the weak classifier is less than or equal to a first preset threshold, updating the weights of the weak classifier and the initial feature weights of each sample feature of each target sample course based on the classification error rate of the weak classifier, and performing the next iteration of training until the classification error rate of the trained weak classifier is greater than the first preset threshold, or the number of model training iterations is greater than a preset iteration number threshold, thus obtaining the recommendation decision model. The initial sample weights of each target sample course can be the same. During the training process of the recommendation model, the recommendation decision model can be trained with each feature of the target sample course data as the focus, resulting in a recommendation decision model with stronger ability to identify features across various dimensions of the courses, further improving the accuracy of the recommendation results obtained by the trained recommendation decision model.
[0080] In one optional implementation, when training the recommendation decision model based on each sample feature of each target sample course, if the target sample feature exists among multiple sample features associated with the target sample course, the server can delete the target sample feature to obtain an updated target sample course. The updated feature weight of the target sample feature is greater than a feature weight threshold. This feature weight threshold can be determined based on actual needs; different feature weight thresholds can be set for sample features of different dimensions, or the same feature weight can be set for sample features of different dimensions. This disclosure does not limit this approach. Deleting sample features with excessively large feature weights prevents the recommendation decision model from overemphasizing a single dimension of the target sample course during training, thus affecting the reliability of feature recognition and improving the accuracy and reliability of the course recommendation results determined by the trained recommendation decision model.
[0081] In one optional implementation, the recommendation decision model is determined when the number of training iterations exceeds a preset iteration threshold. This may result in the classification error rate of the obtained weak classifiers not exceeding a first preset threshold. That is, the recommendation decision model may not be able to evenly focus on each sample feature of the target sample course due to the limited number of weak classifiers. Therefore, the server can also obtain the actual feature focus parameters of the recommendation decision model for the preset sample features based on the preset feature focus parameters of the preset sample features and the output results corresponding to the sample recommendation results of the target sample course output by the recommendation decision model. Furthermore, if the actual feature focus parameters are less than or equal to a second preset threshold, the recommendation decision model is retrained. Based on the preset feature focus parameters of the preset sample features and the sample recommendation results of the target sample course determined by the trained recommendation decision model after analyzing all features of the target sample course, the actual feature focus degree of the recommendation decision model on the preset sample features can be determined. If it is determined that the trained recommendation decision model may not be able to evenly focus on the features of each dimension of the course, the decision recommendation model can be retrained to ensure the consistency of the focus degree of the trained recommendation decision model on the features of each dimension of the course, thereby improving the accuracy of the course recommendation results determined by the final trained recommendation decision model.
[0082] It should be noted that the preset sample features can be any sample feature of the target sample course, and the preset feature attention parameters of the preset sample features can be determined based on actual needs. This embodiment of the disclosure does not limit this, but the parameter value of the preset feature attention parameters of the preset sample features can be greater than 0 and less than 1. The sample recommendation result of the target sample course output by the recommendation decision model is determined by the recommendation decision model after analyzing all sample features of the target sample course. The second preset threshold can be determined based on actual needs, and this embodiment of the disclosure does not limit this. For example, the second preset threshold can be 0.5.
[0083] The process by which the server obtains the actual feature attention parameters of the recommendation decision model for the preset sample features based on preset feature attention parameters of the preset sample features and the output results corresponding to the sample recommendation results of the target sample courses output by the recommendation decision model can include: the server obtaining the actual feature attention parameters of the recommendation decision model for the preset sample features based on the preset feature attention parameters of the preset sample features, the output results corresponding to the sample recommendation results of the target sample courses output by the recommendation decision model, and a preset formula. The preset formula can be:
[0084] e = c * e t +(1-c)*μ; (Formula 1)
[0085] In Formula 1, e represents the actual feature focus parameter of the recommendation decision model for the preset sample features. t The preset feature attention parameter is the preset sample feature, μ is the sample recommendation result of the target sample course output by the recommendation decision model, and c is the parameter weight of the preset feature attention parameter. The parameter weight of the preset feature attention parameter can be determined based on actual needs, and this embodiment does not limit it. The parameter weight of the preset feature attention parameter can be greater than 0 and less than 1.
[0086] It should be noted that, in this embodiment of the disclosure, the process of retraining the recommendation decision model can refer to the process of training the recommendation decision model to be trained based on the target sample course dataset in the above embodiments to obtain the recommendation decision model. This embodiment of the disclosure does not limit this process. Optionally, before retraining the recommendation decision model, the target sample course dataset can be updated. The process of updating the target sample course dataset may include: reselecting an initial sample course dataset that meets the training requirements from multiple course datasets; further, combining the sample courses in the reselected initial sample course set and some sample courses in each non-initial sample course dataset to obtain the updated target sample course dataset. It is understood that the reselected initial sample course set is different from the initial sample course set selected in the previous training process.
[0087] For example, such as Figure 4 As shown, Figure 4 The diagram illustrates a flowchart of a recommendation decision model training method provided in an embodiment of this disclosure, including:
[0088] Step S401: Classify the sample features of multiple sample courses to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses.
[0089] Step S402: Determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and determine a portion of the sample courses in each non-initial sample course dataset.
[0090] Step S403: Combine the sample courses in the initial sample course set with a portion of the sample courses in each non-initial sample course dataset to obtain the target sample course dataset.
[0091] Step S404: Using particle swarm optimization algorithm and grid search algorithm as training algorithms, optimize the parameters of the recommendation decision model to be trained using the target sample course dataset to obtain the optimized recommendation decision model.
[0092] The process of using particle swarm optimization (PSO) and grid search (GCS) as training algorithms and optimizing the parameters of the training recommendation decision model using the target sample course dataset to obtain the optimized recommendation decision model can include: using PSO as the training algorithm and optimizing the parameters of the training recommendation decision model within a first preset parameter range using the target sample course dataset to obtain the initial recommendation decision model; then using GCS as the training algorithm and optimizing the parameters of the initial recommendation decision model within a second preset parameter range using the sample course dataset to obtain the optimized recommendation decision model.
[0093] Step S405: Initialize the initial feature weights of each sample feature of each target sample course, and train the optimized recommendation decision model using each sample feature of each target sample course to obtain the weak classifier trained in the current iteration.
[0094] Step S406: Determine whether the classification error rate of the weak classifier is less than or equal to the first preset threshold.
[0095] Step S407: If the classification error rate of the weak classifier is less than or equal to the first preset threshold, then determine whether the current iteration number is greater than the preset iteration number threshold.
[0096] If the classification error rate of the weak classifier is greater than the first preset threshold, then the recommendation decision model is determined.
[0097] Step S408: If the current iteration number is greater than the preset iteration number threshold, then based on the preset feature attention parameters of the preset sample features and the sample recommendation results of the target sample courses output by the recommendation decision model, the actual feature attention parameters of the recommendation decision model for the preset sample features are obtained.
[0098] If the current iteration number is less than or equal to the preset iteration number threshold, then return to step S402 above to retrain the recommendation decision model;
[0099] Step S409: Determine whether the actual feature attention parameter is less than or equal to the second preset threshold;
[0100] If the actual feature attention parameter is less than or equal to the second preset threshold, then return to step S402 above to retrain the recommendation decision model; if the actual feature attention parameter is greater than the second preset threshold, then the recommendation decision model is determined to be obtained.
[0101] Figure 5 A flowchart illustrating an exemplary embodiment of the present disclosure of a course recommendation method is shown, which can be applied to a server, such as... Figure 5 As shown, the method in this embodiment of the disclosure may include:
[0102] Step S501: Input the basic features of the course to be recommended and the user features of the target user into the pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended.
[0103] The course to be recommended can be any course in the teaching resources of the server, and the recommendation decision model is trained based on the recommendation decision model training method in the above embodiment; the target user is any user who can obtain the teaching resources provided by the server; it should be noted that the basic characteristics of the course to be recommended and the user characteristics of the target user are similar to the basic characteristics of the sample course obtained during the training of the recommendation decision model and the user characteristics associated with the sample course, and this embodiment will not elaborate on them.
[0104] In step S502, if the recommended parameter value is greater than or equal to the recommended parameter threshold, the course to be recommended is sent to the target user's user terminal.
[0105] The recommended parameter threshold can be determined based on actual needs, and this disclosure does not limit it.
[0106] In summary, the course recommendation method provided in this embodiment improves the accuracy of the decision on whether to recommend a course to the target user by performing sample equalization processing on the sample course dataset during the training process of the recommendation decision model. This results in training a more accurate recommendation decision model using sample data with a more balanced sample type, thereby increasing the target user's satisfaction with the recommended courses.
[0107] The foregoing primarily describes the solutions provided by the embodiments of this disclosure from the perspective of the server. It is understood that, in order to implement the above functions, the server includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0108] This disclosure embodiment can divide the server into functional units according to the above method example. For example, it can divide each function into a separate functional module, or it can integrate two or more functions into one processing module. The integrated module can be implemented in hardware or as a software functional module. It should be noted that the module division in this disclosure embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0109] By dividing each functional module according to its corresponding function, an exemplary embodiment of this disclosure provides a recommendation decision model training device, which can be a server or a chip applied to a server. Figure 6 A schematic block diagram of the functional modules of a recommendation decision model training apparatus according to an exemplary embodiment of the present disclosure is shown. Figure 6 As shown, the recommendation decision model training device 600 includes:
[0110] The classification module 601 is configured to classify the sample features of multiple sample courses to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses.
[0111] The determination module 602 is configured to determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and to determine a portion of the sample courses in each non-initial sample course dataset.
[0112] The combination module 603 is configured to combine the sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset to obtain the target sample course dataset.
[0113] Training module 604 is configured to train the recommendation decision model to be trained based on the target sample course dataset, thereby obtaining the recommendation decision model.
[0114] Optionally, training module 604 is configured as follows:
[0115] The parameters of the recommendation decision model to be trained are optimized using the target sample course dataset to obtain the optimized recommendation decision model.
[0116] Using an adaptive enhancement algorithm as the training method, the parameters of the optimized recommendation decision model are further optimized using the target sample course dataset to obtain the recommendation decision model.
[0117] Optionally, training module 604 is configured as follows:
[0118] Using particle swarm optimization as the training algorithm, the parameters of the recommendation decision model to be trained are optimized within a first preset parameter range using the target sample course dataset to obtain an initial recommendation decision model;
[0119] Using a grid search algorithm as the training algorithm, the parameters of the initial recommendation decision model are optimized within a second preset parameter range using the sample course dataset to obtain the optimized recommendation decision model. The minimum value of the second preset parameter range is greater than the minimum value of the first preset parameter range, and the maximum value of the second preset parameter range is greater than the maximum value of the first preset parameter range.
[0120] Optionally, the target sample course dataset includes multiple target sample courses, and each target sample course includes multiple sample features.
[0121] The training module 604 is configured as follows:
[0122] Initialize the initial feature weights for each sample feature of each target sample course;
[0123] The optimized recommendation decision model is trained using the features of each sample in each target sample course to obtain the weak classifier trained in the current iteration;
[0124] If the classification error rate of the weak classifier is less than or equal to the first preset threshold, the weights of the weak classifier and the initial feature weights of each sample feature of each target sample course are updated based on the classification error rate of the weak classifier, and the next iteration of training is performed until the classification error rate of the trained weak classifier is greater than the first preset threshold, or the number of model training iterations is greater than the preset number of iterations threshold, and the recommendation decision model is obtained.
[0125] Optionally, the device further includes an update module 605, configured to:
[0126] If the target sample feature exists among the multiple sample features associated with the target sample course, then the target sample feature is deleted to obtain an updated target sample course, wherein the updated feature weight of the target sample feature is greater than the feature weight threshold.
[0127] Optionally, training module 604 is also configured as follows:
[0128] Based on the preset feature attention parameters of the preset sample features and the sample recommendation results of the target sample courses output by the recommendation decision model, the actual feature attention parameters of the recommendation decision model for the preset sample features are obtained.
[0129] If the actual feature attention parameter is less than or equal to the second preset threshold, then the recommendation decision model is retrained.
[0130] Optionally, the determining module 602 is configured to:
[0131] The sample course dataset with the largest number of sample courses among the various course datasets is determined as the initial sample course dataset that meets the training requirements.
[0132] Optionally, the determining module 602 is configured to:
[0133] Each sample course in each of the non-initial sample course datasets is sorted in descending order of sample weight to obtain a sequence of sample courses associated with each non-initial sample course dataset.
[0134] The number of samples to be selected is determined based on the number of sample courses in each non-initial sample course dataset;
[0135] For each non-initial sample course dataset, in the sample course sequence associated with the non-initial sample course dataset, select sample courses with a sample selection number associated with the non-initial sample course dataset in ascending order of sample weight, to obtain a portion of the sample courses in each non-initial sample course dataset.
[0136] An exemplary embodiment of this disclosure provides a course recommendation device, which may be a server or a chip applied to a server. Figure 7 A schematic block diagram of the functional modules of a course recommendation device according to an exemplary embodiment of the present disclosure is shown. Figure 7 As shown, the recommended device 700 for this course includes:
[0137] The acquisition module 701 is configured to input the basic features of the course to be recommended and the user features of the target user into a pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended. The recommendation decision model is trained by the recommendation decision model training method in the above embodiment.
[0138] The recommendation module 702 is configured to send the course to be recommended to the target user's user terminal if the recommendation parameter value is greater than or equal to the recommendation parameter threshold.
[0139] Figure 8 A schematic block diagram of a chip according to an exemplary embodiment of the present disclosure is shown. Figure 8 As shown, the chip 800 includes one or more processors 801 and a communication interface 802. The communication interface 802 can support the server in executing the data transmission and reception steps in the above-mentioned recommendation decision model training method or course recommendation method, and the processor 801 can support the server in executing the data processing steps in the above-mentioned recommendation decision model training method or course recommendation method.
[0140] Optional, such as Figure 8 As shown, the chip 800 also includes a memory 803, which may include read-only memory and random access memory, and provides operation instructions and data to the processor. A portion of the memory may also include non-volatile random access memory (NVRAM).
[0141] In some implementations, such as Figure 8 As shown, processor 801 executes corresponding operations by calling operation instructions stored in memory (which may be stored in the operating system). Processor 801 controls the processing operations of any unit in the server; the processor can also be called a central processing unit (CPU). Memory 803 may include read-only memory and random access memory, and provides instructions and data to processor 2201. A portion of memory 803 may also include NVRAM. For example, in applications, memory, communication interfaces, and other components are coupled together via a bus system, which may include, in addition to a data bus, a power bus, a control bus, and a status signal bus, etc. However, for clarity, in... Figure 8 The general labeled all buses as Bus System 804.
[0142] The methods disclosed in the embodiments of this disclosure can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above methods can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an ASIC, a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.
[0143] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.
[0144] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.
[0145] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.
[0146] refer to Figure 9The present invention describes a structural block diagram of an electronic device 900 that can serve as a server of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0147] like Figure 9 As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. The RAM 903 may also store various programs and data required for the operation of the device 900. The computing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0148] Multiple components in electronic device 900 are connected to I / O interface 905, including: input unit 906, output unit 907, storage unit 908, and communication unit 909. Input unit 906 can be any type of device capable of inputting information to electronic device 900. Input unit 906 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 907 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 904 may include, but is not limited to, disk and optical disk. Communication unit 909 allows electronic device 900 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.
[0149] The computing unit 901 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above. For example, in some embodiments, the methods of the exemplary embodiments of this disclosure can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 900 via ROM 902 and / or communication unit 909. In some embodiments, the computing unit 901 can be configured to perform the methods of the exemplary embodiments of this disclosure by any other suitable means (e.g., by means of firmware).
[0150] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0151] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on 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 of the foregoing.
[0152] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0153] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0154] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0155] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.
[0156] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this disclosure are performed, in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center integrating one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0157] Although this disclosure has been described in conjunction with specific features and embodiments, it will be apparent that various modifications and combinations can be made therein without departing from the spirit and scope of this disclosure. Accordingly, this specification and drawings are merely exemplary illustrations of the disclosure as defined by the appended claims and are to be considered as covering any and all modifications, variations, combinations, or equivalents within the scope of this disclosure. It is obvious that those skilled in the art can make various alterations and modifications to this disclosure without departing from its spirit and scope. Thus, this disclosure is also intended to include any such modifications and modifications that fall within the scope of the claims of this disclosure and their equivalents.
Claims
1. A method for training a recommendation decision model, characterized in that, include: The sample features of multiple sample courses are classified to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses. Determine the initial sample course dataset that meets the training requirements from the multi-class course dataset, and determine a portion of the sample courses from each non-initial sample course dataset; The sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset are combined to obtain the target sample course dataset, which includes multiple target sample courses, and each target sample course includes multiple sample features. Based on the target sample course dataset, the recommendation decision model to be trained is trained through first-order and second-order optimization to obtain the recommendation decision model; The secondary optimization process includes: Initialize the initial feature weights for each sample feature of each target sample course; The optimized recommendation decision model is trained using the features of each sample in each target sample course to obtain the weak classifier trained in the current iteration; If the classification error rate of the weak classifier is less than or equal to the first preset threshold, the weights of the weak classifier and the initial feature weights of each sample feature of each target sample course are updated based on the classification error rate of the weak classifier, and the next iteration of training is performed until the classification error rate of the trained weak classifier is greater than the first preset threshold, or the number of model training iterations is greater than the preset number of iterations threshold, and the recommendation decision model is obtained.
2. The recommendation decision model training method as described in claim 1, characterized in that, Methods for training a recommendation decision model include: The parameters of the recommendation decision model to be trained are optimized using the target sample course dataset to obtain the optimized recommendation decision model. Using an adaptive enhancement algorithm as the training method, the parameters of the optimized recommendation decision model are further optimized using the target sample course dataset to obtain the recommendation decision model.
3. The recommendation decision model training method as described in claim 2, characterized in that, The step of optimizing the parameters of the recommendation decision model to be trained using the target sample course dataset to obtain the optimized recommendation decision model includes: Using particle swarm optimization as the training algorithm, the parameters of the recommendation decision model to be trained are optimized within a first preset parameter range using the target sample course dataset to obtain an initial recommendation decision model; Using a grid search algorithm as the training algorithm, the parameters of the initial recommendation decision model are optimized within a second preset parameter range using the sample course dataset to obtain the optimized recommendation decision model. The minimum value of the second preset parameter range is greater than the minimum value of the first preset parameter range, and the maximum value of the second preset parameter range is greater than the maximum value of the first preset parameter range.
4. The recommendation decision model training method as described in claim 3, characterized in that, Before performing the next iteration of training, the method further includes: If the target sample feature exists among the multiple sample features associated with the target sample course, then the target sample feature is deleted to obtain an updated target sample course, wherein the updated feature weight of the target sample feature is greater than the feature weight threshold.
5. The recommendation decision model training method as described in claim 1, characterized in that, The recommendation decision model is determined when the number of model training iterations exceeds a preset iteration threshold. The method further includes: Based on the preset feature attention parameters of the preset sample features and the sample recommendation results of the target sample courses output by the recommendation decision model, the actual feature attention parameters of the recommendation decision model for the preset sample features are obtained. If the actual feature attention parameter is less than or equal to the second preset threshold, then the recommendation decision model is retrained.
6. The recommendation decision model training method as described in claim 1, characterized in that, The step of determining the initial sample course dataset that meets the training requirements from the multi-class course dataset includes: The sample course dataset with the largest number of sample courses among the various course datasets is determined as the initial sample course dataset that meets the training requirements.
7. The recommendation decision model training method as described in claim 1, characterized in that, The process of determining a subset of sample courses from each non-initial sample course dataset includes: Each sample course in each of the non-initial sample course datasets is sorted in descending order of sample weight to obtain a sequence of sample courses associated with each non-initial sample course dataset. The number of samples to be selected is determined based on the number of sample courses in each non-initial sample course dataset; For each non-initial sample course dataset, in the sample course sequence associated with the non-initial sample course dataset, select sample courses with a sample selection number associated with the non-initial sample course dataset in ascending order of sample weight, to obtain a portion of the sample courses in each non-initial sample course dataset.
8. A course recommendation method, characterized in that, include: The basic features of the course to be recommended and the user features of the target user are input into a pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended. The recommendation decision model is trained based on the recommendation decision model training method described in any one of claims 1 to 7. If the recommended parameter value is greater than or equal to the recommended parameter threshold, the course to be recommended is sent to the target user's user terminal.
9. A recommendation decision model training device, characterized in that, include: The classification module is configured to classify the sample features of multiple sample courses to obtain a multi-class sample course dataset. The sample features of the sample courses include the basic features of the sample courses and the user features associated with the sample courses. The determination module is configured to determine the initial sample course dataset that meets the training requirements in the multi-class course dataset, and to determine a portion of the sample courses in each non-initial sample course dataset. The combination module is configured to combine the sample courses in the initial sample course set and a portion of the sample courses in each non-initial sample course dataset to obtain a target sample course dataset, wherein the target sample course dataset includes multiple target sample courses, and each target sample course includes multiple sample features. The training module is configured to train the recommendation decision model to be trained based on the target sample course dataset through first-order and second-order optimization to obtain the recommendation decision model; The secondary optimization process includes: Initialize the initial feature weights for each sample feature of each target sample course; The optimized recommendation decision model is trained using the features of each sample in each target sample course to obtain the weak classifier trained in the current iteration; If the classification error rate of the weak classifier is less than or equal to the first preset threshold, the weights of the weak classifier and the initial feature weights of each sample feature of each target sample course are updated based on the classification error rate of the weak classifier, and the next iteration of training is performed until the classification error rate of the trained weak classifier is greater than the first preset threshold, or the number of model training iterations is greater than the preset number of iterations threshold, and the recommendation decision model is obtained.
10. A course recommendation device, characterized in that, include: The acquisition module is configured to input the basic features of the course to be recommended and the user features of the target user into a pre-trained recommendation decision model to obtain the recommendation parameter values of the course to be recommended. The recommendation decision model is trained based on the recommendation decision model training method according to any one of claims 1 to 7. The recommendation module is configured to send the course to be recommended to the target user's user terminal if the recommendation parameter value is greater than or equal to the recommendation parameter threshold.
11. An electronic device, characterized in that, include: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-7 or 8.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7 or 8.
Citation Information
Patent Citations
Fitness course recommendation method and device, storage medium and electronic device
CN115618091A