A method, device and medium for recommending online courses
By adopting a combination method of self-attention mechanism and preset graph convolutional network in the online course recommendation system, the shortcomings of existing systems in terms of accuracy and interpretability are solved, and more accurate and interpretable online course recommendations are achieved.
Patent Information
- Application Number
- CN202410625892.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-05-20
AI Technical Summary
Existing online course recommendation systems have shortcomings in accuracy and interpretability, especially when dealing with the complexity and black box nature of multi-source heterogeneous data and deep neural network models.
The self-attention mechanism and the preset graph convolution network are used to determine the correlation degree of word vectors through the self-attention mechanism and extract it. The knowledge graph of the preset graph convolution network is combined for common course neighbor sampling, and finally the characteristics output from the convolution layer are aggregated for course scoring and recommendation.
It improves the slicing accuracy of course description data and the robustness of word vector representation, enhances the interpretability and accuracy of recommended results, and solves the problem of lack of stability of recommended results in traditional methods.
Smart Images

Figure CN118467830B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data analysis technology, and in particular to a method, device and medium for recommending online courses. Background Art
[0002] With the advent of the digital age, the concept of "Internet +" has become increasingly popular, and the field of Internet + education is in full swing. Nowadays, social competition is becoming increasingly fierce, and people's awareness of independent learning has become stronger. Therefore, online education technology has developed rapidly, and more and more people choose to participate in various courses online to learn relevant knowledge. In the process of course recommendation on the online learning platform, the learning platform pushes multiple sets of courses on the main page, and students select the courses that suit their personal preferences from the multiple sets of courses pushed on the main page. In order to obtain courses that meet the current needs of users, it is necessary to accurately analyze the course description content currently proposed by the user to determine the corresponding recommended courses.
[0003] Current talent evaluation and online training resources are characterized by multi-source heterogeneity. When extracting characteristic information such as instructors, affiliated universities, and class hours from course descriptions based on traditional semantics, the accuracy of course recommendations is low due to the lack of correlation between trigger words and entities. In addition, the current method of analyzing characteristic information based on deep neural networks to obtain recommended courses lacks interpretability due to the complexity and black-box nature of the deep neural network model. How to flexibly push and accurately return online courses that meet your needs based on personalized needs is a problem that needs to be solved. Summary of the invention
[0004] In order to solve the above technical problems, one or more embodiments of this specification provide a method, device and medium for recommending online courses.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of the present specification provide a method for recommending an online course, the method comprising:
[0007] Receive course description data to perform split training on the course description data to obtain a pre-trained word vector sequence corresponding to the course description data;
[0008] Determine the relevance of each pre-trained word vector in the pre-trained word vector sequence based on the self-attention mechanism, obtain a corresponding weight matrix, and extract the word vector sequence based on the weight matrix to obtain relevant word vectors;
[0009] Convolving the related word vectors according to a preset graph convolutional network to obtain user features and course features output by each convolutional layer; wherein the knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to an importance score strategy of a central course entity and adjacent course entities;
[0010] The user features and course features output by different convolutional layers are aggregated to obtain the course ratings corresponding to the course description features, and the online courses with the highest course ratings are recommended based on the course ratings.
[0011] Optionally, in one or more embodiments of the present specification, receiving course description data to perform split training on the course description data to obtain a pre-trained word vector sequence corresponding to the course description data specifically includes:
[0012] According to the course recommendation scenario corresponding to the course description data, a course recommendation word set corresponding to the course recommendation scenario is obtained, so as to determine the occurrence frequency of words in the course recommendation word set according to the course description data, and determine the word boundary of the course description data based on the occurrence frequency;
[0013] Segmenting the course description data based on the word boundaries to obtain course description segmented words corresponding to the course description data;
[0014] Based on the attribute information corresponding to the course description segmentation in the course recommendation word set, each course description segmentation is marked; wherein the attribute information includes: part of speech information and entity information;
[0015] Filtering the course description segmentation words according to the attribute information to remove meaningless words in the course description segmentation words, and obtaining processed course description segmentation words; wherein the meaningless words include: pause words and stop words;
[0016] Determine the word vector of the processed course description segmentation to determine the context dependency of the processed course description segmentation according to the angle cosine calculation;
[0017] The context dependency is marked on the processed course description word segmentation, and a pre-trained word vector sequence is formed according to the word vectors of the processed course description word segmentation.
[0018] Optionally, in one or more embodiments of the present specification, determining the relevance of each pre-trained word vector in the pre-trained word vector sequence based on the self-attention mechanism, obtaining a corresponding weight matrix, and extracting the word vector sequence based on the weight matrix to obtain relevant word vectors specifically includes:
[0019] Determine the input matrix of the self-attention mechanism based on the pre-trained word vector sequence, map the input matrix according to the random matrix corresponding to the self-attention mechanism, and obtain a mapping matrix corresponding to the input matrix; wherein the mapping matrix includes: a query vector matrix, a key vector matrix, and a value vector matrix;
[0020] Normalizing the query vector matrix and the key vector matrix based on a preset normalization strategy to obtain a normalized result so as to determine the degree of correlation of each pre-trained word vector in the pre-trained word vector sequence according to the product of the normalized result and the value vector;
[0021] A weight matrix corresponding to the pre-trained word vector sequence is determined according to the degree of correlation, and the pre-trained word vector sequence is extracted based on the weight matrix to obtain relevant word vectors.
[0022] Optionally, in one or more embodiments of the present specification, the related word vectors are convolved according to a preset graph convolutional network to obtain user features and course features output by each convolutional layer, specifically including:
[0023] Constructing a course recommendation graph structure based on the relevant word vectors and the degree of correlation corresponding to the relevant word vectors;
[0024] Importing the course recommendation graph structure into the preset graph convolutional network, performing convolution operations on the course recommendation graph structure according to different convolutional layers of the preset graph convolutional network, gradually extracting features of each node in the course recommendation graph structure, and obtaining feature information of the course recommendation graph structure;
[0025] According to the annotation information of the relevant word vector corresponding to the feature information, the entity corresponding to the feature information is determined, so as to classify the feature information based on the entity and obtain the user features and course features output by each convolutional layer.
[0026] Optionally, in one or more embodiments of the present specification, the knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to the importance score strategy of the central course entity and the adjacent course entity, specifically including:
[0027] Obtaining the knowledge graph of the preset graph convolutional network, and determining the similarity between the central course entity and the adjacent course entities according to the number of common neighbors corresponding to the central course entity and the adjacent course entities in the knowledge graph and the number of common neighbors and a preset bias value;
[0028] Determine the relationship weight value between the central entity and the neighboring entity based on the similarity between the central course entity and the neighboring course entity and the weight between the central course entity and the neighboring course entity;
[0029] Common course neighbor sampling is performed based on the relationship weight values between the central entity and the neighborhood entities, and a permutation list of vector course entities is determined so as to perform sampling based on the permutation list.
[0030] Optionally, in one or more embodiments of the present specification, determining the similarity between the central course entity and the adjacent course entities according to the number of common neighbors and a preset offset value specifically includes:
[0031] The number of common neighbors and the preset offset value are input into a preset similarity calculation formula to determine the similarity between the central course entity and the adjacent course entities; wherein the preset similarity calculation formula is:
[0032]
[0033] Among them, T(i) and T(j) represent the number of neighbors of the central course entity and the adjacent course entity respectively, ε is a bias value ranging from [0,1], and Sim(i,j) represents the similarity between the central course entity and the adjacent course entity.
[0034] Optionally, in one or more embodiments of the present specification, user features and course features output by different convolutional layers are aggregated to obtain course ratings corresponding to the course description features, and online courses with the highest course ratings are recommended based on the course ratings, specifically including:
[0035] Determine the random weights corresponding to each convolution layer, process the user features and course features output by each convolution layer according to the corresponding random weights, and obtain the score values of each convolution layer;
[0036] Aggregating the score values of each convolutional layer to obtain the course score corresponding to the course description feature;
[0037] The online courses are ranked based on the course ratings to recommend online courses with the highest course ratings.
[0038] Optionally, in one or more embodiments of the present specification, after recommending the online course with the highest course rating according to the course rating, the method further includes:
[0039] Acquire the learning record after the online course is recommended, so as to determine the user learning trend corresponding to the user of the course description data according to the learning record; wherein the learning record is used to indicate the user's interest in the recommended online course;
[0040] If it is determined that the user's learning trend is a downward trend, the weight of the course description feature corresponding to the online course is adjusted downward;
[0041] If it is determined that the user learning trend is an upward trend, the weight of the course description feature corresponding to the online course is adjusted upward.
[0042] One or more embodiments of this specification provide a device for recommending online courses, the device comprising:
[0043] at least one processor; and,
[0044] a memory communicatively connected to the at least one processor; wherein,
[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.
[0046] One or more embodiments of the present specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to execute any of the above-described methods.
[0047] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects:
[0048] By determining the word boundaries by word frequency, the course description data can be effectively segmented to obtain more accurate course description segmentations. Then, according to the attribute information corresponding to the course description segmentation in the course recommendation word set, each course description segmentation is labeled to improve the effect of subsequent processing. By extracting the word vector sequence based on the weight matrix, the extracted results can be adjusted according to the weight of each word vector, so as to obtain the word vector related to the current course recommendation, more accurately capture the correlation between words, solve the long dependency problem, and improve the robustness of the word vector representation and the relevance of the course recommendation task. The knowledge graph of the preset graph convolutional network samples common course neighbors according to the importance score strategy of the central course entity and the adjacent course entity, avoiding the problem of lack of stability of the results caused by the existing random selection of the neighborhood. By determining the random weights corresponding to each convolutional layer and aggregating the score values of each convolutional layer, the generation process of the recommendation results can be clearly explained, which enhances the interpretability of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0050] Figure 1 A flowchart of a method for recommending an online course provided in an embodiment of this specification;
[0051] Figure 2 A schematic diagram of an online course evaluation process in an application scenario provided by an embodiment of this specification;
[0052] Figure 3 A schematic diagram of a recommended device structure for an online course provided in an embodiment of this specification;
[0053] Figure 4 A schematic diagram of a non-volatile storage medium structure provided in an embodiment of this specification. DETAILED DESCRIPTION
[0054] The embodiments of this specification provide a method, device and medium for recommending an online course.
[0055] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0056] like Figure 1 As shown, in an embodiment of this specification, a method for recommending an online course is provided, and the method includes:
[0057] S101: receiving course description data to perform split training on the course description data to obtain a pre-trained word vector sequence corresponding to the course description data.
[0058] Since the course description data may come from multi-source heterogeneous data, there is the possibility of multi-language text or bracketing language tasks, in order to fully obtain the semantic representation in the course description data, thereby accelerating the efficiency and accuracy of course recommendation based on the course description data. In the embodiment of this specification, the description data corresponding to the user's needs from the user end, the description data corresponding to the historical recommended courses from the server end and the user end are first received as the course description data corresponding to the current user. Since the sources and entities corresponding to the course description data are different, in order to increase the diversity and interpretability of recommended learning resources, and to avoid the problem of insufficient extraction accuracy of the course description data due to insufficient correlation between the trigger words and the entities before and after, after obtaining the course description data, the embodiment of this specification first splits the course description data for training, thereby obtaining the pre-trained word vector sequence corresponding to the course description data.
[0059] Specifically, in one or more embodiments of the present specification, receiving course description data to split and train the course description data to obtain a pre-trained word vector sequence corresponding to the course description data specifically includes the following process:
[0060] First, in order to improve the accuracy of the recommendation, this application obtains a course recommendation word set corresponding to the course recommendation scenario according to the course recommendation scenario corresponding to the course description data, thereby determining the frequency of occurrence of words in the course recommendation word set according to the course description data, and determining the word boundaries of the course description data based on the frequency of occurrence. Then the course description data is segmented according to the above-mentioned word boundaries to obtain the course description segmentation corresponding to the course description data. By determining the word boundaries by word frequency, the course description data can be effectively segmented to obtain more accurate course description segmentation. Then, according to the attribute information corresponding to the course description segmentation in the course recommendation word set, each course description segmentation is marked to improve the effect of subsequent processing. Among them, it should be noted that the attribute information includes: part of speech information, entity information. In order to improve the instructions of the course description segmentation and reduce the impact of noise on subsequent processing, the course description segmentation will be filtered according to the attribute information to remove meaningless words in the course description segmentation and obtain the processed course description segmentation. Among them, it should be noted that meaningless words include: pause words and stop words. Then determine the word vector of the processed course description segmentation to determine the context dependency of the processed course description segmentation based on the angle cosine calculation. Annotate the context dependency on the processed course description segmentation, and construct a pre-trained word vector sequence based on the word vector of the processed course description segmentation. By calculating the angle cosine of the word vector, the context dependency of the processed course description segmentation can be determined, thereby better reflecting the semantic relationship between words. Annotate the context dependency on the processed course description segmentation to construct a pre-trained word vector sequence, providing a richer word vector representation for subsequent tasks.
[0061] In a certain application scenario of this manual, data preprocessing and training can be performed based on the c-bert module. By converting the course description data into a vector feature representation, the HanziNLP toolkit is used to split the course description sentences, perform word segmentation and part-of-speech tagging, and finally analyze the dependency of the word vector context through angle cosine calculation.
[0062] Among them, v,w represent the word vector after word segmentation; ε is the vector feature representation after removing pauses and stop words. In addition, the c-bert pre-trained word embedding is represented by wordPiple tags, and CLS and END represent the beginning and end representations respectively.
[0063] S102: Determine the relevance of each pre-trained word vector in the pre-trained word vector sequence based on the self-attention mechanism, obtain a corresponding weight matrix, and extract the word vector sequence based on the weight matrix to obtain relevant word vectors.
[0064] In order to better identify the relationship between trigger words and entities, understand the semantic relationship between words and flexibly consider contextual information, and make accurate course recommendations. In this specification, the degree of correlation between each pre-trained word vector in the pre-trained word vector sequence is determined by the self-attention mechanism, and the corresponding weight matrix is obtained, and the word vector sequence is extracted based on the weight matrix to obtain relevant word vectors. By extracting the word vector sequence based on the weight matrix, the extracted result can be adjusted according to the weight of each word vector to obtain the word vector related to the current course recommendation, more accurately capture the correlation between words, solve the long dependency problem, and improve the robustness of the word vector representation and the relevance of the course recommendation task.
[0065] Specifically, in one or more embodiments of the present specification, the relevance of each pre-trained word vector in the pre-trained word vector sequence is determined based on the self-attention mechanism, a corresponding weight matrix is obtained, and the word vector sequence is extracted based on the weight matrix to obtain relevant word vectors, which specifically includes the following process:
[0066] First, the input matrix of the self-attention mechanism is determined based on the pre-trained word vector sequence, and then the input matrix is mapped according to the random matrix corresponding to the self-attention mechanism to obtain the mapping matrix corresponding to the input matrix. Among them, it should be noted that the mapping matrix includes: a query vector matrix, a key vector matrix and a value vector matrix. Based on the preset normalization strategy, the query vector matrix and the key vector matrix are normalized to obtain a normalized result to determine the relevance of each pre-trained word vector in the pre-trained word vector sequence according to the product of the normalized result and the value vector. Then, the weight matrix corresponding to the pre-trained word vector sequence is determined according to the relevance, and the pre-trained word vector sequence is extracted based on the weight matrix to obtain the relevant word vector. In the above steps, by determining the weight matrix based on the relevance, the pre-trained word vector sequence can be extracted according to the specific task or requirement, and the important word vectors can be selected for further processing or analysis. This method can provide a more flexible processing method to meet the needs of different scenarios. By normalizing the query vector matrix and the key vector matrix, it can ensure that the attention distribution on different pre-trained word vectors is more balanced and stable, avoiding information loss or imbalance caused by excessive or too small weights. The relevance of each pre-trained word vector is determined by the product of the normalized result and the value vector. The weight calculation method can be dynamically adjusted according to task requirements or actual conditions to improve the flexibility and adaptability of the model.
[0067] In a certain application scenario of this manual, the output X = [x1, x2, ..., xn] after C-BERT training can be used as the input of the preset self-attention mechanism trigger module to identify the syntactic dependencies of the course description and extract the trigger words, that is, the attention mechanism can be used to extract the trigger words for each element x. i Calculate a weight to indicate the degree of correlation with other elements. Through three linear changes, introduce a random matrix W, map the input matrix X to Q, K, and V, and finally normalize it with Relu and multiply it by the matrix V to get the final output result A. Dynamic sparsity of data can be achieved by replacing Softmax with Relu.
[0068] S103: Convolve the relevant word vectors according to a preset graph convolutional network to obtain user features and course features output by each convolutional layer; wherein the knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to an importance score strategy of a central course entity and adjacent course entities.
[0069] In order to help mine deep potential associations with the rich semantic associations between users and attributes in the knowledge graph, improve recommendation accuracy, and increase the diversity and interpretability of recommended learning resources. Figure 2 As shown, the relevant word vectors are convolved according to the preset convolutional network, so as to obtain the user features and course features output by each convolutional layer. At the same time, the knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to the importance score strategy of the central course entity and the adjacent course entity, thereby solving the problem of the traditional end-to-end graph convolutional network method, which constructs students, teachers, other knowledge points, and videos into a heterogeneous information network, guides the transmission of student preferences based on the shortest path, and later uses the knowledge graph as an auxiliary input to introduce high-order neighborhood information. When constructing the user preference matrix, since the graph uses random selection of entity neighborhoods in entity representation and does not provide directional guidance for selecting entities, the recommendation results of its model often lack stability.
[0070] Specifically, in one or more embodiments of the present specification, the related word vectors are convolved according to a preset graph convolutional network to obtain user features and course features output by each convolutional layer, specifically including:
[0071] The course recommendation graph structure is constructed based on the correlation between the relevant word vectors and the degree of correlation corresponding to the relevant word vectors. The course recommendation graph structure can better model the relationship between users and courses, rather than being limited to the word vectors themselves. This recommendation graph structure can capture the diverse relationships between users and courses, thereby improving the accuracy and personalization of recommendations. Then the course recommendation graph structure is imported into the preset graph convolutional network to perform convolution operations on the course recommendation graph structure according to different convolutional layers of the preset graph convolutional network, gradually extract the features of each node in the course recommendation graph structure, and obtain the feature information of the course recommendation graph structure. The preset graph convolutional network can be used to perform convolution operations on the graph structure to extract the features of the course recommendation graph structure. This method can make full use of the relationship information between nodes, and gradually extract higher-order features through multi-level convolution operations, thereby better representing users and courses. Then, according to the annotation information of the relevant word vector corresponding to the feature information, the entity corresponding to the feature information is determined, so that the feature information is classified according to the corresponding entity, and the user features and course features output by each convolutional layer are obtained.
[0072] Furthermore, the traditional graph convolution method of expanding the neighborhood of the central entity based on random sampling is not conducive to the knowledge graph to fully play its auxiliary role, making the recommendation results lack stability. Therefore, in one or more embodiments of this specification, the knowledge graph of the preset graph convolution network performs common course neighbor sampling according to the importance score strategy of the central course entity and the adjacent course entity to solve the above problem. The specific implementation process is as follows:
[0073] Obtain a knowledge graph of a preset graph convolutional network, and determine the similarity between the central course entity and the adjacent course entities according to the number of common neighbors corresponding to the central course entity and the adjacent course entities in the knowledge graph according to the number of common neighbors and a preset bias value. In one embodiment of the present specification, determining the similarity between the central course entity and the adjacent course entities according to the number of common neighbors and a preset bias value specifically includes:
[0074] The number of common neighbors and the preset offset value are input into the preset similarity calculation formula to determine the similarity between the central course entity and the adjacent course entities; wherein the preset similarity calculation formula is:
[0075] Among them, T(i) and T(j) represent the number of neighbors of the central course entity and the adjacent course entity, ε is a bias value with a value range of [0,1], and Sim(i,j) represents the similarity between the central course entity and the adjacent course entity. After obtaining the similarity, the relationship weight value between the central course entity and the adjacent course entity is determined based on the similarity between the central course entity and the adjacent course entity and the weight between the central course entity and the adjacent course entity. That is, the relationship weight value Score(i,j)=Sim(i,j)*W(i); Sim(i,j) represents the similarity between the central course entity and the adjacent course entity, and W(i) represents the weight between the central course entity and the adjacent course entity, which is assigned according to the preset rule template. Then, based on the relationship weight value of the central entity and the neighboring entity, the common course neighbor sampling is performed to determine the permutation list of the vector course entity so that sampling can be performed based on the permutation list. The problem of lack of stability caused by the existing random selection of the neighborhood is avoided through the process of automatic sorting sampling.
[0076] S104: Aggregate the user features and course features output by different convolutional layers to obtain course ratings corresponding to the course description features, and recommend online courses with the highest course ratings based on the course ratings.
[0077] Specifically, in one or more embodiments of this specification, Figure 2 The output layer shown aggregates the user features and course features output by different convolutional layers to obtain the course ratings corresponding to the course description features, and recommends the online courses with the highest course ratings based on the course ratings. The specific process includes the following:
[0078] First, the random weights corresponding to each convolution layer are determined, and the user features and course features output by each convolution layer are processed according to the corresponding random weights to obtain the score values of each convolution layer. Then, the score values of each convolution layer are aggregated to obtain the course score corresponding to the course description feature, and the online courses are sorted according to the course score to recommend the online courses with the highest course score. Among them, the course score corresponding to the course description feature is:
[0079] In the above formula, S uf represents the preference score of user u for course f, with a value of [0,100], W l is the random weight of the lth layer, T u is the user feature of the lth layer, T fis the course feature of the lth layer. In the above steps, by processing and aggregating the user features and course features output by each convolutional layer, the amount of calculation can be reduced and the processing efficiency can be improved. Based on the combination of user features and course features, online courses can be recommended more personalized to improve user experience. By determining the random weights corresponding to each convolutional layer and aggregating the score values of each convolutional layer, the generation process of the recommendation results can be clearly explained, which enhances the interpretability of the recommendation system.
[0080] Further, in one or more embodiments of the present specification, after recommending the online course with the highest course rating according to the course rating, the method further includes the following process:
[0081] First, in order to determine whether the course recommendation is in line with the interests of the current user, thereby facilitating the adjustment of the recommendation method to improve the accuracy of the course recommendation, the learning record after the online course recommendation is obtained in the embodiment of this specification to determine the user learning trend corresponding to the user of the course description data according to the learning record; wherein, it can be understood that the learning record can be used to indicate the user's interest in the recommended online course. If it is determined at this time that the user's learning trend is a downward trend, it means that the current online course does not meet the user's interest requirements, so the weight of the course description feature corresponding to the online course is adjusted downward. If it is determined that the user's learning trend is an upward trend, it means that the user is interested in the recommended online course, so the weight of the course description feature corresponding to the online course is adjusted upward. By automatically adjusting the weight according to the user's learning trend, the system can adapt to the learning habits and changes of different users and provide online course recommendations that better meet user needs.
[0082] like Figure 3 As shown, the embodiment of this specification provides a schematic diagram of the recommended device structure of an online course, which is composed of Figure 3 Known equipment includes:
[0083] at least one processor; and,
[0084] a memory communicatively connected to the at least one processor; wherein,
[0085] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to: execute any of the above-mentioned methods.
[0086] like Figure 4 As shown, the embodiment of this specification provides a schematic diagram of the internal structure of a non-volatile storage medium, which is composed of Figure 4 It can be known that a non-volatile storage medium stores computer executable instructions, and the computer executable instructions can execute any of the above-mentioned methods.
[0087] 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 device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0088] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0089] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A method for recommending online courses, characterized in that: The method comprises: Receive course description data to perform split training on the course description data to obtain a pre-trained word vector sequence corresponding to the course description data; Determine the relevance of each pre-trained word vector in the pre-trained word vector sequence based on the self-attention mechanism, obtain a corresponding weight matrix, and extract the word vector sequence based on the weight matrix to obtain relevant word vectors; Convolving the related word vectors according to a preset graph convolutional network to obtain user features and course features output by each convolutional layer; wherein the knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to an importance score strategy of a central course entity and adjacent course entities; Aggregate the user features and course features output by different convolutional layers to obtain the course ratings corresponding to the course description features, and recommend the online courses with the highest course ratings based on the course ratings; The receiving of course description data to split the course description data for training and obtain a pre-trained word vector sequence corresponding to the course description data specifically includes: According to the course recommendation scenario corresponding to the course description data, a course recommendation word set corresponding to the course recommendation scenario is obtained, so as to determine the occurrence frequency of words in the course recommendation word set according to the course description data, and determine the word boundary of the course description data based on the occurrence frequency; Segmenting the course description data based on the word boundaries to obtain course description segmented words corresponding to the course description data; Based on the attribute information corresponding to the course description segmentation in the course recommendation word set, each course description segmentation is marked; wherein the attribute information includes: part of speech information and entity information; Filtering the course description segmentation words according to the attribute information to remove meaningless words in the course description segmentation words, and obtaining processed course description segmentation words; wherein the meaningless words include: pause words and stop words; Determine the word vector of the processed course description segmentation to determine the context dependency of the processed course description segmentation according to the angle cosine calculation; Annotating the context dependency on the processed course description segmentation, and forming a pre-trained word vector sequence according to the word vectors of the processed course description segmentation; The knowledge graph of the preset graph convolutional network performs common course neighbor sampling according to the importance score strategy of the central course entity and the adjacent course entity, specifically including: Obtaining the knowledge graph of the preset graph convolutional network, and determining the similarity between the central course entity and the adjacent course entities according to the number of common neighbors corresponding to the central course entity and the adjacent course entities in the knowledge graph and the number of common neighbors and a preset bias value; Determine the relationship weight value between the central entity and the neighboring entity based on the similarity between the central course entity and the neighboring course entity and the weight between the central course entity and the neighboring course entity; Common course neighbor sampling is performed based on the relationship weight values between the central entity and the neighborhood entities, and a permutation list of vector course entities is determined so as to perform sampling based on the permutation list.
2. The online course recommendation method according to claim 1, characterized in that: The step of determining the relevance of each pre-trained word vector in the pre-trained word vector sequence based on the self-attention mechanism, obtaining a corresponding weight matrix, and extracting the word vector sequence based on the weight matrix to obtain relevant word vectors specifically includes: Determine the input matrix of the self-attention mechanism based on the pre-trained word vector sequence, map the input matrix according to the random matrix corresponding to the self-attention mechanism, and obtain a mapping matrix corresponding to the input matrix; wherein the mapping matrix includes: a query vector matrix, a key vector matrix, and a value vector matrix; Normalizing the query vector matrix and the key vector matrix based on a preset normalization strategy to obtain a normalized result so as to determine the degree of correlation of each pre-trained word vector in the pre-trained word vector sequence according to the product of the normalized result and the value vector; A weight matrix corresponding to the pre-trained word vector sequence is determined according to the degree of correlation, and the pre-trained word vector sequence is extracted based on the weight matrix to obtain relevant word vectors.
3. The online course recommendation method according to claim 1, characterized in that: The method of convolving the related word vectors according to the preset graph convolution network to obtain the user features and course features output by each convolution layer specifically includes: Constructing a course recommendation graph structure based on the relevant word vectors and the degree of correlation corresponding to the relevant word vectors; Importing the course recommendation graph structure into the preset graph convolutional network, performing convolution operations on the course recommendation graph structure according to different convolutional layers of the preset graph convolutional network, gradually extracting features of each node in the course recommendation graph structure, and obtaining feature information of the course recommendation graph structure; According to the annotation information of the relevant word vector corresponding to the feature information, the entity corresponding to the feature information is determined, so as to classify the feature information based on the entity and obtain the user features and course features output by each convolutional layer.
4. The online course recommendation method according to claim 1, characterized in that: Determining the similarity between the central course entity and the adjacent course entities according to the number of common neighbors and the preset offset value specifically includes: The number of common neighbors and the preset offset value are input into a preset similarity calculation formula to determine the similarity between the central course entity and the adjacent course entities; wherein the preset similarity calculation formula is: Among them, T(i) and T(j) represent the number of neighbors of the central course entity and the adjacent course entity respectively, ε is a bias value ranging from [0,1], and Sim(i,j) represents the similarity between the central course entity and the adjacent course entity.
5. The online course recommendation method according to claim 1, characterized in that: The user features and course features output by different convolutional layers are aggregated to obtain the course ratings corresponding to the course description features, and the online courses with the highest course ratings are recommended according to the course ratings, specifically including: Determine the random weights corresponding to each convolution layer, process the user features and course features output by each convolution layer according to the corresponding random weights, and obtain the score values of each convolution layer; Aggregating the score values of each convolutional layer to obtain the course score corresponding to the course description feature; The online courses are ranked based on the course ratings to recommend online courses with the highest course ratings.
6. The online course recommendation method according to claim 1, characterized in that: After recommending the online course with the highest course rating according to the course rating, the method further includes: Acquire the learning record after the online course is recommended, so as to determine the user learning trend corresponding to the user of the course description data according to the learning record; wherein the learning record is used to indicate the user's interest in the recommended online course; If it is determined that the user's learning trend is a downward trend, the weight of the course description feature corresponding to the online course is adjusted downward; If it is determined that the user learning trend is an upward trend, the weight of the course description feature corresponding to the online course is adjusted upward.
7. A device for recommending online courses, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: execute any of the methods described in claims 1-6.
8. A non-volatile storage medium storing computer executable instructions, characterized in that: The computer executable instructions can: execute the method described in any one of claims 1 to 6 above.
Citation Information
Patent Citations
Course recommendation method and system based on graph convolutional neural network and dynamic weights
CN110580314A
Online course recommendation method and system
CN115146162A