Keywords

1 Introduction

The basic course of university computer is an important subject in the study of University and College, almost every major of college students in the first semester of college will be required to take computer basic public courses, its main function is to offer a course for some non-computer major students who don’t know how to operate computers, the basic operation methods, application skills and methods of computer are introduced, the ability of logical thinking, computer operation, software use and calculation thinking of non-computer major undergraduates has been cultivated, the course of college computer foundation is widely accepted, covering most non-computer majors, so it has very practical application significance. But now students of different majors have different understanding of computer software and hardware, for example, the freshmen majoring in communication, electronics and electrical are very skilled in the use of computer technology and common software, some students can reach the level of simple programming, however, students majoring in sports, music, art and so on have a poor understanding of computer technology, some students are still unfamiliar with the use of keyboard and mouse, different family environment and background also affect students’ computer technology level. Therefore, the following problems exist in the teaching of University Computer Foundation and the opening of the course chapters:

1. The normal arrangement of course chapters and the traditional course recommendation can not meet the requirements of students with different computer operation levels.

2. Traditional course recommendation can’t meet the needs of students’ multiple course chapters, such as collaborative filtering algorithm, content-based recommendation algorithm and hybrid recommendation algorithm

So how to ensure that students who have a good foundation of computer operation or who have been exposed to computer technology or who don’t know computer really get the course chapters that are really suitable for them, it will not only affect students’ acquisition of knowledge, it will also affect the teaching effect of teachers, So as to affect the teaching of University Computer Foundation.

Around the above issues, in this paper, we propose a personalized course recommendation algorithm based on ordered learning of Knowledge Graph. In paper [1], a personalized recommendation algorithm based on ranking learning of knowledge map is proposed, this paper constructs Knowledge Graph through the content of University Computer Foundation, embedding into low dimensional space after deep learning, then through the similarity calculation of course knowledge points, construction of ordered learning feature model, student user interest transfer model, finally, the model is built by mixing with the basic feature model, Top-N recommendation through ranking learning. The proposed algorithm has achieved good results, it can play a positive role in recommending different curriculum chapters to students with different needs.

2 Related Research Theory

2.1 Knowledge Graph Embedded in N-Dimensional Spatial Network Representation

Since 2012, Google proposes the concept of Knowledge Graph, it has been widely used and studied in various fields, it has become the basic technology module of various intelligent services, it is often mentioned with ontology technology and can integrate entity context information. To address the timeliness of cold start and recommended course chapters, now the technology of knowledge map is developing continuously, it has developed and accumulated many open ontology databases, there is a significant improvement in improving the performance of the algorithm.

Perozzi B et al. Introduced deep learning technology into the network for the first time, the deepwalk algorithm, which makes it represent the field of learning, treats each node as a word in natural language processing (NLP), move randomly in the network, extract the generated mobile route, take the moving path as a sentence, the result obtained is used as the input of word2vec algorithm, the result obtained is used as the input of word2vec algorithm. In this way, the nodes in its network are inserted into an n-dimensional space, as shown in Fig. 1, with the distributed representation method, we can find the relationship connection between entities more intuitively, Grover A and others changed the generation method of random moving sequence node2vec by further expanding the deepwalk algorithm, a random moving method with bias is proposed, as shown in Fig. 2, in this method, two parameters, p and q, can be used to search the neighbor nodes with Depth First Movement (Depth-First Search) and Breadth First Movement (Breadth-First Search) simultaneously.

Fig. 1.
figure 1

Embedding knowledge map into n-dimensional space

Fig. 2.
figure 2

Breadth and depth first movement from nodes

Breadth First Movement emphasizes more on adjacent nodes and shows the isomorphism between them, The Depth First Movement shows the homogeneity between nodes on a further level, the conditional probability of its movement:

$$ {\text{P}}\left( {d_{i} = x|d_{i - 1} = c} \right) = \left\{ {\begin{array}{*{20}c} {\frac{{\pi_{CX} }}{T},} & {if(c,x) \in E} \\ {0,} & {otherwise} \\ \end{array} } \right. $$
(1)

The probability that \( \pi_{CX} \) is not normalized in the formula, T is the normalization constant, in the most general case, The weight ωcx between nodes c and x can be used as a non-normalized probability \( \pi_{CX} = \,\omega_{\text{cx}} \). t is the last node, c is the current node, x is the next possible node under the second order random movement, the relationship between the non-normalized probability and the weight is: \( \pi_{CX} = \alpha_{p} (t,x)\, \times \;\omega_{\text{cx}} \), The \( \alpha_{pq} (t,x) \) coefficient is as follows:

$$ \alpha_{pq} \left( {t,x} \right) = \left\{ {\begin{array}{*{20}c} {\frac{1}{p},if\; l_{tx} = 0.} \\ {1,if \;l_{tx } = 1. } \\ {\frac{1}{q},if\;l_{tx} = 2.} \\ \end{array} } \right. $$
(2)

Where \( l_{tx} \) is the nearest distance between node t and x, p is the return parameter, q is in-out parameter. Node2vec embedded method has high computational efficiency and adaptability, get the characteristics of nodes in the network, and it can take into account the macro and local information in the network, as shown in Fig. 3, node2vec algorithm.

Fig. 3.
figure 3

Node2vec algorithm student interest transfer model

3 Student Interest Transfer Model

Due to the continuous alternation of students in different majors and academic years, the computer technology of students entering school at different times will change, the degree of attention and interest in different courses will increase or decrease, traditional recommendation algorithms include collaborative filtering algorithm, semantic based recommendation algorithm, knowledge-based recommendation algorithm, etc. these algorithms can not be extended and can not reflect the dynamic changes of students’ behaviors and changing data. Therefore, the problem of students’ interest transfer cannot be solved effectively. However, the recommendation algorithm combined with students’ migration model can effectively improve the personalized recommendation effect of students.

The difference of students’ interest in different chapters of different University Computer Foundation courses by adding different weights to different nodes in the Knowledge Graph model.students’ interest transfer model can dynamically update the connection weight between nodes in the Knowledge Graph by the number and time of students’ behaviors towards the system, in order to reflect the students’ interest transfer. The more similar the student’s behavior in the system is to the current time, the more times the same behavior occurs, the more weight is allocated between the nodes, the more interested or concerned students are in this node. In contrast, the less weight between nodes.

The formula between student Si and Cj is:

$$ \omega_{ij} = \mathop \sum \nolimits_{x = 1}^{n} \left( {\frac{\omega }{{1 + e^{{\left( {t - t_{x} } \right) - t_{0} }} }} + \omega } \right) $$
(3)

In formula (3), the current time is t, the number of times the same behavior is expressed as n, \( t_{x} \) refers to the behavior time of students’ feedback on the course chapters, The time factor of students’ interest transfer is expressed as t0, \( \omega \) is the weight threshold, it means students change over time, that is to say, the recommendation ability it brings is constantly weakening, Gradually tends to constant \( \omega \), so we can modify the Knowledge Graph dynamically according to the students’ interest transfer model. Compared with the traditional recommendation algorithm, the recommendation algorithm based on Learn to Rank can more effectively reflect the different preferences of users and improve the accuracy of recommendation.

3.1 Recommendation System and Personalized Recommendation Algorithm of Learn to Rank

In this paper, we mainly study an algorithm based on Knowledge Graph for ordering learning personalized recommendation courses, The basic idea is: First, a basic Knowledge Graph has been established, then the algorithm is represented by node2vec network based on deep learning, then, the entities contained in the Knowledge Graph are embedded in a lower dimensional space. Second, calculate the similarity between user courses, in order to build the input training model of sorting learning, then the importance of different features adjusted by the objective function is taken as a reference, make it reach the best result, centralized integration of feature weights generated by basic recommendation model, merging into a student interest transfer model, model fusion with basic recommendation, Build a mixed model to be the basic recommendation model of interest transfer, Finally, the algorithm of sorting learning on the constructed model, got the top-N recommendation list. The algorithm proposed in this paper can take into account the long-term and short-term preferences of students for courses and the transfer of students’ interests and other reasons, it can also take into account the weight proportion between heterogeneous features of Knowledge Graph.

As shown in Fig. 4, follow this simple flow chart, Can effectively improve the personalized recommendation effect, it scan effectively improve the personalized recommendation effect.

Fig. 4.
figure 4

Simple flow chart of Learn to Rank (LTR)

3.2 Recommendation Algorithm Based on Learn to Rank

At present, the results of Pessiot J et al. Research are only based on users’ ratings of individual projects, the result of recommendation can not reflect the user’s preference effectively and accurately. For collaborative filtering algorithm, etc., there are students with sparse scores, cold start and so on, aiming at the problems of traditional recommendation algorithm, the relevant personnel consider adding the Learn to Rank technology to the recommendation process of the recommendation algorithm. The method of Learn to Rank is used to transform the calculation of recommendation scores among students’ users into a two classification problem of multi feature vectors, which can better solve the problem of multiparameter estimation caused by multi-dimensional features. Simple flow chart of recommended model, as shown in Fig. 5.

Fig. 5.
figure 5

Simple flow chart of recommended model

In the framework of recommendation process of sequencing learning, The first is to mark the student user course pair (Si, Cj) with \( y_{SiCj} \) , the second is to extract its features, the second is to extract its features, obtain the eigenvector \( \vec{x}_{SiCj} \), then we construct and get the set X of eigenvectors:

$$ X = \left\{ {\vec{x}_{{S_{1} C_{1} }} ,\vec{x}_{{S_{1} C_{2} }} ,\vec{x}_{{S_{1} C_{3} }} ,\vec{x}_{{S_{1} C_{4} }} , \cdots ,\vec{x}_{{S_{i} C_{j} }} } \right\} \subseteq R^{n} $$
(4)

That is, the corresponding set of tags Y:

$$ Y = \left\{ {\vec{y}_{{S_{1} C_{1} }} ,\vec{y}_{{S_{1} C_{2} }} ,\vec{y}_{{S_{1} C_{3} }} ,\vec{y}_{{S_{1} C_{4} }} , \cdots ,\vec{y}_{{S_{i} C_{j} }} } \right\} $$
(5)

Where n represents the dimension of \( \vec{x}_{{S_{1} C_{1} }} \), the final requirement of using ranking learning is to obtain a decision function f:\( R_{n} \) →Y in an optimal way, let the prediction set Y’ made by f for all the training instance sets (x, y) better correspond to the real mark Y, finally get the proportion set Z of weight:

$$ Z = \left\{ {\eta_{1} ,\eta_{2} ,\eta_{3} , \cdots \eta_{{\left| {feature} \right|}} } \right\} $$
(6)

Using machine learning method to solve the problem of sorting in sorting learning, it is based on the idea of classification problem and regression problem solving in machine learning, the goal of using sort learning is to learn a sort function from the training data, it can be used in text retrieval to measure the importance and relevance of text and sort the text. The advantages of using ordered learning are: The recommendation algorithm based on sorting learning can more effectively reflect the different preferences of users and improve the accuracy of recommendation. And it can summarize a large number of complex features and automatic parameter updating, a large number of available methods can be used to avoid over fitting problems. According to the investigation, The existing classical sorting learning algorithms are: LambdaMart, RankingSVM, RankBoost, AdaRank, RankNet and so on.

3.3 Feature Extraction of Knowledge Graph with Weight Depth Movement

Traditional collaborative filtering recommendation algorithm or other algorithms mainly use adjacency matrix to store and operate data, using this method to represent data will bring about calculation efficiency problems, for example, an adjacency matrix A uses the storage space of |Y| × |Y|, when |Y| increases to the million level, it often encounters problems in calculation and processing, and 0 accounts for most of the adjacency matrix, resulting in data sparsity, because of the sparsity of the data, a lot of difficulties arise in the application of fast and effective statistical learning methods.

Using Knowledge Graph can combine semantic fusion with context fusion and fuse heterogeneous feature information, then, the weight of each edge shows the relationship between each node. This paper proposes a course recommendation algorithm based on ordered learning of Knowledge Graph and makes deep movement on the Knowledge Graph, it can take into account the homogeneity between nodes and the isomorphism between nodes, it can also better integrate heterogeneous information and consider the interest transfer of learning users.

This research mainly studies the course of University Computer Foundation, among them, curriculum entity mainly includes teachers, curriculum, types of knowledge points and other major features, a series of heterogeneous characteristics listed can simply summarize the course, using the features of the course chapters, it can get a basic Knowledge Graph, as shown in Fig. 6.

Fig. 6.
figure 6

Integration of context and heterogeneous information to build the knowledge graph of curriculum chapters

In the research, Node2vec algorithm is used to learn the characteristics of Knowledge Graph network, map the corresponding entity to the space of N dimension, through the space of n-dimensional vector, the closer the distance is at the geometric level, the more relevant the solid is, the algorithm in this paper uses vector cosine similarity to measure the correlation between entities ei and ej, Expressed as Cos(ei, ej):

$$ Cos\left( {e_{i} ,e_{j} } \right) = cos\left( {e_{i} ,e_{j} } \right) = \frac{{\vec{e}_{i} \cdot \vec{e}_{j} }}{{\parallel \vec{e}_{i} \parallel \; \times \;\parallel \vec{e}_{i} \parallel }} = \frac{{\mathop \sum \nolimits_{t = 1}^{n} e_{it} e_{jt} }}{{\sqrt {\mathop \sum \nolimits_{t = 1}^{n} e_{it}^{2} } \sqrt {\mathop \sum \nolimits_{t = 1}^{n} e_{jt}^{2} } }} $$
(7)

Then deal with the training set, Mark the student user course (Si, Cj) with yij, on the established basic Knowledge Graph, Calculate the similarity of student user courses (Si, Cj) in a single course, calculate the similarity of student user courses (Si, Cj) in a single course, through context feature, then the eigenvector \( \vec{x}_{SiCj} \) is constructed:

$$ \vec{x}_{{S_{i} C_{j} }} = \left\{ {Cos\left( {S_{i} ,C_{j} } \right)_{1} ,Cos\left( {S_{i} ,C_{j} } \right)_{2} , \cdots ,Cos\left( {S_{i} ,C_{j} } \right)_{{\left| {feature} \right|}} } \right\} $$
(8)

Set up training set \( (y_{ij} ,S_{i} ,\vec{x}_{{S_{i} C_{j} }} ) \) as input of sorting learning algorithm model, according to the optimization function, a decision function f: \( R_{n} \)Y is obtained, then, according to the decision function, we get the list of top-N recommendations, and the weight proportion set \( Z = \left\{ {\eta_{1} ,\eta_{2} ,\eta_{3} , \cdots \eta_{{\left| {feature} \right|}} } \right\} \) of the multi-dimensional feature pair is generated, set up feedback model by Z.

In addition, the weight in the Knowledge Graph can show students’ preference for the course chapters, correlation between features and Curriculum, in paper [2], in the recommended algorithm, the relationship between user and item is expressed by scoring more than 4 in the data set, set the weight of the edge between to 1, then no relationship is set to 0, that is, the corresponding edges are regarded as 0,1 values, therefore, the recommendation algorithm in paper [2] does not care about the relevance and importance of different features to the recommendation results, the influence of user’s preference factors is also not considered, the preference and interest of users will change over time is not considered.

In conclusion, this paper improves this algorithm, this paper uses a mixed recommendation model which combines student user interest transfer, foundation and feedback model.

3.4 Mix Recommendation Model Combining Interest Transfer and Long-Term and Short-Term Preference

Long term consideration, students’ preferences and interests are relatively stable, because personalized recommendation based on a large number of historical data of student users can reflect the basic preferences of student users, a mixed Knowledge Graph model based on student user interest migration model and feedback model, using this model, we can measure the dynamic change of course content, the short-term dynamic change of students’ interest and other time effective factors.

According to the ranking learning personalized recommendation model based on the basic Knowledge Graph in the previous section, we can get the weight set \( Z = \left\{ {\eta_{1} ,\eta_{2} ,\eta_{3} , \cdots \eta_{{\left| {feature} \right|}} } \right\} \) of multi-dimensional features for recommendation results, then, the factor set Z which affects the weight is combined with the student user migration model to build a mixed Knowledge Graph, a dynamic updating method of weight between entities of the mixed Knowledge Graph based on RWij:

$$ RW_{ij} = \left\{ {\begin{array}{*{20}c} {\lambda \times rating \times w_{ij} \times \eta_{k} ,if \;r_{ij} = k;} \\ {\eta_{other} ,if\; r_{ij} = others;} \\ \end{array} } \right. $$
(9)

In method RWij, RWij is expressed as the weight of the edge between entity I and entity J after dynamic update, \( \omega ij \) is the degree of interest processed by the student user interest transfer model, k is the evaluation relationship between student user i and Course Chapter j, rating value refers to the students’ evaluation of the course chapters, \( \lambda \) is the normalization factor, let \( \lambda \)  × rating normalize at the initial weight 1, avoid the influence of exaggerated evaluation in random movement.

Pair the student user course chapters in the training set (Si,Cj), based on the mixed Knowledge Graph which combines the interest transfer of all students and the characteristics of the course chapters,

node2vec deep moving is adopted, obtain the characteristics of similarity Cos(Si,Cj), mix. In combination with formula (7) in the previous section, construct mixed feature model:

$$ \vec{x}_{{S_{i} C_{j} }} = \left\{ {Cos\left( {S_{i} ,C_{j} } \right)_{1} ,Cos\left( {S_{i} ,C_{j} } \right)_{2} , \cdots ,Cos\left( {S_{i} ,C_{j} } \right)_{{\left| {feature} \right|}} ,Cos\left( {S_{i} ,C_{j} } \right)_{mix} } \right\} $$
(10)

Set up a set \( (y_{ij} ,S_{i} ,\vec{x}_{{S_{i} C_{j} }} ) \) as the input of learning ordering model, finally, the top-N recommendation list is generated. the algorithm in this study can effectively combine multi-dimensional features, it can also take into account the long-term and short-term preferences of student users, can improve the effect of personalized recommended courses.

3.5 Basic Description of Algorithm

The simple basic description of the algorithm is as follows, as shown in Table 1.

Table 1. The steps of personalized course recommendation based on Knowledge Graph

4 Conclusion

This paper is based on the brief introduction of the background of the Knowledge Graph of the course chapters of University Computer Foundation in Colleges and universities, this paper proposes and introduces the main workflow of a sort learning personalized course recommendation algorithm based on Knowledge Graph, according to the preferences of students’ users and the deviation of students’ interests over time, the corresponding countermeasures are put forward in the algorithm flow, It has practical significance for the recommendation of University Computer Foundation’s course chapters and even for the recommendation methods of other college courses.