A multi-model-based online course review sentiment analysis method and related device

By calculating the complexity score of user review data, calling multiple sentiment analysis models and constructing a multi-objective optimization function, the accuracy and efficiency issues of sentiment analysis in online education platforms were solved, achieving efficient sentiment analysis results.

CN120994829BActive Publication Date: 2025-12-23湖南工商大学
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511517932.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-23
Publication Date
2025-12-23
Estimated Expiration
2045-10-23

AI Technical Summary

Technical Problem

Existing online education platforms' user comment sentiment analysis technology suffers from several drawbacks, including a lack of intelligent scheduling for model calls, resource redundancy, coarse multi-model fusion strategies, and a mismatch between analysis granularity and text complexity, leading to inaccurate sentiment analysis.

Method used

By acquiring user comment data, calculating complexity scores, determining the number of sentiment analysis models, calling multiple sentiment analysis models to perform sentiment analysis, constructing a multi-objective optimization function to solve for the optimal weights, and fusing the sentiment analysis results.

Benefits of technology

It improves the accuracy and reliability of sentiment analysis, balances computational efficiency, and enables comprehensive analysis of user comments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120994829B_ABST
    Figure CN120994829B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of course review analysis, and provides an online course review sentiment analysis method based on multiple models and related equipment.The method comprises the following steps: calculating the complexity score of user review data, and determining the number of sentiment analysis models corresponding to the user review data according to the complexity score; when the number of sentiment analysis models is multiple, multiple sentiment analysis models equal to the number of sentiment analysis models are called, and the user review data is subjected to sentiment analysis by using each sentiment analysis model to obtain a sentiment analysis result corresponding to each sentiment analysis model; a multi-objective optimization function is constructed based on all the sentiment analysis results, and the multi-objective optimization function is solved to obtain an optimal weight corresponding to each sentiment analysis result; and all the sentiment analysis results are fused according to all the optimal weights to obtain a final sentiment analysis result of the user review data.The method can improve the accuracy of sentiment analysis of user reviews.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of course review analysis, in particular to an online course review sentiment analysis method based on multiple models and related equipment. BACKGROUND

[0002] User reviews of online education platforms serve as a massive and real-time feedback source, which is a key basis for understanding learners' opinions on course content and platform experience. However, existing sentiment analysis techniques have significant bottlenecks: first, model invocation lacks intelligent scheduling, and a single model cannot handle complex text, while static parallel multi-models lead to resource redundancy and cannot balance response speed and computing efficiency; second, multi-model fusion strategies are rough and rely on simple averaging or voting mechanisms, which fail to effectively quantify inter-model consensus and intra-model confidence, resulting in compromised result stability and interpretability; third, the analysis granularity and text complexity are mismatched, and there is no adaptive mechanism for review length, syntactic depth, and semantic richness, leading to inadequate analysis or resource overload. As a result, sentiment analysis of user reviews is inaccurate. SUMMARY

[0003] The embodiments of the present application provide an online course review sentiment analysis method based on multiple models and related equipment, which can solve the problem of inaccurate sentiment analysis of user reviews.

[0004] In a first aspect, the embodiments of the present application provide an online course review sentiment analysis method based on multiple models, which comprises:

[0005] Obtaining user review data of an online course;

[0006] Calculating the complexity score of the user review data and determining the number of sentiment analysis models corresponding to the user review data according to the complexity score;

[0007] When the number of sentiment analysis models is multiple, multiple sentiment analysis models whose number is equal to the number of sentiment analysis models are invoked, and each sentiment analysis model is used to perform sentiment analysis on the user review data to obtain a sentiment analysis result corresponding to each sentiment analysis model; the sentiment analysis result is used to describe the probability that the user review data belongs to each sentiment type;

[0008] Based on all sentiment analysis results, a multi-objective optimization function is constructed, and the multi-objective optimization function is solved to obtain an optimal weight corresponding to each sentiment analysis result; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results;

[0009] All sentiment analysis results are fused according to all optimal weights to obtain a final sentiment analysis result of the user review data.

[0010] Optionally, the complexity score of the user comment data is calculated, including:

[0011] The length feature, average dependency depth and semantic diversity value of the user comment data are calculated.

[0012] The complexity score of the user comment data is calculated based on the length feature, average dependency depth and semantic diversity value.

[0013] Optionally, the length feature, average dependency depth and semantic diversity value of the user comment data are calculated, including:

[0014] Through the formula:

[0015] ;

[0016] The length feature of the user comment data is calculated ;

[0017] Wherein, represents the character set of the user comment data, represents the number of characters of the user comment data;

[0018] Through the formula:

[0019] ;

[0020] The average dependency depth of the user comment data is calculated ;

[0021] Wherein, represents the i-th word in the user comment data, represents the dependency tree depth, represents the total number of words of the user comment data; Through the formula:

[0022]

[0023] ;

[0024] The semantic diversity value of the user comment data is calculated ;

[0025] Wherein, represents the theme set involved in the user comment data, represents the number of themes involved in the user comment data.

[0026] Optionally, the complexity score of the user comment data is calculated based on the length feature, average dependency depth and semantic diversity value, including:

[0027] Through the formula:

[0028] ;​

[0029] Computing a complexity score for user review data ;

[0030] in, , , All are weighting coefficients. , This represents the standardized length feature. This represents the average dependency depth after standardization. This represents the standardized semantic diversity value.

[0031] Optional methods for sentiment analysis of online course reviews include:

[0032] When the number of sentiment analysis models is 1, one sentiment analysis model is called to perform sentiment analysis on the user comment data, and the final sentiment analysis result of the user comment data is obtained.

[0033] Optionally, a multi-objective optimization function can be constructed based on all sentiment analysis results, including:

[0034] A consensus function and a confidence function are constructed based on all sentiment analysis results.

[0035] Each sentiment analysis model is used to generate explanatory text for the sentiment analysis results corresponding to each sentiment analysis model, and an explanatory consistency function is calculated based on all explanatory texts;

[0036] Construct a multi-objective optimization function based on the consensus function, confidence function, and interpretation consistency function values.

[0037] Optionally, the consensus function is:

[0038] ;

[0039] in, Indicates the degree of consensus. Represents the weight vector. Indicates the number of sentiment analysis models. Indicates the first Sentiment analysis results corresponding to each sentiment analysis model Represents the aggregated sentiment probability distribution. , This represents the probability distribution of the first emotion type. This represents the probability distribution of the second emotion type. Indicates the first The probability distribution of sentiment types , Indicates the first The probability distribution of sentiment types Indicates the first Aggregate distribution of sentiment types, Indicates the first Aggregate distribution of sentiment types, , This represents the aggregate distribution of the first sentiment type. , , Indicates the first The weights corresponding to each sentiment analysis result , Indicates the first The sentiment analysis model corresponding to the first Cumulative distribution of each sentiment type , Indicates the first In the sentiment analysis results, the first The probability of each sentiment type Indicates JS divergence:

[0040] ;

[0041] in, express and The average distribution , Indicates KL divergence;

[0042] The confidence function is:

[0043] ;

[0044] in, Indicates the confidence level. Represents the information entropy function;

[0045] The consistency function is explained as follows:

[0046] ;

[0047] in, Indicates the consistent interpretation value. Represents cosine similarity. Indicates the first A dense vector corresponding to the explanatory text. Indicates the first Dense vectors corresponding to each explanatory text:

[0048] ;

[0049] in, Indicates the first An explanatory text, denotes dimension of

[0050] Optionally, the multi-objective optimization function is:

[0051] ;

[0052] ;

[0053] wherein, denotes a standard probability simplex constraint on the weight space, denotes dimension of

[0054] Optionally, all sentiment analysis results are fused according to all optimal weights to obtain a final sentiment analysis result of the user comment data, including:

[0055] by the formula:

[0056] ;

[0057] ;

[0058] ;

[0059] ;

[0060] calculating a final sentiment analysis result of the user comment data ;

[0061] wherein, denotes a final sentiment probability distribution of the first sentiment type, denotes a final sentiment probability distribution of the second sentiment type, denotes a final sentiment probability distribution of the sentiment type, , denotes a final sentiment probability distribution of the sentiment type, denotes a final aggregation distribution of the sentiment type, denotes a final aggregation distribution of the sentiment type, denotes a final aggregation distribution of the first sentiment type, denotes a final aggregation distribution of the sentiment type.

[0062] In a second aspect, the embodiments of the present application provide an online course review sentiment analysis device based on a multi-model, comprising:

[0063] an acquisition module configured to acquire user comment data of an online course;

[0064] a calculation module configured to calculate a complexity score of the user comment data and determine a number of sentiment analysis models corresponding to the user comment data according to the complexity score;

[0065] a sentiment analysis module configured to, when the number of sentiment analysis models is multiple, invoke multiple sentiment analysis models equal to the number of sentiment analysis models, and perform sentiment analysis on the user comment data by using each sentiment analysis model to obtain a sentiment analysis result corresponding to each sentiment analysis model; the sentiment analysis result is used to describe a probability that the user comment data belongs to each sentiment type;

[0066] a solution module configured to construct a multi-objective optimization function based on all the sentiment analysis results, and solve the multi-objective optimization function to obtain an optimal weight corresponding to each sentiment analysis result; the multi-objective optimization function is used to describe the accuracy of all the sentiment analysis results;

[0067] a fusion module configured to fuse all the sentiment analysis results according to all the optimal weights to obtain a final sentiment analysis result of the user comment data.

[0068] In a third aspect, an embodiment of the present application provides a terminal device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the online course comment sentiment analysis method based on multiple models when executing the computer program.

[0069] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the online course comment sentiment analysis method based on multiple models.

[0070] The above-mentioned scheme of the present application has the following beneficial effects:

[0071] In the embodiment of the present application, the user comment data of the online course is acquired, the complexity score of the user comment data is calculated, the number of sentiment analysis models corresponding to the user comment data is determined according to the complexity score, when the number of sentiment analysis models is multiple, multiple sentiment analysis models with a number equal to the number of sentiment analysis models are called, the user comment data is analyzed by using each sentiment analysis model to obtain the sentiment analysis result corresponding to each sentiment analysis model, then a multi-objective optimization function is constructed based on all the sentiment analysis results, the multi-objective optimization function is solved to obtain the optimal weight corresponding to each sentiment analysis result, finally all the sentiment analysis results are fused according to all the optimal weights to obtain the final sentiment analysis result of the user comment data. Wherein, the number of sentiment analysis models is determined according to the complexity of the user comment data, the complexity of the user comment data is considered, the sentiment analysis models are called according to the complexity, the calculation efficiency is balanced while improving the comprehensiveness of the analysis of the user comment, the optimal weight is obtained by solving the multi-objective optimization function, then the sentiment analysis results are fused, the performance of different sentiment analysis models is considered, and the accuracy and reliability of the final sentiment analysis result are improved.

[0072] Other benefits of the present application will be described in detail in the subsequent specific embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0074] Figure 1 The flowchart of the online course comment sentiment analysis method based on multiple models provided by an embodiment of the present application;

[0075] Figure 2 The structural schematic diagram of the online course comment sentiment analysis device based on multiple models provided by an embodiment of the present application;

[0076] Figure 3 The structural schematic diagram of the terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0077] In the following description, for purposes of explanation and not limitation, specific details are set forth such as particular architectures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known methods, devices, circuits, and

[0078] It is to be understood that the terminology "includes", "has", "holds", "contains" or "comprising", "including", "having" and the like, when used in the present specification and in the accompanying claims, are used in the sense of "including but not limited to", "including but not limited to", "including but not limited to" and "including but not limited to" respectively, and should be accorded a broad scope so as to encompass the various embodiments of the present application.

[0079] It is also to be understood that the terminology "and / or" as used in the present specification and in the accompanying claims, refers to one or more of the associated listed items, in any combination and all possible combinations, and includes these combinations.

[0080] As used in the present specification and in the accompanying claims, the term "if" can be interpreted as meaning "when" or "once" or "in response to a determination" or "in response to a detection" depending on the context. Similarly, the phrase "if it is determined" or "if [a described condition or event] is detected" can be interpreted as meaning "once it is determined" or "in response to the determination" or "once [the described condition or event] is detected" or "in response to the detection [of the described condition or event]", depending on the context.

[0081] In addition, the terms "first", "second", "third", etc. as used in the description of the specification and the appended claims are used only to distinguish different instances of similar elements and do not imply or suggest relative importance.

[0082] The use of the terms "one embodiment", "some embodiments", "other embodiments", "another embodiment", "additional embodiments", etc. has been mentioned above. It is to be understood that these phrases are not necessarily referring to the same embodiments, unless otherwise specifically stated. Rather, by using such phrases the applicant is indicating that at least one embodiment of the application could be so implemented.

[0083] In view of the problem that existing sentiment analysis of user comments is inaccurate, an online course comment sentiment analysis method based on multiple models is provided in the embodiments of the present application. The online course comment sentiment analysis method obtains user comment data of an online course, calculates a complexity score of the user comment data, and determines a number of sentiment analysis models corresponding to the user comment data according to the complexity score. When the number of sentiment analysis models is multiple, multiple sentiment analysis models equal to the number of sentiment analysis models are called, and each sentiment analysis model is used to perform sentiment analysis on the user comment data to obtain a sentiment analysis result corresponding to each sentiment analysis model. Then, a multi-objective optimization function is constructed based on all the sentiment analysis results, and the multi-objective optimization function is solved to obtain an optimal weight corresponding to each sentiment analysis result. Finally, all the sentiment analysis results are fused according to all the optimal weights to obtain a final sentiment analysis result of the user comment data. In the method, the number of sentiment analysis models is determined according to the complexity of the user comment data, the complexity of the user comment data is considered, the sentiment analysis models are called according to the complexity, the overall analysis of the user comments is improved, and the calculation efficiency is balanced. By solving the multi-objective optimization function, the optimal weight is obtained, and then the sentiment analysis results are fused, the performance of different sentiment analysis models is considered, and the accuracy and reliability of the final sentiment analysis result are improved.

[0084] Next, the online course comment sentiment analysis method based on multiple models provided by the present application is exemplarily described.

[0085] As shown in Figure 1 , the online course comment sentiment analysis method based on multiple models provided by the present application includes the following steps:

[0086] Step 11, obtaining user comment data of an online course.

[0087] The online course is a course in an online course learning platform such as a MOOC and Xuetang Online. The user comment data is text of user comments of the online course, such as “not recommended for beginners”.

[0088] In some embodiments of the present application, the user comment data of the online course can be obtained by accessing the online course learning platform.

[0089] Step 12, calculating a complexity score of the user comment data, and determining a number of sentiment analysis models corresponding to the user comment data according to the complexity score.

[0090] In some embodiments of the present application, the step of calculating the complexity score of the user comment data and determining the number of sentiment analysis models corresponding to the user comment data according to the complexity score includes:

[0091] In the first step, the length feature, average dependency depth and semantic diversity value of the user review data are calculated.

[0092] The length feature is used to describe the length of the user review data, the average dependency depth is used to describe the syntactic complexity of the user review data, and the semantic diversity is used to describe the semantic complexity of the user review data.

[0093] Specifically, the length feature of the user review data is calculated by the formula:

[0094] ;

[0095] The length feature of the user review data is calculated by the formula: .

[0096] wherein, represents the character set of the user review data, represents the number of characters in the user review data.

[0097] The average dependency depth of the user review data is calculated by the formula:

[0098] ;

[0099] The average dependency depth of the user review data is calculated by the formula: .

[0100] wherein, represents the i-th word in the user review data, represents the dependency tree depth, represents the total number of words in the user review data. The semantic diversity value of the user review data is calculated by the formula:

[0101]

[0102] ; The semantic diversity value of the user review data is calculated by the formula:

[0103] .

[0104] wherein, represents the theme set involved in the user review data, represents the number of themes involved in the user review data.

[0105] ​Exemplarily, the above-mentioned user comment data involves topics such as courses, teachers, platforms, etc. The dependency syntax tree algorithm can be used to calculate the dependency tree depth of each word. The dependency syntax tree is a directed tree structure with words as nodes, which is used to represent the grammatical dependency relationship between words in a sentence. Each word (except the root word) has a unique "parent node", and the upper node represents the grammatical core to which the word depends. In the tree structure, the root node is usually a verb, and other words are represented by dependency arcs to show modification, subject-predicate, object-complement, adverbial, etc. In this structure, the "depth" of each word is defined as the number of edges in the path from the word node to the root node. The greater the depth, the deeper the grammatical nesting level of the word, and the relatively complex the syntactic structure.

[0106] Secondly, the complexity score of the user comment data is calculated based on the length feature, the average dependency depth and the semantic diversity value.

[0107] Specifically, the complexity score of the user comment data is calculated by the formula:

[0108]

[0109] The complexity score of the user comment data is calculated

[0110] wherein, are weight coefficients, denotes the normalized length feature, denotes the normalized average dependency depth, denotes the normalized semantic diversity value.

[0111] Exemplarily, the above-mentioned data can be normalized by methods such as deviation standardization. The above-mentioned weight coefficients are all preset values.

[0112] Thirdly, the number of sentiment analysis models corresponding to the user comment data is determined according to the complexity score.

[0113] Specifically, the higher the complexity score, the greater the number of sentiment analysis models. The number of sentiment analysis models can be determined by comparing the complexity score with a preset threshold value.

[0114] Exemplarily, a first complexity threshold value and a second complexity threshold value are set, the first complexity threshold value is less than the second complexity threshold value, if the complexity score is less than or equal to the first complexity threshold value, the number of sentiment analysis models is 1, if the complexity score is greater than the first complexity threshold value and less than or equal to the second complexity threshold value, the number of sentiment analysis models is 3, and if the complexity score is greater than the second complexity threshold value, the number of sentiment analysis models is 5.

[0115] ​​​​​Step 13, when the number of sentiment analysis models is multiple, a plurality of sentiment analysis models equal to the number of sentiment analysis models are called, and each sentiment analysis model is used to perform sentiment analysis on the user comment data to obtain a sentiment analysis result corresponding to each sentiment analysis model.

[0116] The sentiment analysis result is used to describe the probability that the user comment data belongs to each sentiment type (such as strong negative, negative, neutral, positive, strong positive, etc.). The sentiment analysis model can be a large language model such as chatgpt, deep search, Grok, and general meaning.

[0117] Specifically, the user comment data is input into each sentiment analysis model, and the sentiment analysis model performs sentiment analysis on the user comment data to output the sentiment analysis result.

[0118] It should be noted that when the number of sentiment analysis models is 1, any one sentiment analysis model is called to perform sentiment analysis on the user comment data to obtain the final sentiment analysis result of the user comment data.

[0119] Exemplarily, the prompt words of the large language model are:

[0120] Input: comment text {{comment}}.

[0121] First stage:

[0122] Vocabulary feature dimension: sentiment word distribution and polarity intensity (positive / negative / neutral)? Does it contain intensifiers (such as "extremely") or weakeners? List the key words in {{comment}} and mark the sentiment weight.

[0123] Syntactic structure dimension: how does the sentence type (exclamation / question / interrogation) strengthen the sentiment? What is the role of special structures (double negation, parallelism)? Analyze the relevance of sentence patterns and emotional expression in {{comment}}.

[0124] Domain context dimension: in the {{classification}} field, does this expression conform to the conventional sentiment pattern? Are there any field-specific metaphors? Interpret the emotional significance in {{comment}} in combination with domain knowledge.

[0125] Implicit intent dimension: is there irony, implicit criticism, or veiled praise? Is the surface and deep sentiment of the text separated? Reveal the potential emotional conflict in {{comment}}.

[0126] Second stage:

[0127] Comprehensive sentiment assessment: Based on the cross-validation of the aforementioned four dimensions, the following points are emphasized: 1. The decisive influence of core sentiment words; 2. Sentiment transformation of domain-specific expressions; 3. The correction of the final rating by implicit intentions. The probability distribution of five levels of sentiment is output: [Strongly Negative, Negative, Neutral, Positive, Strongly Positive] = [?, ?, ?, ?, ?].

[0128] Step 14: Construct a multi-objective optimization function based on all sentiment analysis results, and solve the multi-objective optimization function to obtain the optimal weight corresponding to each sentiment analysis result.

[0129] The multi-objective optimization function described above is used to describe the accuracy of all sentiment analysis results.

[0130] In some embodiments of this application, the steps of constructing a multi-objective optimization function based on all sentiment analysis results and solving the multi-objective optimization function to obtain the optimal weight corresponding to each sentiment analysis result include:

[0131] The first step is to construct a consensus function and a confidence function based on all sentiment analysis results.

[0132] Specifically, the consensus function is:

[0133] ;

[0134] in, Indicates the degree of consensus. Represents the weight vector. Indicates the number of sentiment analysis models. Indicates the first Sentiment analysis results corresponding to each sentiment analysis model Represents the aggregated sentiment probability distribution. , This represents the probability distribution of the first emotion type. This represents the probability distribution of the second emotion type. Indicates the first The probability distribution of sentiment types , Indicates the first The probability distribution of sentiment types Indicates the first Aggregate distribution of sentiment types, Indicates the first Aggregate distribution of sentiment types, , This represents the aggregate distribution of the first sentiment type. , , Indicates the first a weight corresponding to the sentiment analysis result, , denotes the cumulative distribution of the jth sentiment type corresponding to the ith sentiment analysis model, , denotes the probability of the jth sentiment type in the ith sentiment analysis result, denotes the JS divergence:

[0135] ;

[0136] wherein, denotes the average distribution of p and q, which is an intermediate distribution in the calculation of JS divergence, and is used to measure the difference between two probability distributions, denotes the KL divergence.

[0137] The confidence function is:

[0138] ;

[0139] wherein, denotes the confidence, denotes the information entropy function, which is used to measure the uncertainty of a probability distribution. The greater the entropy, the more uniform the distribution, indicating that the model confidence is lower; the smaller the entropy, the more concentrated the distribution, indicating that the model confidence is higher.

[0140] For example, the expression of the above KL divergence is:

[0141] ;

[0142] wherein, denotes the probability of distribution p in the jth sentiment type, denotes the probability of distribution q in the jth sentiment type. The second step is to generate an explanation text for each sentiment analysis result corresponding to each sentiment analysis model using each sentiment analysis model, and calculate an explanation consistency function based on all explanation texts.

[0143] The explanation text can be obtained by setting a prompt word for the sentiment analysis model, and using the sentiment analysis model to infer the sentiment analysis result according to the prompt word.

[0144]

[0145] ​​​​​​​​​​​For example, for the user review data "The course is good, the content is also relatively comprehensive, and it is suggested to add some summary courses, and pay more attention to guidance and inspiration when teaching the subject.", the sentiment analysis result [strongly negative, negative, neutral, positive, strongly positive] = [0.0, 0.0, 0.25, 0.65, 0.10], and the explanation text is "There is no negative element; the neutral part (suggestion) accounts for 25%, but is offset by the domain conversion part; the positive part dominates (65%) due to the high weight of core words; the strongly positive part is low (10%) due to the lack of intensifiers or strong expressions. The overall rating is "positive", and the probability sum is 1.0."

[0146] The explanation consistency function is:

[0147] ;

[0148] wherein, represents the explanation consistency value, represents the cosine similarity, represents the dense vector corresponding to the th explanation text, represents the dense vector corresponding to the th explanation text:

[0149] ;

[0150] wherein, represents the th explanation text, represents the dimension of .

[0151] Thirdly, a multi-objective optimization function is constructed according to the consensus degree function, the confidence degree function and the explanation consistency function value.

[0152] Specifically, the multi-objective optimization function is:

[0153] ;

[0154] ;

[0155] wherein, represents the standard probability simplex constraint in the dimensional weight space, represents the dimension of .

[0156] For example, considering the differences in the measurement scales of the three functions, the three functions can be normalized by maximum and minimum values before constructing the multi-objective optimization function, and the multi-objective optimization function is:

[0157] ;

[0158] wherein, denotes the normalized consensus function, denotes the normalized confidence function, denotes the normalized interpretative consistency function.

[0159] Step 4, solve the multi-objective optimization function to obtain the optimal weight corresponding to each sentiment analysis result.

[0160] The optimal weight corresponding to the above sentiment analysis result is the weight corresponding to the sentiment analysis result in the multi-objective function .

[0161] Exemplarily, the multi-objective optimization function can be solved by using a non-dominated sorting genetic algorithm to obtain the optimal weight corresponding to each sentiment analysis result.

[0162] Step 15, according to all the optimal weights, all the sentiment analysis results are fused to obtain the final sentiment analysis result of the user comment data.

[0163] The above final sentiment analysis result is used to describe the probability that the user comment data belongs to each sentiment type after the optimal weight weighted fusion.

[0164] Specifically, by the formula:

[0165] ;

[0166] ;

[0167] ;

[0168] ;

[0169] The final sentiment analysis result of the user comment data is calculated .

[0170] wherein, denotes the final sentiment probability distribution of the 1st sentiment type, denotes the final sentiment probability distribution of the 2nd sentiment type, denotes the final sentiment probability distribution of the th sentiment type, , denotes the final sentiment probability distribution of the th sentiment type, denotes the final aggregation distribution of the th sentiment type, denotes the final aggregation distribution of the th sentiment type, the final aggregation distribution of the first sentiment type, the optimal weight corresponding to the first sentiment analysis result.

[0171] For example, after obtaining the final sentiment analysis result of the user comment data, the user comment data and the corresponding final sentiment analysis result can be stored in the knowledge base. When performing sentiment analysis on new user comment data, the knowledge base can be searched to determine whether similar user comment data exists in the new user comment data. If similar user comment data exists, the final sentiment analysis result corresponding to the similar user comment data is used as the final sentiment analysis result of the new user comment data. The user comment data can be encoded into an embedding vector using an efficient semantic embedding model (Embedding Models). Then, the cosine similarity between the embedding vector of the new user comment data and the embedding vector of each piece of user comment data in the knowledge base is calculated. If there is a cosine similarity greater than a preset similarity, it is considered that the user comment data is similar to the new user comment data.

[0172] It should be noted that after obtaining the final sentiment analysis result of the user comment data, the student or the teacher can be suggested to select an online course of the online course learning platform according to the final sentiment analysis result, so as to promote the intelligent evolution of the online education field.

[0173] It is worth mentioning that the number of sentiment analysis models is determined according to the complexity of the user comment data. The complexity of the user comment data is considered, and the sentiment analysis model is called according to the complexity. The overall analysis of the user comment data is improved, and the calculation efficiency is balanced. By solving the multi-objective optimization function, the optimal weight is obtained, and the sentiment analysis results are fused. The performance of different sentiment analysis models is considered, and the accuracy and reliability of the final sentiment analysis result are improved.

[0174] The method of the present application will be described below in conjunction with a specific example.

[0175] In this embodiment, Python tool is used to obtain course comment data of a higher mathematics course in a MOOC (Massive Open Online Courses) platform. There are 571 pieces of user comment data in the course.

[0176] For each course comment to be analyzed, the semantic similarity between the comment and the knowledge base is calculated, that is, the similarity between the vector after the comment is embedded and the vector saved in the knowledge base is calculated. If there is a record with a similarity greater than a preset threshold (0.85), the sentiment analysis result of the record is directly used; if not, the subsequent steps are continued.

[0177] ​For the comments that do not hit the knowledge base, the length characteristics, syntactic complexity and semantic diversity of the comments are comprehensively analyzed, the complexity score is calculated, and the complexity level is divided into low, medium and high according to the preset threshold.

[0178] Due to too many comment texts, they cannot be completely displayed, and 10 comments are used as the experimental results of this embodiment for display. The selected 10 comments are shown in Table 1:

[0179] Table 1 Online course comment content

[0180]

[0181] The corresponding complexity level is shown in Table 2:

[0182] Table 2 Complexity level

[0183]

[0184] Among them, the complexity level is set according to the complexity score Specifically: when , it is low (low); when , it is medium (medium); and when , it is high (high).

[0185] According to the results in Table 2, the similarity between comment 7 “Can't understand, difficult to understand” and comment 5 “Not recommended for zero foundation” is greater than the threshold 0.85, so the discrete probability distribution of the comprehensive sentiment tendency of comment 5 is directly reused and does not participate in the subsequent step execution.

[0186] For low complexity comments, a single large language model is called for sentiment analysis, and its output is used as the final sentiment probability distribution; for medium complexity comments, three heterogeneous models are called in parallel to independently output sentiment probability distributions; for high complexity comments, five heterogeneous models are called in parallel to independently output sentiment probability distributions; the output results are shown in Table 3:

[0187] Table 3 Sentiment probability distribution results

[0188]

[0189] For multiple sentiment probability distributions generated by medium and high complexity comments, a multi-objective optimization function is constructed with model consistency, model certainty and model explanation consistency as three optimization objectives, the optimal weight distribution is solved by multi-objective programming, and the final sentiment probability distribution is generated. There are a total of 6 comments in the above Table 3 that need to be aggregated by multi-objective optimization, and the aggregation results are shown in Table 4:

[0190] Table 4 Multi-objective optimization aggregation results ​​​

[0191] ;

[0192] wherein, represents the optimal weight vector.

[0193] In summary, the discrete probability distribution of the sentiment tendency of the selected 10 comments is shown in Table 5:

[0194] Table 5 Probability distribution of sentiment tendency of online course comments

[0195] ;

[0196] The above results show the sentiment tendency output of the 10 course comments after multi-model sentiment analysis and probability distribution aggregation. From the results, the method can effectively distinguish comment texts with different emotional polarity.

[0197] In summary, the present experiment preliminarily verifies the stability and effectiveness of the method of the present application in the multi-source sentiment prediction task, and provides good support for subsequent more refined emotion modeling in large-scale course evaluation data.

[0198] The multi-model-based online course comment sentiment analysis device provided by the present application will be exemplarily described below.

[0199] As Figure 2 shown, the embodiment of the present application provides a multi-model-based online course comment sentiment analysis device, which comprises:

[0200] The acquisition module 201 is configured to acquire user comment data of an online course.

[0201] The calculation module 202 is configured to calculate a complexity score of the user comment data, and determine a number of sentiment analysis models corresponding to the user comment data according to the complexity score.

[0202] The sentiment analysis module 203 is configured to, when the number of sentiment analysis models is multiple, call multiple sentiment analysis models with a number equal to the number of sentiment analysis models, and perform sentiment analysis on the user comment data by using each sentiment analysis model to obtain a sentiment analysis result corresponding to each sentiment analysis model; the sentiment analysis result is used to describe a probability that the user comment data belongs to each sentiment type.

[0203] The solving module 204 is configured to construct a multi-objective optimization function based on all the sentiment analysis results, and solve the multi-objective optimization function to obtain an optimal weight corresponding to each sentiment analysis result; the multi-objective optimization function is used to describe the accuracy of all the sentiment analysis results.

[0204] The fusion module 205 is configured to fuse all sentiment analysis results according to all optimal weights to obtain a final sentiment analysis result of the user comment data.

[0205] It should be noted that the information interaction and execution process between the above apparatuses / units are based on the same concept as the method embodiments of the present application, and the specific functions and technical effects brought by the above apparatuses / units can be referred to the method embodiments part, which will not be repeated here.

[0206] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is exemplified, and in actual application, the above-mentioned functions can be completed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to complete all or part of the above-described functions. Each functional unit and module in the embodiments can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit. In addition, the specific names of each functional unit and module are only for convenient distinction, and do not limit the protection scope of the present application. The specific working process of the unit and module in the system can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0207] As shown in Figure 3 , the embodiments of the present application provide a terminal device, the terminal device D10 of the embodiments includes at least one processor D100 (only one processor is shown in the Figure 3 ), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 executes the computer program D102 to implement the steps in any of the above method embodiments.

[0208] Specifically, the processor D100 executes the computer program D102, obtains user comment data of an online course, calculates a complexity score of the user comment data, determines a number of sentiment analysis models corresponding to the user comment data according to the complexity score, calls a plurality of sentiment analysis models whose number is equal to the number of the sentiment analysis models when the number of the sentiment analysis models is multiple, performs sentiment analysis on the user comment data by using each of the sentiment analysis models to obtain a sentiment analysis result corresponding to each of the sentiment analysis models, constructs a multi-objective optimization function based on all the sentiment analysis results, solves the multi-objective optimization function to obtain an optimal weight corresponding to each of the sentiment analysis results, and finally fuses all the sentiment analysis results according to all the optimal weights to obtain a final sentiment analysis result of the user comment data. In this way, the number of the sentiment analysis models is determined according to the complexity of the user comment data, the complexity of the user comment data is considered, the sentiment analysis models are called according to the complexity, the analysis comprehensiveness of the user comment data is improved, and the calculation efficiency is balanced, the optimal weight is obtained by solving the multi-objective optimization function, the sentiment analysis results are fused, the performance of different sentiment analysis models is considered, and the accuracy and reliability of the final sentiment analysis result are improved.

[0209] The processor D100 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gates or transistor logic components, discrete hardware components, etc. The general-purpose processor can be a microprocessor or can also be any conventional processor.

[0210] The storage D101 can be an internal storage unit of the terminal device D10 in some embodiments, such as a hard disk or a memory of the terminal device D10. The storage D101 can also be an external storage device of the terminal device D10 in other embodiments, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device D10. Further, the storage D101 can include both the internal storage unit and the external storage device of the terminal device D10. The storage D101 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of the computer program, etc. The storage D101 can also be used to temporarily store data that has been output or will be output.

[0211] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the steps in each of the above method embodiments.

[0212] The embodiments of the present application provide a computer program product. When the computer program product is run on a terminal device, the terminal device is caused to implement the steps in each of the above method embodiments.

[0213] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the embodiments of the present application can implement all or part of the above-mentioned method processes through a computer program to instruct related hardware to complete, and the computer program can be stored in a computer readable storage medium. The computer program is executed by a processor to implement the steps in each of the above method embodiments. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate forms. The computer readable medium at least includes any entity or device capable of carrying the computer program code of the online course review sentiment analysis method based on multiple models to the terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. For example, a U disk, a mobile hard disk, a magnetic disk or an optical disk, etc.

[0214] In the above embodiments, the description of each embodiment is focused on, and the part not described or recorded in a certain embodiment can be referred to the relevant description of other embodiments.

[0215] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0216] The above is the preferred embodiment of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.

Claims

1. A multi-model based online course review sentiment analysis method, characterized in that, The method comprises the following steps: obtaining user comment data of an online course; calculating a complexity score of the user comment data and determining the number of sentiment analysis models corresponding to the user comment data according to the complexity score; when the number of sentiment analysis models is multiple, calling multiple sentiment analysis models equal to the number of sentiment analysis models and performing sentiment analysis on the user comment data by using each of the sentiment analysis models to obtain a sentiment analysis result corresponding to each of the sentiment analysis models; the sentiment analysis result is used to describe the probability that the user comment data belongs to each sentiment type; constructing a multi-objective optimization function based on all sentiment analysis results and solving the multi-objective optimization function to obtain an optimal weight corresponding to each sentiment analysis result; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results; fusing all sentiment analysis results according to all optimal weights to obtain a final sentiment analysis result of the user comment data; wherein, a preset threshold is compared with the complexity score to determine the number of sentiment analysis models; the calculation of the complexity score of the user comment data comprises: calculating the length feature, average dependency depth and semantic diversity value of the user comment data; calculating the complexity score of the user comment data based on the length feature, average dependency depth and semantic diversity value; the construction of the multi-objective optimization function based on all sentiment analysis results comprises: constructing a consensus function and a confidence function based on all sentiment analysis results; generating an explanation text for each sentiment analysis result corresponding to each sentiment analysis model by using each sentiment analysis model, and calculating an explanation consistency function based on all explanation texts; constructing a multi-objective optimization function according to the values of the consensus function, the confidence function and the explanation consistency function.

2. The online course review sentiment analysis method of claim 1, wherein, the calculation of the length feature, average dependency depth and semantic diversity value of the user comment data comprises: through the formula: ; Computing length features of user review data ; wherein, a set of characters representing user comment data, a number of characters representing user comment data; through the formula: ; Computing average dependency depth of user review data ; wherein, represents the i-th word in the user review data, represents the dependency tree depth, represents the total number of words in the user review data;​ through the formula: ; Computing a semantic diversity value for user review data ; wherein, represents a set of topics to which the user review data relates, represents a number of topics to which the user review data relates.

3. The online course review sentiment analysis method of claim 2, wherein, the calculation of the complexity score of the user comment data based on the length feature, average dependency depth and semantic diversity value comprises: through the formula: ; Computing a complexity score for user review data ; wherein, , , are weight coefficients, , denotes the normalized length feature, denotes the normalized average dependency depth, denotes the normalized semantic diversity value.

4. The online course review sentiment analysis method of claim 1, wherein, The online course comment sentiment analysis method further comprises: when the number of sentiment analysis models is one, calling one sentiment analysis model to perform sentiment analysis on the user comment data to obtain a final sentiment analysis result of the user comment data.

5. The online course review sentiment analysis method of claim 1, wherein, the consensus function is: ; wherein, denotes consensus degree, denotes weight vector, denotes number of sentiment analysis models, denotes sentiment analysis result corresponding to the th sentiment analysis model, denotes aggregated sentiment probability distribution, , denotes sentiment probability distribution of the 1st sentiment type, denotes sentiment probability distribution of the 2nd sentiment type, denotes sentiment probability distribution of the th sentiment type, , denotes sentiment probability distribution of the th sentiment type, denotes aggregated distribution of the th sentiment type, denotes aggregated distribution of the th sentiment type, , denotes aggregated distribution of the 1st sentiment type, , , denotes weight corresponding to the th sentiment analysis result, , denotes cumulative distribution of the th sentiment type corresponding to the th sentiment analysis model, , denotes probability of the th sentiment type in the th sentiment analysis result, denotes JS divergence: ; wherein represents with the average distribution of , represents the KL divergence; the confidence function is: ; wherein denotes a confidence, denotes an information entropy function; the explanation consistency function is: ; wherein, represents an explanation consistency value, represents a cosine similarity, represents a dense vector corresponding to the th explanation text, represents a dense vector corresponding to the th explanation text: ; wherein, represents the interpretation text, represents dimension.

6. The online course review sentiment analysis method of claim 5, wherein, the multi-objective optimization function is: ; ; wherein, denotes standard probability simplex constraints on the weight space, denotes dimension of 7. The online course review sentiment analysis method of claim 6, wherein, the fusion of all sentiment analysis results according to all optimal weights to obtain a final sentiment analysis result of the user comment data comprises: through the formula: ; ; ; ; computing a final sentiment analysis result of user review data ; in, This represents the final sentiment probability distribution for the first sentiment type. This represents the final emotional probability distribution of the second emotional type. Indicates the first The final sentiment probability distribution for each sentiment type , Indicates the first The final sentiment probability distribution for each sentiment type Indicates the first The final aggregate distribution of each sentiment type Indicates the first The final aggregate distribution of each sentiment type This represents the final aggregate distribution of the first sentiment type. Indicates the first The optimal weight corresponding to each sentiment analysis result.

8. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, the processor executes the computer program to realize the multi-model-based online course comment sentiment analysis method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dependency tree and attention mechanism-based attribute sentiment classification method

    CN108399158A

  • Consumer demand analysis method and device based on multi-objective optimization algorithm

    CN119313409A