Movie review sentiment analysis method based on review length adaptive distillation
By using an adaptive distillation method, combining information entropy and syntactic depth to generate a semantic density index, and dynamically adjusting distillation parameters, the problem of insufficient accuracy in recognizing long and short texts in sentiment analysis of movie reviews by large teacher models is solved, achieving efficient and lightweight model training and deployment.
Patent Information
- Application Number
- CN202611100483.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-11-10
AI Technical Summary
Existing technologies suffer from high inference latency and large memory consumption in large teacher models, and traditional knowledge distillation methods cannot adapt to both long and short texts simultaneously, resulting in insufficient recognition accuracy of lightweight student models in sentiment analysis of movie reviews.
An adaptive distillation method based on comment length is adopted. By calculating information entropy and syntactic depth to generate a semantic density index, the distillation temperature and weights are dynamically adjusted. Combined with a dynamic joint loss function, a student model is trained to achieve differentiated processing of different text types.
It achieves a balance between lightweight model and high accuracy, improves the ability to recognize both long and short texts, has an efficient and balanced training process, reduces computational overhead, and is suitable for resource-constrained scenarios.
Smart Images

Figure CN123068630A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data processing technology, and in particular relates to a sentiment analysis method for movie reviews based on adaptive distillation of review length. Background Technology
[0002] In the field of computer data processing technology, text sentiment analysis is a core task of natural language processing, aiming to automatically identify and extract the emotional tendencies contained in text. With the widespread adoption of the internet and mobile devices, massive amounts of user-generated content have been generated, such as movie reviews and product ratings. Fast and accurate sentiment analysis of this text is of significant value for applications such as business decision-making, public opinion monitoring, and personalized recommendations. Currently, high-precision sentiment analysis solutions mainly rely on large pre-trained language models, such as the BERT model. To apply these heavy-duty models to real-world scenarios, the industry commonly employs knowledge distillation techniques. This involves using a pre-trained, large teacher model to guide a simpler, lightweight student model, thereby compressing the model size while preserving its high performance as much as possible. This technique typically trains the student model by defining a joint loss function that includes the true label loss and the teacher-student output difference loss.
[0003] However, existing large-scale teacher models suffer from high inference latency and large memory consumption, resulting in high deployment costs. Furthermore, traditional knowledge distillation methods typically employ fixed distillation hyperparameters, using the same training strategy for all text samples in the dataset. For text data with vastly different lengths, such as movie reviews (ranging from a few words to hundreds of words), fixed distillation parameters cannot simultaneously adapt to both information-sparse short texts and semantically complex long texts. This leads to lightweight student models often failing to achieve ideal recognition accuracy on both types of text simultaneously. Summary of the Invention
[0004] The purpose of this invention is to propose a sentiment analysis method for movie reviews based on adaptive distillation of review length, in order to solve the problem of low uniform recognition accuracy for review texts with significant differences in length.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: A sentiment analysis method for movie reviews based on adaptive distillation of review length includes the following steps: S1. Obtain the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy of the word segmentation sequence and the depth value of the dependency syntax tree, and fuse the information entropy and the depth value to generate a semantic density index. S2. Based on the semantic density index, divide the movie review text into high-density buckets, medium-density buckets, or low-density buckets, and output the bucket identifiers corresponding to the buckets; S3. Based on the barrel identifier, call a distillation curvature function that can output different parameters according to the training rounds to generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence that evolve with the training rounds. S4. Substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function. The dynamic joint loss function integrates the cross-entropy loss of the real label and the KL divergence distillation loss of the teacher model soft label, and uses the square value of the dynamic distillation temperature in the current round to balance the gradient magnitude of the KL divergence, and outputs the adaptive total loss. S5. Train the student model using the adaptive total loss backpropagation, so that the student model converges along different distillation intensity evolution paths for the high-density barrel samples and the low-density barrel samples, and outputs the sentiment classification result after completing the distillation training of the student model.
[0006] As a further description of the above technical solution: S1 further includes performing word segmentation on the movie review text to generate the word segmentation sequence, and performing dependency parsing on the word segmentation sequence to generate the dependency parsing tree; calculating the information entropy by counting the frequency of different words in the word segmentation sequence, and simultaneously counting the longest path length from the root node to each leaf node in the dependency parsing tree as the depth value; after normalizing the information entropy and the depth value, generating the semantic density index by a weighted summation method determined based on the mean and variance in the training dataset.
[0007] As a further description of the above technical solution: S2 includes obtaining a classification rule for distinguishing text structural complexity, the classification rule including a high density threshold and a low density threshold, and comparing the semantic density index with the high density threshold and the low density threshold; classifying text with the semantic density index greater than the high density threshold into the high density bucket, classifying text with the semantic density index less than the low density threshold into the low density bucket, classifying other text into the medium density bucket, and generating the bucket identifier containing density level information.
[0008] As a further description of the above technical solution: Step S3 further includes, for the high-density barrel, setting the dynamic distillation temperature sequence to exponentially decay from an initial high temperature value to a low temperature value with each training round, and simultaneously setting the dynamic distillation weight sequence to linearly increase from an initial low weight to a high weight; for the low-density barrel, setting the dynamic distillation temperature sequence to fluctuate within a predetermined medium-low temperature range, and simultaneously setting the dynamic distillation weight sequence to slowly and linearly increase from an initial high weight to a saturation value; for the medium-density barrel, setting the dynamic distillation temperature sequence and the dynamic distillation weight sequence to constant values, and outputting the current value by the distillation curvature function.
[0009] As a further description of the above technical solution: In step S4, the dynamic joint loss function is specifically expressed as follows: obtaining the original prediction distribution of the student model, obtaining the output distribution of the teacher model after temperature smoothing, and obtaining the output distribution of the student model after smoothing at the same temperature; calculating the cross-entropy loss based on the true labels and the original prediction distribution of the student model; calculating the KL divergence distillation loss based on the output distribution of the teacher model after temperature smoothing and the output distribution of the student model after smoothing at the same temperature, and weighting the KL divergence distillation loss using the square of the dynamic distillation temperature to generate the gradient-balanced distillation loss; and using the dynamic distillation weights to weight and sum the cross-entropy loss and the gradient-balanced distillation loss to obtain the adaptive total loss.
[0010] As a further description of the above technical solution: Before the step of training the student model using the adaptive total loss through backpropagation, the method further includes: obtaining the hidden state vectors of each Transformer layer within the teacher model, and calculating the difference vectors between adjacent layers as semantic transmission coefficients; based on the bucket identifier, for the high-density bucket samples, the semantic transmission coefficients of the deep layers of the teacher model are masked during distillation, and only the semantic transmission coefficients of the shallow and middle layers are used; for the low-density bucket samples, the semantic transmission coefficients of all layers of the teacher model are used, and an additional consistency constraint loss for measuring the similarity between the student model and the teacher model at the corresponding layer is introduced, and the consistency constraint loss is added to the adaptive total loss.
[0011] As a further description of the above technical solution: In S5, the student model is a lightweight DistilBERT structure, and the teacher model is a composite structure of a BERT encoder and a BiLSTM bidirectional temporal network. The teacher model has completed offline training and frozen all parameters before distillation training. It outputs the soft labels and semantic transmission coefficients at the same time. The student model is trained using the AdamW optimizer, and its learning rate and weight decay coefficients are generated by a strategy that can be dynamically adjusted according to the training progress.
[0012] As a further description of the above technical solution: The steps for outputting sentiment classification results after completing the distillation training of the student model are as follows: the trained student model is deployed to the target device, and after receiving the movie review text to be detected, the student model directly performs forward propagation calculation; the student model outputs the probability of positive or negative sentiment classification, and the calculation of the semantic density index, the generation of the bucket identifier, and the calling of the distillation curvature function are not performed during the entire inference process.
[0013] As a further description of the above technical solution: The functional form and initial parameters of the distillation curvature function are determined by: obtaining the sample size ratio of the high-density buckets and the low-density buckets in the training dataset; and based on the sample size ratio, calibrating the exponential decay rate parameter of the dynamic distillation temperature sequence and the linear increasing slope parameter of the dynamic distillation weight sequence, so that the distillation curvature function can adapt to the text length distribution characteristics of the current training dataset.
[0014] An analysis system for sentiment analysis of film reviews based on adaptive distillation of review length includes: The text structure awareness module is used to acquire the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy and depth value and fuse them to generate a semantic density index, divide the sample buckets according to the semantic density index and output the bucket identifiers; The distillation curvature generation module is used to call a distillation curvature function that can output different parameters according to the training rounds based on the barrel identifier, and generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence. The dynamic loss calculation module is used to substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function and output the adaptive total loss. The hierarchical pruning distillation module is used to selectively utilize or enhance the semantic transmission coefficients of the teacher model according to the barrel identifier, and apply the final adaptive total loss to the training of the student model. The sentiment inference module is used to deploy the trained student model and output the sentiment classification results of the text to be detected.
[0015] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: This invention achieves a balance between lightweight and high accuracy by constructing a closed-loop system that integrates text structure perception and real-time control of the training process. It also simultaneously improves the ability to recognize texts of varying lengths. The designed dynamic distillation curvature and hierarchical pruning mechanisms make the training process more efficient and balanced, avoiding the problem of specific types of samples dominating the loss. This accelerates model convergence and improves final performance. It completely separates the complexity of the training phase from the simplicity of the inference phase, so that the final deployed model maintains high performance while having extremely low computational overhead, perfectly meeting the engineering needs of resource-constrained scenarios. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating a film review sentiment analysis method based on adaptive distillation of review length proposed in this invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] Please see Figure 1 This invention provides a technical solution: a film review sentiment analysis method based on adaptive distillation of review length, specifically including the following steps: S1. Obtain the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy of the word segmentation sequence and the depth value of the dependency syntax tree, and fuse the information entropy and the depth value to generate a semantic density index. S2. Based on the semantic density index, divide the movie review text into high-density buckets, medium-density buckets, or low-density buckets, and output the bucket identifiers corresponding to the buckets; S3. Based on the barrel identifier, call a distillation curvature function that can output different parameters according to the training rounds to generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence that evolve with the training rounds. S4. Substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function. The dynamic joint loss function integrates the cross-entropy loss of the real label and the KL divergence distillation loss of the teacher model soft label, and uses the square value of the dynamic distillation temperature in the current round to balance the gradient magnitude of the KL divergence, and outputs the adaptive total loss. S5. Train the student model using the adaptive total loss backpropagation, so that the student model converges along different distillation intensity evolution paths for the high-density barrel samples and the low-density barrel samples, and outputs the sentiment classification result after completing the distillation training of the student model.
[0019] In this embodiment, the problem of traditional knowledge distillation in handling texts of varying lengths is fundamentally solved. By matching differentiated distillation strategies to different texts, the generalization ability of high-density short texts and the semantic understanding ability of low-density long texts are improved simultaneously. This effectively avoids the problems of overfitting short texts and insufficient learning of long texts. Moreover, the entire training process becomes more efficient and balanced due to its adaptive characteristics, preventing any one type of sample from dominating the loss calculation, thereby accelerating the convergence speed of the model and improving the final performance ceiling.
[0020] Specifically, S1 further includes performing word segmentation on the movie review text to generate the word segmentation sequence, and performing dependency parsing on the word segmentation sequence to generate the dependency parsing tree; calculating the information entropy by counting the frequency of different words in the word segmentation sequence, and simultaneously counting the longest path length from the root node to each leaf node in the dependency parsing tree as the depth value; after normalizing the information entropy and the depth value, generating the semantic density index by a weighted summation method determined based on the mean and variance in the training dataset; In this embodiment, by introducing information entropy and syntactic depth—two inherent text attributes more profound than word count—a novel text classification standard, the semantic density index, is constructed. This allows for a more accurate distinction between truly information-sparse short texts and semantically complex long texts. This classification method, based on the inherent structural characteristics of text, provides unprecedented precision guidance for subsequent adaptive knowledge distillation, avoiding the distillation strategy mismatch problem caused by misclassification in traditional methods. This enables the system to match the most appropriate learning path for different types of text and comments with varying information content, improving the model's balance and overall accuracy in sentiment recognition for sentences of varying lengths, achieving high-precision optimization at low cost.
[0021] Specifically, S2 includes obtaining a classification rule for distinguishing text structural complexity, the classification rule including a high density threshold and a low density threshold, and comparing the semantic density index with the high density threshold and the low density threshold; classifying text with the semantic density index greater than the high density threshold into the high density bucket, classifying text with the semantic density index less than the low density threshold into the low density bucket, classifying other text into the medium density bucket, and generating the bucket identifier containing density level information; In this embodiment, by setting a clear numerical threshold, the continuous semantic density index is discretized into three operable text categories, realizing a refined and automated text pre-classification. This provides a clear and unambiguous basis for subsequent differential processing, ensuring that texts of each complexity can be accurately guided to a training path tailored to them.
[0022] Specifically, step S3 further includes, for the high-density barrel, setting the dynamic distillation temperature sequence to exponentially decay from an initial high temperature value to a low temperature value with each training round, and simultaneously setting the dynamic distillation weight sequence to linearly increase from an initial low weight to a high weight; for the low-density barrel, setting the dynamic distillation temperature sequence to fluctuate within a predetermined medium-low temperature range, and simultaneously setting the dynamic distillation weight sequence to slowly and linearly increase from an initial high weight to a saturation value; for the medium-density barrel, setting the dynamic distillation temperature sequence and the dynamic distillation weight sequence to constant values, and outputting the current value by the distillation curvature function; In this embodiment: When the system receives the bucket identifier generated in the previous step, it triggers a core dynamic parameter generation mechanism, namely, calling a preset distillation curvature function. This function generates two parameter sequences that evolve with the training process in real time for the currently processed movie review text, based on its bucket density type: a dynamic distillation temperature sequence and a dynamic distillation weight sequence. The generation rules for these two sequences are differentiated. For text belonging to high-density buckets, the function generates a dynamic distillation temperature sequence that exponentially decays from an initial high temperature value to a low temperature value with each training round, and simultaneously generates a dynamic distillation weight sequence that linearly increases from an initial low weight to a high weight. For text classified into low-density buckets, its dynamic distillation temperature sequence remains relatively stable within a predetermined medium-low temperature range, while its dynamic distillation weight sequence slowly and linearly increases from an initial high value to a near-saturated extremely high value. For text in medium-density buckets, a baseline strategy is adopted, assigning it a constant dynamic distillation temperature sequence and dynamic distillation weight sequence. In each training iteration, the distillation curvature function outputs an instantaneous temperature value and weight value from the corresponding sequence based on the current training round. These two values are collectively referred to as the current values and serve as the key input for constructing the dynamic loss function in the next step.
[0023] Specifically, in S4, the dynamic joint loss function is expressed as follows: obtaining the original prediction distribution of the student model, obtaining the output distribution of the teacher model after temperature smoothing, and obtaining the output distribution of the student model after smoothing at the same temperature; calculating the cross-entropy loss based on the true labels and the original prediction distribution of the student model; calculating the KL divergence distillation loss based on the output distribution of the teacher model after temperature smoothing and the output distribution of the student model after smoothing at the same temperature, and weighting the KL divergence distillation loss using the square of the dynamic distillation temperature to generate the gradient-balanced distillation loss; and using the dynamic distillation weights to weight and sum the cross-entropy loss and the gradient-balanced distillation loss to obtain the adaptive total loss. Before the step of backpropagating the adaptive total loss to train the student model, the method further includes: obtaining the hidden state vectors of each Transformer layer within the teacher model, and calculating the difference vectors between adjacent layers as semantic transmission coefficients; based on the bucket identifier, for the high-density bucket samples, the semantic transmission coefficients of the deep layers of the teacher model are masked during distillation, and only the semantic transmission coefficients of the shallow and middle layers are used; for the low-density bucket samples, the semantic transmission coefficients of all layers of the teacher model are used, and an additional consistency constraint loss for measuring the similarity between the student model and the teacher model at the corresponding layer is introduced, and the consistency constraint loss is added to the adaptive total loss; In S5, the student model is a lightweight DistilBERT structure, and the teacher model is a composite structure of a BERT encoder and a BiLSTM bidirectional temporal network. The teacher model has completed offline training and frozen all parameters before distillation training. It outputs the soft labels and semantic transmission coefficients at the same time. The training of the student model uses the AdamW optimizer, and its learning rate and weight decay coefficients are generated by a strategy that can be dynamically adjusted according to the training progress. Specifically, the steps for outputting sentiment classification results after completing the distillation training of the student model are as follows: the trained student model is deployed to the target device, and after receiving the movie review text to be detected, the student model directly performs forward propagation calculation; the student model outputs the probability of positive or negative sentiment classification, and the calculation of the semantic density index, the generation of the bucket identifier, and the calling of the distillation curvature function are not performed during the entire inference process; The functional form and initial parameters of the distillation curvature function are determined by: obtaining the sample size ratio of the high-density buckets and the low-density buckets in the training dataset; and based on the sample size ratio, calibrating the exponential decay rate parameter of the dynamic distillation temperature sequence and the linear increasing slope parameter of the dynamic distillation weight sequence, so that the distillation curvature function can adapt to the text length distribution characteristics of the current training dataset.
[0024] An analysis system for sentiment analysis of film reviews based on adaptive distillation of review length includes: The text structure awareness module is used to acquire the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy and depth value and fuse them to generate a semantic density index, divide the sample buckets according to the semantic density index and output the bucket identifiers; The distillation curvature generation module is used to call a distillation curvature function that can output different parameters according to the training rounds based on the barrel identifier, and generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence. The dynamic loss calculation module is used to substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function and output the adaptive total loss. The hierarchical pruning distillation module is used to selectively utilize or enhance the semantic transmission coefficients of the teacher model according to the barrel identifier, and apply the final adaptive total loss to the training of the student model. The sentiment inference module is used to deploy the trained student model and output the sentiment classification results of the text to be detected.
[0025] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A sentiment analysis method for film reviews based on adaptive distillation of review length, characterized in that, Specifically, the following steps are included: S1. Obtain the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy of the word segmentation sequence and the depth value of the dependency syntax tree, and fuse the information entropy and the depth value to generate a semantic density index. S2. Based on the semantic density index, divide the movie review text into high-density buckets, medium-density buckets, or low-density buckets, and output the bucket identifiers corresponding to the buckets; S3. Based on the barrel identifier, call the distillation curvature function that can output different parameters according to the training rounds to generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence that evolve with the training rounds. S4. Substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function. The dynamic joint loss function integrates the cross-entropy loss of the real label and the KL divergence distillation loss of the teacher model soft label, and uses the square value of the dynamic distillation temperature in the current round to balance the gradient magnitude of the KL divergence, and outputs the adaptive total loss. S5. Train the student model using the adaptive total loss backpropagation, so that the student model converges along different distillation intensity evolution paths for the high-density barrel samples and the low-density barrel samples, and outputs the sentiment classification result after completing the distillation training of the student model.
2. The film review sentiment analysis method based on adaptive distillation of review length according to claim 1, characterized in that, S1 further includes performing word segmentation on the movie review text to generate the word segmentation sequence, and performing dependency parsing on the word segmentation sequence to generate the dependency parsing tree; The information entropy is calculated by counting the frequency of different words in the word segmentation sequence, and the length of the longest path from the root node to each leaf node in the dependency syntax tree is used as the depth value. After normalizing the information entropy and the depth value, the semantic density index is generated by a weighted summation method determined based on the mean and variance in the training dataset.
3. The film review sentiment analysis method based on adaptive distillation of review length according to claim 1, characterized in that, S2 includes obtaining classification rules for distinguishing text structural complexity, the classification rules including a high density threshold and a low density threshold, and comparing the semantic density index with the high density threshold and the low density threshold; classifying text with the semantic density index greater than the high density threshold into the high density bucket, classifying text with the semantic density index less than the low density threshold into the low density bucket, classifying other text into the medium density bucket, and generating the bucket identifier containing density level information.
4. The film review sentiment analysis method based on adaptive distillation of review length according to claim 1, characterized in that, Step S3 further includes, for the high-density barrel, setting the dynamic distillation temperature sequence to exponentially decay from an initial high temperature value to a low temperature value with each training round, and simultaneously setting the dynamic distillation weight sequence to linearly increase from an initial low weight to a high weight; for the low-density barrel, setting the dynamic distillation temperature sequence to fluctuate within a predetermined medium-low temperature range, and simultaneously setting the dynamic distillation weight sequence to slowly and linearly increase from an initial high weight to a saturation value; for the medium-density barrel, setting the dynamic distillation temperature sequence and the dynamic distillation weight sequence to constant values, and outputting the current value by the distillation curvature function.
5. The film review sentiment analysis method based on adaptive distillation of review length according to claim 1, characterized in that, In step S4, the dynamic joint loss function is specifically expressed as follows: obtaining the original prediction distribution of the student model, obtaining the output distribution of the teacher model after temperature smoothing, and obtaining the output distribution of the student model after smoothing at the same temperature; calculating the cross-entropy loss based on the true labels and the original prediction distribution of the student model; calculating the KL divergence distillation loss based on the output distribution of the teacher model after temperature smoothing and the output distribution of the student model after smoothing at the same temperature, and weighting the KL divergence distillation loss using the square of the dynamic distillation temperature to generate the gradient-balanced distillation loss; and using the dynamic distillation weights to weight and sum the cross-entropy loss and the gradient-balanced distillation loss to obtain the adaptive total loss.
6. The film review sentiment analysis method based on adaptive distillation of review length according to claim 5, characterized in that, Before the step of training the student model using the adaptive total loss through backpropagation, the method further includes: obtaining the hidden state vectors of each Transformer layer within the teacher model and calculating the difference vectors between adjacent layers as semantic transmission coefficients; based on the bucket identifier, for the high-density bucket samples, the semantic transmission coefficients of the deep layers of the teacher model are masked during distillation, and only the semantic transmission coefficients of the shallow and middle layers are used; for the low-density bucket samples, the semantic transmission coefficients of all layers of the teacher model are used, and an additional consistency constraint loss for measuring the similarity between the student model and the teacher model at the corresponding layer is introduced, and the consistency constraint loss is added to the adaptive total loss.
7. The film review sentiment analysis method based on adaptive distillation of review length according to claim 1, characterized in that, In S5, the student model is a lightweight DistilBERT structure, and the teacher model is a composite structure of a BERT encoder and a BiLSTM bidirectional temporal network. The teacher model has completed offline training and frozen all parameters before distillation training. It outputs the soft labels and semantic transmission coefficients at the same time. The student model is trained using the AdamW optimizer, and its learning rate and weight decay coefficients are generated by a strategy that can be dynamically adjusted according to the training progress.
8. The film review sentiment analysis method based on adaptive distillation of review length according to claim 7, characterized in that, The steps for outputting sentiment classification results after completing the distillation training of the student model are as follows: the trained student model is deployed to the target device, and after receiving the movie review text to be detected, the student model directly performs forward propagation calculation; the student model outputs the probability of positive or negative sentiment classification, and the calculation of the semantic density index, the generation of the bucket identifier, and the calling of the distillation curvature function are not performed during the entire inference process.
9. The film review sentiment analysis method based on adaptive distillation of review length according to claim 8, characterized in that, The functional form and initial parameters of the distillation curvature function are determined by: obtaining the sample size ratio of the high-density buckets and the low-density buckets in the training dataset; and based on the sample size ratio, calibrating the exponential decay rate parameter of the dynamic distillation temperature sequence and the linear increasing slope parameter of the dynamic distillation weight sequence, so that the distillation curvature function can adapt to the text length distribution characteristics of the current training dataset.
10. The analysis system for the film review sentiment analysis method based on adaptive distillation of review length according to any one of claims 1-9, characterized in that, include: The text structure awareness module is used to acquire the word segmentation sequence and dependency syntax tree of the movie review text, calculate the information entropy and depth value and fuse them to generate a semantic density index, divide the sample buckets according to the semantic density index and output the bucket identifiers; The distillation curvature generation module is used to call a distillation curvature function that can output different parameters according to the training rounds based on the barrel identifier, and generate a dynamic distillation temperature sequence and a dynamic distillation weight sequence. The dynamic loss calculation module is used to substitute the current value of the dynamic distillation temperature sequence and the current value of the dynamic distillation weight sequence into the dynamic joint loss function and output the adaptive total loss. The hierarchical pruning distillation module is used to selectively utilize or enhance the semantic transmission coefficients of the teacher model according to the barrel identifier, and apply the final adaptive total loss to the training of the student model. The sentiment inference module is used to deploy the trained student model and output the sentiment classification results of the text to be detected.
