Emotion analysis method and device based on customer evaluation of gas station
By establishing an emotional dictionary and analyzing the emotional tendencies in the customer evaluation of gas stations, the problem that the existing evaluation system failed to effectively utilize customer feedback was solved, and more accurate emotional analysis and more effective service improvement were achieved, which improved customer satisfaction.
Patent Information
- Application Number
- CN202510309640.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-03-17
AI Technical Summary
The existing gas station evaluation system fails to deeply explore the emotional tendencies in customer evaluation, resulting in insufficient information collection and analysis, and the customer feedback has not been effectively utilized, which cannot better improve the service of gas stations and improve customer satisfaction.
By establishing an emotional dictionary based on gas station customer evaluation, the emotional score corresponding to each evaluation data is determined, and the evaluation data is classified and processed according to emotional tendencies, and the number of times the dimension words appear is counted to generate the analysis results corresponding to the gas station.
It improves the accuracy of sentiment analysis of customer evaluation data, realizes effective utilization of customer feedback, which is conducive to better improving the service quality of gas stations and thus more effectively improving customer satisfaction.
Smart Images

Figure CN119830899A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of gas stations, and in particular to a sentiment analysis method and device based on gas station customer evaluations. Background Art
[0002] In the current gas station service market, customer feedback is crucial to improving service quality. In order to enable customers and managers to obtain evaluation information about gas stations more intuitively and quickly, thereby improving service levels, competitiveness and customer experience, the adoption of a gas station evaluation system is particularly important.
[0003] However, existing evaluation systems usually only provide basic text feedback and fail to deeply explore the emotional tendencies in the evaluation, which leads to insufficient information collection and analysis and ineffective use of customer feedback, making it impossible to better improve the services of gas stations and more effectively improve customer satisfaction. Summary of the invention
[0004] In order to solve the above-mentioned problem of insufficient information collection and analysis, ineffective use of customer feedback, and thus the inability to more effectively improve customer satisfaction, the embodiment of the present application provides a sentiment analysis method and device based on gas station customer evaluation, and its technical solution is as follows: In a first aspect, the present application embodiment provides a sentiment analysis method based on gas station customer reviews, including: Establishing a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determining a sentiment score corresponding to each evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each sentiment text; Based on each evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each evaluation data; Classify all evaluation data based on sentiment tendency to obtain at least three categories of label data, and count the number of occurrences of at least two preset dimension words in each category of label data to obtain statistical data; Based on sentiment tendencies and statistical data, analysis results corresponding to gas stations are generated.
[0005] In an optional solution of the first aspect, establishing a sentiment dictionary based on at least two evaluation data corresponding to a gas station includes: Extracting at least two sentiment texts from at least two evaluation data corresponding to the gas station; All sentiment texts are annotated, and the sentiment score corresponding to each sentiment text is calculated based on the annotated results; A sentiment dictionary is established based on all sentiment texts and the sentiment scores corresponding to each sentiment text.
[0006] In another optional solution of the first aspect, all emotional texts are annotated, and the emotional score corresponding to each emotional text is calculated according to the result of the annotation process, including: All sentiment texts are annotated, and the numerical range of the sentiment score corresponding to each sentiment text is determined according to the result of the annotation process; Count the number of texts with the same sentiment to obtain a first value; Count the number of all sentiment texts to obtain a second value; A sentiment score corresponding to each sentiment text is calculated according to the first value, the second value, and the value range.
[0007] In another optional solution of the first aspect, calculating a sentiment score corresponding to each sentiment text according to the first value, the second value, and the value range includes: Determining a strength coefficient according to a ratio of the first value to the second value; According to the intensity coefficient and the numerical range, the sentiment score corresponding to each sentiment text is calculated.
[0008] In another optional solution of the first aspect, based on each evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each evaluation data includes: Preprocess each evaluation data to obtain target data, and generate an initial word vector corresponding to each target data through a preset word embedding model; wherein the preset word embedding model is trained by sample data and sample word vectors corresponding to the sample data; According to the sentiment score corresponding to each evaluation data, each initial word vector is weighted to obtain the target word vector; The target word vector is input into a preset sentiment analysis model to obtain the sentiment tendency corresponding to each target word vector; wherein the preset sentiment analysis model is trained by sample word vectors and sample sentiment tendencies corresponding to the sample word vectors.
[0009] In another optional solution of the first aspect, preprocessing each evaluation data to obtain target data includes: Segment each evaluation data to obtain at least two phrase data; Each phrase data is deleted based on a preset character set to obtain streamlined data; All the simplified data are regularized to obtain the target data.
[0010] In another optional solution of the first aspect, based on the sentiment tendency and the statistical data, generating analysis results corresponding to the gas station includes: According to the sentiment tendency and statistical data, improved dimension words are obtained; wherein the preset dimension words include improved dimension words; Obtain the detection data corresponding to the improvement dimension words in the gas station, and generate corresponding improvement suggestions based on the detection data; The improvement dimension words, test data, and improvement suggestions are visualized to obtain analysis results corresponding to gas stations.
[0011] In a second aspect, the embodiment of the present application provides a sentiment analysis device based on gas station customer reviews, including: A first processing module is used to establish a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determine a sentiment score corresponding to each evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each sentiment text; A second processing module is used to determine the emotional tendency corresponding to each evaluation data based on each evaluation data and the corresponding emotional score; The third processing module is used to classify all evaluation data based on sentiment tendency to obtain at least three types of label data, and count the number of occurrences of at least two preset dimension words in each type of label data to obtain statistical data; The fourth processing module is used to generate analysis results corresponding to the gas station based on sentiment tendencies and statistical data.
[0012] In a third aspect, an embodiment of the present application further provides a sentiment analysis device based on gas station customer reviews, including a processor and a memory; The processor is connected to the memory; A memory for storing executable program codes; The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the sentiment analysis method based on gas station customer evaluation provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the sentiment analysis method based on gas station customer reviews provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.
[0014] The beneficial effects brought by the technical solutions provided by some embodiments of this specification include at least: In the process of sentiment analysis based on customer evaluation of gas stations, a sentiment dictionary is established according to the customer evaluation data of gas stations, and then the sentiment tendency in the customer evaluation data is accurately identified through the dictionary, and the number of times the dimension words related to gas stations appear in each sentiment tendency in the customer evaluation data is counted, so that the analysis results are obtained according to the recognition results and statistical results of the sentiment tendency, which improves the accuracy of sentiment analysis of customer evaluation data, realizes the effective use of customer feedback, and is conducive to better improving the service quality of gas stations, thereby more effectively improving customer satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 An overall flow chart of a sentiment analysis method based on gas station customer reviews provided in an embodiment of the present application; Figure 2 An overall flow chart of another sentiment analysis method based on gas station customer reviews provided in an embodiment of the present application; Figure 3 A schematic diagram of the structure of a sentiment analysis device based on gas station customer reviews provided in an embodiment of the present application; Figure 4 A schematic diagram of the structure of another sentiment analysis device based on gas station customer reviews provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0018] In the following introduction, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. The following introduction provides multiple embodiments of the present application, and different embodiments can be replaced or combined, so the present application can also be considered to include all possible combinations of the same and / or different embodiments recorded. Therefore, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be clearly recorded in the following text.
[0019] The following description provides examples and does not limit the scope, applicability or examples set forth in the claims. Changes may be made to the functions and arrangements of the elements described without departing from the scope of the present application. Various processes or components may be appropriately omitted, substituted or added to each example. For example, the described method may be performed in an order different from the order described, and various steps may be added, omitted or combined. In addition, features described in some examples may be combined in other examples.
[0020] See also Figure 1 , Figure 1 An overall flow chart of a sentiment analysis method based on gas station customer reviews provided in an embodiment of the present application is shown.
[0021] like Figure 1 As shown, the sentiment analysis method based on gas station customer reviews may at least include the following steps: Step 101: Establish a sentiment dictionary based on at least two evaluation data corresponding to a gas station, and determine a sentiment score corresponding to each evaluation data according to the sentiment dictionary.
[0022] In the embodiment of the present application, the sentiment analysis method based on gas station customer evaluation can be applied to, but not limited to, mobile terminals, servers or cloud platforms. In the sentiment analysis process based on gas station customer evaluation, a sentiment dictionary is established based on the gas station customer evaluation data, and then the sentiment tendency in the customer evaluation data is accurately identified through the dictionary, and the number of times the dimension words related to the gas station appear in each sentiment tendency in the customer evaluation data is counted, so that the analysis result is obtained based on the recognition result and statistical result of the sentiment tendency, which improves the accuracy of the sentiment analysis of the customer evaluation data, realizes the effective use of customer feedback, and is conducive to better improving the service quality of the gas station, thereby more effectively improving customer satisfaction.
[0023] Specifically, in the sentiment analysis process based on gas station customer reviews, a sentiment dictionary can be first established based on at least two evaluation data corresponding to the gas station, wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each sentiment text.
[0024] It is understandable that the way to obtain customer evaluation data can be, but is not limited to, directly accessing the evaluation data through the internal database of the company to which the gas station belongs, using web crawler technology to collect evaluation data from the mini-program corresponding to the gas station, and conducting offline questionnaire surveys on customers. In the process of establishing the sentiment dictionary, the Chinese characters or words containing sentimental connotations and gas station-related terms in the evaluation data can be first identified through regular expressions to obtain sentiment text.
[0025] It should be noted that regular expressions are usually referred to as regex or regexp. They are a powerful text processing tool that is often used for pattern matching, search, and replacement. It can match a class of strings through a "template" created by the user, rather than just matching an exact string. Here, a list of Chinese characters or words containing emotional colors can be constructed as a matching template. The list can be created manually or obtained from an existing emotional dictionary, such as the Chinese version of NRC Emotion Lexicon or other emotional dictionaries specifically for Chinese. Then, regular expressions can be used to identify texts containing emotional words in the list in the evaluation data. Suppose we have an emotional vocabulary list of "good", "friendly", "bad", "unsatisfied", "reasonable", and "good". There are two evaluation data: "friendly attitude of employees" and "reasonable oil price". The content that can be identified by regular expressions is "friendly" and "reasonable". Similarly, regular expressions can be used to identify gas station-related terms such as "service attitude" and "oil price", and then the emotional texts "friendly service attitude" and "reasonable oil price" can be obtained.
[0026] After obtaining the sentiment text, each sentiment text can be assigned a corresponding sentiment score through, but not limited to, expert annotation, reference to set scores of other existing sentiment dictionaries, or custom rules (such as setting according to the frequency of occurrence of the sentiment text), and sentiment texts with the same content can be merged into one sentiment text, thereby realizing the establishment of a sentiment dictionary specifically for gas stations.
[0027] Furthermore, after establishing a sentiment dictionary, the sentiment scores of all sentiment texts in each evaluation data can be determined through the sentiment dictionary, and then a sentiment score corresponding to the evaluation data can be calculated based on these sentiment scores. For example, when there is an evaluation data "the service attitude of this gas station is good and the oil price is reasonable", which contains two sentiment texts "good service attitude" and "reasonable oil price", if the sentiment scores corresponding to these two sentiment texts are 1.5 and 1.0 respectively, the sentiment score corresponding to the evaluation data can be calculated by, but not limited to, taking the sum, taking the average, taking the weighted average, taking the median, taking the maximum (or minimum) value, or other value-taking methods based on these two sentiment scores, such as 1.5+1.0=2.5 or (1.5+1.0) / 2=1.25, etc.
[0028] As an option of the embodiment of the present application, a sentiment dictionary is established based on at least two evaluation data corresponding to the gas station, including: Extracting at least two sentiment texts from at least two evaluation data corresponding to the gas station; All sentiment texts are annotated, and the sentiment score corresponding to each sentiment text is calculated based on the annotated results; A sentiment dictionary is established based on all sentiment texts and the sentiment scores corresponding to each sentiment text.
[0029] Specifically, in the process of establishing a sentiment dictionary based on the evaluation data, the corresponding sentiment text can be first extracted from the evaluation data, and the extraction method can be but not limited to rule matching (such as regular expression), topic modeling (such as LDA or NMF), etc. After the sentiment text is extracted, the sentiment text can be annotated, and the annotation method can be but not limited to annotation of sentiment polarity and sentiment intensity, that is, the sentiment polarity (such as "positive", "negative", "neutral", etc.) and sentiment intensity (such as "strong", "relatively strong", "medium", "relatively weak", "weak", etc.) of each sentiment text are judged and organized into a data structure or a relational database, and then the result of the annotation processing (such as "good service attitude" → "positive" and "relatively strong") can be obtained, so that different calculation methods can be adopted for sentiment texts of different polarities according to the result to obtain the sentiment score corresponding to each sentiment text. For example, the corresponding specific score can be set as the sentiment score according to the sentiment polarity and sentiment intensity. If the emotional intensity is divided into the above five intensities, the emotional scores for the emotional text with a "positive" emotional polarity can be set as 1, 3, 5, 7, and 9 (the larger the score, the stronger the emotional intensity), and the emotional scores for the emotional text with a "negative" emotional polarity can be set as -2, -4, -6, -8, and -10 (the smaller the score, the stronger the emotional intensity), and the emotional score for the emotional text with a "neutral" emotional polarity can be set to 0.
[0030] It should be noted that the labeling process can be implemented, but is not limited to, through manual labeling, automated or semi-automated tools and platforms (such as Brat, Label Studio, Doccano, etc.).
[0031] Next, after obtaining the sentiment scores of all sentiment texts, sentiment texts with the same content may be merged, and then a corresponding data structure or database may be established as a sentiment dictionary.
[0032] As another option of the embodiment of the present application, all emotional texts are annotated, and the emotional score corresponding to each emotional text is calculated according to the result of the annotation process, including: All sentiment texts are annotated, and the numerical range of the sentiment score corresponding to each sentiment text is determined according to the result of the annotation process; Count the number of texts with the same sentiment to obtain a first value; Count the number of all sentiment texts to obtain a second value; A sentiment score corresponding to each sentiment text is calculated according to the first value, the second value, and the value range.
[0033] Specifically, in the process of annotating the sentiment texts and calculating the sentiment scores corresponding to all the sentiment texts based on the results of the annotation process, all the sentiment texts can be first annotated with sentiment polarity, so as to determine the range of sentiment scores corresponding to each sentiment text. For example, sentiment texts with positive sentiment polarity are assigned a sentiment score range of 0 to 5 (including 1 but not including 0), sentiment texts with negative sentiment polarity are assigned a sentiment score range of -5 to 0 (including -5 but not including 0), and sentiment texts with neutral sentiment polarity are assigned a sentiment score of 0.
[0034] Next, the number of the same sentiment texts (i.e., sentiment texts with the same content) and the number of all sentiment texts can be counted to obtain the corresponding first value and second value. For example, when there are three sentiment texts, namely, "good service attitude", "reasonable price", and "good service attitude", for the sentiment text "good service attitude", the first value is 2 and the second value is 3, and for the sentiment text "reasonable price", the first value is 1 and the second value is 3.
[0035] Afterwards, since the sentiment polarities of these two sentiment texts are positive and neutral respectively (assuming that the sentiment polarity of the sentiment text expressing affirmation of the gas station is set to be positive), refer to the example of sentiment score range division in the previous paragraph, and then calculate the sentiment score corresponding to "good service attitude" based on "2", "3" and "0~5", and the sentiment score corresponding to "reasonable price" can be obtained based on "0".
[0036] It is worth noting that, according to the first value, the second value and the numerical range of the sentiment score, the specific sentiment score can be calculated in the following ways but is not limited to: (1) First calculate the ratio x (e.g., 2 / 3) of the first value to the second value and the length y (e.g., 5) of the value range, then multiply x and y, and use the product as the specific sentiment score; (2) When the first value is greater than half of the second value, the first value is used as the specific sentiment score; and when the first value is less than or equal to half of the second value, the product of the median of the value range (such as 2.5) and the first value is used as the specific sentiment score.
[0037] As another option of the embodiment of the present application, calculating the sentiment score corresponding to each sentiment text according to the first value, the second value and the value range includes: Determining a strength coefficient according to a ratio of the first value to the second value; According to the intensity coefficient and the numerical range, the sentiment score corresponding to each sentiment text is calculated.
[0038] Specifically, after obtaining the first value, the second value and the corresponding value range, the ratio of the first value to the second value can be calculated as the intensity coefficient to indicate the degree of importance that customers attach to the aspects represented by the emotional text. For example, when the number of emotional texts such as "poor environment" is large, it means that customers care more about the environment of the gas station.
[0039] Next, the intensity coefficient may be multiplied by the length of the numerical range, and the resulting product is the sentiment score corresponding to the sentiment text.
[0040] Step 102: Based on each evaluation data and the corresponding sentiment score, determine the sentiment tendency corresponding to each evaluation data.
[0041] Specifically, after determining each evaluation data and the corresponding sentiment score, the sentiment tendency of each evaluation data can be determined according to the value of the sentiment score and the preset range. For example, there is a sentiment score of 36 for evaluation data A, a sentiment score of -20 for evaluation data B, and a sentiment score of 8 for evaluation data C. The preset ranges are X: -60~-10 (including -60 but not including -10), Y: -10~10 (including -10 and 10), and Z: 10~60 (including 60 but not including 10). Then the judgment rule of sentiment tendency can be set as follows: when the sentiment score of the evaluation data is in the X range, the sentiment tendency of the evaluation data is determined to be negative; when the sentiment score of the evaluation data is in the Y range, the sentiment tendency of the evaluation data is determined to be neutral; when the sentiment score of the evaluation data is in the Z range, the sentiment tendency of the evaluation data is determined to be positive; when the sentiment score of the evaluation data is not in the preset range, the evaluation data is invalidated (i.e., deleted from the storage space).
[0042] As another option of the embodiment of the present application, based on each evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each evaluation data includes: Preprocess each evaluation data to obtain target data, and generate an initial word vector corresponding to each target data through a preset word embedding model; wherein the preset word embedding model is trained by sample data and sample word vectors corresponding to the sample data; According to the sentiment score corresponding to each evaluation data, each initial word vector is weighted to obtain the target word vector; The target word vector is input into a preset sentiment analysis model to obtain the sentiment tendency corresponding to each target word vector; wherein the preset sentiment analysis model is trained by sample word vectors and sample sentiment tendencies corresponding to the sample word vectors.
[0043] Specifically, in the process of determining the sentiment tendency corresponding to each evaluation data, each evaluation data can be preprocessed first to obtain target data (such as text data of string type, etc.) suitable for input into a preset word embedding model (such as Word2Vec model, GloVe model, FastText model, BERT model, ELMo model, etc.), and the initial word vectors corresponding to the target data are generated through this model. It should be noted that the preset word embedding model is trained by sample data and sample word vectors corresponding to the sample data.
[0044] Then, the sentiment score corresponding to each evaluation data can be used as a weight, and the initial word vectors can be weighted by weighted algorithms such as TF-IDF, SIF, etc. (but not limited to these), and then the target word vectors can be obtained.
[0045] After that, the target word vectors can be input into a preset sentiment analysis model to obtain the sentiment tendency corresponding to each target word vector. It should be noted that the preset sentiment analysis model is trained by sample word vectors and sample sentiment tendencies corresponding to the sample word vectors, and this model is implemented based on the fusion of the MacBERT model and the TextCNN model. It can be understood that the target word vectors are input into the MacBERT model to obtain corresponding output results, and then the output results are used as the input data of the TextCNN model to obtain the sentiment tendency.
[0046] As another option of the embodiment of the present application, preprocessing each evaluation data to obtain target data includes: Performing segmentation processing on each evaluation data to obtain at least two phrase data; Performing deletion processing on each phrase data based on a preset character set to obtain refined data; Performing regularization processing on all refined data to obtain target data.
[0047] Specifically, in the process of preprocessing the evaluation data to obtain target data, each evaluation data can be segmented first through the Jieba (a Chinese word segmentation library) word segmentation technology to obtain at least two phrase data. After that, a predefined stop word list can be loaded, and this list contains common but meaningless words such as "de" (的), "le" (了), "zai" (在), etc. Then, Python scripts can be used to clear these stop words through loop comparison to achieve the deletion processing of each phrase data, so as to obtain refined data and ensure that only meaningful words are retained in the target data.
[0048] Then, all the simplified data may be regularized by, but not limited to, regular expressions to obtain standardized target data, wherein the regularization process can keep the data consistent in case, expand common abbreviations to full forms, or correct spelling errors, so that the model can better understand and process the data.
[0049] Step 103: Classify all evaluation data based on sentiment tendency to obtain at least three categories of label data, and count the number of occurrences of at least two preset dimension words in each category of label data to obtain statistical data.
[0050] Specifically, after determining the sentiment tendency of each evaluation data, all evaluation data can be classified according to the sentiment tendency (i.e., positive, negative, neutral or good review, bad review, medium review, etc.) to obtain at least three categories of label data, wherein the evaluation data in each category of label data have the same sentiment tendency.
[0051] Next, the number of occurrences of at least two preset dimension words in each type of label data can be counted to obtain statistical data, wherein the preset dimension words mainly include evaluation terms related to gas stations, such as "environment", "service", "oil price", etc. It can be understood that the statistical data at least includes content such as: "negative → service → 30", "positive → facilities → 150" or "slow service speed is mentioned 30 times in negative reviews", "complete gas station facilities are mentioned 150 times in positive reviews", etc.
[0052] Step 104: Generate analysis results corresponding to gas stations based on sentiment tendencies and statistical data.
[0053] Specifically, after obtaining the sentiment tendency and statistical data of the evaluation data, the aspects that need to be improved and the feasible measures of the gas station can be analyzed based on the sentiment tendency and statistical data of all the evaluation data of the gas station. For example, if the proportion of data with negative sentiment tendency in the evaluation data is relatively large, it means that the gas station needs to improve a lot. The specific aspects that need to be improved can be determined based on the dimensional words that appear more frequently in the category with negative sentiment tendency in the statistical data. In addition, feasible measures can be determined based on the direction of improvement required and the collection source and collection time of the evaluation data. For example, when "poor service attitude" is mentioned the most times in the negative reviews, and the evaluation data set containing this content appears in a certain time period of a certain month, the list of staff in this time period of that month can be queried, and they can be trained and educated on service attitude.
[0054] As another option of the embodiment of the present application, based on sentiment tendency and statistical data, an analysis result corresponding to a gas station is generated, including: According to the sentiment tendency and statistical data, improved dimension words are obtained; wherein the preset dimension words include improved dimension words; Obtain the detection data corresponding to the improvement dimension words in the gas station, and generate corresponding improvement suggestions based on the detection data; The improvement dimension words, test data, and improvement suggestions are visualized to obtain analysis results corresponding to gas stations.
[0055] Specifically, in the process of generating analysis results corresponding to the gas station based on the sentiment tendencies and statistical data of all evaluation data of the gas station, the improved dimensional words can be first determined based on the sentiment tendencies and statistical data, that is, the dimensional words with negative or bad sentiment tendencies in the statistical data (it can be a dimensional word with the largest number of occurrences, or multiple dimensional words with a large number of occurrences).
[0056] Next, the detection data corresponding to the improvement dimension words in the gas station can be obtained. For example, when the improvement dimension words include "oil price" and "service", the recent oil supply list and staff list of the gas station can be obtained. Then, the specific shortcomings of the gas station can be found out based on these data, so that specific adjustment plans (i.e. improvement suggestions, such as changing suppliers, adjusting staff working hours, replacing new and efficient equipment, etc.) can be formulated for the shortcomings to improve industry competitiveness and enhance user satisfaction.
[0057] After that, the improvement dimension words, test data and improvement suggestions can also be visualized, wherein the visualization can be implemented, but not limited to, through tools such as Tableau, Power BI, Qlik Sense / QlikView or libraries such as Grafana, Matplotlib, Seaborn, Plotly, D3.js, etc., and then the analysis results corresponding to the gas station can be obtained. It is understandable that the analysis results at least include the important aspects that need to be improved (i.e., the improvement dimension words), the specific deficiencies shown by the test data, and the measures that can be taken to address the deficiencies.
[0058] See also Figure 2 , Figure 2 An overall flow chart of another sentiment analysis method based on gas station customer reviews provided in an embodiment of the present application is shown.
[0059] like Figure 2As shown in the figure, in the sentiment analysis process based on customer evaluation of gas stations, customer evaluation data can be collected through multiple platforms and websites of gas stations, including customers' overall evaluation of gas stations and feedback on specific services; then, a sentiment dictionary specifically for gas stations can be established based on these evaluation data to distinguish different sentiment polarities and different sentiment intensities expressed by the evaluation data; then, the collected evaluation data can be preprocessed, including text cleaning, removal of irrelevant information and language standardization, etc., to obtain target data; thus, sentiment analysis can be performed on the target data according to the sentiment dictionary and the preset sentiment analysis model to obtain the sentiment tendency of each evaluation data; then, the number of times each dimension word appears in each sentiment tendency can be counted to obtain statistical data to determine the aspects that need to be improved in the gas station; thereafter, analysis data (such as the above-mentioned improvement dimension words, improvement suggestions, etc.) can be generated based on the statistical data and the sentiment tendency of each evaluation data, and the analysis data can be visualized to obtain analysis results; after obtaining the analysis results, API (Application Programming Interface, that is, application programming interface, is a collection of predefined functions, protocols and tools. Its function is to allow different software programs to communicate and exchange data without knowing the underlying implementation details. Interface technology integrates the analysis results into the gas station's website or management system, allowing managers to easily access and view the data, achieve timely feedback and improvements, and at the same time, provide customer interaction functions through the website, allowing customers to make more informed choices and feedback based on the visualized analysis results, thereby promoting continuous improvement and optimization of the site.
[0060] See also Figure 3 , Figure 3 A structural schematic diagram of a sentiment analysis device based on gas station customer reviews provided in an embodiment of the present application is shown.
[0061] like Figure 3 As shown, the sentiment analysis device based on gas station customer evaluation may include at least a first processing module 301, a second processing module 302, a third processing module 303 and a fourth processing module 304, wherein: The first processing module 301 is used to establish a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determine the sentiment score corresponding to each evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and the sentiment score corresponding to each sentiment text; The second processing module 302 is used to determine the emotional tendency corresponding to each evaluation data based on each evaluation data and the corresponding emotional score; The third processing module 303 is used to classify all evaluation data based on sentiment tendency to obtain at least three types of label data, and count the number of occurrences of at least two preset dimension words in each type of label data to obtain statistical data; The fourth processing module 304 is used to generate analysis results corresponding to the gas station based on the sentiment tendency and statistical data.
[0062] In some possible embodiments, establishing a sentiment dictionary based on at least two evaluation data corresponding to a gas station includes: The first processing module 301 is specifically used for: Extracting at least two sentiment texts from at least two evaluation data corresponding to the gas station; All sentiment texts are annotated, and the sentiment score corresponding to each sentiment text is calculated based on the annotated results; A sentiment dictionary is established based on all sentiment texts and the sentiment scores corresponding to each sentiment text.
[0063] In some possible embodiments, all sentiment texts are annotated, and a sentiment score corresponding to each sentiment text is calculated according to the result of the annotation process, including: The first processing module 301 is specifically used for: All sentiment texts are annotated, and the numerical range of the sentiment score corresponding to each sentiment text is determined according to the result of the annotation process; Count the number of texts with the same sentiment to obtain a first value; Count the number of all sentiment texts to obtain a second value; A sentiment score corresponding to each sentiment text is calculated according to the first value, the second value, and the value range.
[0064] In some possible embodiments, calculating the sentiment score corresponding to each sentiment text according to the first value, the second value, and the value range includes: The first processing module 301 is specifically used for: Determining a strength coefficient according to a ratio of the first value to the second value; According to the intensity coefficient and the numerical range, the sentiment score corresponding to each sentiment text is calculated.
[0065] In some possible embodiments, based on each evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each evaluation data includes: The second processing module 302 is specifically used for: Preprocess each evaluation data to obtain target data, and generate an initial word vector corresponding to each target data through a preset word embedding model; wherein the preset word embedding model is trained by sample data and sample word vectors corresponding to the sample data; According to the sentiment score corresponding to each evaluation data, each initial word vector is weighted to obtain the target word vector; The target word vector is input into a preset sentiment analysis model to obtain the sentiment tendency corresponding to each target word vector; wherein the preset sentiment analysis model is trained by sample word vectors and sample sentiment tendencies corresponding to the sample word vectors.
[0066] In some possible embodiments, preprocessing each evaluation data to obtain target data includes: The second processing module 302 is specifically used for: Segment each evaluation data to obtain at least two phrase data; Each phrase data is deleted based on a preset character set to obtain streamlined data; All the simplified data are regularized to obtain the target data.
[0067] In some possible embodiments, based on sentiment tendency and statistical data, an analysis result corresponding to a gas station is generated, including: The fourth processing module 304 is specifically used for: According to the sentiment tendency and statistical data, improved dimension words are obtained; wherein the preset dimension words include improved dimension words; Obtain the detection data corresponding to the improvement dimension words in the gas station, and generate corresponding improvement suggestions based on the detection data; The improvement dimension words, test data, and improvement suggestions are visualized to obtain analysis results corresponding to gas stations.
[0068] See also Figure 4 , Figure 4 A structural schematic diagram of another sentiment analysis device based on gas station customer reviews provided in an embodiment of the present application is shown.
[0069] like Figure 4 As shown, the sentiment analysis device 400 based on gas station customer reviews may include at least one processor 401 , at least one network interface 404 , a user interface 403 , a memory 405 , and at least one communication bus 402 .
[0070] The communication bus 402 may be used to realize the connection and communication among the above-mentioned components.
[0071] The user interface 403 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0072] The network interface 404 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.
[0073] Among them, the processor 401 may include one or more processing cores. The processor 401 uses various interfaces and lines to connect the various parts of the entire sentiment analysis device 400 based on gas station customer evaluation, and executes various functions and processes data of the sentiment analysis device 400 based on gas station customer evaluation by running or executing instructions, programs, code sets or instruction sets stored in the memory 405, and calling data stored in the memory 405. Optionally, the processor 401 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 401 can integrate one or a combination of CPU, GPU, modem, etc. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 401, and it can be implemented by a single chip.
[0074] The memory 405 may include a RAM or a ROM. Optionally, the memory 405 includes a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 405 may optionally be at least one storage device located away from the aforementioned processor 401. As Figure 4 As shown, the memory 405 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a sentiment analysis application based on gas station customer reviews.
[0075] Specifically, the processor 401 may be used to call the sentiment analysis application based on gas station customer reviews stored in the memory 405, and specifically perform the following operations: Establishing a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determining a sentiment score corresponding to each evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each sentiment text; Based on each evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each evaluation data; Classify all evaluation data based on sentiment tendency to obtain at least three categories of label data, and count the number of occurrences of at least two preset dimension words in each category of label data to obtain statistical data; Based on sentiment tendencies and statistical data, analysis results corresponding to gas stations are generated.
[0076] The present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the above method are implemented. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0077] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0078] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0079] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0080] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0081] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0082] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program codes.
[0083] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct related hardware, and the program may be stored in a computer-readable memory, which may include a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0084] The above are only exemplary embodiments of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of the implementation scheme of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A sentiment analysis method based on gas station customer reviews, characterized in that: include: Establishing a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determining a sentiment score corresponding to each evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each sentiment text; Based on each of the evaluation data and the corresponding sentiment score, determining the sentiment tendency corresponding to each of the evaluation data; Classify all the evaluation data based on the sentiment tendency to obtain at least three categories of label data, and count the number of occurrences of at least two preset dimension words in each category of the label data to obtain statistical data; Based on the sentiment tendency and the statistical data, an analysis result corresponding to the gas station is generated.
2. The method according to claim 1, characterized in that The step of establishing a sentiment dictionary based on at least two evaluation data corresponding to the gas station includes: Extracting at least two sentiment texts from at least two evaluation data corresponding to the gas station; Performing annotation processing on all the emotion texts, and calculating the emotion score corresponding to each emotion text according to the result of the annotation processing; A sentiment dictionary is established based on all the sentiment texts and the sentiment score corresponding to each of the sentiment texts.
3. The method according to claim 2, characterized in that The tagging of all the emotion texts and calculating the emotion score corresponding to each emotion text according to the tagging result include: Performing a tagging process on all the emotion texts, and determining a numerical range of an emotion score corresponding to each emotion text according to the result of the tagging process; Counting the number of the same sentiment texts to obtain a first value; Counting the number of all the sentiment texts to obtain a second value; A sentiment score corresponding to each of the sentiment texts is calculated according to the first value, the second value, and the value range.
4. The method according to claim 3, characterized in that The calculating, according to the first value, the second value and the value range, a sentiment score corresponding to each of the sentiment texts comprises: Determining an intensity coefficient according to a ratio of the first value to the second value; The sentiment score corresponding to each of the sentiment texts is calculated according to the intensity coefficient and the numerical range.
5. The method according to claim 1, characterized in that The step of determining the emotional tendency corresponding to each evaluation data based on each evaluation data and the corresponding emotional score includes: Preprocessing each of the evaluation data to obtain target data, and generating an initial word vector corresponding to each of the target data through a preset word embedding model; wherein the preset word embedding model is trained by sample data and sample word vectors corresponding to the sample data; Performing weighted processing on each of the initial word vectors according to the sentiment score corresponding to each of the evaluation data to obtain a target word vector; The target word vector is input into a preset sentiment analysis model to obtain the sentiment tendency corresponding to each target word vector; wherein the preset sentiment analysis model is trained by sample word vectors and sample sentiment tendencies corresponding to the sample word vectors.
6. The method according to claim 5, characterized in that The preprocessing of each evaluation data to obtain target data comprises: Segmenting each evaluation data to obtain at least two phrase data; Performing deletion processing on each of the phrase data based on a preset character set to obtain simplified data; Regularization processing is performed on all the simplified data to obtain target data.
7. The method according to claim 1, characterized in that The generating of the analysis result corresponding to the gas station based on the sentiment tendency and the statistical data includes: According to the sentiment tendency and the statistical data, an improved dimensional word is obtained; wherein the preset dimensional word includes the improved dimensional word; Acquire detection data corresponding to the improvement dimension word in the gas station, and generate corresponding improvement suggestions according to the detection data; The improvement dimension words, the detection data and the improvement suggestions are visualized to obtain analysis results corresponding to the gas station.
8. A sentiment analysis device based on gas station customer reviews, characterized in that: include: A first processing module is used to establish a sentiment dictionary based on at least two evaluation data corresponding to the gas station, and determine a sentiment score corresponding to each of the evaluation data according to the sentiment dictionary; wherein the sentiment dictionary includes at least two sentiment texts generated by the evaluation data and a sentiment score corresponding to each of the sentiment texts; A second processing module, configured to determine the sentiment tendency corresponding to each evaluation data based on each evaluation data and the corresponding sentiment score; A third processing module is used to classify all the evaluation data based on the sentiment tendency to obtain at least three types of label data, and count the number of occurrences of at least two preset dimension words in each type of the label data to obtain statistical data; The fourth processing module is used to generate an analysis result corresponding to the gas station based on the emotional tendency and the statistical data.
9. A sentiment analysis device based on gas station customer reviews, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Convolutional neural network text sentiment analysis method combining emotion dictionary
CN108647219A
Emotion dictionary construction method based on user scores
CN110489522A
Course quality analysis method, device and system
CN113254647A
Service quality evaluation method, system and device and readable storage medium
CN114219337A
Emotion analysis method and device, computer equipment and storage medium
CN114398911A