Network public praise evaluation method and system for scenic spots and electronic equipment
阅读说明:本技术 一种旅游景点网络口碑评价方法、系统及电子设备 (Network public praise evaluation method and system for scenic spots and electronic equipment ) 是由 胡师彦 董倩 于 2019-08-30 设计创作,主要内容包括:本发明公开一种旅游景点网络口碑评价方法、系统及电子设备,所述旅游景点网络口碑评价方法包括:对待分析口碑评论数据进行预处理,以得到训练集和待分类数据集;利用所述训练集训练卷积神经网络,以得到维度分类模型;将所述待分类数据集输入至所述维度分类模型,以得到维度分类结果;通过决策树对所述维度分类结果进行情感分析,得出口碑评价。本发明能够针对旅游景点的具体服务类型进行口碑评价。(The invention discloses a method, a system and electronic equipment for evaluating network public praise of tourist attractions, wherein the method for evaluating the network public praise of the tourist attractions comprises the following steps: preprocessing public praise comment data to be analyzed to obtain a training set and a data set to be classified; training a convolutional neural network by using the training set to obtain a dimension classification model; inputting the data set to be classified into the dimension classification model to obtain a dimension classification result; and performing sentiment analysis on the dimension classification result through a decision tree to obtain public praise evaluation. The invention can perform public praise evaluation aiming at the specific service types of the scenic spots.)
1. A network public praise evaluation method for tourist attractions is characterized by comprising the following steps:
preprocessing public praise comment data to be analyzed to obtain a training set and a data set to be classified;
training a convolutional neural network by using the training set to obtain a dimension classification model;
inputting the data set to be classified into the dimension classification model to obtain a dimension classification result;
and performing sentiment analysis on the dimension classification result through a decision tree to obtain public praise evaluation.
2. The method of claim 1, wherein the step of preprocessing the public praise comment data to be analyzed to obtain a training set and a data set to be classified comprises:
obtaining a vector according to the public praise comment data to be analyzed;
obtaining a word vector matrix according to the public praise comment data to be analyzed;
and obtaining the training set and the data set to be classified according to the vector and the word vector matrix.
3. The method as claimed in claim 2, wherein the step of obtaining the vector according to the public praise comment data to be analyzed comprises:
classifying the sentences of the public praise comment data to be analyzed to obtain sentence classification results;
and converting the sentence classification result to obtain the vector.
4. The method as claimed in claim 2, wherein the step of obtaining a word vector matrix according to the word comment data to be analyzed comprises:
segmenting the sentences of the public praise comment data to be analyzed to obtain segmented sentences;
segmenting the segmented sentences to obtain single sentence segmentation results;
and converting the single sentence word segmentation result to obtain the word vector matrix.
5. The method of claim 1, wherein the method further comprises: and acquiring the to-be-analyzed public praise comment data.
6. The method of claim 1, wherein the step of training the convolutional neural network with the training set to obtain the dimension classification model comprises:
initializing parameters of the convolutional neural network;
importing the training set into the convolutional neural network to obtain a training set classification result;
carrying out error analysis on the training set classification result to obtain an error analysis result;
judging whether the error analysis result converges to a set threshold value, and if so, obtaining a dimension classification model; and if the set threshold value is not converged, the training set is imported into the convolutional neural network again.
7. A network public praise evaluation system of tourist attractions is characterized by comprising:
the preprocessor is used for preprocessing the public praise comment data to be analyzed to obtain a training set and a data set to be classified;
a dimension classification model acquirer for training the convolutional neural network by using the training set to obtain a dimension classification model;
the dimension classification result acquirer is used for inputting the data set to be classified into the dimension classification model to obtain a dimension classification result;
and the public praise evaluation acquirer is used for carrying out sentiment analysis on the dimension classification result through the decision tree to obtain public praise evaluation.
8. The tourist attraction network public praise evaluation system according to claim 7, wherein: the network public praise evaluation system for the scenic spots further comprises a public praise comment data acquirer, wherein the public praise comment data acquirer is used for acquiring the public praise comment data to be analyzed.
9. The tourist attraction network public praise evaluation system of claim 7, wherein the preprocessor comprises:
the vector acquirer is used for acquiring a vector according to the public praise comment data to be analyzed;
the word vector matrix device is used for obtaining a word vector matrix according to the public praise comment data to be analyzed;
and the training set and the data collector to be classified are used for obtaining the training set and the data set to be classified according to the vector and the word vector matrix.
10. An electronic device comprising a processor and a memory, the memory storing program instructions, characterized in that: the processor executes program instructions to implement the tourist attraction network public praise evaluation method of any of claims 1 to 6.
Technical Field
The invention relates to the technical field of machine learning, in particular to a method and a system for evaluating network public praise of tourist attractions and electronic equipment.
Background
Tourist attractions are a service type product, and due to the characteristics of production and consumption simultaneity and the like, consumers cannot try the product. The market public praise at tourist attractions therefore becomes an important reference for consumers before purchasing products. Compared with promotion modes such as television, advertisement and the like, the market public praise of tourist attractions has much higher credibility in the mind of consumers. With the development of tourism electronic commerce, consumers can share the evaluation of tourist attractions to a network platform. The mass real network evaluation on the network forms a public praise image of the tourist attractions. However, it is difficult for consumers to summarize the public praise of each service type of tourist attractions from these massive network evaluations. The network public praise evaluation system of the third-party network tourist attractions is produced. The result of the network public praise evaluation of the tourist attractions not only serves consumers to make better decisions, but also enables managers of the tourist attractions to develop the defects of hotel optimization.
Disclosure of Invention
In view of the above disadvantages of the prior art, an object of the present invention is to provide a method, a system, and an electronic device for evaluating a network public praise of a scenic spot, which are used to solve the problem that the public praise evaluation method and system in the prior art only perform a general public praise evaluation on the public praise of the scenic spot service, and do not perform public praise evaluation on a specific service type of the scenic spot.
In order to achieve the above objects and other related objects, the present invention provides a method for evaluating a network public praise of a scenic spot, comprising:
preprocessing public praise comment data to be analyzed to obtain a training set and a data set to be classified;
training a convolutional neural network by using the training set to obtain a dimension classification model;
inputting the data set to be classified into the dimension classification model to obtain a dimension classification result;
and performing sentiment analysis on the dimension classification result through a decision tree to obtain public praise evaluation.
In an embodiment of the present invention, the step of preprocessing the public praise comment data to be analyzed to obtain a training set and a data set to be classified includes:
obtaining a vector according to the public praise comment data to be analyzed;
obtaining a word vector matrix according to the public praise comment data to be analyzed;
and obtaining the training set and the data set to be classified according to the vector and the word vector matrix.
In an embodiment of the present invention, the step of obtaining a vector according to the public praise comment data to be analyzed includes:
classifying the sentences of the public praise comment data to be analyzed to obtain sentence classification results;
and converting the sentence classification result to obtain the vector.
In an embodiment of the present invention, the step of obtaining a word vector matrix according to the public praise comment data to be analyzed includes:
segmenting the sentences of the public praise comment data to be analyzed to obtain segmented sentences;
segmenting the segmented sentences to obtain single sentence segmentation results;
and converting the single sentence word segmentation result to obtain the word vector matrix.
In an embodiment of the present invention, the method for evaluating the network public praise of the tourist attraction further includes: and acquiring the to-be-analyzed public praise comment data.
In an embodiment of the present invention, the step of training the convolutional neural network by using the training set to obtain a dimension classification model includes:
initializing parameters of the convolutional neural network;
importing the training set into the convolutional neural network to obtain a training set classification result;
carrying out error analysis on the training set classification result to obtain an error analysis result;
judging whether the error analysis result converges to a set threshold value, and if so, obtaining a dimension classification model; and if the set threshold value is not converged, the training set is imported into the convolutional neural network again.
In order to achieve the above object, the present invention further provides a scenic spot network public praise evaluation system, which comprises:
the preprocessor is used for preprocessing the public praise comment data to be analyzed to obtain a training set and a data set to be classified;
a dimension classification model acquirer for training the convolutional neural network by using the training set to obtain a dimension classification model;
the dimension classification result acquirer is used for inputting the data set to be classified into the dimension classification model to obtain a dimension classification result;
and the public praise evaluation acquirer is used for carrying out sentiment analysis on the dimension classification result through the decision tree to obtain public praise evaluation.
In an embodiment of the present invention, the network public praise evaluation system of tourist attractions further includes a public praise comment data acquirer, and the public praise comment data acquirer is configured to acquire the public praise comment data to be analyzed.
In an embodiment of the present invention, the preprocessor includes:
the vector acquirer is used for acquiring a vector according to the public praise comment data to be analyzed;
the word vector matrix device is used for obtaining a word vector matrix according to the public praise comment data to be analyzed;
and the training set and the data collector to be classified are used for obtaining the training set and the data set to be classified according to the vector and the word vector matrix.
In order to achieve the above object, the present invention further provides an electronic device, which includes a processor and a memory, where the memory stores program instructions, and the processor executes the program instructions to implement the above method for evaluating the network public praise of the tourist attraction.
As described above, the method, system and electronic device for evaluating the network public praise of the scenic spots of the present invention have the following advantages:
the invention relates to a scenic spot network public praise evaluation method, which comprises the steps of preprocessing public praise comment data to be analyzed to obtain a training set and a data set to be classified; training a convolutional neural network by using the training set to obtain a dimension classification model; inputting the data set to be classified into the dimension classification model to obtain a dimension classification result; and performing sentiment analysis on the dimension classification result through a decision tree to obtain public praise evaluation. By utilizing the scenic spot network public praise evaluation method, not only basic positive or negative evaluation labels are made for network evaluation, but also the dimensionality related to the network evaluation, namely the service type, is classified, and more abundant service type public praise is obtained. The invention can perform public praise evaluation aiming at the specific service types of the scenic spots. The phenomenon that the tourists need to combine more specific service evaluation as reference materials is avoided.
The network public praise evaluation method for the scenic spots greatly reduces the calculated amount and complexity when high-dimensional data is processed. The invention greatly improves the data processing efficiency and is beneficial to processing the user evaluation.
The network public praise evaluation system for the tourist attractions comprises a preprocessor, a dimension classification model acquirer, a dimension classification result acquirer and a public praise evaluation acquirer. The network public praise evaluation system for the scenic spots can not only evaluate the public praise of scenic spot services, but also evaluate the public praise of specific service types of the scenic spots.
Drawings
Fig. 1 is a flowchart illustrating a method for evaluating a network public praise of a tourist attraction according to an embodiment of the present disclosure.
Fig. 2 is a flowchart illustrating a method for evaluating a network public praise of a tourist attraction according to another embodiment of the present application.
Fig. 3 is a flowchart illustrating a step S1 of the method for evaluating the network public praise of the tourist attraction in fig. 1 according to an embodiment of the present application.
Fig. 4 is a flowchart illustrating a step S11 of the method for evaluating the network public praise of the tourist attraction in fig. 3 according to an embodiment of the present application.
Fig. 5 is a flowchart illustrating a step S12 of the method for evaluating the network public praise of the tourist attraction in fig. 3 according to an embodiment of the present application.
Fig. 6 is a flowchart illustrating a step S2 of the method for evaluating the network public praise of the tourist attraction in fig. 1 according to an embodiment of the present application.
Fig. 7 is a block diagram illustrating a structure of a tourist attraction network public praise evaluation system according to an embodiment of the present disclosure.
Fig. 8 is a block diagram illustrating a public praise evaluation system for a tourist attraction network according to another embodiment of the present application.
Fig. 9 is a block diagram illustrating a structure of a preprocessor of a scenic spot network public praise evaluation system according to an embodiment of the present disclosure.
Fig. 10 is a hardware structure diagram of an implementation of a scenic spot network public praise evaluation system according to an embodiment of the present application.
Fig. 11 is a hardware configuration diagram of an implementation of a scenic spot network public praise evaluation system according to another embodiment of the present application.
Fig. 12 is a block diagram of an electronic device according to an embodiment of the present application.
Fig. 13 is a text classification structure diagram of a convolutional neural network of a tourist attraction network public praise evaluation method according to an embodiment of the present application.
Description of the element reference numerals
1 processor
2 memory
3 sentence vector
4 convolution kernel
5 feature extraction results
6 characteristic simplification results
7 service type
10 preprocessor
11 vector obtainer
12-word vector matrix device
13 training set and waiting classification data collector
20-dimensional classification model acquirer
30-dimension classification result acquirer
40-mouth stele evaluation acquirer
50 public praise comment data acquirer
S0-S4
S11-S13
S111, S1112 step
S121 to S123
S21-S25
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for evaluating a network public praise of a tourist attraction according to an embodiment of the present disclosure. Tourist attraction network public praise evaluation method, wherein the tourist attraction network public praise is obtainedThe evaluation method comprises the following steps: and S1, preprocessing the public praise comment data to be analyzed to obtain a training set and a data set to be classified. And S2, training the convolutional neural network by using the training set to obtain a dimension classification model. And S3, inputting the data set to be classified into the dimension classification model to obtain a dimension classification result. And S4, performing sentiment analysis on the dimension classification result through the decision tree to obtain a public praise evaluation. Referring to fig. 2, fig. 2 is a flowchart illustrating a method for evaluating a network public praise of a tourist attraction according to another embodiment of the present application. Before step S1, the method for evaluating the network public praise of the tourist attraction further includes step S0, where step S0 is to obtain the public praise comment data to be analyzed. Means for obtaining the to-be-analyzed public praise comment data include, but are not limited to, using crawler technology to capture sight evaluation samples from a travel platform. Specifically, step S1 may be, but is not limited to, preprocessing the tombstone comment data to be analyzed in conjunction with a Hidden Markov Model (Hidden Markov Model) and word2 vec. Specifically, step S4 may be, but is not limited to, performing sentiment analysis on the dimension classification result using a Decision Tree (Decision Tree) to obtain a word-of-mouth evaluation. The decision tree is a binary tree-shaped decision tree with additional result results, and is a method for intuitively applying statistical probability analysis. Decision trees in machine learning are typically used for predictive model regression models. The application of decision trees to sentiment analysis is considered as a regression problem quantifying sentiment levels with 0-1 values to yield more accurate praise evaluation star ratings. The decision tree is a tree structure in which each child node represents a test on an attribute, each branch represents a test output, and each leaf node represents a classification output or an emotional degree output. The key point of the decision tree establishment is the selection of the characteristics, namely the selection of the judgment condition sub-nodes, and the selection of the proper characteristic values can quickly classify, thereby reducing the depth of the decision tree. The information entropy is used for representing the uncertainty of the data set, the information entropy of the data set which is uniformly distributed is the largest, and when a feature classifies the data set, the difference value between the information entropy of the classified data set and the information entropy before classification is called information gain. The decision tree selects the characteristic with larger information gain to judge the child node. The hidden Markov model (Hidden Markov Model, HMM) essentially derives implicit parametric information from observed parameters, and there is a partial dependency on the features between the front and back. In terms of word segmentation, the word segmentation is to know the sentence sequence O ═ O1,O2,O3......OnFinding out the word segmentation sequence S ═ S with the best possibility, i.e. the maximum probability of occurrence1,S2,S3......SN}. The hidden markov model includes five tuples: and (3) state set: q ═ Q1,Q2,Q3....QNN is the number of possible states. And (3) observation set: v ═ V1,V2,V3....VMAnd M is the possible observation number. Transition probability: a ═ aij]Wherein a isijRepresenting the transition probability from state i to state j. Observing a probability matrix: b ═ Bj(k)]Wherein b isj(k) V representing the Generation of an Observation in the case of State jKThe probability of (c). Initial state distribution: and pi. For example: the state set Q ═ { B, E, M, S }, denotes the beginning, end, middle, and character independent word formation, respectively. For example: "weather is good today", and the state sequence that can be solved by the hidden markov model is "BEBEBE". The segmentation result is today/weather/ok. The process of word segmentation is to know the transition probability and initial probability between states, and to find out the sentence sequence O ═ O1,O2,O3......OnFinding a word segmentation sequence S ═ S }1,S2,S3......SNMaximizes the value of the P (S |0) conditional probability. The convolutional neural network in step S2 is a convolutional neural network generated by using the main characteristics of the object captured by the human observation object first and evolving, and solves the above-mentioned problems of increased computation amount and complexity in high-dimensional data processing because the convolutional layer is added, i.e. local sensing, and the pooling layer is a feature simplification. Referring to fig. 13, fig. 13 is a text classification structure diagram of a convolutional neural network of a scenic spot network public praise evaluation method according to an embodiment of the present application. The input of the dimension classification model is a
Referring to fig. 3, fig. 4, and fig. 5, fig. 3 is a flowchart illustrating a step S1 of the scenic spot network public praise evaluation method in fig. 1 according to an embodiment of the present application. Fig. 4 is a flowchart illustrating a step S11 of the method for evaluating the network public praise of the tourist attraction in fig. 3 according to an embodiment of the present application. Fig. 5 is a flowchart illustrating a step S12 of the method for evaluating the network public praise of the tourist attraction in fig. 3 according to an embodiment of the present application. And S11, obtaining a vector according to the word-of-mouth comment data to be analyzed. And S12, obtaining a word vector matrix according to the word comment data to be analyzed. And S13, obtaining the training set and the data set to be classified according to the vector and the word vector matrix. Specifically, there is no clear sequence between step S11 and step S12, the word vector matrix may be obtained by first performing step S11 according to the to-be-analyzed word-of-mouth comment data to obtain a vector, and then performing step S12 according to the to-be-analyzed word-of-mouth comment data. Or, the step S12 may be performed first according to the to-be-analyzed word-of-speech comment data to obtain a word vector matrix, and then the step S11 may be performed according to the to-be-analyzed word-of-speech comment data to obtain a vector. Wherein, the step S11 of obtaining a vector according to the public praise comment data to be analyzed includes: and S111, classifying the sentences of the public praise comment data to be analyzed to obtain sentence classification results. And S112, converting the sentence classification result to obtain the vector. Wherein, the step S12 of obtaining a word vector matrix according to the to-be-analyzed public praise comment data includes: s121, segmenting the sentence of the public praise comment data to be analyzed to obtain a segmented sentence. And S122, segmenting the segmented sentences to obtain single sentence segmentation results. And S123, converting the single sentence word segmentation result to obtain the word vector matrix. Specifically, the public praise evaluation method further includes segmenting the public praise comment data to be analyzed and setting labels, but not limited to splitting the sentences of the public praise comment data to be analyzed with delimiters as boundaries, where commas in the sentences are the end of one sentence and the beginning of the next sentence, and setting labels for the split sentences. The label is divided into two parts: the dimension classification result related to the first part of sentences is the service type, and the second part is the evaluation of the service type. For example: "traffic is inconvenient". The labels of this sentence are: external traffic-negative.
Referring to fig. 6, fig. 6 is a flowchart illustrating a step S2 of the method for evaluating the network public praise of the tourist attraction in fig. 1 according to an embodiment of the present application. The step of training the convolutional neural network by using the training set to obtain a dimension classification model comprises: and S21, initializing parameters of the convolutional neural network. And S22, importing the training set into the convolutional neural network to obtain a training set classification result. And S23, carrying out error analysis on the training set classification result to obtain an error analysis result. And S24, judging whether the error analysis result converges to a set threshold value, and if so, performing the operation of the step S25. And S25, obtaining a dimension classification model. If the set threshold value is not converged, the operation of step S22 is performed, and the training set is imported into the convolutional neural network again. Specifically, the parameter of the convolutional neural network includes, but is not limited to, a weight of the fully-connected network.
Referring to fig. 7, 8 and 9, fig. 7 is a block diagram illustrating a structure of a tourist attraction network public praise evaluation system according to an embodiment of the present disclosure. Fig. 8 is a block diagram illustrating a public praise evaluation system for a tourist attraction network according to another embodiment of the present application. Fig. 9 is a block diagram illustrating a structure of a preprocessor of a scenic spot network public praise evaluation system according to an embodiment of the present disclosure. Similar to the principle of the scenic spot network public praise evaluation method of the present invention, the present invention also provides a scenic spot network public praise evaluation system, the whole scenic spot network public praise evaluation system can be implemented in a computer system or a server system, the computer system or the server system includes but is not limited to: the system comprises a
The invention discloses a scenic spot network public praise evaluation method which comprises the steps of S1, preprocessing public praise comment data to be analyzed to obtain a training set and a data set to be classified. And S2, training the convolutional neural network by using the training set to obtain a dimension classification model. And S3, inputting the data set to be classified into the dimension classification model to obtain a dimension classification result. And S4, performing sentiment analysis on the dimension classification result through the decision tree to obtain a public praise evaluation. By utilizing the public praise evaluation method, not only basic positive or negative evaluation labels are made for network evaluation, but also the dimensionality related to the network evaluation, namely the service type, is classified, and more abundant service type public praise is obtained. The invention can perform public praise evaluation aiming at the specific service types of the scenic spots. The phenomenon that the tourists need to combine more specific service evaluation as reference materials is avoided.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:基于人脸识别的词条数据扩充方法及装置