Multi-model-based online course comment sentiment analysis method and related equipment
By acquiring online course review data, calculating complexity scores, 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 highly efficient sentiment analysis results.
Patent Information
- Application Number
- CN202511517932.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-10-23
AI Technical Summary
Existing online education platforms' user comment sentiment analysis technology suffers from several drawbacks, including a lack of intelligent scheduling for model calls, resource redundancy, a crude multi-model fusion strategy, an inability to balance response speed and computational efficiency, and a mismatch between analysis granularity and text complexity, leading to inaccurate sentiment analysis.
By acquiring user review data from online courses, calculating complexity scores, determining the number of sentiment analysis models, and calling multiple sentiment analysis models for sentiment analysis, a multi-objective optimization function is constructed to solve for the optimal weights. The sentiment analysis results are then fused to achieve adaptive multi-model sentiment analysis.
It improves the accuracy and reliability of sentiment analysis, balances computational efficiency, and enables comprehensive analysis of user comments.
Smart Images

Figure CN120994829A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of course review analysis technology, and in particular to a multi-model-based online course review sentiment analysis method and related equipment. Background Technology
[0002] User reviews on online education platforms, as a massive, real-time feedback source, are crucial for understanding learners' opinions on course content and platform experience. However, existing sentiment analysis technologies suffer from significant bottlenecks: First, model invocation lacks intelligent scheduling; a single model struggles to handle complex text, while static parallel multi-model approaches lead to resource redundancy, failing to balance response speed and computational efficiency. Second, multi-model fusion strategies are crude, relying on simple averaging or voting mechanisms, failing to effectively quantify consensus and built-in model reliability, resulting in compromised stability and interpretability. Third, the granularity of analysis is mismatched with text complexity; no adaptive mechanism has been established for review length, syntactic depth, and semantic richness, leading to insufficient analysis or resource overload. These factors contribute to inaccurate sentiment analysis of user reviews. Summary of the Invention
[0003] This application provides a multi-model-based online course review sentiment analysis method and related equipment, which can solve the problem of inaccurate sentiment analysis of user reviews.
[0004] In a first aspect, embodiments of this application provide a multi-model-based online course review sentiment analysis method, which includes: Obtain user review data for online courses; Calculate the complexity score of user comment data, and determine the number of sentiment analysis models corresponding to the user comment data based on the complexity score; When there are multiple sentiment analysis models, multiple sentiment analysis models are invoked in a number equal to the number of sentiment analysis models. Each sentiment analysis model is used to perform sentiment analysis on the user comment data, and the sentiment analysis results corresponding to each sentiment analysis model are obtained. The sentiment analysis results are used to describe the probability that the user comment data belongs to each sentiment type. A multi-objective optimization function is constructed based on all sentiment analysis results, and the optimal weight corresponding to each sentiment analysis result is obtained by solving the multi-objective optimization function; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results; The final sentiment analysis result of the user comment data is obtained by fusing all the sentiment analysis results based on all the optimal weights.
[0005] Optionally, calculate a complexity score for the user review data, including: Calculate the length features, average dependency depth, and semantic diversity values of user comment data; The complexity score of user review data is calculated based on length features, average dependency depth, and semantic diversity values.
[0006] Optionally, calculate the length features, average dependency depth, and semantic diversity values of the user comment data, including: Through the formula: ; Calculate the length feature of user review data ; in, A character set representing user comment data. This indicates the number of characters in the user comment data; Through the formula: ; Calculate the average dependency depth of user review data ; in, This indicates the first in the user review data. One word, Indicates the depth of the dependency tree. This represents the total number of words in user comment data; Through the formula: ; Calculate the semantic diversity value of user comment data ; in, This represents the set of topics covered by user comment data. This indicates the number of topics covered in the user comment data.
[0007] Optionally, a complexity score for user review data can be calculated based on length features, average dependency depth, and semantic diversity values, including: Through the formula: ; Computing a complexity score for user review data ; 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.
[0008] Optional methods for sentiment analysis of online course reviews include: 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.
[0009] Optionally, a multi-objective optimization function can be constructed based on all sentiment analysis results, including: A consensus function and a confidence function are constructed based on all sentiment analysis results. 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; Construct a multi-objective optimization function based on the consensus function, confidence function, and interpretation consistency function values.
[0010] Optionally, the consensus function is: ; 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: ; in, express and The average distribution , Indicates KL divergence; The confidence function is: ; in, Indicates the confidence level. Represents the information entropy function; The consistency function is explained as follows: ; 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: ; in, Indicates the first An explanatory text, express Dimensions.
[0011] Optionally, the multi-objective optimization function is: ; ; in, express Standard probabilistic simplex constraint on the dimensional weight space. express Dimensions.
[0012] Optionally, all sentiment analysis results are fused according to all optimal weights to obtain the final sentiment analysis results of the user comment data, including: Through the formula: ; ; ; ; The final sentiment analysis results of user review data are calculated. ; in, This represents the final sentiment probability distribution for the first sentiment type. This represents the final emotional probability distribution for 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.
[0013] Secondly, embodiments of this application provide a multi-model-based online course review sentiment analysis device, comprising: The acquisition module is used to acquire user review data for online courses; The calculation module is used to calculate the complexity score of user comment data and determine the number of sentiment analysis models corresponding to the user comment data based on the complexity score; The sentiment analysis module is used to call multiple sentiment analysis models when there are multiple sentiment analysis models, and to use each sentiment analysis model to perform sentiment analysis on user comment data, obtaining the sentiment analysis result corresponding to each sentiment analysis model; the sentiment analysis result is used to describe the probability of user comment data belonging to each sentiment type; The solution module is used to 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; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results; The fusion module is used to fuse all sentiment analysis results according to all optimal weights to obtain the final sentiment analysis result of user comment data.
[0014] Thirdly, embodiments of this application provide a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the aforementioned multi-model-based online course comment sentiment analysis method.
[0015] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned multi-model-based online course review sentiment analysis method.
[0016] The above-mentioned solution in this application has the following beneficial effects: In the embodiments of this application, user review data of online courses is acquired, and then the complexity score of the user review data is calculated. The number of sentiment analysis models corresponding to the user review data is determined according to the complexity score. When there are multiple sentiment analysis models, multiple sentiment analysis models are called in a number equal to the number of sentiment analysis models. Each sentiment analysis model is used to perform sentiment analysis on the user review data, and the sentiment analysis result corresponding to each sentiment analysis model is obtained. Then, a multi-objective optimization function is constructed based on all sentiment analysis results, and the multi-objective optimization function is solved to obtain the optimal weight corresponding to each sentiment analysis result. Finally, all sentiment analysis results are fused according to all optimal weights to obtain the final sentiment analysis result of the user review data. Specifically, determining the number of sentiment analysis models based on the complexity of the user review data takes into account the complexity of the user review data. Calling sentiment analysis models based on complexity improves the comprehensiveness of the analysis of user reviews while balancing computational efficiency. Solving the multi-objective optimization function to obtain the optimal weights before fusing the sentiment analysis results takes into account the performance of different sentiment analysis models, improving the accuracy and reliability of the final sentiment analysis result.
[0017] Other beneficial effects of this application will be described in detail in the following detailed description section. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating a multi-model-based online course review sentiment analysis method provided in an embodiment of this application; Figure 2 A schematic diagram of the structure of a multi-model-based online course review sentiment analysis device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0020] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0021] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0022] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0023] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0024] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0025] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0026] To address the inaccuracy of existing sentiment analysis methods for user reviews, this application provides a multi-model-based sentiment analysis method for online course reviews. This method acquires user review data for online courses, calculates the complexity score of the user review data, and determines the number of sentiment analysis models corresponding to the user review data based on the complexity score. When there are multiple sentiment analysis models, multiple models are invoked, and each model is used to perform sentiment analysis on the user review data, obtaining the sentiment analysis result for each model. Then, a multi-objective optimization function is constructed based on all sentiment analysis results, and the optimal weight corresponding to each sentiment analysis result is obtained by solving the multi-objective optimization function. Finally, all sentiment analysis results are fused according to all optimal weights to obtain the final sentiment analysis result for the user review data. The method involves determining the number of sentiment analysis models based on the complexity of user comment data. This approach considers the complexity of user comment data and calls the appropriate sentiment analysis model based on the complexity. This improves the comprehensiveness of the analysis of user comments while balancing computational efficiency. By solving a multi-objective optimization function, the optimal weights are obtained and then the sentiment analysis results are fused. This approach considers the performance of different sentiment analysis models and improves the accuracy and reliability of the final sentiment analysis results.
[0027] The following section provides an illustrative example of the multi-model-based sentiment analysis method for online course reviews provided in this application.
[0028] like Figure 1 As shown, the multi-model-based online course review sentiment analysis method provided in this application includes the following steps: Step 11: Obtain user review data for online courses.
[0029] The online courses mentioned above are from online learning platforms such as MOOCs and XuetangX. The user review data mentioned above is the text of user reviews of the online courses, such as "Not recommended for beginners".
[0030] In some embodiments of this application, user review data for online courses can be obtained by accessing an online course learning platform.
[0031] Step 12: Calculate the complexity score of the user comment data, and determine the number of sentiment analysis models corresponding to the user comment data according to the complexity score.
[0032] In some embodiments of this application, the steps of calculating the complexity score of user comment data and determining the number of sentiment analysis models corresponding to the user comment data according to the complexity score include:
[0033] The first step is to calculate the length features, average dependency depth, and semantic diversity values of the user comment data.
[0034] The length feature described above is used to describe the length of user comment data, the average dependency depth is used to describe the syntactic complexity of user comment data, and the semantic diversity is used to describe the semantic complexity of user comment data.
[0035] Specifically, through the formula: ; Calculate the length feature of user review data .
[0036] in, A character set representing user comment data. This indicates the number of characters in the user comment data.
[0037] Through the formula: ; Calculate the average dependency depth of user review data .
[0038] in, This indicates the first in the user review data. One word, Indicates the depth of the dependency tree. This represents the total number of words in the user comment data.
[0039] Through the formula: ; Calculate the semantic diversity value of user comment data .
[0040] in, This represents the set of topics covered by user comment data. This indicates the number of topics covered in the user comment data.
[0041] For example, the user review data mentioned above covers topics such as courses, teachers, and platforms. The dependency tree algorithm can be used to calculate the dependency tree depth of each word. A dependency tree is a directed tree structure with words as nodes, used to represent the grammatical dependencies between words in a sentence. Each word (except the root word) has a unique "parent node," and its upper-level nodes represent the grammatical core to which the word depends. In the tree structure, the root node is usually the predicate, and other words represent grammatical functions such as modification, subject-predicate, object complement, and adverbial through dependency arcs. In this structure, the "depth" of each word is defined as the number of edges traversed in the path from the word node to the root node. A greater depth indicates a deeper grammatical nesting level and a more complex syntactic structure.
[0042] The second step is to calculate the complexity score of user comment data based on length features, average dependency depth, and semantic diversity values.
[0043] Specifically, through the formula: ; Computing a complexity score for user review data .
[0044] 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.
[0045] For example, the above data can be standardized using methods such as deviation standardization. All the weighting coefficients mentioned above are preset values.
[0046] The third step is to determine the number of sentiment analysis models corresponding to the user comment data based on the complexity score.
[0047] Specifically, the higher the complexity score, the larger the number of sentiment analysis models. The number of sentiment analysis models can be determined by comparing the complexity score with a preset threshold.
[0048] For example, a first complexity threshold and a second complexity threshold are set. The first complexity threshold is less than the second complexity threshold. If the complexity score is less than or equal to the first complexity threshold, the number of sentiment analysis models is 1. If the complexity score is greater than the first complexity threshold and less than or equal to the second complexity threshold, the number of sentiment analysis models is 3. If the complexity score is greater than the second complexity threshold, the number of sentiment analysis models is 5.
[0049] Step 13: When there are multiple sentiment analysis models, call multiple sentiment analysis models equal to the number of sentiment analysis models, and use each sentiment analysis model to perform sentiment analysis on the user comment data to obtain the sentiment analysis results corresponding to each sentiment analysis model.
[0050] The sentiment analysis results described above are used to describe the probability that user comment data belongs to each sentiment type (such as strongly negative, negative, neutral, positive, strongly positive, etc.). The sentiment analysis model described above can be a large language model such as chatgpt, Deep Search, Grok, or Generalized Language Models.
[0051] Specifically, user comment data is input into each sentiment analysis model, which then performs sentiment analysis on the user comment data and outputs the sentiment analysis results.
[0052] It should be noted that when the number of sentiment analysis models is 1, any one of the sentiment analysis models can be called to perform sentiment analysis on the user comment data to obtain the final sentiment analysis result of the user comment data.
[0053] For example, the prompt words for a large language model are:
[0054] Input: Comment text {{comment}}.
[0055] Phase 1: Lexical feature dimensions: Distribution and polarity intensity of sentiment words (positive / negative / neutral)? Does it contain intensifying words (such as "extremely") or de-intensifying words? List the keywords in {{comment}} and label their sentiment weights.
[0056] Syntactic structure dimension: How do sentence types (exclamation / interrogation / rhetorical question) strengthen emotions? What is the role of special structures (double negation, parallelism)? Analyze the correlation between sentence structure and emotional expression in {{comment}}.
[0057] Domain-specific context dimension: In the domain of {{classification}}, does this expression conform to conventional sentiment patterns? Does it contain domain-specific metaphors? Interpret the sentiment salience in {{comment}} by combining domain knowledge.
[0058] Implied Intent Dimension: Is there irony, veiled criticism, or subtle praise? Is there a separation between the surface and deeper emotions of the text? Reveal the potential emotional conflict within the comments.
[0059] Phase Two: 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] = [?, ?, ?, ?, ?].
[0060] 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.
[0061] The multi-objective optimization function described above is used to describe the accuracy of all sentiment analysis results.
[0062] 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: The first step is to construct a consensus function and a confidence function based on all sentiment analysis results.
[0063] Specifically, the consensus function is: ; 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: ; in, express and The average distribution of is used as the intermediate distribution in JS divergence calculation to measure the difference between two probability distributions. , This represents the KL divergence.
[0064] The confidence function is: ; in, Indicates the confidence level. Entropy is the information entropy function used to measure the uncertainty of a probability distribution. Higher entropy indicates a more uniform distribution and lower model confidence; lower entropy indicates a more concentrated distribution and higher model confidence.
[0065] For example, the expression for the above KL divergence is: ; in, Represents distribution In the Probability of each sentiment type Represents distribution In the The probability of each sentiment type.
[0066] The second step involves generating explanatory text for the sentiment analysis results corresponding to each sentiment analysis model using each sentiment analysis model, and calculating the explanatory consistency function based on all explanatory texts.
[0067] By setting cue words for the sentiment analysis model and using the model to infer the sentiment analysis results based on the cue words, an explanatory text can be obtained.
[0068] For example, regarding the user review data "The course is good, and the content is quite comprehensive. I suggest adding some summary courses, and also paying more attention to guidance and inspiration when explaining questions.", the sentiment analysis result [Strongly Negative, Negative, Neutral, Positive, Strongly Positive] = [0.0, 0.0, 0.25, 0.65, 0.10]. The explanatory text is "No negative elements; the neutral part (suggestion) accounts for 25%, but is offset by the domain conversion part; positive dominates (65%), due to the high weight of core words; strong positive is low (10%), due to the lack of reinforcing words or strong expressions. The overall rating is 'positive', with a total probability of 1.0."
[0069] The consistency function is explained as follows: ; 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: ; in, Indicates the first An explanatory text, express Dimensions.
[0070] The third step is to construct a multi-objective optimization function based on the consensus function, confidence function, and interpretation consistency function values.
[0071] Specifically, the multi-objective optimization function is: ; ; in, express Standard probabilistic simplex constraint on the dimensional weight space. express Dimensions.
[0072] For example, considering the differences in the metrics of the three functions, we can normalize the maximum and minimum values of the three functions before constructing the multi-objective optimization function. The multi-objective optimization function would then be: ; in, This represents the normalized consensus function. This represents the normalized confidence function. This represents the interpretation consistency function after normalization.
[0073] The fourth step is to solve the multi-objective optimization function to obtain the optimal weight corresponding to each sentiment analysis result.
[0074] The optimal weights corresponding to the sentiment analysis results described above are the weights corresponding to the sentiment analysis results in the multi-objective function. .
[0075] For example, a non-dominated sorting genetic algorithm can be used to solve the multi-objective optimization function to obtain the optimal weight corresponding to each sentiment analysis result.
[0076] Step 15: Merge all sentiment analysis results according to all optimal weights to obtain the final sentiment analysis result of user comment data.
[0077] The final sentiment analysis results described above are used to describe the probability that user comment data belongs to each sentiment type after optimal weighted fusion.
[0078] Specifically, through the formula: ; ; ; ; The final sentiment analysis results of user review data are calculated. .
[0079] in, This represents the final sentiment probability distribution for the first sentiment type. This represents the final emotional probability distribution for 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.
[0080] For example, after obtaining the final sentiment analysis results of user comment data, the user comment data and the corresponding final sentiment analysis results can be stored in a knowledge base. When performing sentiment analysis on new user comment data, the knowledge base can first be searched to see if similar user comment data exists. If so, the final sentiment analysis results corresponding to the similar user comment data are used as the final sentiment analysis results for the new user comment data. Efficient semantic embedding models can be used to encode user comment data into embedding vectors. Then, the cosine similarity between the embedding vector of the new user comment data and the embedding vector of each user comment data in the knowledge base is calculated. If a cosine similarity greater than a preset similarity exists, the user comment data is considered similar to the new user comment data.
[0081] It should be noted that after obtaining the final sentiment analysis results of user review data, suggestions can be made to students or teachers to select online courses from online learning platforms based on the final sentiment analysis results, thereby promoting the evolution of the online education field towards intelligence.
[0082] It is worth mentioning that the number of sentiment analysis models is determined based on the complexity of user comment data. Taking into account the complexity of user comment data, the sentiment analysis models are called according to the complexity. This improves the comprehensiveness of the analysis of user comment data while balancing computational efficiency. By solving a multi-objective optimization function, the optimal weights are obtained and then the sentiment analysis results are fused. The performance of different sentiment analysis models is taken into account, which improves the accuracy and reliability of the final sentiment analysis results.
[0083] The method of this application will be illustrated below with a specific example.
[0084] This embodiment uses Python tools to obtain course review data for a higher mathematics course on a MOOC (Massive Open Online Courses) platform. The course contains a total of 571 user reviews.
[0085] For each course review to be analyzed, the semantic similarity between the review and the knowledge base is calculated, that is, the similarity between the vector of the review after embedding and the vector stored 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 that record is used directly; otherwise, the subsequent steps are performed.
[0086] For comments that do not hit the knowledge base, the length characteristics, syntactic complexity, and semantic diversity of the comments are comprehensively analyzed to calculate a complexity score and classify them into three levels of complexity: low, medium, and high according to a preset threshold.
[0087] Due to the large amount of text in the comments, they cannot all be displayed. Therefore, 10 comments are used to present the experimental results of this embodiment. The 10 selected comments are shown in Table 1: Table 1. Online Course Review Content ; The corresponding complexity levels are shown in Table 2: Table 2 Complexity Levels ; The complexity level is based on a complexity score. Specifically: when When, it is a low level; when At that time, it is the medium level; when It is a high level.
[0088] Based on the results in Table 2, the similarity between comment 7 "I can't understand it, it's hard to comprehend" and comment 5 "Not recommended for beginners" is greater than the threshold of 0.85. Therefore, the discrete probability distribution of the overall sentiment tendency of comment 5 is directly reused and will not be used in subsequent steps.
[0089] For low-complexity comments, a single large language model is used for sentiment analysis, and its output serves as the final sentiment probability distribution. For medium-complexity comments, three heterogeneous models are used in parallel to independently output sentiment probability distributions. For high-complexity comments, five heterogeneous models are used in parallel to independently output sentiment probability distributions. The output results are shown in Table 3. Table 3. Results of Emotion Probability Distribution ; For multiple sentiment probability distributions generated by medium-to-high complexity comments, a multi-objective optimization function is constructed with three optimization objectives: inter-model consistency, model self-determinism, and model interpretability consistency. The optimal weight allocation is solved through multi-objective programming to generate the final sentiment probability distribution. Table 3 above lists 6 comments that require multi-objective optimization aggregation, and the aggregation results are shown in Table 4. Table 4. Multi-objective optimization aggregation results ; in, This represents the optimal weight vector.
[0090] In summary, the discrete probability distribution of the sentiment of the 10 selected comments is shown in Table 5: Table 5. Probability Distribution of Sentiment Tendency in Online Course Reviews ; The results above demonstrate the sentiment tendency output of 10 course reviews after multi-model sentiment analysis and probability distribution aggregation. The results show that this method can effectively distinguish review texts with different emotional polarities.
[0091] In summary, this experiment preliminarily verifies the stability and effectiveness of the proposed method in multi-source sentiment prediction tasks, providing good support for subsequent more refined sentiment modeling in large-scale course evaluation data.
[0092] The following is an exemplary description of the multi-model-based online course review sentiment analysis device provided in this application.
[0093] like Figure 2 As shown, this application provides a multi-model-based online course review sentiment analysis device 200, which includes: Module 201 is used to obtain user review data for online courses; The calculation module 202 is used to calculate the complexity score of user comment data and determine the number of sentiment analysis models corresponding to the user comment data according to the complexity score; The sentiment analysis module 203 is used to call multiple sentiment analysis models when there are multiple sentiment analysis models, and to use each sentiment analysis model to perform sentiment analysis on user comment data to obtain the sentiment analysis result corresponding to each sentiment analysis model; the sentiment analysis result is used to describe the probability that the user comment data belongs to each sentiment type; The solver module 204 is used to 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; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results; The fusion module 205 is used to fuse all sentiment analysis results according to all optimal weights to obtain the final sentiment analysis result of the user comment data.
[0094] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0096] like Figure 3 As shown, an embodiment of this application provides a terminal device, wherein the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 3 The diagram shows only one processor, 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.
[0097] Specifically, when the processor D100 executes the computer program D102, it acquires user review data for online courses, calculates the complexity score of the user review data, and determines the number of sentiment analysis models corresponding to the user review data based on the complexity score. When there are multiple sentiment analysis models, it calls multiple sentiment analysis models equal to the number of models, and uses each sentiment analysis model to perform sentiment analysis on the user review data, obtaining the sentiment analysis result corresponding to each model. Then, it constructs a multi-objective optimization function based on all sentiment analysis results, solves the multi-objective optimization function, and obtains the optimal weight corresponding to each sentiment analysis result. Finally, it fuses all sentiment analysis results based on all optimal weights to obtain the final sentiment analysis result of the user review data. In this process, determining the number of sentiment analysis models based on the complexity of the user review data takes into account the complexity of the user review data. Calling sentiment analysis models based on complexity improves the comprehensiveness of the analysis of user review data while balancing computational efficiency. Solving the multi-objective optimization function to obtain the optimal weights before fusing the sentiment analysis results takes into account the performance of different sentiment analysis models, improving the accuracy and reliability of the final sentiment analysis result.
[0098] The processor D100 can be a central processing unit (CPU), or it can 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 gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0099] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.
[0100] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0101] This application provides a computer program product that, when run on a terminal device, enables the terminal device to implement the steps described in the various method embodiments above.
[0102] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or some intermediate form. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a device / terminal device for a multi-model online course comment sentiment analysis method, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, such as a USB flash drive, a portable hard drive, a magnetic disk, or an optical disk.
[0103] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0104] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0105] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention.
Claims
1. A multi-model-based sentiment analysis method for online course reviews, characterized in that, include: Obtain user review data for online courses; Calculate the complexity score of the user comment data, and determine the number of sentiment analysis models corresponding to the user comment data according to the complexity score; When there are multiple sentiment analysis models, multiple sentiment analysis models are called in a number equal to the number of sentiment analysis models, and each sentiment analysis model is used to perform sentiment analysis on the user comment data to obtain the sentiment analysis result corresponding to each sentiment analysis model. The sentiment analysis results are used to describe the probability that the user comment data belongs to each sentiment type; A multi-objective optimization function is constructed based on all sentiment analysis results, and the optimal weight corresponding to each sentiment analysis result is obtained by solving the multi-objective optimization function; the multi-objective optimization function is used to describe the accuracy of all sentiment analysis results. The final sentiment analysis result of the user comment data is obtained by fusing all sentiment analysis results based on all optimal weights.
2. The online course review sentiment analysis method according to claim 1, characterized in that, The calculation of the complexity score of the user review data includes: Calculate the length feature, average dependency depth, and semantic diversity value of the user comment data; The complexity score of the user comment data is calculated based on the length feature, average dependency depth, and semantic diversity value.
3. The online course review sentiment analysis method according to claim 2, characterized in that, The calculation of the length features, average dependency depth, and semantic diversity values of the user comment data includes: Through the formula: ; Calculate the length feature of user review data ; in, A character set representing user comment data. This indicates the number of characters in the user comment data; Through the formula: ; Calculate the average dependency depth of user review data ; in, This indicates the first in the user comment data. One word, Indicates the depth of the dependency tree. This represents the total number of words in user comment data; Through the formula: ; Calculate the semantic diversity value of user comment data ; in, This represents the set of topics covered by user comment data. This indicates the number of topics covered in the user comment data.
4. The online course review sentiment analysis method according to claim 3, characterized in that, The calculation of the complexity score of the user comment data based on the length feature, average dependency depth, and semantic diversity value includes: Through the formula: ; Computing a complexity score for user review data ; 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.
5. The online course review sentiment analysis method according to claim 1, characterized in that, The online course review sentiment analysis method also includes: When the number of sentiment analysis models is 1, one sentiment analysis model is invoked to perform sentiment analysis on the user comment data, and the final sentiment analysis result of the user comment data is obtained.
6. The online course review sentiment analysis method according to claim 1, characterized in that, The multi-objective optimization function constructed based on all sentiment analysis results includes: A consensus function and a confidence function are constructed based on all sentiment analysis results. 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; A multi-objective optimization function is constructed based on the consensus function, confidence function, and interpretation consistency function value.
7. The online course review sentiment analysis method according to claim 6, characterized in that, The consensus function is: ; 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: ; in, express and The average distribution , Indicates KL divergence; The confidence function is: ; in, Indicates the confidence level. Represents the information entropy function; The interpretation consistency function is: ; in, Indicates the consistency value of interpretation. Represents cosine similarity. Indicates the first A dense vector corresponding to the explanatory text. Indicates the first Dense vectors corresponding to each explanatory text: ; in, Indicates the first An explanatory text, express Dimensions.
8. The online course review sentiment analysis method according to claim 7, characterized in that, The multi-objective optimization function is: ; ; in, express Standard probabilistic simplex constraint on the dimensional weight space. express Dimensions.
9. The online course review sentiment analysis method according to claim 8, characterized in that, The process of fusing all sentiment analysis results based on all optimal weights to obtain the final sentiment analysis result of the user comment data includes: Through the formula: ; ; ; ; The final sentiment analysis results of user review data are calculated. ; in, This represents the final sentiment probability distribution for the first sentiment type. This represents the final emotional probability distribution for 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.
10. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the multi-model-based online course review sentiment analysis method as described in any one of claims 1 to 9.
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
Semantic sentiment analysis method fusing in-depth features and time sequence models
US11194972B1