Question package combination recommendation method and device based on adaptive test model
Through the adaptive test model and gradient descent optimization algorithm, the problem that the existing technology cannot simulate computer adaptive testing and multi-stage testing is solved, and the recommendation of the question package combination is realized, which improves the accuracy and efficiency of recommendations and provides a unified Test framework.
Patent Information
- Application Number
- CN202410987525.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-22
- Publication Date
- 2024-11-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing adaptive testing models cannot simulate both computer adaptive testing and multi-stage testing methods at the same time, and lack a unified framework to coordinate and integrate their advantages.
A method of combining questions packages based on adaptive test model is proposed. By obtaining the user's historical answer data and the attribute information of questions, using the adaptive test model to process them, output the question package combination, and adjusting the topic selection through the gradient descent optimization algorithm Parameters, recommendations for implementing the question package combination.
It improves the accuracy and efficiency of question recommendations, learns directly from the data, recommends the best question package combinations for users, eliminates the need for manual design, and realizes a unified framework of computer adaptive testing and multi-stage testing.
Smart Images

Figure CN118964596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence education technology, and in particular to a method and device for recommending question package combinations based on an adaptive test model. Background Art
[0002] With the development of artificial intelligence technology, intelligent education is moving towards universalization and younger age. In order to meet the needs of individual students and optimize their learning outcomes, intelligent education technology can be combined to provide a personalized learning experience. In personalized education, the key is to understand the students' ability level so as to generate a suitable combination of questions based on their ability. The adaptive testing model can effectively assess the students' ability level in this regard. The core of the adaptive testing model is its recommendation strategy, which selects the most appropriate questions for the learner based on the learner's current ability assessment.
[0003] The current adaptive testing models are mainly divided into two categories: computer adaptive testing and multi-stage testing. Computer adaptive testing models select a question at each step based on the learner's ability assessment and require students to complete the current question before moving on to the next step. Multi-stage testing, on the other hand, selects a set of questions pre-defined by experts at each step, which are usually of similar difficulty and diverse in content.
[0004] Although computer adaptive testing and multi-stage testing each have their own advantages and disadvantages, they differ in the granularity of adaptability, with the former being adjusted at the question level and the latter at the question package level. Therefore, there is currently a lack of a unified framework that can flexibly simulate both approaches simultaneously, thereby coordinating and integrating them in a single approach. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a method and device for recommending question package combinations based on an adaptive test model to solve the problem that it is currently impossible to simulate both computer adaptive testing and multi-stage testing models at the same time.
[0006] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0007] The first aspect of the present invention discloses a method for recommending question package combinations based on an adaptive test model, the method comprising:
[0008] When receiving a recommendation request including the number of recommendations, obtain the user's historical answer data, basic information, and attribute information of all questions in the current test node;
[0009] Input the historical answer data, the basic information and the attribute information of all questions into the adaptive test model for processing, and obtain the question package combination of the next test node of the current test node; wherein the historical answer data is pre-divided into a query set and a support set, and the adaptive test model is optimized by the first recommendation model; the first recommendation model is optimized by the second recommendation model, and the second recommendation model is trained by the sample answer data, sample information and sample questions;
[0010] Outputting the question package combination and storing the user's answer data for the question package combination;
[0011] If the number of times the combination of question packages is output is less than the recommended number, return to the step of obtaining the historical answer data, basic information and attribute information of all questions of the user in the current test node until the number of times the combination of question packages is output is equal to the recommended number;
[0012] The process of processing in the adaptive test model includes:
[0013] Based on the historical answer data and the basic information, the attribute information of all questions is screened to obtain the attribute information of multiple target questions corresponding to the user in the current test node; the cross entropy loss is calculated based on the support set; the current ability value of the user is calculated using the cross entropy loss and the first gradient descent update formula; the current question selection parameters are calculated using the current ability value, the query set and the second gradient descent update formula; the question package combination containing multiple questions to be recommended is calculated using the current question selection parameters, the attribute information of each target question and the weighted question selection formula.
[0014] Preferably, the process of training a machine learning model based on sample answer data, sample information and sample questions to obtain a second recommendation model includes:
[0015] Obtaining the user's sample answer data, sample information, and attribute information of the sample questions;
[0016] Inputting the sample answer data, the sample information and the attribute information of the sample questions into a machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended;
[0017] Determine whether the sample question package combination is consistent with the preset verification question package combination;
[0018] If they are consistent, the machine learning model is determined as the second recommended model;
[0019] If they are inconsistent, the parameters of the machine learning model are adjusted, and the process returns to the step of inputting the sample answer data, the sample information, and the attribute information of the sample questions into the machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended;
[0020] The process of processing in the machine learning model includes:
[0021] The attribute information of the sample questions is screened based on the sample answer data and the sample information to obtain the attribute information of multiple sample questions to be tested corresponding to the user; the sample answer data is divided into a sample query set and a sample support set; the sample cross entropy loss is calculated based on the sample support set; the sample ability value of the user is calculated using the sample cross entropy and an internal function; the sample question selection parameters are calculated using the sample ability value, the sample query set and an external function; and a sample question package combination containing multiple sample questions to be recommended is calculated using the sample question selection parameters, each of the sample questions to be tested and a question selection formula.
[0022] Preferably, the process of optimizing the second recommendation model to obtain the first recommendation model includes:
[0023] Get the preset continuous sample topic selection parameters;
[0024] The second recommendation model is optimized using the continuous sample topic selection parameters to obtain the first recommendation model.
[0025] Preferably, the process of optimizing the first recommendation model to obtain the adaptive test model includes:
[0026] Obtaining a preset first gradient descent update formula, a preset second gradient descent update formula, and a preset weighted topic selection formula;
[0027] The first recommendation model is optimized using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
[0028] Preferably, the method of calculating a question package combination including a plurality of questions to be recommended by using the current question selection parameters, the attribute information of each target question and a weighted question selection formula comprises:
[0029] For each of the target topics, obtaining topic parameters of the target topic from the attribute information of the target topic;
[0030] The question package combination including a plurality of questions to be recommended is calculated using the question parameters, the current question selection parameters and the weighted question selection formula.
[0031] The second aspect of the present invention discloses a device for recommending question package combinations based on an adaptive test model, the device comprising:
[0032] A first acquisition unit is used to acquire the historical answer data, basic information and attribute information of all questions of the user in the current test node when receiving a recommendation request including the number of recommendations;
[0033] A first input unit is used to input the historical answer data, the basic information and the attribute information of all questions into the adaptive test model for processing, so as to obtain the question package combination of the next test node of the current test node; wherein the historical answer data is pre-divided into a query set and a support set, and the adaptive test model is optimized by a first recommendation model; the first recommendation model is optimized by a second recommendation model, and the second recommendation model is trained by sample answer data, sample information and sample questions;
[0034] An output unit, used for outputting the question package combination and storing the answer data of the user for the question package combination;
[0035] A judgment unit, configured to return to executing the first acquisition unit if the number of times the combination of question packages is output is less than the recommended number, until the number of times the combination of question packages is output is equal to the recommended number;
[0036] The process of processing in the adaptive test model includes:
[0037] Based on the historical answer data and the basic information, the attribute information of all questions is screened to obtain the attribute information of multiple target questions corresponding to the user in the current test node; the cross entropy loss is calculated based on the support set; the current ability value of the user is calculated using the cross entropy loss and the first gradient descent update formula; the current question selection parameters are calculated using the current ability value, the query set and the second gradient descent update formula; the question package combination containing multiple questions to be recommended is calculated using the current question selection parameters, the attribute information of each target question and the weighted question selection formula.
[0038] Preferably, it also includes:
[0039] A second acquisition unit is used to acquire the user's sample answer data, sample information and attribute information of the sample question;
[0040] A second input unit is used to input the sample answer data, the sample information and the attribute information of the sample questions into a machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended;
[0041] A judging unit, used to judge whether the sample question package combination is consistent with a preset verification question package combination;
[0042] a determining unit, configured to determine the machine learning model as a second recommendation model if the two models are consistent;
[0043] an adjusting unit, configured to adjust the parameters of the machine learning model if they are inconsistent, and return to execute the second input unit;
[0044] The process of processing in the machine learning model includes:
[0045] The attribute information of the sample questions is screened based on the sample answer data and the sample information to obtain the attribute information of multiple sample questions to be tested corresponding to the user; the sample answer data is divided into a sample query set and a sample support set; the sample cross entropy loss is calculated based on the sample support set; the sample ability value of the user is calculated using the sample cross entropy and an internal function; the sample question selection parameters are calculated using the sample ability value, the sample query set and an external function; and a sample question package combination containing multiple sample questions to be recommended is calculated using the sample question selection parameters, each of the sample questions to be tested and a question selection formula.
[0046] Preferably, it also includes:
[0047] A third acquisition unit is used to acquire preset continuous sample topic selection parameters;
[0048] The first optimization unit is used to optimize the second recommendation model by using the continuous sample topic selection parameters to obtain the first recommendation model.
[0049] Preferably, it also includes:
[0050] A fourth acquisition unit, used to acquire a preset first gradient descent update formula, a preset second gradient descent update formula, and a preset weighted topic selection formula;
[0051] The second optimization unit is used to optimize the first recommendation model by using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
[0052] Preferably, the adaptive test model is specifically used for:
[0053] For each of the target topics, the topic parameters of the target topic are obtained from the attribute information of the target topic; and the topic parameters, the current topic selection parameters and the weighted topic selection formula are used to calculate a topic package combination containing multiple topics to be recommended.
[0054] Based on the above-mentioned embodiment of the present invention, a method and device for recommending question package combinations based on an adaptive test model are provided. When a recommendation request is received, the user's historical answer data, basic information and attribute information of all questions are obtained and input into the adaptive test model for processing to obtain a question package combination; the question package combination is output and the user's answer data is stored; if the number of times the question package combination is output is less than the recommended number, then the new question package combination is determined and output until the number of times the question package combination is output is equal to the recommended number. The present invention defines the process of question recommendation as a binary optimization problem, that is, calculating the optimal user ability value and the optimal question selection; and the calculation process is gradient approximated, and the global strategy is converted into a greedy strategy. The greedy algorithm based on gradient descent obtains an approximate solution to the optimization problem, thereby obtaining a question package combination. The present invention directly learns from various types of data and information, recommends the optimal question package combination to users, and improves the accuracy of the recommendation results and the efficiency of the recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0056] Figure 1 A flowchart of a method for recommending question package combinations based on an adaptive test model provided by an embodiment of the present invention;
[0057] Figure 2 A schematic diagram of a method for recommending question package combinations based on an adaptive test model provided by an embodiment of the present invention;
[0058] Figure 3 A processing flow chart of an adaptive test model provided by an embodiment of the present invention;
[0059] Figure 4 A training flow chart of a second recommendation model provided by an embodiment of the present invention;
[0060] Figure 5 A processing flow chart of a machine learning model provided by an embodiment of the present invention;
[0061] Figure 6 A structural block diagram of a question package combination recommendation device based on an adaptive test model provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0064] As can be seen from the background technology, since computer adaptive testing and multi-stage testing each have their own advantages and disadvantages, they differ in adaptability granularity, the former is adjusted at the question level, and the latter is adjusted at the question package level. Therefore, the purpose of the embodiment of the present invention is to propose a unified data-driven adaptive testing system framework, design a universal recommendation strategy, which can take into account both computer adaptive testing and multi-stage testing. The combination of question packages is adaptively recommended according to different situations of users (learners), and the design framework can directly learn from the data to solve the optimal set of questions for each user, eliminating the need for manual test design.
[0065] Therefore, an embodiment of the present invention provides a method and device for recommending question package combinations based on an adaptive test model. When a recommendation request is received, the user's historical answer data, basic information, and attribute information of all questions are obtained and input into the adaptive test model for processing to obtain the question package combination of the next test node of the current test node; the question package combination is output and the user's answer data for the question package combination is stored; if the number of times the question package combination is output is less than the recommended number, then the new question package combination is returned to determine the output to the user until the number of times the question package combination is output is equal to the recommended number. The present invention defines the process of question recommendation as a binary optimization problem, that is, calculating the optimal user ability value and the optimal question selection; and the calculation process is gradient approximated, and the global strategy is converted into a greedy strategy. A simple greedy algorithm based on gradient descent is used to obtain an approximate solution to the optimization problem, and a recommendation strategy for question package combinations is designed based on this. Directly learning from various types of data and information, the optimal question package combination is recommended to the user, which improves the accuracy of the recommendation results and the efficiency of the recommendation.
[0066] See also Figure 1, shows a flow chart of a method for recommending question package combinations based on an adaptive test model provided by an embodiment of the present invention.
[0067] It should be noted that this method is applicable to a unified adaptive testing system (UATS framework), which uses a data-driven approach to model different test forms (computer adaptive testing and multi-stage testing) as a unified structure search problem to achieve the purpose of flexibly handling different types of adaptive testing requirements.
[0068] Specifically, it can be applied to various types of programming learning on online education platforms. It can be used to adaptively generate recommendation strategies in the learning process and automatically select suitable questions for learners to improve learning efficiency.
[0069] For example Figure 2 As shown, the test nodes include Test Step t and Test Step t+1, and the question nodes include Question Node 1, ..., Question Node m, ..., Question Node M. The purpose of the present invention is to select multiple optimal questions in the test node Test Step, wherein the number of question nodes M is the maximum number of questions that can be selected in each test node Test Step. In each test node Test Step, the user's current ability value Estimateθ is first determined, and then a question is selected based on the user's current ability value Estimateθ. The selection of questions can be regarded as an optimal edge selection problem. To this end, the edge weight of each question is discretized, and each time the optimal question is sought, it is converted into a search for the optimal edge. As shown Figure 2 Each directed edge shown is represented by Where V = {(q1,a1),…,(q n ,a n )} is the answer record of a learner on all the questions in the question bank, including the questions answered and whether the answer is correct or not (correct is 1, otherwise is 0). 1 means that this edge is selected in the final test structure, and 0 means that this edge is not selected in the final test structure.
[0070] Therefore, in the embodiment of the present invention, a combination of question packages containing multiple questions to be recommended is finally selected by optimizing the user's ability value to form a final test structure. Specifically, the method includes:
[0071] Step S101: when a recommendation request including the number of recommendations is received, the historical answer data, basic information and attribute information of all questions of the user in the current test node are obtained.
[0072] In the specific implementation process of step S101, when a recommendation request carrying the number of recommendations and user information (such as user ID) is received, the historical answer data of the user (learner) in the current test node, the basic information of the user and the attribute information of all questions are obtained based on the user information.
[0073] It should be noted that the historical answer data of the user includes but is not limited to the ID of the questions that the user has answered, the answer time and the answer status (correct or wrong), etc. For example, all the answer records of learner i can be represented as a tuple set D i ={(q,a)}, where q refers to the question ID. If a is 1, it means the question q is answered correctly, and if a is 0, it means the answer is wrong.
[0074] It is understandable that the basic information of the user is the user ID, and can also be information such as the user's school age; for example, the basic information of the user indicates that the user is a primary or secondary school student. The attribute information of all questions is all questions in the question bank and their corresponding attribute information, including but not limited to the question ID, the knowledge points involved in the question, etc.
[0075] It should be noted that the information (including but not limited to the user's basic information) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0076] Step S102: inputting historical answer data, basic information and attribute information of all questions into the adaptive test model for processing, and obtaining a question package combination of the next test node of the current test node.
[0077] It should be noted that the adaptive test model is optimized by the first recommendation model; the first recommendation model is optimized by the second recommendation model, and the second recommendation model is trained by sample answer data, sample information and sample questions. For the specific optimization and training process, please refer to the embodiment of the present invention. Figure 4 and Figure 5 The content shown.
[0078] In the specific implementation of step S102, the acquired historical answer data, basic information and attribute information of all questions are input into the adaptive test model for processing to obtain a question package combination of the next test node of the current test node.
[0079] It can be understood that the adaptive test model determines the attribute information of the target question corresponding to the current test node from the attribute information of all questions based on historical answer data and basic information. In other words, it determines the target question corresponding to the current test node, thereby selecting the optimal test question for the next test node of the current test node from the target questions.
[0080] Specifically, the present invention regards each test of the user as a test node, and each test node corresponds to many target questions. It is necessary to select the most preferred target question for the current test node for the user from many target questions, and record it as the recommended question. Therefore, it can be understood that the purpose of the present invention is to evaluate the user's optimal ability value from the data set and find the most preferred target question based on the optimal ability value, that is, the purpose of the present invention is to solve a two-layer optimization problem.
[0081] In actual application, since the user's real ability value cannot be known in the user's historical answer data set, which hinders the evaluation of the user's ability, the historical answer data is randomly divided into the query set Du and the support set Dt in advance. Among them, the support set Dt is used to simulate the question selection process and estimate the user's final ability value θ; the query set Du is used to evaluate the accuracy of the estimation (for example, various classification indicators such as cross entropy L(θT, Du) or prediction accuracy can be used for evaluation).
[0082] It should be noted that, combined with Figure 3 The content shown in the adaptive test model is processed in the following steps:
[0083] Step S301: Filter the attribute information of all questions based on the historical answer data and basic information to obtain the attribute information of multiple target questions corresponding to the user in the current test node.
[0084] In the specific implementation of step S301, based on the pre-set screening criteria, according to the historical answer data and basic information, the attribute information of multiple target questions corresponding to the user in the current test node is screened from the attribute information of all questions.
[0085] For example, in an online programming course for primary and secondary school students, the basic information of the user in the current test section indicates that the user is a primary and secondary school student, and the historical answer data can indicate the knowledge points that the user has learned or involved in the learning process. Based on this, programming questions that can be solved by the primary algorithm can be screened from the attribute information of all questions.
[0086] Step S302: Calculate the cross entropy loss based on the support set.
[0087] In the specific implementation of step S302, the cross entropy loss L(θ, Dt ). See formula (1) for details.
[0088]
[0089] Among them, p θ (Q i ,Y i ) represents the IRT model (Item Response Theory) predicting the question Q based on the ability θ i The probability of 1. -logp θ (Q i ,Y i ) represents the true label Y i The cross entropy loss with the predicted question. The sum of all questions in the support set Dt is the cross entropy loss L(θ,D t ).
[0090] Step S303: Calculate the user's current ability value using the cross entropy loss and the first gradient descent update formula.
[0091] It should be noted that after obtaining the attribute information of multiple target questions corresponding to the user in the current test node, in order to recommend the best question to the user, it is necessary to first accurately evaluate the user's ability.
[0092] It can be understood that, assuming that the current test node is t, the user's ability estimation value in the current test node t is expressed as θt. Furthermore, the set of optimal test questions selected in the current test node t (that is, the combination of question packages to be recommended) is determined by the user's ability estimation value θt.
[0093] In the specific implementation of step S303, the cross entropy loss L(θ, D t ) and the first gradient descent update formula (such as formula (3)), calculate the user's current ability value
[0094] st internal function:
[0095]
[0096] Among them, α represents the edge weight of the question. L(θ,D t (α)) represents the current loss function. The optimal current capability value of the user in the current test node t can be calculated by formula (2): However, in actual application, the optimal solution is obtained It is very time-consuming. If the optimal solution is obtained each time, the cost of updating the topic parameters is unacceptable. Therefore, it is necessary to perform an approximate transformation (i.e., update it by gradient descent), as shown in formula (3). to replace To shorten the training time. γ represents the learning rate and L represents the loss function.
[0097] Step S304: Calculate the current topic selection parameters using the current capability value, the query set and the second gradient descent update formula.
[0098] It should be noted that according to Figure 2 When selecting a question from a test node, each directed edge is represented as However, due to the discreteness of the x parameter, it is not differentiable when using the machine learning algorithm, which seriously hinders the progress of training. Therefore, the continuous parameter α is used to replace the x parameter. The parameter α is a continuous value from 0 to 1. The weight parameter of each directed edge is expressed as
[0099] Based on this, in the specific implementation of step S304, the current capability value is used The query set Du and the second gradient descent update formula (such as formula (5)) are used to calculate the current topic parameter α.
[0100] External functions:
[0101]
[0102] Among them, β represents the learning rate, and L represents the loss function. The current topic parameter α can be calculated by formula (4), and formula (5) is obtained by approximate transformation of formula (4). The current topic parameter α is updated by gradient descent through formula (5).
[0103] It can be understood that the dynamic optimization method of approximating formula (4) to obtain formula (5) not only improves the response speed of the system, but also avoids the emergence of local optimal solutions to a certain extent, ensuring the reliability and accuracy of the test results.
[0104] It should be noted that the to replace This method will produce a certain error, that is, the difference between the approximate solution and the optimal solution. According to the lemma of the strong convexity of the IRT model (such as formula (6)), the error bound can be proved. Furthermore, the convergence of this scheme can be proved according to the error bound (as shown in formula (7)).
[0105] According to the strong convexity in the cognitive diagnosis IRT model, we can get:
[0106] 1. The internal function is strongly convex with respect to θ, and its derivatives with respect to θ and α are L-Lipschitz continuous. Its second-order derivative is also Lipschitz continuous.
[0107] Specifically, is τ-Lipschitz continuous, is ρ-Lipschitz continuous.
[0108] 2. The external function is M-Lipschitz continuous, its derivative with respect to θ is L-Lipschitz continuous, and its derivative with respect to α is W-Lipschitz continuous.
[0109] According to the above lemma, it can be further proved that this approximation is reasonable, and the gradient estimation error bound is as follows:
[0110]
[0111] According to formula (6), this is a binary optimization problem. In order to optimize and obtain the optimal solution, it is necessary to optimize the internal optimization until convergence and then cycle for external optimization. This is very time-consuming. Therefore, for the internal optimization, the solution after K iterations is used to represent the optimal solution. This will produce a certain error, as shown in formula (6). According to the lemma of the strong convexity of the IRT model, the error bound can be proved. This error bound provides a guarantee for the proof of convergence, and then it is found that the process from global search to local search is convertible.
[0112] In order to further confirm the effectiveness of the embodiment of the present invention, the convergence analysis can be performed using the previous error bounds. It is known that the error in each step of the gradient approximation is bounded. Then, according to a series of inferences, it can be proved that the average value of the gradient and is bounded in the whole process, which is expressed as follows:
[0113]
[0114] in, It means that during the whole training process, the gradient of the loss function L at different time steps t (i.e. ). The sum of squares of the gradients reflects the degree to which the model is optimized during training.
[0115] T is the total number of training steps. Indicates that at the tth step, the loss function L is about the parameter The square sum of the gradients of . The gradient here represents the rate of change of the loss function under the current parameter value. Indicates that at step t, the optimal value of parameter θ depends on a hyperparameter α t . D u represents the test data set used for evaluation. 16W represents a constant coefficient used to calibrate the scale of the expression on the right. and Respectively represent the initial parameters and the final parameters Under this condition, the loss function L is used in the test data set D u This difference represents the amount of change in the loss function during the entire training process. C represents a constant used to represent the error bound during the optimization process.
[0116] It can be understood that formula (7) expresses the case where the entire method converges to the optimal bounded situation, proves the feasibility of transforming from global to greedy, and also proves the property of gradient approximation convergence.
[0117] According to the relevant contents of the above formula (6) and formula (7), it is proved that the method proposed in the embodiment of the present invention has a theoretical guarantee for estimation error and convergence. This means that the method proposed in the embodiment of the present invention is mathematically robust and can effectively find the optimal solution. Compared with other data-driven methods, the embodiment of the present invention has less fluctuation during the training process, which ensures the reliability and repeatability of the adaptive test model.
[0118] Step S305: Utilizing the current topic selection parameters, the attribute information of each target topic and the weighted topic selection formula, a topic package combination including multiple topics to be recommended is calculated.
[0119] In the specific implementation of step S305, for each target topic, the topic parameters of the target topic are obtained from the attribute information of the target topic; the topic parameters, the current topic selection parameters and the weighted topic selection formula are used to calculate a topic package combination containing multiple topics to be recommended.
[0120] Specifically, the current topic selection parameter α, the attribute information of each target topic and the weighted topic selection formula (such as formula (8)) are used to calculate a topic package combination containing multiple topics to be recommended.
[0121] It should be noted that the ultimate optimization goal is That is, the optimal question parameters for each step. Therefore, when the optimal goal is obtained, the selected recommended questions can be expressed as:
[0122]
[0123] Among them, for each question package The node m represents the question, the number of test steps is t, and the question parameters are q. Performing this operation on all parameters belonging to the same node can select the most suitable question. The meaning here is to select the question corresponding to the most suitable feature from the features corresponding to each q by weighting. It represents the questions selected from the m nodes in the t-th step test. The combination of questions selected from the M nodes is the optimal combination, which is given to the user at this time to answer.
[0124] Step S103: Output the question package combination and store the user's answer data for the question package combination.
[0125] In the process of implementing step S103, a question package combination containing multiple questions to be recommended is output so that the user can answer the multiple questions to be recommended in the question package combination, and the user's answer data for the question package combination is stored so that a new question package combination can be output to the user later according to business needs.
[0126] Step S104: Determine whether the number of times the question package combination is output is less than the recommended number. If the number of times the question package combination is output is less than the recommended number, return to step S101; if the number of times the question package combination is output is not less than the recommended number, end the process.
[0127] In the process of implementing step S104, determine whether the number of output question package combinations is less than the number of recommendations included in the recommendation request; when the number of output question package combinations is less than the recommended number, return to execute step S101, obtain the latest user's historical answer data, basic information and attribute information of all questions to continue to output new question package combinations to the user; when the number of output question package combinations is not less than the recommended number, that is, when the number of output question package combinations is equal to the recommended number, end the process.
[0128] It is understandable that the number of output question package combinations gradually increases, so there is no situation where the number of output question package combinations is greater than the recommended number.
[0129] In an embodiment of the present invention, based on hierarchical search and optimization theory, the selection process of the recommended questions is transformed into a dynamic path search problem. In each test node, the current ability value and the current question selection parameters are estimated based on the user's historical answer data, basic information and attribute information of all questions, and multiple recommended questions are selected based on the question selection parameters to obtain a question package combination. A simple greedy algorithm based on gradient descent is used to obtain an approximate solution to the optimization problem, and a recommendation strategy for the question package combination is designed based on this. Automated question selection and combination are achieved through a data-driven approach, eliminating the need for manual intervention and saving a lot of manpower and time costs.
[0130] The above embodiments of the present invention Figure 1For the specific training process of obtaining the second recommendation model based on the sample answer data, sample information and sample questions mentioned in Figure 4 .
[0131] In some recommendation strategies, a given cognitive diagnosis model and learner historical answer data V are generally used to optimize the entire ability parameter space Θ, trying to find the ability θ that best matches the historical answer data. * , as shown in formula (9).
[0132]
[0133] Where L is an arbitrary loss function based on the diagnostic model, V = {(q1,a1),…,(q n ,a n )} is the answer record of a learner on all the questions in the question bank, including the answered question q and whether the answer is correct or not a (correct is 1, otherwise it is 0).
[0134] It is understandable that when the user's answer record on all questions is obtained, the ability assessment is undoubtedly the most comprehensive and accurate. Like the general machine learning optimization method, the gradient descent method is also needed to calculate the full gradient and then optimize the solution to the above problem. However, it is generally impossible for users to answer all questions, so an adaptive recommendation algorithm is needed to select the most suitable questions from them and give them to the user to answer. Each step of the test should be the most appropriate set of questions. Since there is a combination effect between questions, the efficiency and accuracy of the test can be increased by using an algorithm to obtain the optimal set of questions each time.
[0135] Based on this, according to the characteristics of programming learning, the embodiment of the present invention proposes a process of training a machine learning model according to sample answer data, sample information and sample questions to obtain a second recommendation model, including:
[0136] Step S401: Obtain the user's sample answer data, sample information, and attribute information of the sample questions.
[0137] In the specific implementation process of step S401, sample answer data, sample information and attribute information of sample questions for training the machine learning model are obtained.
[0138] Step S402: Input the sample answer data, sample information and attribute information of the sample questions into the machine learning model for processing to obtain a sample question package combination containing multiple sample questions to be recommended.
[0139] In the specific implementation of step S402, the sample answer data, sample information and attribute information of the sample questions are input into the machine learning model for processing to obtain a sample question package combination containing multiple sample questions to be recommended.
[0140] Step S403: Determine whether the sample question package combination is consistent with the preset verification question package combination. If the sample question package combination is consistent with the preset verification question package combination, execute step S404; if the sample question package combination is inconsistent with the preset verification question package combination, execute step S405.
[0141] In the specific implementation of step S403, it is determined whether the sample question package combination is consistent with the preset verification question package combination, specifically, it is determined whether all sample recommended questions contained in the sample question package combination are consistent with all verification questions contained in the preset verification question package combination. If the sample question package combination is consistent with the preset verification question package combination, step S404 is executed; if the sample question package combination is inconsistent with the preset verification question package combination, step S405 is executed.
[0142] Step S404: Determine the machine learning model as the second recommendation model.
[0143] In the specific implementation of step S404, if the sample question package combination is consistent with the preset verification question package combination, the machine learning model is determined as the second recommendation model.
[0144] Step S405: Adjust the parameters of the machine learning model and return to execute step S402.
[0145] In the process of implementing step S405, if the sample question package combination is inconsistent with the preset verification question package combination, the parameters of the machine learning model are adjusted and the process returns to step S402.
[0146] The process of processing in the machine learning model is shown in Figure 5 The content shown includes:
[0147] Step S501: Filter the attribute information of the sample questions based on the sample answer data and the sample information to obtain the attribute information of the multiple sample questions to be tested corresponding to the user.
[0148] It should be noted that the specific implementation process of step S501 is consistent with the specific implementation process of step S301, and will not be repeated here.
[0149] Step S502: Divide the sample answer data into a sample query set and a sample support set.
[0150] In the specific implementation of step S502, the sample answer data is randomly divided into a sample query set and a sample support set.
[0151] Step S503: Calculate the sample cross entropy loss based on the sample support set.
[0152] It should be noted that the specific implementation process of step S503 is consistent with the specific implementation process of step S302, and will not be repeated here.
[0153] Step S504: Calculate the user's sample capability value using sample cross entropy and internal functions.
[0154] In the specific implementation of step S504, the sample cross entropy and the internal function (such as formula (10)) are used to calculate the user's sample ability value.
[0155]
[0156] The sample capability value calculated by formula (10) can be provided to the external function in step S505 for calculation. In order to obtain the optimal capability value, cross entropy convergence is performed on Dt, and gradient descent updates θ. Finally, the optimal solution is obtained by convergence.
[0157] Step S505: Calculate sample topic selection parameters using sample capability values, sample query sets and external functions.
[0158] In the specific implementation of step S505, the sample capability value, the sample query set and the external function (such as formula (11)) are used to calculate the sample topic selection parameters.
[0159]
[0160] Among them, formula (11) is based on The minimum convergence loss is calculated in Du and used to update the topic parameter x.
[0161] It should be noted that x is a binary value with a value of 0 or 1, 1 represents the selection of this question, and 0 represents the non-selection of this question. The optimal question selection combination is achieved by converging the loss function to the minimum.
[0162] Step S506: using the sample topic selection parameters, each sample topic to be tested and the topic selection formula, calculate and obtain a sample topic package combination containing multiple sample topics to be recommended.
[0163] In the specific implementation of step S506, the sample topic selection parameters, each sample topic to be tested and the topic selection formula (such as formula (12)) are used to calculate a sample topic package combination containing multiple sample topics to be recommended. In other words, the optimal sample topic to be recommended is selected by each selection of parameter x.
[0164]
[0165] It is understandable that by training the machine learning model to obtain the second recommendation model, the purpose of recommending questions to users can be achieved. However, due to the discreteness of the parameter x, it is not differentiable when using the machine learning algorithm, which seriously hinders the progress of training.
[0166] Based on this, an embodiment of the present invention obtains preset continuous sample topic selection parameters (for example, a continuous parameter α, where α is a continuous value from 0 to 1 and can be used for gradient updating); then the continuous sample topic selection parameters are used to optimize the second recommendation model to obtain the first recommendation model.
[0167] It is understandable that in order to achieve the optimal test structure, the embodiment of the present invention adopts a dynamic and differentiable selection algorithm, which adapts each of the above edges into a continuous parameter, and the specific selection is represented by a set of weight parameters. In this way, the optimization solution of gradient descent can be achieved.
[0168] It should be noted that the specific formulas for replacing the parameter x with the parameter α are shown in formula (2) and formula (4).
[0169] Furthermore, both the first recommendation model and the second recommendation model are built on the premise that global information is known. In the real world, when a user answers the questions of the first t steps, there is no way to know the answers to the following questions. Therefore, the global search problem is unsolvable. To this end, the embodiment of the present invention converts the global search problem into a greedy search problem, that is, the optimal structure is selected at each step to replace the search for the global optimal structure. Each time, the user's ability at this time is obtained based on the feedback of the questions that have been answered, and then the topic selection parameters of the current state are updated according to the user's ability, thereby realizing the greedy topic selection method.
[0170] Therefore, in the specific implementation process, the preset first gradient descent update formula, the preset second gradient descent update formula and the preset weighted topic selection formula are obtained; the first recommendation model is optimized using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
[0171] The above-mentioned embodiment of the present invention Figure 1 The proposed method for recommending question packages based on an adaptive test model corresponds to Figure 6 , shows a structural block diagram of a question package combination recommendation device based on an adaptive test model provided by an embodiment of the present invention.
[0172] The recommendation device includes: a first acquisition unit 601 , a first input unit 602 , an output unit 603 and a judgment unit 604 .
[0173] The first acquisition unit 601 is used to acquire the user's historical answer data, basic information and attribute information of all questions in the current test node when receiving a recommendation request including the number of recommendations.
[0174] The first input unit 602 is used to input the historical answer data, basic information and attribute information of all questions into the adaptive test model for processing to obtain the question package combination of the next test node of the current test node; wherein the historical answer data is pre-divided into a query set and a support set, and the adaptive test model is optimized by the first recommendation model; the first recommendation model is optimized by the second recommendation model, and the second recommendation model is trained by sample answer data, sample information and sample questions.
[0175] The output unit 603 is used to output the question package combination and store the user's answer data for the question package combination.
[0176] The judging unit 604 is used to return to execute the first obtaining unit 601 if the number of times the combination of question packages is output is less than the number of times recommended, until the number of times the combination of question packages is output is equal to the number of times recommended.
[0177] The processing in the adaptive test model includes:
[0178] Based on historical answer data and basic information, the attribute information of all questions is screened to obtain the attribute information of multiple target questions corresponding to the user in the current test node; the cross entropy loss is calculated based on the support set; the current ability value of the user is calculated using the cross entropy loss and the first gradient descent update formula; the current question selection parameters are calculated using the current ability value, the query set and the second gradient descent update formula; the question package combination containing multiple questions to be recommended is calculated using the current question selection parameters, the attribute information of each target question and the weighted question selection formula.
[0179] In an embodiment of the present invention, based on hierarchical search and optimization theory, the selection process of the recommended questions is transformed into a dynamic path search problem. In each test node, the current ability value and the current question selection parameters are estimated based on the user's historical answer data, basic information and attribute information of all questions, and multiple recommended questions are selected based on the question selection parameters to obtain a question package combination. A simple greedy algorithm based on gradient descent is used to obtain an approximate solution to the optimization problem, and a recommendation strategy for the question package combination is designed based on this. Automated question selection and combination are achieved through a data-driven approach, eliminating the need for manual intervention and saving a lot of manpower and time costs.
[0180] Combination Figure 6 According to the content shown, the recommendation device also includes: a second acquisition unit, a second input unit, a judgment unit, a determination unit and an adjustment unit.
[0181] The second acquisition unit is used to acquire the user's sample answer data, sample information and attribute information of the sample questions.
[0182] The second input unit is used to input the sample answer data, sample information and attribute information of the sample questions into the machine learning model for processing to obtain a sample question package combination containing multiple sample questions to be recommended.
[0183] The judging unit is used to judge whether the sample question package combination is consistent with the preset verification question package combination; if the sample question package combination is consistent with the preset verification question package combination, the determining unit is executed; if the sample question package combination is inconsistent with the preset verification question package combination, the adjusting unit is executed.
[0184] A determination unit is used to determine the machine learning model as the second recommended model if they are consistent.
[0185] The adjustment unit is used to adjust the parameters of the machine learning model if there is any inconsistency, and return to execute the second input unit.
[0186] Among them, the processing process in the machine learning model includes:
[0187] The attribute information of the sample questions is screened based on the sample answer data and sample information to obtain the attribute information of multiple sample questions to be tested corresponding to the user; the sample answer data is divided into a sample query set and a sample support set; the sample cross entropy loss is calculated based on the sample support set; the sample ability value of the user is calculated using the sample cross entropy and internal functions; the sample question selection parameters are calculated using the sample ability value, the sample query set and the external function; the sample question selection parameters, each sample question to be tested and the question selection formula are used to calculate a sample question package combination containing multiple sample questions to be recommended.
[0188] Combination Figure 6 According to the content shown, the recommendation device also includes: a third acquisition unit and a first optimization unit.
[0189] The third acquisition unit is used to acquire preset continuous sample topic selection parameters.
[0190] The first optimization unit is used to optimize the second recommendation model using the continuous sample topic selection parameters to obtain the first recommendation model.
[0191] Combination Figure 6 According to the content shown, the recommendation device also includes: a fourth acquisition unit and a second optimization unit.
[0192] The fourth acquisition unit is used to acquire a preset first gradient descent update formula, a preset second gradient descent update formula and a preset weighted topic selection formula.
[0193] The second optimization unit is used to optimize the first recommendation model by using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
[0194] Combination Figure 6 As shown in the content, the adaptive test model is specifically used for: for each target question, obtaining the question parameters of the target question from the attribute information of the target question; using the question parameters, the current question selection parameters and the weighted question selection formula, calculating a question package combination containing multiple questions to be recommended.
[0195] In summary, the present invention transforms the problem selection process into a dynamic path search problem by establishing a tree structure containing all potential test paths. At each test node, the optimal path is selected based on the current user's ability estimate, thereby dynamically adjusting the difficulty and content of the test. This approach not only improves the adaptability of the test, but also ensures the consistency and logic of the test process, improves the test efficiency and user experience. Furthermore, the present invention realizes automated problem selection and combination through a data-driven method, eliminates the need for manual intervention, and saves a lot of manpower and time costs.
[0196] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0197] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may 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 the present invention.
[0198] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for recommending question package combinations based on an adaptive test model, characterized in that: The method comprises: When receiving a recommendation request including the number of recommendations, obtain the user's historical answer data, basic information, and attribute information of all questions in the current test node; Input the historical answer data, the basic information and the attribute information of all questions into the adaptive test model for processing, and obtain the question package combination of the next test node of the current test node; wherein the historical answer data is pre-divided into a query set and a support set, and the adaptive test model is optimized by the first recommendation model; the first recommendation model is optimized by the second recommendation model, and the second recommendation model is trained by the sample answer data, sample information and sample questions; Outputting the question package combination and storing the user's answer data for the question package combination; If the number of times the combination of question packages is output is less than the recommended number, return to the step of obtaining the historical answer data, basic information and attribute information of all questions of the user in the current test node until the number of times the combination of question packages is output is equal to the recommended number; The process of processing in the adaptive test model includes: Filtering the attribute information of all questions based on the historical answer data and the basic information to obtain the attribute information of multiple target questions corresponding to the user in the current test node; Calculating a cross entropy loss based on the support set; Using the cross entropy loss and the first gradient descent update formula, calculate the current ability value of the user; Calculate the current topic selection parameters using the current capability value, the query set and the second gradient descent update formula; The current topic selection parameters, the attribute information of each target topic and the weighted topic selection formula are used to calculate a topic package combination containing multiple topics to be recommended.
2. The method according to claim 1, characterized in that The process of training the machine learning model based on the sample answer data, sample information and sample questions to obtain the second recommendation model includes: Obtaining the user's sample answer data, sample information, and attribute information of the sample questions; Inputting the sample answer data, the sample information and the attribute information of the sample questions into a machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended; Determine whether the sample question package combination is consistent with the preset verification question package combination; If they are consistent, the machine learning model is determined as the second recommended model; If they are inconsistent, the parameters of the machine learning model are adjusted, and the process returns to the step of inputting the sample answer data, the sample information, and the attribute information of the sample questions into the machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended; The process of processing in the machine learning model includes: Filtering the attribute information of the sample questions based on the sample answer data and the sample information to obtain the attribute information of a plurality of sample questions to be tested corresponding to the user; Dividing the sample answer data into a sample query set and a sample support set; Calculating a sample cross entropy loss based on the sample support set; Using the sample cross entropy and the internal function, the sample capability value of the user is calculated; Calculate sample topic selection parameters using the sample capability value, the sample query set and an external function; By using the sample topic selection parameters, each of the sample topics to be tested and the topic selection formula, a sample topic package combination including a plurality of sample topics to be recommended is calculated.
3. The method according to claim 1, characterized in that The process of optimizing the second recommendation model to obtain the first recommendation model includes: Get the preset continuous sample topic selection parameters; The second recommendation model is optimized using the continuous sample topic selection parameters to obtain the first recommendation model.
4. The method according to claim 1, characterized in that The process of optimizing the first recommendation model to obtain the adaptive test model includes: Obtaining a preset first gradient descent update formula, a preset second gradient descent update formula, and a preset weighted topic selection formula; The first recommendation model is optimized using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
5. The method according to claim 1, characterized in that The method of calculating a question package combination including a plurality of questions to be recommended by using the current question selection parameters, the attribute information of each target question and a weighted question selection formula comprises: For each of the target topics, obtaining topic parameters of the target topic from the attribute information of the target topic; The question package combination including a plurality of questions to be recommended is calculated using the question parameters, the current question selection parameters and the weighted question selection formula.
6. A device for recommending question package combinations based on an adaptive test model, characterized in that: The device comprises: A first acquisition unit is used to acquire the historical answer data, basic information and attribute information of all questions of the user in the current test node when receiving a recommendation request including the number of recommendations; A first input unit is used to input the historical answer data, the basic information and the attribute information of all questions into the adaptive test model for processing, so as to obtain the question package combination of the next test node of the current test node; wherein the historical answer data is pre-divided into a query set and a support set, and the adaptive test model is optimized by a first recommendation model; the first recommendation model is optimized by a second recommendation model, and the second recommendation model is trained by sample answer data, sample information and sample questions; An output unit, used for outputting the question package combination and storing the answer data of the user for the question package combination; A judgment unit, configured to return to executing the first acquisition unit if the number of times the combination of question packages is output is less than the recommended number, until the number of times the combination of question packages is output is equal to the recommended number; The process of processing in the adaptive test model includes: Filtering the attribute information of all questions based on the historical answer data and the basic information to obtain the attribute information of multiple target questions corresponding to the user in the current test node; Calculating a cross entropy loss based on the support set; Using the cross entropy loss and the first gradient descent update formula, calculate the current ability value of the user; Calculate the current topic selection parameters using the current capability value, the query set and the second gradient descent update formula; The current topic selection parameters, the attribute information of each target topic and the weighted topic selection formula are used to calculate a topic package combination containing multiple topics to be recommended.
7. The device according to claim 6, characterized in that Also includes: A second acquisition unit is used to acquire the user's sample answer data, sample information and attribute information of the sample question; A second input unit is used to input the sample answer data, the sample information and the attribute information of the sample questions into a machine learning model for processing to obtain a sample question package combination including a plurality of sample questions to be recommended; A judging unit, used to judge whether the sample question package combination is consistent with a preset verification question package combination; a determining unit, configured to determine the machine learning model as a second recommendation model if the two models are consistent; an adjusting unit, configured to adjust the parameters of the machine learning model if they are inconsistent, and return to execute the second input unit; The process of processing in the machine learning model includes: Filtering the attribute information of the sample questions based on the sample answer data and the sample information to obtain the attribute information of a plurality of sample questions to be tested corresponding to the user; Dividing the sample answer data into a sample query set and a sample support set; Calculating a sample cross entropy loss based on the sample support set; Using the sample cross entropy and the internal function, the sample capability value of the user is calculated; Calculate sample topic selection parameters using the sample capability value, the sample query set and an external function; By using the sample topic selection parameters, each of the sample topics to be tested and the topic selection formula, a sample topic package combination including a plurality of sample topics to be recommended is calculated.
8. The device according to claim 6, characterized in that Also includes: A third acquisition unit is used to acquire preset continuous sample topic selection parameters; The first optimization unit is used to optimize the second recommendation model by using the continuous sample topic selection parameters to obtain the first recommendation model.
9. The device according to claim 6, characterized in that Also includes: A fourth acquisition unit, used to acquire a preset first gradient descent update formula, a preset second gradient descent update formula, and a preset weighted topic selection formula; The second optimization unit is used to optimize the first recommendation model by using the first gradient descent update formula, the second gradient descent update formula and the weighted topic selection formula to obtain an adaptive test model.
10. The device according to claim 6, characterized in that The adaptive test model is specifically used for: For each of the target topics, the topic parameters of the target topic are obtained from the attribute information of the target topic; and the topic parameters, the current topic selection parameters and the weighted topic selection formula are used to calculate a topic package combination containing multiple topics to be recommended.
Citation Information
Patent Citations
Self-adaptive recommendation method, device and equipment for online programming teaching and storage medium
CN114969301A
Self-adaptive recommendation method for online programming teaching and related equipment
CN115985152A
Question recommendation method and apparatus, and computer device and storage medium
WO2023071505A1
