Comment usefulness processing method, system, apparatus, and storage medium
By constructing a multi-layer neural network model to process influencing factors, text, and image data, and combining this with the time factor, the problem of inaccurate prediction of comment usefulness in existing technologies is solved, achieving more accurate comment usefulness analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JINAN UNIVERSITY
- Filing Date
- 2023-04-07
- Publication Date
- 2026-07-21
AI Technical Summary
Existing review usefulness prediction models fail to fully consider information related to reviews, users, and merchants, resulting in low prediction accuracy. Furthermore, most models are cross-sectional designs and fail to reflect the dynamic changes of reviews over time.
A multi-layer neural network model was constructed to process influencing factors, text, and image data respectively. A joint deep learning method was used to predict the usefulness of comments, and a usefulness vote prediction model was constructed by combining the time factor.
It improves the accuracy of comment usefulness analysis results, can dynamically track changes in comment usefulness, and provides more accurate usefulness voting data to help businesses and consumers make more informed decisions.
Smart Images

Figure CN116522219B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data processing technology, and in particular to a method, system, apparatus, and storage medium for processing comments on usefulness. Background Technology
[0002] In related technologies, although numerous machine learning algorithms have been applied to predict the usefulness of reviews, most prediction models are not perfect, leading to various problems. For example, using a cross-sectional design, such static reviews, may result in biased predictions of review usefulness; or failing to incorporate information related to reviews, users, and merchants into the model, considering only the user's screen-sharing behavior, can lead to errors between predictions and reality. Therefore, existing methods for predicting review usefulness suffer from low accuracy due to incomplete information consideration. Summary of the Invention
[0003] This invention aims to at least solve one of the technical problems existing in the prior art. To this end, this invention proposes a method, system, apparatus, and storage medium for processing comment usefulness, which can effectively improve the accuracy of comment usefulness analysis results.
[0004] On one hand, embodiments of the present invention provide a method for processing the usefulness of comments, including the following steps:
[0005] The comment association data is preprocessed, including preprocessing of influencing factors, text data, and image data. The comment association data includes training data and current comment data to be processed.
[0006] An impact factor module, a text processing module, and an image data processing module are constructed respectively. The impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer. The text processing module includes a bidirectional encoding model or a long short-term memory recurrent neural network model. The image data processing module includes a convolutional neural network model and a pre-trained model.
[0007] Using the influence factor module, the text processing module, and the image data processing module as different branch input units, a prediction model for the usefulness of comments is constructed.
[0008] The comment usefulness vote prediction model is trained using the preprocessed training data;
[0009] The preprocessed current comment data is input into the trained comment usefulness vote prediction model to obtain comment usefulness voting data.
[0010] In some embodiments, the preprocessing of the influence factors of the comment association data includes:
[0011] Convert the price string value in the aforementioned influencing factors;
[0012] Convert the influencing factors after converting the price string value to date values;
[0013] The influence factors after the date values are converted are standardized.
[0014] In some embodiments, the preprocessing of the text data related to the comment includes:
[0015] The text content in the text data is truncated to a preset number of characters;
[0016] If the truncated text content is less than the preset number of characters, the truncated text content is padded.
[0017] The text content, after being padded or truncated, is assembled into a text matrix.
[0018] In some embodiments, the preprocessing of the image data related to the comment data includes:
[0019] If the number of images in the image data is less than the preset number, the image data will be supplemented.
[0020] The image data or the supplemented image data is standardized.
[0021] In some embodiments, the comment association data includes data from different time periods.
[0022] In some embodiments, the pre-trained model includes a lightweight pre-trained model, which includes the MobileNet network.
[0023] In some embodiments, when training the comment usefulness vote prediction model using the preprocessed training data, the number of iterations is set to include 6, and the number of iterations is used to characterize the number of training iterations for each module in the comment usefulness vote prediction model.
[0024] On the other hand, embodiments of the present invention provide a system for processing the usefulness of comments, including:
[0025] The first module is used to preprocess the comment-related data. The preprocessing includes preprocessing the influence factors, text data, and image data. The comment-related data includes training data and current comment data to be processed.
[0026] The second module is used to construct an impact factor module, a text processing module, and an image data processing module, respectively. The impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer; the text processing module includes a bidirectional encoding model or a long short-term memory recurrent neural network model; and the image data processing module includes a convolutional neural network model and a pre-trained model.
[0027] The third module is used to construct a comment usefulness vote prediction model using the influence factor module, the text processing module and the image data processing module as different branch input units.
[0028] The fourth module is used to train the comment usefulness vote prediction model using the preprocessed training data;
[0029] The fifth module is used to input the preprocessed current comment data to be processed into the trained comment usefulness vote prediction model to obtain comment usefulness voting data.
[0030] On the other hand, embodiments of the present invention provide a processing apparatus for commenting on usefulness, comprising:
[0031] At least one memory for storing programs;
[0032] At least one processor is used to load the program to execute the processing method for the usefulness of the comments.
[0033] On the other hand, embodiments of the present invention provide a storage medium storing a computer-executable program, which, when executed by a processor, is used to implement the processing method for the usefulness of comments.
[0034] The method for processing the usefulness of comments provided in this embodiment of the invention has the following beneficial effects:
[0035] This embodiment constructs an influence factor module consisting of an input layer, a preprocessing layer, a fully connected layer, and an activation layer; a text processing module consisting of a bidirectional encoding model or a long short-term memory recurrent neural network model; and an image data processing module consisting of a convolutional neural network model and a pre-trained model. The influence factor module, text processing module, and image data processing module are used as input units for different branches to construct a comment usefulness vote prediction model. After preprocessing the influence factor, text data, and image data, the comment usefulness vote prediction model is trained using the preprocessed training data. The preprocessed current comment data is then input into the trained comment usefulness vote prediction model for comment usefulness analysis to obtain comment usefulness voting data. This effectively improves the accuracy of the comment usefulness analysis results, thereby improving the accuracy of the voting data.
[0036] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0037] The present invention will be further described below with reference to the accompanying drawings and embodiments, wherein:
[0038] Figure 1 This is a flowchart illustrating a method for processing the usefulness of comments according to an embodiment of the present invention;
[0039] Figure 2 This is a schematic diagram illustrating the performance of multiple pre-trained models in an object detection task according to an embodiment of the present invention;
[0040] Figure 3 This is a schematic diagram of a comment usefulness vote prediction model according to an embodiment of the present invention. Detailed Implementation
[0041] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0042] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0043] In the description of this invention, unless otherwise explicitly defined, terms such as "setup" and "connection" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0044] In the description of this invention, the terms "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment or example, which are included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0045] Before describing specific embodiments, the terms used in the embodiments of this application are explained as follows:
[0046] DENSE layer: Also known as a fully connected layer in Keras, it's a fundamental and powerful structure in deep neural networks. The core operation of a fully connected layer is matrix-vector multiplication y = W * x, essentially a linear transformation from one feature space to another. Therefore, the purpose of a Dense layer is to extract the correlations between the previously extracted features through a non-linear transformation, finally mapping them to the output space. Logically, it's equivalent to the following function: weights W are m * n matrices, input x is an n-dimensional vector, activation function is Activation, bias is bias, and output vector out is an m-dimensional vector, then out = Activation(Wx + bias), meaning a linear transformation plus a non-linear transformation produces the output.
[0047] BERT, short for Bidirectional Encoder Representations from Transformers, is a Transformer-based natural language representation model that has proven to deliver exceptional performance in most NLP tasks, including text classification, question answering, and language inference. In text representation, traditional NLP models (such as word2vec and GloVe) ignore contextual information, consistently assigning the same word vector to the same word in different sentences, failing to address polysemy. For example, "place" in "Jacks is the place to be" and "Something takes place" cannot be represented by the same word vector. To solve polysemy, BERT abandons traditional NLP text encoding methods and uses multi-headed self-attention to learn the relationships and correlations between each word in the text. This approach explicitly represents word correlations through word vectors, implicitly embedding sentence context information in each word vector. This allows for dynamically assigning a word vector to each word within its context, improving text representation quality and enabling parallel processing.
[0048] LSTM stands for Long Short-Term Memory. It is a special type of RNN that uses input at time t+n or earlier to process the information at time t+n more effectively. It was specifically designed to address the long-term dependency problem of traditional RNNs. RNN stands for Recurrent Neural Network, which can utilize information in the time dimension. RNNs generally can only process relatively close contexts. LSTM introduces three gates: the input gate, the forget gate, and the output gate, as well as memory cells with the same shape as the hidden states (some literature considers memory cells as a special type of hidden state) to record additional information.
[0049] CNN stands for Convolutional Neural Network, a type of neural network specifically designed to process data with a grid-like structure. A convolutional network is a neural network that uses convolution operations in at least one layer to replace general matrix multiplication. CNNs significantly reduce the number of parameters by utilizing local connectivity, weight sharing, multi-kernel convolution, and pooling, allowing for deeper layers and effective implicit feature extraction. CNNs are primarily used to recognize two-dimensional graphics that are invariant to translation, scaling, and other forms of distortion. Because their feature detection layers learn implicitly from training data, explicit feature extraction is avoided. Furthermore, since neurons on the same feature map have the same weights, the network can learn in parallel, a major advantage of convolutional networks over networks where neurons are simply interconnected. Convolutional neural networks (CNNs) have unique advantages in speech recognition and image processing due to their special structure of local weight sharing. Their layout is closer to that of actual biological neural networks. Weight sharing reduces the complexity of the network. In particular, the feature that multi-dimensional input vector images can be directly input into the network avoids the complexity of data reconstruction in the process of feature extraction and classification. It can directly process grayscale images and can be directly used to process image-based classification.
[0050] ReLU Activation Function: An activation function is a function added to artificial neural networks to help the network learn complex patterns in data. Similar to neuron-based models in the human brain, the activation function ultimately determines what to fire to the next neuron. ReLU is a simple computation that returns the value provided as input if the input is greater than 0; if the input is 0 or less, it returns 0. For values greater than zero, this function is linear, meaning it possesses many of the desirable properties of linear activation functions when training neural networks using backpropagation. However, it is a non-linear function because negative values are always output as zero.
[0051] Currently, the massive user base of the internet and the continuous improvement of internet infrastructure have driven the development of internet applications, including online shopping and travel booking. This internet-based lifestyle brings great convenience to its target audience, but it also brings consumers the inconvenience of not being able to directly experience the products. In the internet age where products and services are virtualized, more consumers choose to publish their evaluations of products online based on their own genuine experiences after enjoying goods and services. Online Consumer Reviews (OCRs) have become an important source of information for consumers to understand products.
[0052] Online reviews are an electronic form of product or service evaluation, representing user comments on purchased goods or services. They express users' relatively objective feelings and feedback on the product or service. A useful online review is defined as a product assessment that helps potential consumers make purchasing decisions. In the context of the tourism and hospitality industry, products are experiential; users cannot perceive the true value of a product before consumption and can only gain a deeper understanding of the product by referring to online reviews and relying on word-of-mouth to make a decision. Therefore, businesses with more useful reviews offer greater potential value to consumers. For users, online reviews can provide valuable reference, assist in decision-making, enhance consumer confidence, and subtly influence the perceptions and behaviors of potential consumers. For businesses, a large number of online reviews not only increases product and business exposure but also allows for adjustments to products or services, changes in business strategies, and optimization of customer management by analyzing massive amounts of online reviews—in other words, proactive marketing strategies based on consumer feedback. Online reviews play an increasingly important role in the development of the hotel industry chain, directly influencing the decision-making process of hotel consumers and managers. Today, checking online reviews before booking a hotel has become a habit for users. Research shows that genuine user reviews are more likely to be accepted than any form of advertising.
[0053] However, with the rapid advancement of internet and mobile technologies and the significant increase in internet users, online review websites have seen a surge in information creators. The sheer volume of information can sometimes make it difficult for users to efficiently access data of interest, leading to information overload. The increase in the number of reviews inevitably affects their overall value; some reviews are merely brief statements by the reviewer, resulting in inconsistent quality and some reviews lacking meaning. To address this issue, some travel review websites use a "usefulness" metric, allowing readers to vote on the quality of a review. The number of votes a review receives represents the degree of reader perception and resonance with the review. "Useful" reviews can reduce the cognitive effort readers need to search for valuable information, thereby facilitating the decision-making process and alleviating information overload.
[0054] Existing machine learning algorithms are applied to predict the usefulness of reviews, but most predictive models are not perfect. The shortcomings of existing technologies are concentrated in the following aspects:
[0055] First, most existing technologies are cross-sectional designs, failing to consider the changing state of comments over time and their dynamic impact on comments, commenters, and businesses. This static approach to comments can lead to biased predictions of comment usefulness. Therefore, it is necessary to track the state of comments and conduct longitudinal studies, that is, to collect comment information and usefulness votes at different times, observe their changes, and make predictions.
[0056] Secondly, the data sources of existing technologies are not comprehensive enough, and there is a lack of application of theoretical achievements in academia. For example, some factors / attributes that have a significant impact on comments, users and merchants are not included in the model, and only the attribute of user voting behavior is considered.
[0057] Thirdly, few studies have considered extracting non-human features from text content to enhance the information value of raw data, failing to fully explore the predictive power of comment usefulness models.
[0058] Based on this, embodiments of the present invention provide a method, system, apparatus, and storage medium for processing the usefulness of reviews. The main approach employs a multi-layer neural network to incorporate multimodal inputs into a usefulness prediction model, addressing the non-linear relationship between review features and usefulness. Specifically, this embodiment first processes multimodal inputs from different sources individually through different types of neural layers, then collectively learns an overall representation. Next, a joint deep learning method is used to predict the overall usefulness of the reviews, and a regression task applying machine learning algorithms is established.
[0059] Reference Figure 1 This invention provides a method for processing the usefulness of comments, including but not limited to the following steps:
[0060] Step S110: Preprocess the comment-related data;
[0061] In this embodiment, the comment association data includes training data and currently pending comment data. The comment association data includes data from different time periods; that is, when collecting comment association data, data is collected over two different time periods, such as six months apart, thus introducing a time factor as input data for the comment usefulness vote prediction model. The time elements include the difference between the comment's publication time and the collection time, the difference between the comment administrator's reply time and the collection time, etc.
[0062] In this embodiment, preprocessing includes preprocessing the impact factor, text data, and image data. Specifically, in this embodiment, when preprocessing the impact factor of the comment-related data, the price string value in the impact factor can be converted, then the impact factor after price string value conversion can be converted to a date value, and then the impact factor after date value conversion can be standardized. For example, the impact factor data obtained in the comment-related data is [Number of comments: 19821; Restaurant star rating: 4; Average price: '200'; Date: '2022-10-6']. After converting the impact factor data to a price string value, the data after price string value conversion is [Number of comments: 19821; Restaurant star rating: 4; Average price: 200; Date: '2022-10-6']. After converting the data to date values (taking 300 days from the publication date as an example), the data after date value conversion is [Number of comments: 19821; Restaurant star rating: 4; Average price: 200; Date: 300]. Then, each feature in the data after date value conversion is standardized by z-score, i.e., z = (xu) / σ, where u is the mean of the population data, σ is the standard deviation of the population data, and x is the individual value.
[0063] In this embodiment, when preprocessing the text data of the comment association data, since the machine learning system uses tensors as the basic data structure, all inputs should have the same length. Therefore, this embodiment truncates the text content in the text data by a preset number of characters; if the truncated text content is less than the preset number of characters, it is padded; and the padded or truncated text content is used to form a text matrix. For example, taking a preset character count of 200, the text content of each comment in the text data is truncated after 200 characters. If the text content contains fewer than 200 words, zeros are added after the last word. Then, an existing preprocessing model is introduced to convert the text into a matrix of numbers suitable for model training, and then the text is tokenized and its length is adjusted.
[0064] In this embodiment, when preprocessing the image data of the comment-related data, if the number of images in the image data is less than a preset number, the image data is supplemented; the image data or the supplemented image data is then standardized. For example, taking a preset number of images equal to 4, each comment retains only 4 images. If a comment contains fewer than 4 images, 0s are added after the last image. The size of each image is standardized to 224*224*3 pixels, and then the pixel values are standardized to [-1, -1] through a scaling layer.
[0065] Therefore, the preprocessing of comment-related data includes, but is not limited to, the following steps:
[0066] Step 1: Filter comments based on the number of images and the length of the comments. Comments with fewer than one image are considered as having no images. Since this embodiment uses multimodal components to predict the usefulness of comments, only comments with complete modal data are considered, i.e., comments with zero images are discarded. Comments with fewer than 20 characters are also skipped.
[0067] Step 2: Identify and mark any values that are abnormal due to network errors, and remove them during subsequent image reprocessing. Abnormal values caused by network errors include: the number of friends of the commenter (too many), non-existent download links for the image, and abnormal expected price figures.
[0068] Step 3: Discard comments with 0 usefulness votes.
[0069] Step 4: Fill in all the empty values using either the average or 0. For numerical data, we use the average; for non-numerical data, such as comment text, we use 0.
[0070] Step 5: Save the preprocessed data.
[0071] Furthermore, attributes with non-numerical data are vectorized. For example, string values representing prices are converted to numbers; date values representing the posting date or reply date of a comment are converted to the posting date to represent the age of the date value. Before data is input, each feature in the metadata is normalized, and the logarithm of the usefulness votes is taken. This removes interference from units, prevents features with excessively small values from being overwhelmed, ensures data validity, and makes the model more likely to converge.
[0072] Step S120: Construct the impact factor module, text processing module, and image data processing module respectively;
[0073] In this embodiment, the impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer. The impact factor module in this embodiment is constructed using a simple chain containing two fully connected (Dense) layers and activated using ReLU. The impact factor module comprises an input layer, a preprocessing layer, and finally forms the main body of the model. After input, the data is preprocessed and added to the model, and finally activated using ReLU activation functions (with sizes of 32 and 16 respectively).
[0074] The text processing module includes either a transformer-based bidirectional encoder model (BERT) or a long short-term memory recurrent neural network model (LSTM). During the construction of the comment usefulness vote prediction model, one of these models can be chosen.
[0075] Specifically, the BERT model is trained using large-scale unlabeled corpora to obtain a semantic representation of the text containing rich semantic information. This semantic representation is then fine-tuned for specific natural language processing tasks before being applied to those tasks. Its main input is the original word vectors of each character / word in the text. Each character is converted into a one-dimensional vector by querying a word vector table. This vector can be randomly initialized or pre-trained using algorithms such as Word2Vector as initial values. The output is a vector representation of each character / word in the text, incorporating the semantic information of the entire text. For different NLP tasks, the model input is fine-tuned, and the utilization of the model output also differs. For text classification tasks, the BERT model inserts a [CLS] symbol before the text and uses the output vector corresponding to this symbol as the semantic representation of the entire text for text classification. For sequence labeling tasks, the BERT model uses the output vector corresponding to each character in the text to label (classify) that character.
[0076] LSTM can effectively transmit and represent information in long-term sequences without ignoring (forgetting) useful information from long ago. At the same time, LSTM also solves the vanishing gradient problem (the weight / bias gradients of a neural network are extremely small, causing a sharp decrease in the rate of parameter adjustment) and the exploding gradient problem (the weight / bias gradients of a neural network are extremely large, causing excessive parameter adjustment). The working principle of LSTM mainly consists of four steps: the first step is to selectively forget some past information; the second step is to remember some present information; the third step is to merge the past and present memories; and the fourth step is to output the result.
[0077] The image data processing module includes a convolutional neural network (CNN) model and a pre-trained model. In this embodiment, the pre-trained model is built using a lightweight pre-trained model of the MobileNet network. MobileNet is a lightweight pre-trained model that uses depthwise separable convolutions to build a lightweight deep neural network. By introducing two simple global hyperparameters (i.e., the output shape of the image module and the image shape in the model), MobileNet effectively balances latency and accuracy. Given the massive datasets and features brought about by multimodal inputs, this embodiment introduces MobileNet to avoid overloading machine resources. The MobileNet network has three versions: V1, V2, and V3. This embodiment uses version V2, which balances accuracy and model size. Figure 2 As shown, the performance of different models on the object detection task reveals that, with similar numbers of parameters, MobileNetsV2 performs better than other models, having a larger computational cost and a faster response speed.
[0078] Specifically, the CNN model is a stack consisting of three Conv2D and MaxPooling2D layers, with a convolution stride of 3 and a padding strategy of 'same' to obtain an output of the same size as the input. The filter sizes for each layer are configured as 16, 32, and 64, respectively. In this model, this embodiment performs four convolutions on the image to obtain four different images with different features. After pooling to reduce the image size, the images are then activated by an activation function before being output. After all the convolutions are completed, all the obtained image feature data is stretched into a vector, flattened, and then fed into a fully connected neural network for the prediction task in this embodiment.
[0079] Step S130: Using the impact factor module, text processing module, and image data processing module as different branch input units, construct a prediction model for the usefulness of comments;
[0080] In this embodiment, a comment usefulness vote prediction model is constructed based on the TensorFlow framework (a symbolic mathematics system based on dataflow programming). This embodiment establishes different independent branches according to the basic structure and format of different data, and the proposed prediction model architecture is as follows: Figure 3 As shown. The first branch concerns influencing factors; this type of simple vector data is processed using a general approximator represented by a densely connected network. The second branch concerns text content, i.e., sequence data, which is processed using language representation methods described by recurrent neural networks. The third branch concerns images; this type of image data is processed by image classification models such as two-dimensional convolutional neural networks.
[0081] This embodiment fuses text and image features and employs a different strategy to connect these three layers. Finally, a dense regression function is added to the connected representations to generate the output. Since the output layer is purely linear, the regressor can freely learn to predict values (i.e., vote counts) within any range.
[0082] Step S140: Train the comment usefulness vote prediction model using the preprocessed training data;
[0083] In this embodiment, the influence factor module, text processing module, and image data processing module can be combined to obtain 7 comment usefulness vote prediction models. Hyperparameter settings are required before training. Specifically, due to the large amount of training data, including text and images, excessive iterations (epochs) would exhaust the machine resources in this embodiment. Therefore, this embodiment sets epoch = 6, meaning each model will be trained six times. The initial learning rate is set to 1e-4 (scientific notation) in this embodiment. In gradient descent, excessively high or low learning rates can lead to optimization failure, reducing the effective capacity of the model and even directly affecting model convergence. During training, the model automatically adjusts the learning rate to achieve the optimal result. Multiple tests have verified that this initial learning rate can train the optimal model with high efficiency. The batch size is set to 32. A batch that is too large will cause updates to enter local minima, affecting model accuracy; a batch that is too small will result in slow weight updates and a longer optimization process.
[0084] Due to the large number of images and data, this embodiment requires the construction of a lazy-loaded (i.e., delayed loading, where data is loaded only when the object is needed) dataset to ensure that each model can be fully trained. The request is sent only when the image and text are both in the visible area, and the model will obtain the current image and data, after which model training can begin.
[0085] In some embodiments, during training, user review data from certain public websites can be selected as the data source for model evaluation. Yelp reviews are used to study methods for measuring usefulness, obtaining the number of "helpfulness" votes without considering any "funny" or "cool" votes. After obtaining the URLs (i.e., website addresses) of the Yelp review pages, this embodiment uses a data collection program written in Python to collect all English reviews. A filtering process is added to the program to filter out some useless data, ultimately obtaining the data used as the basis for subsequent analysis in this embodiment.
[0086] After data collection was completed, comments that did not receive "useful" votes were discarded to avoid affecting the results of the deep learning model. The final dataset included 138,177 review records related to 466 restaurants, which were divided into training, validation, and test sets in a 6:2:2 ratio.
[0087] During model training, the dataset was shuffled multiple times and cross-validation was performed five times. The final experimental results show that the algorithm achieves average performance 5 times that of cross-validation. Here, standard error-based metrics, including mean squared error (MSE), mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and mean arctangent absolute percentage error (MAAPE), are used to evaluate the performance of the proposed model.
[0088] As shown in Table 1, the prediction model using multimodal input performs better than the model using partial modal input. When using three modalities of data (influencing factors, text, and images) as feature input and employing the Dense+BERT+CNN model, the result is the minimum of all feature combinations. This result aligns well with the expectations of this invention: combining structured peripheral data and unstructured core data will produce better prediction results.
[0089] Table 1
[0090]
[0091]
[0092] Step S150: Input the preprocessed current comment data to be processed into the trained comment usefulness vote prediction model to obtain comment usefulness voting data.
[0093] In this embodiment, after all model training is completed, the model composed of Dense+BERT+CNN is used as the current comment usefulness vote prediction model. Then, the current comment data to be processed is input into the model to obtain effective and accurate comment usefulness voting data, thereby providing effective and accurate reference data for merchants and consumers.
[0094] In summary, from a technical perspective, firstly, this embodiment uses panel data to reflect the dynamic changes in comment information. Specifically, a longitudinal analysis was conducted on data collection and model design. The raw data was collected from two different time periods (six months apart), and time factors (such as the difference between the comment's publication time and the collection time, and the difference between the comment administrator's reply time and the collection time) were incorporated into the metadata as one of the model inputs. Secondly, this embodiment uses multimodal data as input and uses the number of usefulness votes without numerical limitations as output. It comprehensively utilizes metadata, text, and image data to reflect the role of different dimensions of data in predicting the usefulness of comments. Directly using the number of usefulness votes as input is more in line with the actual prediction results. Thirdly, a deep learning model that can comprehensively observe data from different dimensions is used to obtain an overall judgment.
[0095] At the application level, firstly, this embodiment provides business operators with a predictable number of usefulness votes for new reviews, allowing them to identify reviews that are crucial to their products in advance, rather than waiting for a review's usefulness votes to accumulate to a certain level before recognizing its importance. This helps managers improve service quality, better analyze customer behavior, refine marketing strategies, and ultimately increase the company's competitive advantage. Secondly, this embodiment provides online review website administrators with a new review set sorting rule: useful reviews are prioritized based on their number of usefulness votes. This is valuable for optimizing and improving the website's review system, helping website administrators set up more effective review mechanisms based on user characteristics and review content. Thirdly, this embodiment provides reviewers with decision-making references and practical basis for quickly finding more valuable reviews.
[0096] This invention provides a system for processing the usefulness of comments, including:
[0097] The first module is used to preprocess the comment-related data. The preprocessing includes preprocessing the influencing factors, text data, and image data. The comment-related data includes training data and the current comment data to be processed.
[0098] The second module is used to construct the impact factor module, text processing module, and image data processing module, respectively. The impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer; the text processing module includes a bidirectional encoding model or a long short-term memory recurrent neural network model; and the image data processing module includes a convolutional neural network model and a pre-trained model.
[0099] The third module is used to construct a prediction model for the usefulness of comments by using the impact factor module, text processing module and image data processing module as different branch input units.
[0100] The fourth module is used to train the comment usefulness vote prediction model using preprocessed training data;
[0101] The fifth module is used to input the preprocessed current comment data to be processed into the trained comment usefulness vote prediction model to obtain comment usefulness voting data.
[0102] The content of the method embodiments of the present invention is applicable to the system embodiments. The specific functions implemented in the system embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0103] This invention provides a processing apparatus for commenting on usefulness, comprising:
[0104] At least one memory for storing programs;
[0105] At least one processor is used to load the program for execution. Figure 1 The method for handling the usefulness of comments is shown.
[0106] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0107] This invention provides a storage medium storing a computer-executable program, which, when executed by a processor, is used to implement... Figure 1 The method for handling the usefulness of comments is shown.
[0108] The content of the method embodiments of the present invention is applicable to the storage medium embodiments. The specific functions implemented by the storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0109] Furthermore, embodiments of the present invention also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform... Figure 1 The method for handling the usefulness of comments is shown.
[0110] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention. Furthermore, the embodiments of the present invention and the features thereof can be combined with each other unless otherwise specified.
Claims
1. A method for processing the usefulness of comments, characterized in that, Includes the following steps: The comment association data is preprocessed, including preprocessing of influencing factors, text data, and image data. The comment association data includes training data and current comment data to be processed. An impact factor module, a text processing module, and an image data processing module are constructed respectively. The impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer. The text processing module includes a bidirectional encoding model or a long short-term memory recurrent neural network model. The image data processing module includes a convolutional neural network model and a pre-trained model. Using the influence factor module, the text processing module, and the image data processing module as different branch input units, a prediction model for the usefulness of comments is constructed. The comment usefulness vote prediction model is trained using the preprocessed training data; The preprocessed current comment data to be processed is input into the trained comment usefulness vote prediction model to obtain comment usefulness voting data; The preprocessing of the influencing factors of the comment association data includes: Convert the price string value in the aforementioned influencing factors; Convert the influencing factors after converting the price string value to date values; Standardize the impact factors after converting date values; The preprocessing of text data related to comment data includes: The text content in the text data is truncated to a preset number of characters; If the truncated text content is less than the preset number of characters, the truncated text content is padded. The text content after padding or truncation is combined into a text matrix; The comment-related data includes data from different time periods with a time factor; the time factor includes the difference between the comment posting time and the collection time, and the difference between the comment administrator's reply time and the collection time; The comment usefulness vote prediction model fuses text features and image features, and then performs concatenation processing on the fused multimodal features. Finally, it generates comment usefulness votes using a dense regression function on the concatenated representation.
2. The method for processing the usefulness of comments according to claim 1, characterized in that, The preprocessing of image data related to comment data includes: If the number of images in the image data is less than the preset number, the image data will be supplemented. The image data or the supplemented image data is standardized.
3. The method for processing the usefulness of comments according to claim 1, characterized in that, The pre-trained model includes a lightweight pre-trained model, which includes the MobileNet network.
4. The method for processing the usefulness of comments according to claim 1, characterized in that, When training the comment usefulness vote prediction model using the preprocessed training data, the number of iterations is set to 6, which represents the number of training iterations for each module in the comment usefulness vote prediction model.
5. A system for processing the usefulness of comments, characterized in that, The system is applied to the method as described in any one of claims 1-4, comprising: The first module is used to preprocess the comment-related data. The preprocessing includes preprocessing the influence factors, text data, and image data. The comment-related data includes training data and current comment data to be processed. The second module is used to construct an impact factor module, a text processing module, and an image data processing module, respectively. The impact factor module includes an input layer, a preprocessing layer, a fully connected layer, and an activation layer; the text processing module includes a bidirectional encoding model or a long short-term memory recurrent neural network model; and the image data processing module includes a convolutional neural network model and a pre-trained model. The third module is used to construct a comment usefulness vote prediction model using the influence factor module, the text processing module and the image data processing module as different branch input units. The fourth module is used to train the comment usefulness vote prediction model using the preprocessed training data; The fifth module is used to input the preprocessed current comment data to be processed into the trained comment usefulness vote prediction model to obtain comment usefulness voting data.
6. A processing apparatus for commenting on usefulness, characterized in that, include: At least one memory for storing programs; At least one processor is configured to load the program to perform the processing method for the usefulness of comments as described in any one of claims 1-4.
7. A storage medium, characterized in that, It contains a computer-executable program, which, when executed by a processor, is used to implement the method for processing the usefulness of comments as described in any one of claims 1-4.