Method, device and medium for analyzing textual comments about vehicles
By combining deep learning large language model and time series analysis, the limitations of the existing technology in dealing with complex semantics and long texts are solved, and high-precision emotional polarity classification and capture dynamic changes of user concerns are realized, providing car companies with accurate decision-making support.
Patent Information
- Application Number
- CN202510000886.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-02
AI Technical Summary
Existing vehicle text comment analysis methods have limitations in dealing with complex semantics and long texts, fail to fully utilize the context information of large-scale prediction libraries, and fail to consider dynamic changes in user attitudes and attention preferences.
Using deep learning large language models, such as the BERT model, combined with time series analysis, multiple text comments about vehicles and their time belonging to them are acquired and analyzed, and events that affect user attitude changes and topics of user concern are identified through emotional polarity prediction models and potential Dirichlet allocation models.
It improves the accuracy and robustness of emotional polarity classification, captures the dynamic changes in users' concerns about models, and provides car companies with accurate and forward-looking decision-making support.
Smart Images

Figure CN119377414B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of data analysis, and in particular relates to a method, device and medium for analyzing textual comments about a vehicle. Background Art
[0002] With the prevalence of social media, users' evaluation and discussion of car models and brands are also increasing, which has generated a large number of unstructured comments on performance, configuration, appearance, price and after-sales service. The emotions and opinions contained in the comments not only reflect consumers' actual experience and expectations of various models, but also directly affect potential consumers' purchase decisions and the brand image of car companies.
[0003] Most existing vehicle text review analysis methods use traditional neural network model training to identify users' opinions and sentiment polarity on products, ignoring the dynamic changes of users' opinions.
[0004] In related technologies, word cloud graphs and word frequency analysis are used to visualize the keywords of user comments, and a sentiment analysis toolkit is used to obtain users' attitudes and opinions on products to achieve the purpose of vehicle analysis.
[0005] There are also related technologies that use vehicles as objects, use convolutional neural networks to train text topic extraction models, and LSTM-Attention to train text sentiment polarity discrimination models. Pipeline processing is used to obtain car user evaluation topics and topic sentiment scores, and finally output topic evaluations and sentiment polarity to achieve vehicle comparison based on car user review opinions.
[0006] Existing analysis methods use traditional neural networks for model training. Such models have obvious limitations when processing complex semantics and long texts. They rely on pre-trained word vectors and cannot fully utilize the contextual information of large-scale prediction libraries, making it difficult to fully understand users' true views. In addition, existing methods do not consider the dynamic changes in user attitudes and attention preferences, and only analyze changes in user views on products from a single static perspective, making it difficult to accurately locate the relationship between changes in user focus on products and market events. Summary of the invention
[0007] The present disclosure proposes a method, device and medium for analyzing text reviews of vehicles to solve the above technical problems.
[0008] According to a first aspect of the present disclosure, a method for analyzing text comments about a vehicle is provided, the method comprising: obtaining a plurality of text comments about the vehicle and the time to which each text comment belongs; inputting each text comment into a trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment; counting the number of text comments; performing a time series analysis on the number of text comments, the time to which each text comment belongs, and the sentiment polarity of each text comment to identify events that affect changes in user attitudes; identifying topics of concern to users under events through a latent Dirichlet allocation model to obtain trend changes in topics of concern to users.
[0009] Specifically, the text review includes a safety text review, a price text review, and an appearance text review. A text review analysis method for a vehicle includes: obtaining multiple text reviews about the vehicle and the time to which each text review belongs, wherein the text reviews include safety text reviews, price text reviews, and appearance text reviews; inputting the safety text reviews, price text reviews, and appearance text reviews into a trained sentiment polarity prediction model to obtain the sentiment polarity of the safety text reviews, the sentiment polarity of the price text reviews, and the sentiment polarity of the appearance text reviews; counting the number of safety text reviews, the number of price text reviews, and the number of appearance text reviews; performing time series analysis on the number of safety text reviews, the number of price text reviews, the number of appearance reviews, the time to which the safety text reviews belong, the time to which the price text reviews belong, the time to which the appearance text reviews belong, the sentiment polarity of the safety text reviews, the sentiment polarity of the price text reviews, and the sentiment polarity of the appearance text reviews to identify events that affect changes in user attitudes; identifying topics that users are concerned about under events through a latent Dirichlet allocation model to obtain trend changes in topics that users are concerned about, wherein the topics include safety, price, and appearance.
[0010] According to the above technical means, the dynamic changes of emotions and concerns are tracked based on time series analysis, and the changes in users' evaluation of car models and shifts in their concerns are identified, so as to timely adjust product promotion and public relations strategies.
[0011] In some embodiments, the sentiment polarity prediction model is trained, including: capturing text comments about vehicles from social media platforms; preprocessing the text comments to obtain standard text comments; annotating the text comments with sentiment polarity, wherein the sentiment polarity includes positive, neutral, and negative; using the text comments to train the BERT model, including: converting characters or words in the text comments into vectors of fixed dimension through word embedding; capturing the position of words through position embedding; distinguishing different sentences through segment embedding; adding the text comments element by element to generate a comprehensive embedding vector; inputting the text comments into the BERT model, wherein the BERT model includes multiple stacked Transformer encoders, each encoder processes the text comments through a self-attention mechanism to capture the relationship between words in a sentence, and the output of the BERT model includes a [CLS] vector for overall semantic representation and a corresponding output vector for each word; passing the [CLS] vector to a feedforward neural network and connecting it to a SoftMax layer to convert the output into a category probability distribution to predict sentiment polarity.
[0012] Based on the above technical means, the special structure of the BERT model enables the model to understand the semantics and contextual information of text comments at a deeper level.
[0013] In some embodiments, the preprocessing of text comments includes: filtering text comments; removing duplicate text in text comments; converting text comments in Traditional Chinese to text comments in Simplified Chinese; replacing words with similar meanings in text comments in Simplified Chinese with an identical word; performing word segmentation on text comments; and removing words that are not related to Chinese semantics.
[0014] Based on the above technical means, the quality of the data set is ensured to improve the training efficiency of the model.
[0015] In some embodiments, the time series analysis of the number of text comments, the time to which each text comment belongs, and the sentiment polarity of each text comment is performed to identify events that affect changes in user attitudes, including: using a line graph to analyze the overall trend changes in the number of daily text comments over a period of time to determine the peak value and change trend of the number of text comments; counting the number of text comments of each sentiment polarity at the key time point of the peak value; visualizing the trend of the number of text comments of each sentiment polarity over time to determine the time point of sentiment transition; determining the mean sentiment score of daily text comments; calculating the difference between the mean sentiment scores of two consecutive days to re-verify the time point of sentiment transition; smoothing the sentiment score using a moving average method to eliminate noise; calculating the moving average by setting an appropriate window size to analyze the smoothed data to re-verify the identified sentiment transition time point; anchoring events that affect changes in user sentiment.
[0016] According to the above technical means, first, the peak value of the number of text comments is determined, and secondly, the number of text comments of each sentiment polarity is counted; the trend of the number of text comments of each sentiment polarity changing over time is intuitively displayed to determine the time point of sentiment change, and then after multiple verifications, the (major) events that affect the (significant) changes in user emotions are finally anchored, thereby achieving accurate anchoring of the (major) events that affect the (significant) changes in user emotions.
[0017] In some embodiments, the formula of the moving average method is: , to calculate the moving average of the sentiment score at time t, where represents the observation sequence, and N represents the number of moving average items.
[0018] According to the above technical means, a specific method for calculating the moving average of the sentiment score at time t is provided, which makes it possible to smooth the sentiment score by means of the moving average method.
[0019] In some embodiments, the method of identifying topics of interest to users under an event through a latent Dirichlet allocation model to obtain trend changes in topics of interest to users includes: estimating the topic distribution of each document and the word distribution under each topic by maximizing the likelihood function; determining the number of topics of interest to users under the event; manually marking topics based on the top P keywords with higher probabilities; and comparing the changing trends of topics of interest to users to determine constant topics and high-frequency topics of interest to users.
[0020] Based on the above-mentioned technical means, it is possible to identify users' concerns about different car models during major events, helping automobile companies, public relations departments, etc. to clarify users' constant and high-frequency concerns about car models, thereby specifying targeted market strategies and product improvement plans.
[0021] In some embodiments, the latent Dirichlet allocation model calculates the document Conditional word generation The probability includes: According to the formula: , calculate the document Conditional word generation Probability ,in, express The probability of belonging to the sth topic, Indicates the sth topic in the document The probability in .
[0022] According to a second aspect of the present disclosure, a device for analyzing text comments about a vehicle is provided, including: a text comment data acquisition module, used to obtain multiple text comments about the vehicle and the time to which each text comment belongs; a text comment data processing module, used to input each text comment into a trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment; a text comment quantity statistics module, used to count the number of text comments; a time series analysis module, used to perform time series analysis on the number of text comments, the time to which each text comment belongs, and the sentiment polarity of each text comment, to identify events that affect changes in user attitudes; a topic identification module, used to identify topics of concern to users under events through a latent Dirichlet allocation model, to obtain trend changes in topics of concern to users.
[0023] According to a third aspect of the present disclosure, a text comment analysis device for a vehicle is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the text comment analysis method for the vehicle as described above based on instructions stored in the memory.
[0024] According to a fourth aspect of the present disclosure, a computer storable medium is provided, on which computer program instructions are stored, and when the instructions are executed by a processor, the above-mentioned text review analysis method for a vehicle is implemented.
[0025] By adopting the above technical scheme, the embodiments of the present disclosure can achieve the following beneficial technical effects: The present disclosure provides a method for analyzing textual comments about vehicles that integrates deep learning and time series. The present disclosure is based on a large language model of deep learning, breaks through the limitations of contextual understanding, dynamic word representation, long text adaptation and complex semantics of traditional models, effectively improves the accuracy and robustness of sentiment polarity classification, and combines time series to capture the horizontal dynamic changes of focus points on the basis of vertical static comparison, providing more accurate and forward-looking decision support for car companies. Specifically, the present disclosure combines the BERT model with time series analysis to achieve high-precision sentiment polarity classification in the analysis of textual comments about vehicles, and achieves a comprehensive characterization of the dynamic evolution trend of users' focus points on vehicle models. The BERT model uses its powerful two-way contextual semantic understanding ability to accurately extract the deep semantic features of vehicle models in user comments, and effectively processes complex comment information involving vehicle model configuration, performance, price, appearance, etc. through text word embedding, segment embedding and position embedding processing, combined with the advantages of multi-layer Transformer encoders. Time series analysis enables accurate tracking of the focus and sentiment changes of each car model. Based on multi-level analysis methods such as daily comment volume, sentiment frequency changes, and focus heat, it accurately locates the key time nodes when users' evaluation of car models fluctuates dramatically, thereby effectively anchoring major events that have a significant impact on the attention and evaluation of car models. Through the topic model, it identifies the focus of users on different car models under various major events, helping automobile companies, public relations departments, etc. to sort out the constant and high-frequency focus of users on car models, so as to specify targeted market strategies and product improvement plans. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0027] The present disclosure can be more clearly understood from the following detailed description with reference to the accompanying drawings.
[0028] Figure 1 is a flowchart illustrating a method for analyzing text comments about a vehicle according to some embodiments of the present disclosure.
[0029] Figure 2 is a flow chart showing a method for training the sentiment polarity prediction model according to some embodiments of the present disclosure.
[0030] Figure 3 is a flow chart showing a method for preprocessing text comments according to some embodiments of the present disclosure.
[0031] Figure 4 is a flow chart showing a method for identifying events that influence changes in user attitudes according to some embodiments of the present disclosure.
[0032] Figure 5 is a flow chart showing a method for identifying topics of interest to users under events according to some embodiments of the present disclosure.
[0033] Figure 6 is a schematic diagram showing sentiment polarity classification according to some embodiments of the present disclosure.
[0034] Figure 7 is a workflow diagram showing a BERT model according to some embodiments of the present disclosure.
[0035] Figure 8 It is a graph showing the changing trend of the number of comments on a certain car model over a period of time according to some embodiments of the present disclosure.
[0036] Fig. 9 It is a graph showing the changing trend of the number of text reviews of three types of sentiment polarities for a certain car model over a period of time according to some embodiments of the present disclosure.
[0037] Fig.10 is a graph showing a changing trend of a difference in sentiment score of a certain vehicle type over a period of time according to some embodiments of the present disclosure.
[0038] Fig.11 is a comparative schematic diagram showing the ranking of topics of concern for four types of vehicles of the same level according to some embodiments of the present disclosure.
[0039] Fig.12 It is a schematic diagram showing the phase changes of topics of concern for a certain vehicle type according to some embodiments of the present disclosure.
[0040] Fig.13 is a block diagram showing a text review analysis apparatus about a vehicle according to some embodiments of the present disclosure.
[0041] Fig.14 is a block diagram showing a text review analysis device for a vehicle according to some other embodiments of the present disclosure.
[0042] Fig.15 is a block diagram illustrating a computer system for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0043] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.
[0044] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0045] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.
[0046] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.
[0047] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0048] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0049] At present, with the prevalence of social media, users' evaluation and discussion of car models and brands are also increasing, which has generated a large number of unstructured comments on performance, configuration, appearance, price and after-sales service. The emotions and opinions contained in the comments not only reflect consumers' actual experience and expectations of various models, but also directly affect potential consumers' purchasing decisions and the brand image of car companies.
[0050] Most existing vehicle text review analysis methods use traditional neural network model training to identify users' opinions and sentiment polarity on products, ignoring the dynamic changes of users' opinions.
[0051] In related technologies, word cloud graphs and word frequency analysis are used to visualize the keywords of user comments, and a sentiment analysis toolkit is used to obtain users' attitudes and opinions on products to achieve the purpose of vehicle (competitive product) analysis.
[0052] There are also related technologies that use vehicles as the object, use convolutional neural networks to train text topic extraction models, LSTM-Attention to train text sentiment polarity discrimination models, and use Pipeline processing to obtain car user evaluation topics and topic sentiment scores. Finally, the topic evaluation and sentiment polarity are output to achieve vehicle (or car competing product) comparison based on car user review opinions.
[0053] Existing analysis methods use traditional neural networks for model training. Such models have obvious limitations when processing complex semantics and long texts. They rely on pre-trained word vectors and cannot fully utilize the contextual information of large-scale prediction libraries, making it difficult to fully understand users' true views. In addition, existing methods do not consider the dynamic changes in user attitudes and attention preferences, and only analyze changes in user views on products from a single static perspective, making it difficult to accurately locate the relationship between changes in user focus on products and market events.
[0054] In view of this, the present disclosure proposes a method, device and medium for analyzing textual comments about vehicles. The present disclosure provides a method for analyzing textual comments about vehicles that integrates deep learning and time series. The present disclosure is based on a large language model of deep learning, breaks through the limitations of contextual understanding, dynamic word representation, long text adaptation and complex semantics of traditional models, effectively improves the accuracy and robustness of sentiment polarity classification, and combines time series to capture the horizontal dynamic changes of focus points on the basis of vertical static comparison, providing more accurate and forward-looking decision support for car companies. Specifically, the present disclosure combines the BERT model with time series analysis to achieve high-precision sentiment polarity classification in the analysis of textual comments about vehicles, and achieves a comprehensive characterization of the dynamic evolution trend of users' focus points on vehicle models. The BERT model uses its powerful two-way contextual semantic understanding ability to accurately extract the deep semantic features of vehicle models in user comments, and effectively processes complex comment information involving vehicle model configuration, performance, price, appearance, etc. through text word embedding, segment embedding and position embedding processing, combined with the advantages of multi-layer Transformer encoders. Time series analysis enables accurate tracking of the focus and sentiment changes of each car model. Based on multi-level analysis methods such as daily comment volume, sentiment frequency changes, and focus heat, it accurately locates the key time nodes when users' evaluation of car models fluctuates dramatically, thereby effectively anchoring major events that have a significant impact on the attention and evaluation of car models. Through the topic model, it identifies the focus of users on different car models under various major events, helping automobile companies, public relations departments, etc. to sort out the constant and high-frequency focus of users on car models, so as to specify targeted market strategies and product improvement plans.
[0055] First of all, it should be noted that the English name of the large language model is Large Language Model, which is an artificial intelligence model designed to understand and generate human language. In the field of natural language processing, it can help computers better understand and generate text. Large language models have emergent capabilities, which are defined as capabilities related to certain complex tasks. Three typical LLM emergent capabilities include contextual learning, instruction following, and step-by-step reasoning. Among them, the contextual learning capability was first introduced by GPT-3, which allows the language model to perform tasks by understanding the context and generating corresponding outputs when provided with natural language instructions or multiple task examples, without the need for additional training or parameter updates.
[0056] The emergence of the BERT model is based on the rapid development of deep learning in the field of natural language processing. Before BERT, there have been many pre-trained language models that have demonstrated the powerful performance of pre-trained models in NLP tasks. These models are usually based on unidirectional contextual information and only consider the forward or backward information in the text, which limits the global understanding of the text. BERT aims to solve this problem by introducing bidirectional contextual information, thereby accurately representing the semantic information in the text. BERT is a bidirectional language representation model based on the Transformer architecture. Through pre-training on massive text data, rich contextual representations are learned, and then fine-tuned on downstream tasks to achieve extremely high performance.
[0057] The latent Dirichlet allocation model is a generative probability model for a text collection. It assumes that each text is represented by a multinomial distribution of topics, and each topic is represented by a multinomial distribution of words. In particular, it assumes that the prior distribution of the topic distribution of texts is Dirichlet distribution, and the prior distribution of the word distribution of topics is also Dirichlet distribution. The LDA model is a probabilistic graphical model with hidden variables. In the model, the word distribution of each topic, the topic distribution of each text, and the topic at each position in the text are all hidden variables, and the word at each position in the text is an observed variable. To use LDA for topic analysis is to learn the topic distribution of each text and the word distribution of each topic for a given text collection.
[0058] Figure 1 is a flow chart showing a method for analyzing textual comments about a vehicle according to some embodiments of the present disclosure. Figure 1 As shown, the text review analysis method for a vehicle includes steps 110 to 150 .
[0059] In step 110 , a plurality of text comments about the vehicle and the time at which each text comment belongs are obtained.
[0060] Readers please note that text review is a broad concept.
[0061] In step 120, each text comment is input into the trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment.
[0062] like Figure 2 As shown, in some embodiments, training the sentiment polarity prediction model includes:
[0063] Step 210 , crawling text comments about the vehicle on the social media platform.
[0064] Based on the Python crawler program, the car model review data on social media is captured. According to the search keywords, the text reviews of a certain car model on the social platform within a period of time are captured. The data includes the time stated in the review, the content of the review, the user ID of the review, the URL to which the review belongs, the number of likes on the review, and the IP address to which the review belongs.
[0065] Step 220 , preprocess the text comments to obtain standard text comments.
[0066] like Figure 3 As shown, in some embodiments, the preprocessing of the text comments includes:
[0067] Step 310: Filter the text comments.
[0068] Filter irrelevant links, irrelevant emoticons, irrelevant pictures, and irrelevant "@" characters in text.
[0069] Step 320, remove duplicate text in the text comments.
[0070] Eliminate duplicate and irrelevant texts. It can be seen on social platforms that users often copy and paste the same words or sentences, so it is necessary to take measures to eliminate them.
[0071] Step 330: Convert the text comment in Traditional Chinese to the text comment in Simplified Chinese.
[0072] Convert Traditional Chinese to Simplified Chinese to facilitate large language model processing.
[0073] Step 340, replace words with similar meanings in the simplified Chinese text comments with an identical word.
[0074] A common word refers to all words with similar meanings, and one of these words is used to unify all other words with similar meanings.
[0075] Step 350: perform word segmentation processing on the text comments.
[0076] Perform word segmentation on text comments based on Jieba library.
[0077] Jieba is a Python Chinese word segmentation component with good performance. Chinese text needs to be segmented to obtain individual words. The word segmentation principle of the jieba library is: use a Chinese word library to determine the association probability between Chinese characters, and form phrases with high probability between Chinese characters to form the word segmentation results. In addition to word segmentation, users can also add custom phrases.
[0078] Step 360, remove words that are not related to Chinese semantics.
[0079] According to the preset stop dictionary, words irrelevant to Chinese semantics are eliminated.
[0080] Irrelevant words include function words and common auxiliary words that have no actual meaning.
[0081] Step 230 , annotating the text comments with sentiment polarity, wherein the sentiment polarity includes positive, neutral, and negative.
[0082] A set of annotation guidelines was established in advance to clearly define the three types of sentiment: positive (annotated as 1), neutral (annotated as 0), and negative (annotated as -1), which were completed manually by experienced annotators. The consistency between different annotators was evaluated through cross-validation, and comments with inconsistent annotations were reviewed and revised to ensure data quality.
[0083] The labeled data is divided into training set, validation set, and test set. The training set accounts for 80% of the total and is used for model training. The validation set accounts for 10% and is used to adjust model parameters and select the best model. The test set also accounts for 10% and is used to evaluate the performance of the model. In order to keep the proportion of sentiment polarity consistent, random partitioning or stratified sampling is used, and Python's scikit-learn library is used to divide the data, and the number of three types of comments in each subset is balanced to prevent category bias in the model training process.
[0084] Step 240, training the BERT model using text comments, including: converting characters or words in the text comments into vectors of fixed dimensions through word embedding; capturing the position of words through position embedding; distinguishing different sentences through segment embedding; adding the text comments element by element to generate a comprehensive embedding vector; inputting the text comments into the BERT model, wherein the BERT model includes multiple stacked Transformer encoders, BERT-Base has 12 layers, and BERT-Large has 24 layers, each encoder processes the text comments through a self-attention mechanism to capture the relationship between words in a sentence; the BERT model output includes a [CLS] vector for overall semantic representation and a corresponding output vector for each word; passing the [CLS] vector to a feedforward neural network and connecting it to a SoftMax layer to convert the output into a category probability distribution to predict sentiment polarity.
[0085] like Figure 7 As shown in the figure, the input text is converted into a fixed-dimensional vector by word embedding, where the [CLS] and [SEP] tags are used to mark the beginning and end of the input sequence. The position information of the word in the input sequence is captured by position embedding to ensure that the model can recognize the order of words. Segment embedding is used to distinguish different sentences, especially in sentence pair tasks, by assigning different segment vectors to each word in each sentence. For single sentence input, the segment vectors of all words are the same, that is, marked as 0.
[0086] After the input text is processed by word embedding, position embedding, and segment embedding, it is added element by element to generate a comprehensive embedding vector as the input of the BERT model and enters the multi-layer Transformer encoder. The BERT model contains multiple stacked Transformer encoders, BERT-Base has 12 layers, and BERT-Large has 24 layers. Each encoding layer processes the input through the self-attention mechanism to capture the relationship between each word and other words in the sentence, allowing the BERT model to understand the semantics and contextual information of the text at a deeper level.
[0087] The output of the BERT model is the [CLS] vector for overall semantic representation and the corresponding output vector for each word. The [CLS] vector is the semantic representation of the entire input sequence and is widely used in classification tasks. The output vectors of other words can also be used for tasks such as sequence labeling. These vectors contain context-sensitive word representations.
[0088] In the classification task, the model will pass the [CLS] vector to the Feed-Forward Neural Network and connect it to the SoftMax layer to convert the output into a category probability distribution, which is used to predict the category to which the input sequence belongs, that is, to predict the sentiment polarity. Figure 6 As shown, there are three types of sentiment polarity, namely positive, neutral and negative.
[0089] In step 130 , the number of text comments is counted.
[0090] In step 140, a time series analysis is performed on the number of text comments, the time of each text comment, and the sentiment polarity of each text comment to identify events that affect changes in user attitudes.
[0091] like Figure 4 As shown, in some embodiments, the time series analysis of the number of text comments, the time of each text comment, and the sentiment polarity of each text comment to identify events that affect the change of user attitudes includes:
[0092] Step 410, using a line graph to analyze the overall trend change of the number of daily text comments over a period of time, and determine the peak value and change trend of the number of text comments.
[0093] Step 420 , counting the number of text comments of each sentiment polarity at the key time point of the peak.
[0094] like Figure 8As shown, statistical and data visualization tools (such as line charts) are used to analyze the overall trend changes in the number of daily comments within a certain period of time, identify the peak values and special change trends in the number of comments, which may correspond to some key time points.
[0095] Step 430 , visualize the trend of the number of text comments of each sentiment polarity over time to determine the transition time point of the sentiment.
[0096] like Fig. 9 As shown in the figure, after identifying the key time points of the comment volume, the volume of positive, neutral and negative emotional comments is calculated based on the results of sentiment analysis, and the trend of the three types of emotional comments over time is visualized, with particular attention paid to the emotional frequency fluctuations before and after the key time points to determine the time points of significant emotional changes.
[0097] Step 440 , determining the average sentiment score of the daily text comments.
[0098] Step 450, calculating the difference between the average values of the emotion scores for two consecutive days to verify the time point of the emotion transition again.
[0099] Considering the average sentiment score of daily comments, the difference between the average sentiment scores of two consecutive days is calculated, such as Fig.10 As shown, the dates with larger differences are associated with significant changes in emotions, which once again verifies the time point of significant changes in emotions.
[0100] Please note that Figure 8 , Fig. 9 and Fig.10 The above contents are interpreted together to make the present disclosure clearer.
[0101] The number of daily comments from the public from February 1, 2022 to February 15, 2023 is counted and visualized in the form of a line graph, such as Figure 8 As shown, the three peaks with the highest number of daily comments correspond to December 11, 2022 (peak 1), December 21, 2022 (peak 2), and February 6, 2023 (peak 3), and major events may have occurred at these three time points.
[0102] Based on sentiment analysis, the sentiment polarity of public comments from February 1, 2022 to February 15, 2023 is identified as positive, neutral, and negative. Fig. 9 As shown in the figure, the number trend changes of each type of comments in two and a half months are counted, and the corresponding peaks are identified as December 11, 2022 (peak 1), December 21, 2022 (peak 2), and February 8, 2023 (peak 3). Figure 8In comparison, the time of Peak 1 and Peak 2 is the same, and the time of Peak 3 changes from February 6 to February 8. Among them, the amount of positive and negative comments in Peak 1 is relatively close, the amount of positive comments in Peak 2 slightly exceeds the negative comments, and the amount of negative comments in Peak 3 gradually increases during this time period, while the positive comments gradually decrease. It is preliminarily determined that public sentiment has changed significantly at these three time points.
[0103] According to the daily comment volume and its corresponding sentiment polarity, the average sentiment score of daily comments is calculated, and the sentiment averages of two consecutive days are differentiated (the sentiment average of the next day minus the sentiment average of the previous day). Fig.10 These are the four dates with the largest average difference in sentiment scores, corresponding to December 11, 2022, December 21, 2022, January 5, 2023, and February 6, 2023. The public sentiment at these four time points has changed significantly. Fig. 9 The number of comments on January 5, 2023 was small and not representative, which once again verified that the time points of significant emotional changes were December 11, 2022, December 21, 2022, and February 6, 2023.
[0104] The sentiment scores are smoothed using the moving average method to eliminate noise and reveal potential sentiment change trends. The smoothed data is analyzed by calculating the moving average by setting the window period to 2, 5, and 6 days to verify whether the time points of significant sentiment changes identified in the previous steps are still valid. The final anchored time points that affect significant changes in user sentiment are December 11, 2022, December 21, 2022, and February 6, 2023.
[0105] Step 460, smoothing the sentiment score using a moving average method to eliminate noise.
[0106] The sentiment scores were smoothed using the moving average method to eliminate noise, and the smoothed data revealed the underlying sentiment change trend.
[0107] Step 470, by setting an appropriate window size to calculate a moving average, to analyze the smoothed data, and to verify again the transition time point of the identified emotion.
[0108] like Fig.11 As shown in the figure, the moving average method is used to smooth the sentiment score to eliminate noise and reveal the potential trend of sentiment change. The smoothed data is analyzed by calculating the moving average by setting an appropriate window size to verify whether the time points of significant sentiment transition identified in the previous steps are still valid, and finally the major events that affect the significant change of user sentiment are anchored.
[0109] The method of using the moving average method is as follows: the moving average of the sentiment score at time t is expressed as ,in, represents the observation sequence, and N represents the number of moving average items.
[0110] In step 150, the topics that users are concerned about under the event are identified by using a latent Dirichlet allocation model to obtain trend changes of the topics that users are concerned about.
[0111] like Figure 5 As shown, the topic of interest to the user under the event is identified by the latent Dirichlet allocation model to obtain the trend change of the topic of interest to the user, including:
[0112] Step 510, estimating the topic distribution of each document and the word distribution under each topic by maximizing the likelihood function.
[0113] Estimate the topic distribution of each document and the word distribution under each topic. The topic distribution of a document means that the model can estimate the probability of multiple topics corresponding to each document, that is, the topics involved in the document and the proportion of each topic; the word distribution under each topic means that the model estimates the probability distribution of a word for each topic, that is, the probability of keywords appearing in each topic, which is usually expressed by Beta.
[0114] Step 520, determining the amount of topics that the user is concerned about under the event.
[0115] Determine the number of topics that users are concerned about under each major event. The number of topics will have a crucial impact on the performance of the model. Too many topics will easily lead to complex analysis and meaningless results, while too few topics may cover unrepresentative topics.
[0116] Step 530: manually mark the topics based on the top P keywords with higher probabilities.
[0117] Considering that the latent Dirichlet allocation model is an unsupervised learning method, three experienced experts are required to manually label the topics based on the top 10 keywords with the highest probability, such as Fig.11 As shown, this is the ranking of topics of concern for four types of vehicles of the same level.
[0118] Step 540 , comparing the changing trends of the topics that the user is interested in, to determine the constant topics and high-frequency topics that the user is interested in.
[0119] Sort out and compare the changing trends of topics that users are concerned about, and summarize the constant and high-frequency topics that users are concerned about. Among them, constant topics refer to topics that appear repeatedly in multiple events. They may be core topics that users have been concerned about for a long time or universal topics that are not related to the event itself. High-frequency topics refer to topics that have attracted high attention in certain specific events. These may be unique content of the event, reflecting the urgency or special concerns of users. Fig.12As shown in the figure, users' focus changes in three stages for a certain car model, among which safety, price, and appearance are constant topics, while interior, range, and brand are high-frequency topics.
[0120] The workflow of the latent Dirichlet allocation model is as follows: randomly initialize parameters and continuously iterate and update to ensure that the model fits the document data, estimate the topic distribution of the document and the word distribution of the topic by maximizing the likelihood function, and the iterative process should be stopped based on convergence criteria such as reaching the maximum number of iterations and the parameter change being less than a certain threshold. After the training is completed, the obtained topic distribution and word distribution are used to analyze the document collection.
[0121] The method of using the latent Dirichlet allocation model is as follows: Conditional word generation The probability is expressed as: ,in, express The probability of belonging to the sth topic, Indicates the sth topic in the document The probability in .
[0122] As mentioned above, based on the analysis results, we can provide ideas for the product development, marketing and brand public relations departments of automobile companies. Users' emotions and concerns about different models will change over time. Based on time series analysis, we can track the dynamic changes of emotions and concerns, identify changes in users' evaluation of models and shifts in focus, and adjust product promotion and public relations strategies in a timely manner; external environmental changes such as relevant policy adjustments and economic fluctuations, as well as internal marketing activities and new car releases of automobile companies, will have an impact on the market. Correlating the above factors with the performance of the automobile market will help companies fully understand the impact of internal and external environments on models and enhance the competitive advantage of automobile companies in the market.
[0123] In the text review analysis method about vehicles in the embodiment of the present disclosure, the present disclosure, based on the large language model of deep learning, breaks through the limitations of context understanding, dynamic word representation, long text adaptation and complex semantics of traditional models, effectively improves the accuracy and robustness of sentiment polarity classification, and combines time series to capture the horizontal dynamic changes of focus points on the basis of vertical static comparison, providing more accurate and forward-looking decision support for car companies. Specifically, the present disclosure combines the BERT model with time series analysis to achieve high-precision sentiment polarity classification in the analysis of text reviews about vehicles (or text reviews of competing models), and achieves a comprehensive characterization of the dynamic evolution trend of users' focus on models. The BERT model uses its powerful two-way contextual semantic understanding ability to accurately extract the deep semantic features of the model in the user's comments, and through text word embedding, segment embedding and position embedding processing, combined with the advantages of multi-layer Transformer encoders, effectively processes complex comment information involving model configuration, performance, price, appearance, etc. Time series analysis enables accurate tracking of the focus and sentiment changes of each car model. Based on multi-level analysis methods such as daily comment volume, sentiment frequency changes, and focus heat, it accurately locates the key time nodes when users' evaluation of car models fluctuates dramatically, thereby effectively anchoring major events that have a significant impact on the attention and evaluation of car models. Through the topic model, it identifies the focus of users on different car models under various major events, helping automobile companies, public relations departments, etc. to sort out the constant and high-frequency focus of users on car models, so as to specify targeted market strategies and product improvement plans.
[0124] Fig.13 is a block diagram showing a text review analysis apparatus for a vehicle according to some embodiments of the present disclosure. Fig.13 As shown, the text comment analysis device 1300 for a vehicle includes a text comment data acquisition module 1310 , a text comment data processing module 1320 , a text comment quantity statistics module 1330 , a time series analysis module 1340 , and a topic identification module 1350 .
[0125] The text comment data acquisition module 1310 is configured to acquire a plurality of text comments about the vehicle and the time to which each text comment belongs;
[0126] The text comment data processing module 1320 is configured to input each text comment into the trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment;
[0127] A text comment quantity counting module 1330 is configured to count the number of text comments;
[0128] The time series analysis module 1340 is configured to perform time series analysis on the number of text comments, the time of each text comment, and the sentiment polarity of each text comment to identify events that affect changes in user attitudes;
[0129] The topic identification module 1350 is configured to identify topics that users are concerned about under an event through a latent Dirichlet allocation model to obtain trend changes in topics that users are concerned about.
[0130] In the device of the embodiment of the present disclosure, a text review analysis device for vehicles that integrates deep learning and time series is provided. The present disclosure is based on a large language model of deep learning, breaks through the limitations of context understanding, dynamic word representation, long text adaptation and complex semantics of traditional models, effectively improves the accuracy and robustness of sentiment polarity classification, and combines time series to capture the horizontal dynamic changes of focus points on the basis of vertical static comparison, providing more accurate and forward-looking decision support for car companies. Specifically, the present disclosure combines the BERT model with time series analysis to achieve high-precision sentiment polarity classification in the analysis of text reviews about vehicles (or text reviews of competing models), and achieves a comprehensive portrayal of the dynamic evolution trend of users' focus points on models. The BERT model uses its powerful two-way context semantic understanding ability to accurately extract the deep semantic features of the model in the user's comments, and effectively processes complex comment information involving model configuration, performance, price, appearance, etc. through text word embedding, segment embedding and position embedding processing, combined with the advantages of multi-layer Transformer encoders. Time series analysis enables accurate tracking of the focus and sentiment changes of each car model. Based on multi-level analysis methods such as daily comment volume, sentiment frequency changes, and focus heat, it accurately locates the key time nodes when users' evaluation of car models fluctuates dramatically, thereby effectively anchoring major events that have a significant impact on the attention and evaluation of car models. Through the topic model, it identifies the focus of users on different car models under various major events, helping automobile companies, public relations departments, etc. to sort out the constant and high-frequency focus of users on car models, so as to specify targeted market strategies and product improvement plans.
[0131] Fig.14 is a block diagram showing a text review analysis device for a vehicle according to some other embodiments of the present disclosure.
[0132] like Fig.14 As shown, the text review analysis device 1400 for a vehicle includes a memory 1410; and a processor 1420 coupled to the memory 1410. The memory 1410 is used to store instructions for executing the corresponding embodiment of the text review analysis method for a vehicle. The processor 1420 is configured to execute the text review analysis method for a vehicle in any of some embodiments of the present disclosure based on the instructions stored in the memory 1410.
[0133] Fig.15 is a block diagram showing a computer system for implementing some embodiments of the present disclosure. Fig.15 As shown, computer system 1500 may be embodied in the form of a general purpose computing device. Computer system 1500 includes memory 1510, processor 1520, and bus 1530 that connects various system components.
[0134] The memory 1510 may include, for example, a system memory, a non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs. The system memory may include a volatile storage medium, such as a random access memory (RAM) and / or a cache memory. The non-volatile storage medium may store, for example, instructions for executing at least one of the corresponding embodiments of the text review analysis method for a vehicle. The non-volatile storage medium includes, but is not limited to, a disk memory, an optical memory, a flash memory, etc.
[0135] The processor 1520 can be implemented by a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistors, etc. Discrete hardware components. Accordingly, each module such as the text comment data acquisition module, the text comment data processing module, the text comment quantity statistics module, the time series analysis module, and the topic identification module can be implemented by the central processing unit (CPU) running the instructions in the memory to execute the corresponding steps, or can be implemented by a dedicated circuit to execute the corresponding steps.
[0136] The bus 1530 may use any of a variety of bus architectures, including, but not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, and a Peripheral Component Interconnect (PCI) bus.
[0137] The computer system 1500 may also include an input / output interface 1540, a network interface 1550, a storage interface 1560, etc. These interfaces 1540, 1550, 1560, the memory 1510, and the processor 1520 may be connected via a bus 1530. The input / output interface 1540 may provide a connection interface for input / output devices such as a display, a mouse, and a keyboard. The network interface 1550 provides a connection interface for various networked devices. The storage interface 1560 provides a connection interface for external storage devices such as a floppy disk, a USB flash drive, and an SD card.
[0138] Here, various aspects of the present disclosure are described with reference to flowcharts and / or block diagrams of methods, devices, and computer program products according to embodiments of the present disclosure. It should be understood that each frame of the flowchart and / or block diagram and the combination of frames can be implemented by computer-readable program instructions.
[0139] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable device to produce a machine, so that the processor executes the instructions to produce means for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0140] These computer-readable program instructions may also be stored in a computer-readable memory, which cause the computer to work in a specific manner to produce an article of manufacture, including instructions for implementing the functions specified in one or more blocks in the flowchart and / or block diagram.
[0141] The present disclosure can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects.
[0142] The present disclosure provides a method for analyzing textual comments about vehicles (or textual comments about competing models) that integrates deep learning and time series. The present disclosure is based on a large language model of deep learning, which breaks through the limitations of contextual understanding, dynamic word representation, long text adaptation and complex semantics of traditional models, effectively improves the accuracy and robustness of sentiment polarity classification, and combines time series to capture the horizontal dynamic changes of focus points on the basis of vertical static comparison, providing more accurate and forward-looking decision support for car companies. Specifically, the present disclosure combines the BERT model with time series analysis to achieve high-precision sentiment polarity classification in the analysis of competing models, and achieves a comprehensive characterization of the dynamic evolution trend of users' focus points on models. The BERT model uses its powerful two-way contextual semantic understanding ability to accurately extract the deep semantic features of the model in user comments, and effectively processes complex comment information involving model configuration, performance, price, appearance, etc. through text word embedding, segment embedding and position embedding processing, combined with the advantages of multi-layer Transformer encoders. Time series analysis enables accurate tracking of the focus and sentiment changes of each car model. Based on multi-level analysis methods such as daily comment volume, sentiment frequency changes, and focus heat, it accurately locates the key time nodes when users' evaluation of car models fluctuates dramatically, thereby effectively anchoring major events that have a significant impact on the attention and evaluation of car models. Through the topic model, it identifies the focus of users on different car models under various major events, helping automobile companies, public relations departments, etc. to sort out the constant and high-frequency focus of users on car models, so as to specify targeted market strategies and product improvement plans.
[0143] So far, the vehicle text review analysis method, device and medium according to the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.
[0144] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A method for analyzing textual comments about vehicles, characterized in that: The method comprises: Get multiple text comments about the vehicle and the time of each text comment; Input each text comment into the trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment; Count the number of text comments; Conduct time series analysis on the number of text comments, the time of each text comment, and the sentiment polarity of each text comment to identify events that affect changes in user attitudes, including: using a line chart to analyze the overall trend of the number of daily text comments over a period of time to determine the peak and change trend of the number of text comments; counting the number of text comments of each sentiment polarity at the key time point of the peak; visualizing the trend of the number of text comments of each sentiment polarity over time to determine the time point of sentiment transition; determining the average sentiment score of daily text comments; calculating the difference between the average sentiment scores of two consecutive days to re-verify the time point of sentiment transition; using the moving average method to smooth the sentiment score to eliminate noise: calculating the moving average through a set window size to analyze the smoothed data and re-verify the identified sentiment transition time point; anchoring events that affect user sentiment changes; The topics that users are concerned about under events are identified through the latent Dirichlet allocation model to obtain the trend changes of the topics that users are concerned about.
2. The vehicle text review analysis method according to claim 1, characterized in that: Training the sentiment polarity prediction model includes: Scrape textual comments about vehicles on social media platforms; Preprocess the text comments to obtain standard text comments; Tagging sentiment polarity of text comments, where sentiment polarity includes positive, neutral, and negative; Training the BERT model using text comments includes: converting characters or words in the text comments into vectors of fixed dimensions through word embedding; capturing the position of words through position embedding; distinguishing different sentences through segment embedding; adding the text comments element by element to generate a comprehensive embedding vector; inputting the text comments into the BERT model, wherein the BERT model contains multiple stacked Transformer encoders, each encoder processes the text comments through a self-attention mechanism to capture the relationship between words in a sentence, and the output of the BERT model includes a [CLS] vector for overall semantic representation and a corresponding output vector for each word; passing the [CLS] vector to a feedforward neural network and connecting it to a SoftMax layer to convert the output into a category probability distribution to predict sentiment polarity.
3. The vehicle text review analysis method according to claim 2, characterized in that: The preprocessing of the text comments includes: Filter text comments; Remove duplicate text from text reviews; Convert text comments in Traditional Chinese to text comments in Simplified Chinese; Replace words with the same meaning in the text reviews in Simplified Chinese with a single word; Perform word segmentation on text comments; Eliminate words that are not relevant to Chinese semantics.
4. The vehicle text review analysis method according to claim 1, characterized in that: The formula of the moving average method is: , to calculate the moving average of the sentiment score at time t, where represents the observation sequence, N represents the number of moving average items, MA t is the moving average of the sentiment score at time t.
5. The vehicle text review analysis method according to claim 1, characterized in that: The method of identifying the topics that users are concerned about under an event by using a latent Dirichlet allocation model to obtain trend changes of the topics that users are concerned about includes: Estimate the topic distribution of each document and the word distribution under each topic by maximizing the likelihood function; Determine the amount of topics that users follow under the event; Manually mark the topics based on the top P keywords with higher probabilities; Compare the changing trends of topics that users follow to determine the constant topics and high-frequency topics that users follow.
6. The vehicle text review analysis method according to claim 5, characterized in that: The Latent Dirichlet Allocation Model Calculation Documentation Conditional word generation The probability of: According to the formula: , calculate the document Conditional word generation Probability ,in, express The probability of belonging to the sth topic, Indicates the sth topic in the document The probability in .
7. A text review analysis device for a vehicle, characterized in that: include: A text review data acquisition module is used to obtain multiple text reviews about the vehicle and the time of each text review; The text comment data processing module is used to input each text comment into the trained sentiment polarity prediction model to obtain the sentiment polarity of each text comment; Text comment quantity statistics module, used to count the number of text comments; The time series analysis module is used to perform time series analysis on the number of text comments, the time of each text comment, and the sentiment polarity of each text comment, and identify events that affect changes in user attitudes, including: using a line chart to analyze the overall trend changes in the number of daily text comments over a period of time, and determine the peak value and change trend of the number of text comments; counting the number of text comments of each sentiment polarity at the key time point of the peak; visualizing the trend of the number of text comments of each sentiment polarity over time to determine the time point of sentiment transition; determining the average sentiment score of daily text comments; calculating the difference between the average sentiment scores of two consecutive days to re-verify the time point of sentiment transition; using the moving average method to smooth the sentiment score to eliminate noise: calculating the moving average through the set window size to analyze the smoothed data and re-verify the identified sentiment transition time point; anchoring events that affect user sentiment changes; The topic identification module is used to identify the topics that users are concerned about under the event through the latent Dirichlet allocation model to obtain the trend changes of the topics that users are concerned about.
8. A text review analysis device for a vehicle, characterized in that: include: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the vehicle text review analysis method according to any one of claims 1 to 6 based on instructions stored in the memory.
9. A computer storable medium, characterized in that: Computer program instructions are stored thereon, and when the instructions are executed by a processor, a text review analysis method for a vehicle as claimed in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Topic-based public opinion emotion evolution method
CN111143549A
Automobile online comment sentiment analysis method based on sentiment word vectors
CN112966526A