Brand influence dynamic monitoring method based on big data driving
By constructing a variety of models to classify online public opinions and perform topic mining, the problem of insufficiently comprehensive calculation of brand influence in existing technologies is solved, a comprehensive and accurate prediction of brand influence trends is achieved, and early warning capabilities are provided for brands.
Patent Information
- Application Number
- CN202410736141.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-06-07
AI Technical Summary
The existing technology only considers the influence of a specific platform when calculating brand influence, and cannot represent the overall evaluation of all media and users on the Internet, resulting in calculation results that are not comprehensive and accurate.
Using a method based on big data, we collect data from various online media and forums through web crawlers to build a media public opinion sentiment classification model, a hot topic mining model and a brand influence trend prediction model, combined with TextCNN-GRU, BTM and Stacking integrated learning models , perform sentiment classification, topic mining and trend prediction.
It achieves comprehensive prediction of brand influence trends, provides brands with early warning capabilities, and improves the accuracy and comprehensiveness of influence calculations.
Smart Images

Figure CN118691307A
Abstract
Description
Technical Field
[0001] The invention relates to a brand influence dynamic monitoring method based on big data drive, belonging to the technical field of information management. Background Art
[0002] Regarding the evaluation methods and measurement techniques of brand influence of different brand types, current research is mainly divided into two directions. One is to focus on the market and financial perspectives, by extracting key factors of brand influence and obtaining relevant data for measurement; the other direction is to establish different brand influence indicators based on research results and evaluate them through expert scoring. However, these research results are more from the perspective of the market and consumers.
[0003] Existing technologies such as the invention with patent number "CN112598468A" disclose a method for evaluating the Internet influence index of public opinion on consumer products, including the following steps: input target-related keywords in the mapping function; map the keywords to obtain a keyword set; classify Sina Weibo, Xiaohongshu, etc. as Weibo platforms, and classify Black Cat Complaint Platform and Consumer Quality Network as online media platforms; obtain Weibo information; collect Weibo descriptive information; calculate the influence value of Weibo platforms; obtain online media information; collect online media descriptive information; obtain website rankings and website relevance rating indexes; calculate the influence value of online media platforms; calculate the total network influence value according to the formula. The present invention has the beneficial effects of comprehensive information collection, wide monitoring and analysis dimensions, and can truly reflect the Internet public opinion influence of the brand name, product category name, and product quality failure category name to be evaluated.
[0004] However, the above scheme only calculates the brand influence by calculating the influence of a specific platform. It cannot represent the overall evaluation of all media and users on the Internet. It lacks a certain degree of comprehensiveness, resulting in the influence calculation results not necessarily being accurate. Summary of the invention
[0005] In order to solve the above problems in the prior art, the present invention is proposed.
[0006] The technical solution of the present invention is as follows:
[0007] A brand influence dynamic monitoring method based on big data drive includes the following steps:
[0008] Collect web page data from various online media and forums through web crawlers and pre-process the web page data;
[0009] Construct a media public opinion sentiment classification model, and use it to classify the public opinion information in the pre-processed web page data of various network media;
[0010] Construct a hot topic mining model, and use it to mine hot topics from pre-processed web page data of various forums. At the same time, construct a hot topic tracking model, and use it to track hot topics.
[0011] Construct a brand influence trend prediction model, which predicts the brand influence trend through sentiment classification of brand-related public opinion information and related hot topics.
[0012] As a preferred embodiment of the present invention, the specific steps of preprocessing the web page data are:
[0013] Filter the web page tags in the web page data to obtain text data, remove punctuation and spaces in the text data, and then use the Jieba word segmentation algorithm to split the sentences in the text data into word items. Then, based on the preset stop word list, filter out words that do not express specific meanings, and finally convert all text data into word vector form.
[0014] As a preferred embodiment of the present invention, the media public opinion sentiment classification model is constructed based on the TextCNN-GRU model, and the specific steps of sentiment classification are as follows:
[0015] Construct training sets and test sets based on preprocessed media web page data;
[0016] The training set is input into the media public opinion sentiment classification model to train the model, and then the performance of the media public opinion sentiment classification model is evaluated through the test set. If the performance evaluation result of the media public opinion sentiment classification model is less than the preset performance threshold, the parameters of the media public opinion sentiment classification model are adjusted and the performance is evaluated again after retraining through the training set. The operation is repeated until the performance of the media public opinion sentiment classification model is greater than the preset performance threshold, and then the training is stopped to obtain the trained media public opinion sentiment classification model;
[0017] The trained media public opinion sentiment classification model is used to perform sentiment classification on the public opinion information in various media web page data.
[0018] As a preferred embodiment of the present invention, the hot topic mining model mines hot topics through the following steps:
[0019] Each post in the preprocessed forum webpage data is stored in a document to form a document set, and all the terms in the document set are combined two by two to generate all possible word pairs;
[0020] The word pairs are modeled by the BTM algorithm to obtain the BTM topic model, and the initial number of topics of the BTM topic model is set. Topics are extracted according to the word pairs through the BTM topic model, and the number of topics is continuously adjusted by using the KL distance as the evaluation index of topic similarity. When the average similarity between the topics extracted by the BTM topic model is the smallest, the trained BTM topic model is obtained.
[0021] After extracting the topics of the document set through the trained BTM topic model, the hot topics are determined through the following steps:
[0022] Set the topic importance index TI j (t i ), represents the i-th topic t i In the jth document d j The importance of this indicator is determined by the following two factors:
[0023] Theme i In the document d j The number of times it appears in topic t i The ratio of the number of occurrences in all documents M is I j (t i ) and the subject t i In the document d j The number of occurrences in document d j The ratio of the number of times all other topics k appear in j (t i ), I j (t i ) and T j (t i ) is calculated as follows:
[0024]
[0025] Therefore, the topic importance index T j (t i ) is calculated as follows:
[0026] TI j (t i )=I j (t i )·T j (t i )
[0027] Theme i The higher the value of the topic importance, the more important the topic t i The larger the amount of information contained, the more representative it is, that is, the hot topic. Then the topic t is calculated by the following formula: i Importance in the entire documentation set:
[0028]
[0029] Where: TI(t i ) represents the subject t i The importance of the document in the entire set.
[0030] As a preferred embodiment of the present invention, the hot topic tracking model tracks hot topics through the following steps:
[0031] Divide the media articles in various types of online media webpage data into different time windows in chronological order, and identify hot topics in each time window;
[0032] The topic strength of each hot topic in any time window is calculated by averaging the distribution probabilities of hot topics on each media article in the time window. The topic strength δ of hot topic z is z The calculation formula is as follows:
[0033]
[0034] Where: D i represents the number of media articles contained in time window i; d j represents the jth media article in time window i; Indicates media articles j The probability of belonging to hot topic z;
[0035] The Jaccard coefficient is used to calculate the proportion of the same feature words between two hot topics, and then the word co-occurrence algorithm is used to calculate the probability that the feature words of two hot topics appear in the same media article at the same time. The JW algorithm is constructed by combining the two to calculate whether the two hot topics are related, and then the related hot topic content is tracked simultaneously.
[0036] As a preferred embodiment of the present invention, the step of calculating the ratio of the same characteristic words between two hot topics by using the Jaccard coefficient is as follows:
[0037] Suppose the feature word vector set of hot topic z1 is Feature word vector set of hot topic z2 Among them, n is the total number of feature words, and the proportion of the same feature words between two hot topics is calculated by the following formula:
[0038]
[0039] The formula for calculating the probability of two hot topic feature words appearing in the same media article at the same time through the word co-occurrence algorithm is as follows:
[0040]
[0041] Where: f is the total number of time windows; w is the total number of articles in the corresponding time window; ‖Segment‖ represents the number of articles in two adjacent time windows where hot topics z1 and z2 are located; Indicates that the feature words are included in two adjacent time windows at the same time Media articles;
[0042] Combining the above formula, the calculation formula of the JW algorithm is as follows:
[0043] JW(z1,z2)=γJaccard(z1,z2)+(1-γ)Wordco-occurrence(z1,z2)
[0044] Among them: γ represents weight;
[0045] A threshold is set. When the value of two hot topics calculated by the JW algorithm is greater than the threshold, it is determined that the two hot topics are related.
[0046] As a preferred embodiment of the present invention, the brand influence trend prediction model is based on a Stacking ensemble learning model, and the Stacking ensemble learning model is composed of two layers of prediction models, the first layer of prediction model is composed of several types of sub-prediction models, and the second layer of prediction model is composed of an extreme gradient boosting model;
[0047] The first-layer prediction model construction steps are:
[0048] Pre-select several different types of initial prediction models and train the models using pre-built training sets;
[0049] After the training is completed, the error difference r of each initial prediction model is calculated by the Pearson correlation coefficient. xy The calculation is as shown below:
[0050]
[0051] in: represents the average value of samples in the training set; x i represents the i-th sample in the training set; m represents the total number of samples in the training set or test set; y i represents the i-th sample in the test set; Represents the average value of samples in the test set;
[0052] A preset error difference threshold is used, and the initial prediction model with an error difference greater than the threshold is used as a sub-prediction model of the first-layer prediction model.
[0053] As a preferred embodiment of the present invention, the training steps of the brand influence trend prediction model are:
[0054] The sentiment classification of brand-related public opinion information and related hot topics are constructed as a training set, and then the training set is divided into sub-training sets equal to the number of prediction models;
[0055] For any sub-prediction model in the first-layer prediction model, randomly select any sub-training set as the test set, and input the remaining training sets into the prediction model for training, then evaluate the sub-prediction model with the corresponding test set and adjust the parameters of the sub-prediction model according to the evaluation results to complete the training, and perform predictions with the trained sub-prediction model to obtain the prediction results of each sub-prediction model;
[0056] A new training set is constructed through the prediction results of all sub-prediction models, and then the new training set is input into the second-layer prediction model for training to obtain a trained brand influence trend prediction model.
[0057] On the other hand, the present invention further provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any embodiment of the present invention is implemented.
[0058] In yet another aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described in any embodiment of the present invention.
[0059] The present invention has the following beneficial effects:
[0060] 1. Based on machine learning, the present invention predicts the influence trend of brands through all network media and public opinion information data in forums on the Internet, providing brands with the ability to provide early warning. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 is a flow chart of the method of the present invention;
[0062] Figure 2 This is a schematic diagram of the structure of the media public opinion sentiment classification model of the present invention;
[0063] Figure 3 Mining hot topic flow chart for the present invention;
[0064] Figure 4 A flow chart for generating word pairs of the BTM topic model of the present invention;
[0065] Figure 5 It is a schematic diagram of the structure of the brand influence trend prediction model of the present invention. DETAILED DESCRIPTION
[0066] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0067] It should be understood that the step numbers used in this document are only for convenience of description and are not intended to limit the order in which the steps are executed.
[0068] It should be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0069] The terms “include” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0070] The term "and / or" means and includes any and all possible combinations of one or more of the associated listed items.
[0071] Embodiment 1:
[0072] See also Figure 1 , a brand influence dynamic monitoring method based on big data drive, including the following steps:
[0073] Collect web page data from various online media and forums through web crawlers and pre-process the web page data;
[0074] Construct a media public opinion sentiment classification model, and use it to classify the public opinion information in the pre-processed web page data of various network media;
[0075] Construct a hot topic mining model, and use it to mine hot topics from pre-processed web page data of various forums. At the same time, construct a hot topic tracking model, and use it to track hot topics.
[0076] Construct a brand influence trend prediction model, which predicts the brand influence trend through sentiment classification of brand-related public opinion information and related hot topics.
[0077] In this embodiment, the brand influence score is also calculated by setting a brand influence monitoring indicator:
[0078] As a preferred implementation of this embodiment, the specific steps of preprocessing the web page data are:
[0079] Filter web page tags in web page data to obtain text data, remove punctuation and spaces in the text data, and then use the Jieba word segmentation algorithm to segment sentences in the text data into word items. Then, filter out words that do not express specific meanings based on the preset stop word list, and finally convert all text data into word vector form;
[0080] Specifically, in this embodiment, the read() function in Python is used to read data; the second step is to use the compile() method in the re library to write a regular expression to filter out information that is not related to the text analysis, where the expression [\u4e00-\u9fa5] can filter out punctuation marks in the text, and the expression [(?<=\>).*? (?=\<)] is used to filter web page tags in the crawler data; the third step is to call the jieba library of python to perform Chinese word segmentation on the text and divide the sentence into terms in units of words; the fourth step is to load the stop_words stop word list to filter out words that do not express specific meanings in the text; the fifth step is to finally use the strip() function of python to remove spaces in the text, read the corpus into memory at one time and pass it into jieba.cut(file.read()).
[0081] The first step in generating word vectors is to construct a dictionary for training. Use Counter to count words. When constructing the dictionary, only words with a frequency greater than 1 in the corpus are retained. <pad>and <unk>These are two initialized tokens. <pad>Used to complete sentences. <unk>It is used to replace words that have not appeared in the corpus. In this step, we get a dictionary containing 10384 words. The second step is to construct the mapping from word to token and from token to word. Use the Tokenizer class to receive the size of the dictionary through the vocab_size parameter. After setting the dictionary size, the low-frequency words will be filtered out. Therefore, when generating the vector of the text later, the word vector of the low-frequency words outside the dictionary will no longer appear. The third step is to instantiate an object t of Tokenizer and obtain the corresponding relationship between the index and the words in the dictionary through the t.word_index() method. The fourth step is to use the t.texts_to_sequences() method to convert each sentence and paragraph in the text into a vector represented by the index. When converting the sentence vector represented by the index, since each sentence is of different length, it is not convenient to batch process in the subsequent neural network model training. Therefore, a padding completion operation is required to make all sentences of the same length. The method used is the pad_sequences() method to fill the part of the sentence that is not long enough with 0 and cut off the redundant part of the sentence. The fifth step is to finally load the pre-trained word vector. You need to match this word vector with the index in the dictionary and build an embedding matrix. You can then find the corresponding word vector through the index. This completes the word vector technology and converts the text into a vector form that can be processed by the computer, laying the foundation for the subsequent sentiment analysis model.
[0082] As a preferred implementation of this embodiment, the media public opinion sentiment classification model is constructed based on the TextCNN-GRU model, and the specific steps of sentiment classification are as follows:
[0083] Construct training sets and test sets based on preprocessed media web page data;
[0084] The training set is input into the media public opinion sentiment classification model to train the model, and then the performance of the media public opinion sentiment classification model is evaluated through the test set. If the performance evaluation result of the media public opinion sentiment classification model is less than the preset performance threshold, the parameters of the media public opinion sentiment classification model are adjusted and the performance is evaluated again after retraining through the training set. The operation is repeated until the performance of the media public opinion sentiment classification model is greater than the preset performance threshold, and then the training is stopped to obtain the trained media public opinion sentiment classification model;
[0085] The trained media public opinion sentiment classification model is used to perform sentiment classification on the public opinion information in various media web page data.
[0086] See also Figure 2 In this embodiment, the specific structure of the TextCNN-GRU model is:
[0087] The model consists of ten parts: embedding layer, convolution layer, nonlinear activation function layer, pooling layer, Dropout layer, Flatten layer, GRU layer, Dropout layer, fully connected layer and Sigmoid activation function layer;
[0088] (1) Embedding layer
[0089] The word2vec word vector transforms the dimension of the input vector through the embedding layer. Since the convolution operation requires the channels dimension in the Text-CNN model, after the word vectorization is completed, the shape is actually (batch_size, vocab_size, embedding_size). However, the dimension required by the convolution in Tensorflow is (batch_size, heights, widths, channels). Therefore, the channels dimension is increased through the expand_dims method.
[0090] (2) Convolutional layer
[0091] Also known as convolution filter, it can extract features and capture local information of text during the convolution process. Since we use multiple filters, the convolution pooling operation must be processed separately for each filter. First, pooled_outputs is defined to store the output results of the convolution pooling operation of each filter. For each filter, filter_size represents the convolution kernel size, that is, the sliding window size, strides represents the step size of the convolution, and padding is 'VALID', which means that only simple convolution is performed without filling 0. After the convolution operation, conv is obtained and activated using the relu function.
[0092] (3) Pooling layer
[0093] The pooling layer is usually located after the convolution layer. It mainly extracts some local optimal features from the features obtained by the convolution layer, continuously reduces the amount of features extracted by the convolution layer, reduces parameters to reduce the complexity of the model, prevents overfitting as much as possible, discards the number of redundant features and retains only useful information. The pooling layer is implemented based on the tf.nn.max_pool method, where pool_size represents the pooling window size, which is related to the length of the sentence vector and the size of the convolution kernel. Different filter_sizes correspond to different pool_sizes, strides represent the step size of the pooling, and the padding value is also 'VALID'. Simple pooling does not perform padding, and the output size is smaller than the input.
[0094] (4) Dropout layer
[0095] When training a neural network, we often encounter the problem of overfitting. To prevent overfitting, we can improve the performance of the neural network by preventing the joint action of feature detectors. During forward propagation, we stop the activation value of a certain neuron with a certain probability p, reducing the over-reliance on certain local features and making the model more generalizable. In the implementation, we use the tf.nn.dropout method, where the parameter keep_prob is the probability of each element being retained.
[0096] (5) Flatten layer
[0097] It is used to transform the dimension of the input value, that is, to transform the two-dimensional features obtained from the previous hierarchical structure into one-dimensional features, using the tf.nn.flatten function.
[0098] (6) GRU layer
[0099] GRU has a simpler hierarchical structure than LSTM. It does not contain the output gate and cell state in LSTM, and the functions of the forget gate and input gate in LSTM are implemented by the update gate and reset gate. The update gate (resetgate) and reset gate (updategate) can retain long-distance sequence information, which will not fade away with the change of time, nor will it be eliminated because it is irrelevant to the prediction. Call the tf.nn.rnn_cell.GRUCell function to implement it. The important parameters of this function are: num_unit is the number of neurons in GRUcell, units represents the output dimension, and activation represents the activation function selected when implementing this layer.
[0100] (7) Fully connected layer
[0101] All features captured by the previous convolutional layer and pooling layer are fully connected, and weighted concatenation is performed to obtain the output feature value. The fully connected layer is usually at the end of the CNN. It specifically connects each neuron in the previous layer to the neurons in this layer one by one, integrates the features extracted by the previous layers, and learns the high-level meaning of the features. It is implemented based on the tf.layers.dense function. Its most important parameter is rate, which represents the proportion of neurons that need to be discarded during training.
[0102] (8) Classifier
[0103] The classifier is usually followed by the last fully connected layer, and usually uses the softmax function to output a number between 0 and 1, which represents the classification label, that is, the probability that the sample is classified into a certain category. The label output by the model is compared with the true label of the sample to obtain the error update value, which is then passed to the previous layers through stochastic gradient descent and back propagation to update the parameters in the network structure in a timely manner.
[0104] As a preferred implementation of this embodiment, see Figure 3 , the hot topic mining model mines hot topics through the steps:
[0105] Each post in the preprocessed forum webpage data is stored in a document to form a document set, and all the terms in the document set are combined two by two to generate all possible word pairs (also called biterms);
[0106] The word pairs are modeled by the BTM algorithm to obtain the BTM topic model, and the initial number of topics of the BTM topic model is set. Topics are extracted according to the word pairs through the BTM topic model, and the number of topics is continuously adjusted by using the KL distance as the evaluation index of topic similarity. When the average similarity between the topics extracted by the BTM topic model is the smallest, the trained BTM topic model is obtained.
[0107] The BTM, like LDA, is a topic model that can generate keywords in each topic and the probability distribution of each topic in a new document. The difference of BTM is that it introduces the idea of word pairs. Each word pair generates a topic. Even for a short text, the number of word pairs is relatively large, which solves the sparsity problem of document generation topics of the LDA model on short texts. A word pair refers to two words that appear in the same segment after preprocessing. In a short text, it can be regarded as any two unordered co-occurring words that appear in a document. The data generation process of BTM can be described as the process in which each biterm is taken out of a specific topic in the corpus in turn. The topic is sampled using all the data in the corpus, and then judged based on the information of the word pairs, thereby obtaining the distribution of each topic in the text. According to the author of the paper, BTM performs better than LDA on short texts, and even for long texts, the effect of BTM is not weaker than LDA;
[0108] The word pair generation process is as follows: Figure 4 As shown, the word pair b=(b i , b j ) under topic z is as follows:
[0109]
[0110] The probability of the entire corpus is shown in the following formula:
[0111]
[0112] The biggest difference between BTM and traditional topic models is that the BTM model does not model the process of document generation. Therefore, it is impossible to directly obtain the proportion of topics in a document during topic learning. In order to infer the topics in a document, it is assumed that the proportion of document topics is equal to the expectation of topics in the biterm generated by the document, as shown in the following formula:
[0113] P(z|d)=Σ b P(z|b)P(b|d)
[0114] P(z|b) can be expressed by the Bayesian formula based on the parameter value predicted by BTM as shown in the following formula:
[0115]
[0116] Where P(z) = θ z , P(w i |z)=Ф i|z , and P(b|d) can be estimated by the empirical distribution of biterms in the document as shown in the following formula:
[0117]
[0118] where n d (b) is the frequency of biterm b in document d. In short text, P(b|d) is approximately a uniform distribution. The BTM model needs to obtain the values of θ and Φ based on the existing parameters and corpus;
[0119] This embodiment uses Gibbs sampling to infer the parameters of BTM;
[0120] First, the initial state is randomly selected for the Markov chain, and then each bitermb=(w i , w j )’s conditional distribution P(z|z b ,B,α,β)where z b represents the distribution of all topics except b, B represents the word pair data set of all biterms, and the joint probability formula for the entire data is as follows:
[0121]
[0122] Where: n z represents the number of times bitermb is assigned to topic z, n w|z is the number of times word w is assigned to topic z, and α and β are the Dirichlet priors in LDA. Note that when a biterm b is assigned to topic z, word w i and w j will be assigned to the subject at the same time;
[0123] Finally, by counting the biterms and word co-occurrences of the topic distribution, we can predict the distribution of the inferred topic words Φ and the global topic distribution θ as shown in the following formula:
[0124]
[0125] The steps for selecting the number of topics are:
[0126] In the topic model, the selection of the topic number K value will directly affect the quality of the model, thereby interfering with the clustering effect, so the setting of parameter K is particularly important. A good model should maximize the topic differentiation, so that the topics of each category do not interfere with each other, and the text topic can be clearly highlighted. When studying text clustering, the main clustering assumption is that the similarity of documents of the same category is greater, while the similarity of documents of different categories is smaller. It can be seen that when the average similarity between topics is the smallest, the topic model can reach the optimal level.
[0127] Euclidean distance or cosine similarity is often used to calculate the similarity between text vectors. However, in order to preserve the characteristics of topic probability distribution, a similarity function that can measure the distance of probability distribution, namely KL (Kullback-Leibler) distance, is used as the metric. The calculation of KL distance is shown in the following formula:
[0128]
[0129] where z i and z j is the probability distribution of two different topics, and They represent the topic z of the kth document. i and theme z j The corresponding probability, N is the total number of documents. From the KL distance formula, it can be seen that for all k, KL(zi||zj)≠KL(zj||zi). Therefore, this embodiment uses another commonly used symmetric version of KL distance, namely Jensen-Shannon distance. Jensen-Shannon distance is shown in the following formula:
[0130]
[0131] Then, the overall average similarity is expressed using the JS distance as follows:
[0132]
[0133] After extracting the topics of the document set through the trained BTM topic model, the hot topics are determined through the following steps:
[0134] Set the topic importance index TI j (t i ), represents the i-th topic t i In the jth document d j The importance of this indicator is determined by the following two factors:
[0135] Theme i In the document d j The number of times it appears in topic t i The ratio of the number of occurrences in all documents M is I j (t i ) and the subject t i In the document d j The number of occurrences in document d j The ratio of the number of times all other topics k appear in j (t i ), I j (t i ) and T j (t i ) is calculated as follows:
[0136]
[0137] Therefore, the topic importance index T j (t i ) is calculated as follows:
[0138] TI j (t i )=I j (t i )·T j (t i )
[0139] Theme i The higher the value of the topic importance, the more important the topic t i The larger the amount of information contained, the more representative it is, that is, the hot topic. Then the topic t is calculated by the following formula: i Importance in the entire documentation set:
[0140]
[0141] Where: TI(t i ) represents the subject t i The importance of the document in the entire set.
[0142] As a preferred implementation of this embodiment, the hot topic mining model mines hot topics through the following steps:
[0143] Each post in the preprocessed forum webpage data is stored in a document to form a document set, and all the terms in the document set are combined two by two to generate all possible word pairs;
[0144] The word pairs are modeled by the BTM algorithm to obtain the BTM topic model, and the initial number of topics of the BTM topic model is set. Topics are extracted according to the word pairs through the BTM topic model, and the number of topics is continuously adjusted by using the KL distance as the evaluation index of topic similarity. When the average similarity between the topics extracted by the BTM topic model is the smallest, the trained BTM topic model is obtained.
[0145] After extracting the topics of the document set through the trained BTM topic model, the hot topics are determined through the following steps:
[0146] Set the topic importance index TI j (t i ), represents the i-th topic t i In the jth document d j The importance of this indicator is determined by the following two factors:
[0147] Theme i In the document d j The number of times it appears in topic t i The ratio of the number of occurrences in all documents M is I j (t i ) and the subject t i In the document d j The number of occurrences in document d j The ratio of the number of times all other topics k appear in j (t i ), I j (t i ) and T j (t i ) is calculated as follows:
[0148]
[0149] Therefore, the topic importance index T j (t i ) is calculated as follows:
[0150] TI j (t i )=I j (t i )·T j (t i )
[0151] Theme i The higher the value of the topic importance, the more important the topic t i The larger the amount of information contained, the more representative it is, that is, the hot topic. Then the topic t is calculated by the following formula: i Importance in the entire documentation set:
[0152]
[0153] Where: TI(t i ) represents the subject t i The importance of the document in the entire set.
[0154] 5. The method for dynamic monitoring of brand influence based on big data drive according to claim 1 is characterized in that the hot topic tracking model tracks hot topics through the following steps:
[0155] Divide the media articles in various types of online media webpage data into different time windows in chronological order, and identify hot topics in each time window;
[0156] The topic strength of each hot topic in any time window is calculated by averaging the distribution probabilities of hot topics on each media article in the time window. The topic strength δ of hot topic z is z The calculation formula is as follows:
[0157]
[0158] Where: D i represents the number of media articles contained in time window i; d j represents the jth media article in time window i; Indicates media articles j The probability of belonging to hot topic z;
[0159] The Jaccard coefficient is used to calculate the proportion of the same feature words between two hot topics, and then the word co-occurrence algorithm is used to calculate the probability that the feature words of two hot topics appear in the same media article at the same time. The JW algorithm is constructed by combining the two to calculate whether the two hot topics are related, and then the related hot topic content is tracked simultaneously.
[0160] As a preferred implementation of this embodiment, the step of calculating the ratio of the same characteristic words between two hot topics by using the Jaccard coefficient is:
[0161] Suppose the feature word vector set of hot topic z1 is Feature word vector set of hot topic z2 Among them, n is the total number of feature words, and the proportion of the same feature words between two hot topics is calculated by the following formula:
[0162]
[0163] The formula for calculating the probability of two hot topic feature words appearing in the same media article at the same time through the word co-occurrence algorithm is as follows:
[0164]
[0165] Where: f is the total number of time windows; w is the total number of articles in the corresponding time window; ‖Segment‖ represents the number of articles in two adjacent time windows where hot topics z1 and z2 are located; Indicates that the feature words are included in two adjacent time windows at the same time Media articles;
[0166] Combining the above formula, the calculation formula of the JW algorithm is as follows:
[0167] JW(z1,z2)=γJaccard(z1,z2)+(1-γ)Wordco-occurrence(z1,z2)
[0168] Among them: γ represents weight;
[0169] A threshold is set. When the value of two hot topics calculated by the JW algorithm is greater than the threshold, it is determined that the two hot topics are related.
[0170] As a preferred implementation of this embodiment, see Figure 5 The brand influence trend prediction model is based on a Stacking ensemble learning model, which consists of two layers of prediction models. The first layer of prediction models consists of several types of sub-prediction models, and the second layer of prediction models consists of an extreme gradient boosting model.
[0171] The first-layer prediction model construction steps are:
[0172] In order to obtain the best prediction effect, a model with a large degree of difference needs to be selected as the base learner in the first layer of the Stacking model. This is because different algorithm models essentially observe data from different data space angles and data structure angles, and then establish corresponding models based on the observation conditions of the algorithm and its own algorithm principles. Therefore, selecting an algorithm with a large degree of difference can maximize the advantages of different algorithms, allowing each differentiated model to complement each other.
[0173] Pre-select several different types of initial prediction models and train the models using pre-built training sets;
[0174] After the training is completed, the error difference r of each initial prediction model is calculated by the Pearson correlation coefficient. xy The calculation is as shown below:
[0175]
[0176] in: represents the average value of samples in the training set; x i represents the i-th sample in the training set; m represents the total number of samples in the training set or test set; y i represents the i-th sample in the test set; Represents the average value of samples in the test set;
[0177] A preset error difference threshold is set, and an initial prediction model with an error difference greater than the threshold is used as a sub-prediction model of the first-layer prediction model;
[0178] Specifically, in this embodiment, the first-layer prediction model selected XGBoost algorithm model, LSTM model, random forest (RF), gradient boosted decision tree (GBDT), support vector machine (SVM), and KNN model;
[0179] The construction of the XGBoost (Extreme Gradient Boosting Tree) model mainly uses the XGBClassifier function in the XGBoost library for modeling. After the XGBoost model is established, the model needs to be adjusted to adjust some parameters to make the model more effective. In order to speed up the convergence speed, a higher learning rate (learning_rate) is first selected, and the GridSearchCV function in sklearn is introduced to perform grid search and determine the number of trees. Then, given the learning rate and the number of trees, the decision tree is tuned, followed by regularization tuning, and finally the learning rate is reduced to determine the final parameters.
[0180] That is, the number of decision trees in the model parameter tuning is 260, the learning rate is 0.01, the regularization coefficient gamma is 1, the sampling rate of training data is 0.7, the maximum depth of the tree is 6, the regularization parameter is 100, the weight of the smallest tree model leaf is 2, and the feature sampling rate of the sample data is 0.7;
[0181] The Long Short-Term Memory Network (LSTM) is an improvement on the Recurrent Neural Network (RNN), but it is slightly different from the general RNN in structure. Its neurons add a "gate" structure mechanism (three types of gates: input, forget, and output) based on the RNN unit. These "gates" can capture long-term and short-term memories along the time step, solving the key problem that standard RNN cannot handle long-term dependent information - the gradient vanishing and gradient exploding problems;
[0182] The random forest and gradient boosting decision tree adopt the integrated learning methods of Bagging and Boosting respectively, which have excellent learning ability and rigorous mathematical theory support and have been widely used in various fields;
[0183] The support vector machine has unique advantages in solving small sample, nonlinear and high-dimensional regression problems. KNN also has good practical application effects due to its mature theory and efficient training.
[0184] As a preferred implementation of this embodiment, the training steps of the brand influence trend prediction model are:
[0185] The sentiment classification of brand-related public opinion information and related hot topics are constructed as a training set, and then the training set is divided into sub-training sets equal to the number of prediction models;
[0186] It is worth noting that the training set of the meta-learner is generated by the output of the base learner. If the training set of the base learner is directly used to generate the secondary training set, serious overfitting may occur. In order to prevent the data from being repeatedly learned by the two-layer learner and avoid the occurrence of the "overfitting" effect, it is necessary to reasonably divide the data usage process. According to the selected 6 base learners, the original training data set needs to be divided into 6 sub-data sets according to the time dimension, and ensure that each block of data ID does not overlap. For a single base learner, use 1 data block as the validation set and the corresponding 5 data blocks as the training set. Each base learner can output a prediction result for its own test data set, and these 6 results can eventually be merged into a new data set. The newly generated data set has the same size as the original data set. In this way, the feature transformation of all data from input features to output features is realized, and because the data blocks predicted by each base learner do not participate in the training of the learner, this configuration makes all data only used once during model training, effectively preventing the occurrence of overfitting.
[0187] For any sub-prediction model in the first-layer prediction model, randomly select any sub-training set as the test set, and input the remaining training sets into the prediction model for training, then evaluate the sub-prediction model with the corresponding test set and adjust the parameters of the sub-prediction model according to the evaluation results to complete the training, and perform predictions with the trained sub-prediction model to obtain the prediction results of each sub-prediction model;
[0188] A new training set is constructed through the prediction results of all sub-prediction models, and then the new training set is input into the second-layer prediction model for training to obtain a trained brand influence trend prediction model.
[0189] Embodiment 2:
[0190] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in any embodiment of the present invention when executing the program.
[0191] Embodiment three:
[0192] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented.
[0193] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. A and B may be singular or plural. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c may be single or multiple.
[0194] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0195] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0196] In several embodiments provided in the present application, if any function 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 storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk, and other media that can store program codes.
[0197] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.< / unk> < / pad> < / unk> < / pad>
Claims
1. A brand influence dynamic monitoring method based on big data, characterized in that: The following steps are involved: Collect web page data from various online media and forums through web crawlers and pre-process the web page data; Construct a media public opinion sentiment classification model, and use it to classify the public opinion information in the pre-processed web page data of various network media; Construct a hot topic mining model, and use it to mine hot topics from pre-processed web page data of various forums. At the same time, construct a hot topic tracking model, and use it to track hot topics. Construct a brand influence trend prediction model, which predicts the brand influence trend through sentiment classification of brand-related public opinion information and related hot topics.
2. According to the big data driven brand influence dynamic monitoring method of claim 1, it is characterized in that: The specific steps of preprocessing the web page data are as follows: Filter the web page tags in the web page data to obtain text data, remove punctuation and spaces in the text data, and then use the Jieba word segmentation algorithm to split the sentences in the text data into word items. Then, based on the preset stop word list, filter out words that do not express specific meanings, and finally convert all text data into word vector form.
3. According to the big data driven brand influence dynamic monitoring method of claim 1, it is characterized in that: The media public opinion sentiment classification model is built based on the TextCNN-GRU model, and the specific steps of sentiment classification are as follows: Construct training sets and test sets based on preprocessed media web page data; The training set is input into the media public opinion sentiment classification model to train the model, and then the performance of the media public opinion sentiment classification model is evaluated through the test set. If the performance evaluation result of the media public opinion sentiment classification model is less than the preset performance threshold, the parameters of the media public opinion sentiment classification model are adjusted and the performance is evaluated again after retraining through the training set. The operation is repeated until the performance of the media public opinion sentiment classification model is greater than the preset performance threshold, and then the training is stopped to obtain the trained media public opinion sentiment classification model; The trained media public opinion sentiment classification model is used to perform sentiment classification on the public opinion information in various media web page data.
4. According to the big data driven brand influence dynamic monitoring method of claim 1, it is characterized in that: The hot topic mining model mines hot topics through the following steps: Each post in the preprocessed forum webpage data is stored in a document to form a document set, and all the terms in the document set are combined two by two to generate all possible word pairs; The word pairs are modeled by the BTM algorithm to obtain the BTM topic model, and the initial number of topics of the BTM topic model is set. Topics are extracted according to the word pairs through the BTM topic model, and the number of topics is continuously adjusted by using the KL distance as the evaluation index of topic similarity. When the average similarity between the topics extracted by the BTM topic model is the smallest, the trained BTM topic model is obtained. After extracting the topics of the document set through the trained BTM topic model, the hot topics are determined through the following steps: Set the topic importance index TI j (t i ), represents the i-th topic t i In the jth document d j The importance of this indicator is determined by the following two factors: Theme t i In the document d j The number of times it appears in topic t i The ratio of the number of occurrences in all documents M is I j (t i ) and the subject t i In the document d j The number of occurrences in document d j The ratio of the number of times all other topics k appear in j (t i ), I j (t i ) and T j (t i ) is calculated as follows: Therefore, the topic importance index T j (t i ) is calculated as follows: TI j (t i )=I j (t i )·T j (t i ) Theme i The higher the value of the topic importance, the more important the topic t i The larger the amount of information contained, the more representative it is, that is, the hot topic. Then the topic t is calculated by the following formula: i Importance in the entire documentation set: Where: TI(t i ) represents the subject t i The importance of the document in the entire set.
5. According to the big data driven brand influence dynamic monitoring method of claim 1, it is characterized in that: The hot topic tracking model tracks hot topics through the following steps: Divide the media articles in various types of online media webpage data into different time windows in chronological order, and identify hot topics in each time window; The topic strength of each hot topic in any time window is calculated by averaging the distribution probabilities of hot topics on each media article in the time window. The topic strength δ of hot topic z is z The calculation formula is as follows: Where: D i represents the number of media articles contained in time window i; d j represents the jth media article in time window i; Indicates media articles j The probability of belonging to hot topic z; The Jaccard coefficient is used to calculate the proportion of the same feature words between two hot topics, and then the word co-occurrence algorithm is used to calculate the probability that the feature words of two hot topics appear in the same media article at the same time. The JW algorithm is constructed by combining the two to calculate whether the two hot topics are related, and then the related hot topic content is tracked simultaneously.
6. According to claim 5, a method for dynamic monitoring of brand influence based on big data drive is characterized in that: The step of calculating the ratio of the same characteristic words between two hot topics by using the Jaccard coefficient is as follows: Suppose the feature word vector set of hot topic z1 is Feature word vector set of hot topic z2 Among them, n is the total number of feature words, and the proportion of the same feature words between two hot topics is calculated by the following formula: The formula for calculating the probability of two hot topic feature words appearing in the same media article at the same time through the word co-occurrence algorithm is as follows: Where: f is the total number of time windows; w is the total number of articles in the corresponding time window; ‖Segment‖ represents the number of articles in two adjacent time windows where hot topics z1 and z2 are located; Indicates that the feature words are included in two adjacent time windows at the same time Media articles; Combining the above formula, the calculation formula of the JW algorithm is as follows: JW(z1,z2)=γJaccard(z1,z2)+(1-γ)Word co-occurrence(z1,z2) Among them: γ represents weight; A threshold is set. When the value of two hot topics calculated by the JW algorithm is greater than the threshold, it is determined that the two hot topics are related.
7. The method for dynamic monitoring of brand influence based on big data drive according to claim 1 is characterized in that: The brand influence trend prediction model is based on the Stacking ensemble learning model, which consists of two layers of prediction models. The first layer of prediction model consists of several types of sub-prediction models, and the second layer of prediction model consists of an extreme gradient boosting model. The first-layer prediction model construction steps are: Pre-select several different types of initial prediction models and train the models using pre-built training sets; After the training is completed, the error difference r of each initial prediction model is calculated by the Pearson correlation coefficient. xy The calculation is as shown below: in: represents the average value of samples in the training set; x i represents the i-th sample in the training set; m represents the total number of samples in the training set or test set; y i represents the i-th sample in the test set; Represents the average value of samples in the test set; A preset error difference threshold is used, and the initial prediction model with an error difference greater than the threshold is used as a sub-prediction model of the first-layer prediction model.
8. The method for dynamic monitoring of brand influence based on big data drive according to claim 7 is characterized in that: The training steps of the brand influence trend prediction model are: The sentiment classification of brand-related public opinion information and related hot topics are constructed as a training set, and then the training set is divided into sub-training sets equal to the number of prediction models; For any sub-prediction model in the first-layer prediction model, randomly select any sub-training set as the test set, and input the remaining training sets into the prediction model for training, then evaluate the sub-prediction model with the corresponding test set and adjust the parameters of the sub-prediction model according to the evaluation results to complete the training, and perform predictions with the trained sub-prediction model to obtain the prediction results of each sub-prediction model; A new training set is constructed through the prediction results of all sub-prediction models, and then the new training set is input into the second-layer prediction model for training to obtain a trained brand influence trend prediction model.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Topic detection or tracking method for network text big data
CN104462253A
Advertisement pushing method, device and system based on text classification
CN112818112A
Key player detection method in social media using KeyplayerRank
KR102126911B1
method and system for passion identification of a user
US20200175107A1
Method for detecting deceptive e-commerce reviews based on sentiment-topic joint probability
US20210027016A1
