Automobile evaluation sentiment analysis method and device, electronic equipment and storage medium
By combining LSTM and Text CNN neural networks, a car evaluation sentiment analysis model has been developed, which solves the problem of training data relying on manual annotation and achieves efficient and accurate sentiment analysis, making it suitable for the highly specialized automotive field.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-12
- Publication Date
- 2026-03-20
AI Technical Summary
Existing technologies rely on manual annotation of training data, which is difficult to apply to the highly specialized automotive field, resulting in low efficiency and high cost of sentiment analysis.
A sentiment analysis model for car reviews is trained by combining a Long Short-Term Memory (LSTM) network and a Text CNN neural network for text classification. It calculates the sentiment score of the review and outputs the actual sentiment of the review by combining the contextual information and key features of the text.
It improves the efficiency and accuracy of sentiment analysis, reduces the cost of manual annotation, and achieves professional and targeted sentiment analysis results, which facilitates product improvement for enterprises.
Smart Images

Figure CN115391526B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer data mining branch natural language processing, and particularly relates to a car evaluation sentiment analysis method and device, an electronic device and a storage medium. BACKGROUND
[0002] With the popularization of cars, major car portals have developed maturely, and a large amount of online car review data has been generated. However, relevant practitioners have certain deficiencies in information awareness and technology, which leads to the fact that the commercial value hidden behind these data cannot be well mined and utilized. Using data mining technology to perform sentiment analysis on car reviews can more intuitively reflect user experience, thereby providing a more humanized solution for the continuous improvement of products in the future, and can also save a large amount of labor cost and time cost for enterprises.
[0003] In related technologies, a method of training a neural network model is used to extract sentiment vectors in text, thereby realizing text sentiment analysis. Although this method can improve the efficiency of sentiment analysis, the training data rely on manual annotation, which not only has high labor cost, but also is difficult to apply to fields with high professionalism, such as the automotive industry, and needs to be improved. SUMMARY
[0004] The present application provides a car evaluation sentiment analysis method and device, an electronic device and a storage medium to solve the technical problem in related technologies that training data rely on manual annotation and are difficult to apply to fields with high professionalism.
[0005] The first aspect of the present application provides a car evaluation sentiment analysis method, comprising the following steps: crawling a plurality of text review information of a vehicle; calculating a review sentiment score of each piece of text review information of the plurality of text review information; and inputting the review sentiment score into a pre-trained car evaluation sentiment analysis model to output an actual evaluation sentiment of the vehicle based on the front and rear associated information and key features of the text, wherein the car evaluation sentiment analysis model is obtained by training a long short-term memory network LSTM and a text classification Text CNN neural network.
[0006] According to the above technical means, the present application can calculate the review sentiment score of each piece of text review information of a vehicle, and then use the car evaluation sentiment analysis model obtained by training a long short-term memory network LSTM and a text classification Text CNN neural network to realize sentiment analysis of car evaluation in combination with the front and rear associated information and key features of the text, thereby improving the analysis efficiency, making the sentiment analysis result more professional and accurate, and facilitating the product improvement of enterprises based on sentiment analysis in the future.
[0007] Optionally, in an embodiment of the present application, before the comment sentiment score is input into the pre-trained car review sentiment analysis model, the method further comprises: obtaining online review data of a car; generating a model training set according to the online review data, training data in the model training set based on a preset series of rules, and feeding into a model combining the LSTM and the Text CNN neural network until a preset iteration condition is met to obtain the pre-trained car review sentiment analysis model.
[0008] According to the above technical means, the embodiment of the present application can generate a corresponding model training set based on online review data of a car, realize training of a car review sentiment analysis model, so that the training result is more professional and targeted, and based on a model of LSTM and Text CNN neural network, data iteration is performed to realize sentiment classification effect.
[0009] Optionally, in an embodiment of the present application, before the comment sentiment score of each piece of text review information is calculated, the method further comprises: preprocessing and screening the plurality of pieces of text review information to obtain text review information meeting a preset condition.
[0010] According to the above technical means, the embodiment of the present application can preprocess and screen the text review information, thereby ensuring that the model training process is not affected by irrelevant characters, and thereby ensuring the reliability of the sentiment analysis result.
[0011] Optionally, in an embodiment of the present application, the inputting of the comment sentiment score into the pre-trained car review sentiment analysis model and the outputting of the actual review sentiment of the vehicle based on the front and rear associated information and the key features of the text comprise: obtaining a word vector representation of each piece of text review information and obtaining the front and rear associated information; extracting the key features based on the word vector representation and the front and rear associated information to obtain a probability classification of positive and negative sentiments.
[0012] According to the above technical means, the embodiment of the present application can realize probability classification of positive and negative sentiments based on the front and rear associated information and the key features, thereby improving the accuracy of the sentiment analysis result.
[0013] The second aspect embodiment of the present application provides a car review sentiment analysis device, comprising: a crawling module configured to crawl a plurality of pieces of text review information of a vehicle; a calculation module configured to calculate a comment sentiment score of each piece of text review information of the plurality of pieces of text review information; and an analysis module configured to input the comment sentiment score into a pre-trained car review sentiment analysis model and output an actual review sentiment of the vehicle based on front and rear associated information and key features of the text, wherein the car review sentiment analysis model is trained by combining a long short-term memory network (LSTM) and a text classification (Text CNN) neural network.
[0014] Optionally, in an embodiment of the present application, further comprising: an acquisition module configured to acquire online review data of the automobile; a training module configured to generate a model training set according to the online review data, train data in the model training set based on a preset series of rules, and feed the data into a model combining the LSTM and the Text CNN neural network until a preset iteration condition is met, to obtain the pre-trained automobile evaluation sentiment analysis model.
[0015] Optionally, in an embodiment of the present application, further comprising: a preprocessing module configured to preprocess and screen the multiple pieces of text review information to obtain text review information meeting a preset condition.
[0016] Optionally, in an embodiment of the present application, the analysis module comprises: an acquisition unit configured to acquire a word vector representation of each piece of text review information and acquire the before-after correlation information; and a classification unit configured to extract the key features based on the word vector representation and the before-after correlation information to obtain a probability classification of positive and negative sentiments.
[0017] The third aspect embodiment of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the automobile evaluation sentiment analysis method as described in the above embodiments.
[0018] The fourth aspect embodiment of the present application provides a computer readable storage medium, which stores a computer program executable by a processor to implement the automobile evaluation sentiment analysis method as described above.
[0019] The beneficial effects of the embodiments of the present application are as follows:
[0020] (1) The embodiments of the present application can improve the sentiment analysis efficiency and accuracy of text information based on an automobile evaluation sentiment analysis model trained by combining a long short-term memory network LSTM and a text classification Text CNN neural network;
[0021] (2) The embodiments of the present application can calculate a review sentiment score of each piece of text review information in the review information of the vehicle, perform sentiment score calculation on a sentiment dictionary in the automobile field, and make the result of sentiment analysis more professional and targeted;
[0022] (3) The embodiments of the present application can generate a training set based on multiple pieces of text review information of the vehicle crawled after preprocessing and screening, train the model, and reduce the labor cost without manual annotation.
[0023] Additional aspects and advantages of the present application will be made apparent from the following description with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0024] The above and / or additional aspects and advantages of the present application will become apparent and be more readily understood from the following description, by reference to the drawings, wherein:
[0025] Figure 1 A flowchart of a method for sentiment analysis of automobile evaluation according to an embodiment of the present application;
[0026] Figure 2 A structural diagram of a neural network model of a method for sentiment analysis of automobile evaluation according to an embodiment of the present application;
[0027] Figure 3 A flowchart of a method for sentiment analysis of automobile evaluation according to an embodiment of the present application;
[0028] Figure 4 A structural diagram of a device for sentiment analysis of automobile evaluation according to an embodiment of the present application;
[0029] Figure 5 A structural diagram of an electronic device according to an embodiment of the present application.
[0030] Wherein, 10 - a device for sentiment analysis of automobile evaluation; 100 - a crawling module, 200 - a computing module, 300 - an analysis module. DETAILED DESCRIPTION
[0031] Embodiments of the present application are described in detail below with reference to the accompanying drawings. Examples of the embodiments are shown in the drawings, in which the same or similar components are denoted by the same or similar reference numerals, and have the same or similar functions throughout. The embodiments described below are exemplary and are intended to explain the present application, and should not be understood as limiting the present application.
[0032] The automobile evaluation sentiment analysis method, device, electronic equipment and storage medium provided by the embodiment of the present application are described below with reference to the accompanying drawings. In view of the technical problem that the training data relies on manual annotation and is difficult to apply to fields with high professional requirements, the present application provides an automobile evaluation sentiment analysis method. In the method, the comment sentiment score of each piece of text comment information of a vehicle can be calculated, and then based on an automobile evaluation sentiment analysis model trained by combining a long short-term memory network (LSTM) and a text classification (TextCNN) neural network, the sentiment analysis of the automobile evaluation can be realized by combining the front and rear correlation information and the key features of the text, thereby improving the analysis efficiency, making the sentiment analysis result more professional and accurate, and reducing the labor cost without manual annotation of data, so that the enterprise can improve the product based on the sentiment analysis in the future. Thus, the technical problem that the training data relies on manual annotation and is difficult to apply to fields with high professional requirements is solved.
[0033] Specifically, Figure 1 A flowchart of an automobile evaluation sentiment analysis method provided by the embodiment of the present application is shown.
[0034] As Figure 1 shown, the automobile evaluation sentiment analysis method includes the following steps:
[0035] In step S101, multiple pieces of text comment information of a vehicle are crawled.
[0036] In actual execution, the embodiment of the present application can grab the corresponding text comment information from the automobile-related website, so as to generate a training set based on the text comment information of the vehicle in the subsequent process, so that the model trained can be more professional.
[0037] For example, the embodiment of the present application can use the third-party library BeautifulSoup of python to grab the online comment data of the target vehicle enterprise or vehicle model from the automobile website.
[0038] In step S102, the comment sentiment score of each piece of text comment information of the multiple pieces of text comment information is calculated.
[0039] As a possible implementation, the embodiment of the present application can calculate the sentiment score corresponding to the comment according to the sentiment words, degree adverbs, etc. in each piece of text comment information of the multiple pieces of text comment information.
[0040] Optionally, in one embodiment of the present application, before calculating the comment sentiment score of each piece of text comment information of the multiple pieces of text comment information, the multiple pieces of text comment information are preprocessed and screened to obtain text comment information meeting a preset condition.
[0041] For example, the embodiments of the present application can preprocess a plurality of pieces of text comment information by means of, for example, the jieba tool and an authoritative sentiment dictionary and a high-frequency dictionary commonly used in the automobile industry. For each piece of comment data, the embodiments of the present application can eliminate punctuation marks, special symbols, English (parts that cannot be matched by calling a Google translation function) and the like in the text, that is, convert the text data format into Chinese; perform word segmentation by using the accurate mode of the open-source, integrated python library jieba that supports Chinese word segmentation; remove stop words such as “of”, “get”, “place” and the like; and classify and count each word according to the categories of positive sentiment words, negative sentiment words, suggestion sentiment words and degree adverbs by using the open-source Chinese sentiment dictionary of HowNet.
[0042] Further, the embodiments of the present application can also perform a screening step after preprocessing. The embodiments of the present application can use the obtained information to design a calculation rule of a comment sentiment score and set a corresponding threshold to perform positive and negative sample screening. The data that does not pass the screening can be used as a test set, and the embodiments of the present application can feed it into a preset neural network model to determine the sentiment polarity.
[0043] It should be noted that the threshold and the preset neural network model can be set by a person skilled in the art according to the actual situation, and are not specifically limited herein.
[0044] In step S103, the comment sentiment score is input into a pre-trained automobile evaluation sentiment analysis model, and the actual evaluation sentiment of the vehicle is output based on the front and rear associated information and the key features of the text, wherein the automobile evaluation sentiment analysis model is obtained by combining and training a long short-term memory network LSTM and a text classification Text CNN neural network.
[0045] It can be understood that RNN, LSTM and GRU are generally considered to have great advantages in processing sequence data, while TextCNN, Attention and Capsule are good at obtaining information features. Therefore, LSTM performs well in this respect. In view of the fact that Attention may introduce more low-quality features and Capsule has a large calculation complexity, the neural network model of the embodiments of the present application adopts a combination mode of LSTM and Text CNN.
[0046] In actual implementation, the embodiment of the application can be combined with the long short-term memory network LSTM and the text classification TextCNN neural network for training to obtain a high-precision and high-efficiency automobile evaluation sentiment analysis model, realize sentiment analysis of long text data, and input the calculated comment sentiment score into the pre-trained automobile evaluation sentiment analysis model, then use the LSTM to obtain the correlation information before and after the text data, and output to the Text CNN for extraction of the next key features, so as to output the actual evaluation sentiment of the vehicle.
[0047] Optionally, in an embodiment of the application, before the comment sentiment score is input into the pre-trained automobile evaluation sentiment analysis model, it further includes: obtaining online comment data of the automobile; generating a model training set according to the online comment data, training data in the model training set based on a preset series of rules, and feeding into the model combined with the LSTM and the Text CNN neural network until a preset iteration condition is met, to obtain the pre-trained automobile evaluation sentiment analysis model.
[0048] As a possible implementation, the embodiment of the application can generate a model training set from the online comment data of the screened automobile, feed into the network model combined with the LSTM and the Text CNN neural network technology, and obtain an automobile evaluation sentiment analysis model meeting the expected accuracy rate through parameter tuning and optimization, and finally perform sentiment analysis on the automobile comment.
[0049] Specifically, as shown in Figure 2 The embodiment of the application can use a three-layer LSTM architecture, each layer uses two independent LSTM structures to process word-level and char-level inputs respectively, the output of the previous layer is taken as the input of the next layer, and the last layer of the LSTM architecture is taken as the input of the Text CNN, convolution and pooling operations are performed on it, then the outputs of the two levels are spliced, finally a fully connected layer is used to further process the previously extracted feature information, and finally the sentiment classification effect is realized.
[0050] Optionally, in an embodiment of the application, the comment sentiment score is input into the pre-trained automobile evaluation sentiment analysis model, and the actual evaluation sentiment of the vehicle is output based on the correlation information before and after the text and the key features, including: obtaining a word vector representation of each piece of text comment information, and obtaining the correlation information before and after; extracting key features based on the word vector representation and the correlation information before and after to obtain a probability classification of positive and negative sentiments.
[0051] In actual execution, since the computer cannot directly recognize the text information as typical unstructured data, the embodiment of the application can represent the text data by using a word vector. In order to improve the accuracy, the embodiment of the application can use two representation forms of char single word level and word single word level. Further, the embodiment of the application can use three-layer LSTM to obtain the front and rear associated information. The local information is extracted and saved through convolution and pooling, and overfitting is prevented to a certain extent. Then, through full connection, the input features are changed in dimension to be highly purified, and the probability classification of positive and negative emotions is obtained.
[0052] In combination with FIG. 1, FIG. 2 and FIG. 3, Figure 2 and Figure 3 the working principle of the automobile evaluation sentiment analysis method of the embodiment of the application is described in detail in an embodiment.
[0053] As shown in FIG. 4, Figure 3 the embodiment of the application can include the following steps:
[0054] Step S301: obtaining text data. The embodiment of the application can use the third-party library BeautifulSoup of python to crawl the online comment data of the target vehicle enterprise or vehicle model from the automobile website, and store it in the CSV file.
[0055] Step S302: text preprocessing. The embodiment of the application can perform the following operations on each comment data:
[0056] S1: removing punctuation marks, special symbols, English (calling Google translation function still cannot match part) and the like in the text, that is, converting the text data format into Chinese.
[0057] S2: using the accurate mode of the open source and integrated python library jieba supporting Chinese word segmentation to perform word segmentation.
[0058] S3: removing stop words. After step S2, there are a large number of invalid items, such as “of”, “get”, “place” and the like, which can be removed before feature extraction.
[0059] S4: the embodiment of the application can use the more authoritative open source Chinese sentiment dictionary of HowNet to classify and count each word according to the categories of positive sentiment words, negative sentiment words, suggestion sentiment words, degree adverbs and the like.
[0060] Step S303: design screening rules. Since the current data has no pre-labeled class labels, the embodiments of the application can use the obtained information to design the calculation rules of the sentiment score, and set the corresponding threshold to screen the positive and negative samples. The data that does not pass can be used as a test set, and fed into the pre-designed neural network model to determine the sentiment polarity.
[0061] Step S304: build a network model. It can be understood that RNN, LSTM, GRU are generally considered to have great advantages in processing sequence data, while TextCNN, Attention, Capsule are good at obtaining information features. Therefore, LSTM performs well in this aspect, and since Attention may introduce more low-quality features and Capsule has a large computational complexity, the neural network model of the embodiments of the application adopts a combination of LSTM and TextCNN. The embodiments of the application can use LSTM to obtain the correlation information before and after the text data, and output it to Text CNN for further extraction of key features.
[0062] As shown in Figure 2 , the embodiments of the application can use a three-layer LSTM architecture, each layer using two independent LSTM structures to process word-level and char-level inputs respectively, taking the output of the previous layer as the input of the next layer, and taking the last layer of the LSTM architecture as the input of the Text CNN, performing convolution and pooling operations, and then splicing the outputs of the two levels. Finally, a fully connected layer is used to further process the features extracted in the previous step to achieve the effect of sentiment classification.
[0063] Specifically, it can include the following steps:
[0064] Sa: represent the text data with word vectors. Since computers cannot directly recognize text information as typical unstructured data, the embodiments of the application can use Word2Vec to convert it into structured data. In order to improve the accuracy, the embodiments of the application can use both char single word level and word single word level representations.
[0065] Sb: use three-layer LSTM to obtain the correlation information before and after.
[0066] Sc: extract and save local information through convolution and pooling, and prevent overfitting to some extent.
[0067] Sd: change the input features in the dimension through full connection to obtain the probability classification of positive and negative emotions.
[0068] Step S305: generating the sentiment analysis result. The embodiment of the present application can continuously optimize the part that needs to be adjusted in the above steps to obtain the expected network model for generating the sentiment analysis result of the car review.
[0069] According to the car review sentiment analysis method proposed in the embodiment of the present application, the comment sentiment score of each piece of text comment information of the vehicle can be calculated, and then based on the car review sentiment analysis model trained by combining the long short-term memory network LSTM and the text classification Text CNN neural network, the sentiment analysis of the car review is realized by combining the front and rear correlation information and the key features of the text, which improves the analysis efficiency, makes the sentiment analysis result more professional and targeted, has higher accuracy, and does not need manual annotation data, thereby reducing the labor cost and facilitating the product improvement of enterprises based on the sentiment analysis in the future. Thus, the technical problem that the training data depends on manual annotation and is difficult to be applied to the field with high professionalism is solved.
[0070] Secondly, the car review sentiment analysis device according to the embodiment of the present application is described with reference to the accompanying drawings.
[0071] Figure 4 is a block schematic diagram of the car review sentiment analysis device according to the embodiment of the present application.
[0072] As shown in Figure 4 , the car review sentiment analysis device 10 comprises a crawling module 100, a calculation module 200 and an analysis module 300.
[0073] Specifically, the crawling module 100 is configured to crawl a plurality of pieces of text comment information of a vehicle.
[0074] The calculation module 200 is configured to calculate a comment sentiment score of each piece of text comment information of the plurality of pieces of text comment information.
[0075] The analysis module 300 is configured to input the comment sentiment score into a pre-trained car review sentiment analysis model, and output an actual review sentiment of the vehicle based on the front and rear correlation information and the key features of the text, wherein the car review sentiment analysis model is trained by combining a long short-term memory network LSTM and a text classification Text CNN neural network.
[0076] Optionally, in an embodiment of the present application, the car review sentiment analysis device 10 further comprises an acquisition module and a training module.
[0077] The acquisition module is configured to acquire online comment data of a car.
[0078] The training module is configured to generate a model training set according to online comment data, train data in the model training set based on a preset series of rules, and feed the data into a model combining a LSTM and a Text CNN neural network until a preset iteration condition is met, thereby obtaining a pre-trained automobile evaluation sentiment analysis model.
[0079] Optionally, in an embodiment of the present application, the automobile evaluation sentiment analysis device 10 further comprises a preprocessing module.
[0080] The preprocessing module is configured to preprocess and screen the multiple pieces of text comment information to obtain text comment information meeting a preset condition.
[0081] Optionally, in an embodiment of the present application, the analysis module 300 comprises an acquisition unit and a classification unit.
[0082] The acquisition unit is configured to acquire a word vector representation of each piece of text comment information and acquire front and rear association information.
[0083] The classification unit is configured to extract key features based on the word vector representation and the front and rear association information to obtain a probability classification of positive and negative sentiments.
[0084] It should be noted that the foregoing explanation and description of the embodiment of the automobile evaluation sentiment analysis method also apply to the embodiment of the automobile evaluation sentiment analysis device, which will not be described here again.
[0085] The automobile evaluation sentiment analysis device according to the embodiment of the present application can calculate a comment sentiment score of each piece of text comment information of a vehicle, and further based on an automobile evaluation sentiment analysis model trained by combining a long short-term memory network LSTM and a text classification Text CNN neural network, combine front and rear association information and key features of the text to realize sentiment analysis of automobile evaluation, improve analysis efficiency, make the sentiment analysis result more professional and targeted, and more accurate, and do not need manual annotation of data, thereby reducing labor cost and facilitating enterprises to improve products based on sentiment analysis in the future. Thus, the technical problem that training data depends on manual annotation and is difficult to be applied to fields with high professionalism is solved.
[0086] Figure 5 The structure schematic diagram of the electronic device provided by the embodiment of the present application is shown in FIG. 5. The electronic device can comprise:
[0087] The memory 501, the processor 502, and a computer program stored in the memory 501 and executable on the processor 502.
[0088] The processor 502 implements the automobile evaluation sentiment analysis method provided in the above embodiments when executing the program.
[0089] Further, the electronic device further comprises:
[0090] The communication interface 503 is configured to communicate between the memory 501 and the processor 502.
[0091] The memory 501 is configured to store a computer program executable on the processor 502.
[0092] The memory 501 can include a high-speed RAM memory, and can also include a non-volatile memory, for example, at least one disk memory.
[0093] If the memory 501, the processor 502 and the communication interface 503 are independently implemented, the communication interface 503, the memory 501 and the processor 502 can be connected to each other through a bus and complete communication between each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0094] Optionally, in a specific implementation, if the memory 501, the processor 502 and the communication interface 503 are integrated on a chip, the memory 501, the processor 502 and the communication interface 503 can complete communication between each other through an internal interface.
[0095] The processor 502 can be a Central Processing Unit (CPU), or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0096] The embodiments also provide a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the above-mentioned automobile evaluation sentiment analysis method.
[0097] In the description of the application, reference to "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" means that a particular feature, structure, material, or characteristic being described is included in at least one embodiment or example of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment or example. Furthermore, the described specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples. In addition, the usage of "N" means at least two, for example, two, three or the like, unless explicitly stated otherwise.
[0098] Furthermore, the terms "first", "second", or the like, are used only to describe the different features and do not imply or suggest relative importance of, or a number of, the indicated technical features. Thus, the features defined with "first", "second" can include at least one of the features explicitly or implicitly. In the description of the application, "N" means at least two, for example, two, three, etc., unless explicitly specified otherwise.
[0099] Any process or method descriptions or descriptions of the flow diagrams in the present application can be understood as representing code modules, segments, or portions of code which include one or more executable instructions for performing specific logic functions or steps in the process, and that the various systems described herein can include one or more circuits, or other means for performing the functions described in conjunction with the different aspects. In some embodiments, the various systems described herein can include, without limitation, hardware, software, and / or embedded logic such as a combination of logic gates in an application specific integrated circuit, a microprocessor, or other platform.
[0100] The logic and / or steps represented in the flowcharts and / or described herein, for example, can be considered as a sequence of executable instructions stored in a computer readable medium, which can be executed by an instruction execution system, apparatus or device, such as a computer-based system, a processor-based system, or other system that can fetch the instructions from the instruction execution system, apparatus or device and execute the instructions, or a combination of them. For the purposes of this specification, a "computer readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus or device. The computer readable medium can be a computer readable storage medium or a computer readable signal medium. The computer readable storage medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a propagation medium. The computer readable signal medium can include, but is not limited to, a computer readable medium that facilitates transfer of the program from one place to another. A specific example of a computer readable medium is a non-transitory computer-readable storage medium. A specific example of a computer readable signal medium is a source or destination of the computer readable medium. Another specific example of a computer readable signal medium is a computer readable signal travelling through space. Thus, a computer readable medium can take many forms of hardware to carry out the program for use by or in connection with the instruction execution system, apparatus or device.
[0101] It should be understood that aspects of the application can be implemented in hardware, software, firmware or a combination thereof. In the above embodiments, the N steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As such, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, or their combinations can be used: discrete logic circuitry having logic gates for implementing logic functions on data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0102] Those skilled in the art can understand that all or part of the steps carried out by the above-mentioned embodiment methods can be completed by programs instructing related hardware, and the programs can be stored in a computer readable storage medium. When the programs are executed, one or a combination of the steps of the method embodiments is included.
[0103] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each of the units can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.
[0104] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.
Claims
1. A sentiment analysis method for car reviews, characterized in that, Includes the following steps: Scrape multiple text comment messages for vehicles; Calculate the sentiment score for each of the multiple text comment messages; calculate the corresponding sentiment score for each comment message based on sentiment words and degree adverbs in each of the multiple text comment messages, and... The sentiment scores of the reviews are input into a pre-trained car evaluation sentiment analysis model. Based on the context and key features of the text, the model outputs the actual sentiment evaluation of the vehicle. The car evaluation sentiment analysis model is trained using a combination of a Long Short-Term Memory (LSTM) network and a Text CNN neural network for text classification. It employs a three-layer LSTM architecture, with two independent LSTMs in each layer to handle word-level and character-level inputs. The output of the previous layer is used as the input of the next layer, and the output of the last LSTM layer is used as the input of the TextCNN for convolution and pooling. The outputs of the two levels are then concatenated, and the extracted features are processed through a fully connected layer to output a probability classification of positive or negative sentiment. The obtained information is used to design rules for calculating the review sentiment scores, and corresponding thresholds are set to filter positive and negative samples. Data that fails the threshold is used as a test set and fed into a pre-set neural network model to determine the sentiment polarity. Before inputting the sentiment score of the review into the pre-trained car review sentiment analysis model, the method further includes: Obtain online review data for cars; A model training set is generated based on the online review data, and the data in the model training set is trained based on a series of preset rules. The data is then fed into a model that combines the LSTM and the Text CNN neural network until preset iteration conditions are met, thus obtaining the pre-trained car review sentiment analysis model.
2. The method according to claim 1, characterized in that, Before calculating the sentiment score for each of the multiple text comment messages, the process also includes: The multiple text comment messages are preprocessed and filtered to obtain text comment messages with preset conditions.
3. The method according to claim 1, characterized in that, The step of inputting the sentiment score of the review into a pre-trained car evaluation sentiment analysis model, and outputting the actual sentiment evaluation of the vehicle based on the contextual information and key features of the text, includes: Obtain the word vector representation of each text comment and the preceding and following correlation information; Based on the word vector representation and the preceding and following correlation information, the key features are extracted to obtain the probability classification of positive and negative sentiment.
4. A car evaluation sentiment analysis device, characterized in that, For implementing the method as described in any one of claims 1-3, comprising: The crawling module is used to crawl multiple text comments about vehicles. The calculation module is used to calculate the sentiment score of each of the multiple text comment messages; and The analysis module is used to input the sentiment scores of the reviews into a pre-trained car evaluation sentiment analysis model, and output the actual sentiment evaluation of the vehicle based on the context and key features of the text. The car evaluation sentiment analysis model is trained by combining a Long Short-Term Memory (LSTM) network and a Text CNN neural network for text classification. It adopts a three-layer LSTM architecture, with two independent LSTMs in each layer to process word-level and character-level inputs. The output of the previous layer is used as the input of the next layer, and the output of the last layer of the LSTM is used as the input of the TextCNN for convolution and pooling. Then, the outputs of the two levels are concatenated, and the extracted features are processed through a fully connected layer to output the probability classification of positive and negative sentiment.
5. The apparatus according to claim 4, characterized in that, Also includes: The acquisition module is used to acquire online review data for cars; The training module is used to generate a model training set based on the online review data, train the data in the model training set according to a preset series of rules, and feed it into the model combining the LSTM and the Text CNN neural network until the preset iteration conditions are met to obtain the pre-trained car evaluation sentiment analysis model.
6. The apparatus according to claim 4, characterized in that, Also includes: The preprocessing module is used to preprocess and filter the multiple text comment messages to obtain text comment messages with preset conditions.
7. The apparatus according to claim 4, characterized in that, The analysis module includes: The acquisition unit is used to acquire the word vector representation of each text comment and to acquire the preceding and following correlation information; The classification unit is used to extract the key features based on the word vector representation and the preceding and following correlation information to obtain a probability classification of positive and negative sentiment.
8. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the car evaluation sentiment analysis method as described in any one of claims 1-3.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the car evaluation sentiment analysis method as described in any one of claims 1-3.
Citation Information
Patent Citations
Emotion analysis method based on rule and data network fusion
CN108108433A
Automobile competitive product comparison method based on viewpoint mining analysis
CN110415071A