Network public opinion monitoring method and system based on big data platform

By using the Bayes classifier and crawler technology on big data platforms for network public opinion monitoring, the problem of low training efficiency and complexity of deep learning neural network models has been solved, and highly efficient and explained public opinion monitoring and predictions have been achieved.

CN119336972APending Publication Date: 2025-01-21SICHUAN CHANGHONG JIAHUA INFORMATION PROD CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411463397.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, deep learning neural network models have problems such as low training efficiency, long training cycle, and model complexity and opacity that are not conducive to debugging and improvement in network public opinion security monitoring.

Method used

Adopt a network public opinion monitoring method based on big data platforms, collect historical public opinion data through crawlers technology, build a thesaurus and prepare pre -processing, use the Bayes classifier to calculate the post -test probability of public opinion data to achieve real -time public opinion monitoring and prediction.

Benefits of technology

It improves the training efficiency of the model, shortens the training cycle, enhances the interpretability of the model, facilitates debugging and improvement, and at the same time improves the prediction accuracy and has strong robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336972A_ABST
    Figure CN119336972A_ABST
Patent Text Reader

Abstract

The invention discloses a network public opinion monitoring method and system based on a big data platform. The method comprises the steps of collecting a large amount of historical public opinion data; preprocessing and word segmentation are carried out on the historical public opinion data, and a set of all different words appearing in all the historical public opinion data is obtained and recorded as a word bank; obtaining a bag-of-word representation of each piece of historical public opinion data by using a word library, and marking a tag vector of each piece of public opinion data; calculating parameters pi < c > and theta < jc > of a Beyer classifier by using the bag-of-word representation of the corresponding public opinion data in the training set and the corresponding label vector; the method comprises the steps of obtaining real-time public opinion data of a target object, carrying out word segmentation on the real-time public opinion data, calculating the posterior probability that each word is positive information and negative information, calculating and comparing the posterior probability of the positive information and the posterior probability of the negative information of the real-time public opinion data, and outputting the data with the large numerical value as a prediction result of the real-time public opinion data. According to the invention, the model training period is short, and maintenance is easy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network public opinion security monitoring, and in particular to a network public opinion monitoring method and system. Background Art

[0002] In the current economic environment, as an important manifestation of market vitality, the development of small and medium-sized enterprises is directly related to the healthy development of the economy and social stability. Public opinion analysis plays a vital role in helping small and medium-sized enterprises improve their sensitivity to market dynamics and assess customer repayment risks. By collecting, classifying and analyzing the sentiment tendency of massive information on the Internet, it helps companies monitor and evaluate the credit status of customers, and by analyzing customers' online behavior and speech, predict their repayment ability and risks, and provide support for credit decisions. Therefore, public opinion analysis is not only a tool for small and medium-sized enterprises to understand the market and customers, but also an effective means to enhance competitiveness and risk resistance.

[0003] Publication number CN118193815A discloses "A method for monitoring network public opinion security based on deep learning neural network algorithm", which mentions collecting public opinion data and building a deep learning neural network model, and predicting the real-time collected public opinion data through the constructed deep learning neural network model; this method of building a deep learning neural network model requires a large amount of high-quality training data and also requires continuous adjustment of weights through back propagation, which leads to low training efficiency and long training cycle; in addition, the complexity and opacity of the neural network model in the prediction process are not conducive to debugging and improvement. Summary of the invention

[0004] Based on this, in order to solve the above technical problems, a method and system for monitoring network public opinion based on a big data platform is provided to solve the problems of long development cycle of existing technical models and being unfavorable for debugging and improvement.

[0005] In a first aspect, a method for monitoring online public opinion based on a big data platform is provided, the method comprising:

[0006] Collect a large amount of historical public opinion data from news websites through crawler technology;

[0007] Preprocess each piece of historical public opinion data, segment the preprocessed public opinion data, and obtain a collection of all different words that appear in all historical public opinion data as a vocabulary;

[0008] Use the word library to obtain the bag-of-words representation of each piece of historical public opinion data, and mark the label vector of each piece of public opinion data, where the label vector is positive information or negative information; use part of the historical public opinion data as a training set and the other part of the public opinion data as a validation set;

[0009] The parameter π of the Bayes classifier is calculated using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jc is the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning;

[0010] Acquire the real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of the positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of the negative information of the real-time public opinion data, compare the posterior probability of the positive information and the posterior probability of the negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

[0011] In the above scheme, optionally, after obtaining the real-time public opinion data of the target object, the method further includes: obtaining profile information of the target object, and vectorizing the profile information into a unified dimension d through a text vectorization model a;

[0012] Vectorize the real-time public opinion data of the target object into dimension d through the text vectorization model a;

[0013] Calculate the cosine similarity between each real-time public opinion data and the profile information of the target object, filter out the real-time public opinion data with a cosine similarity less than a preset threshold, and remove irrelevant public opinions.

[0014] In the above scheme, further optionally, the profile information includes: brand information, product information, general agent information, policy information, economic information and technical information.

[0015] In the above scheme, optionally, the method of multiplying the probabilities of all words being positive information to obtain the posterior probability of the positive information of the real-time public opinion data, and multiplying the probabilities of all words being negative information to obtain the posterior probability of the negative information of the real-time public opinion data includes:

[0016] Obtain the logarithm of the probability of all words being positive information and multiply them to obtain the posterior probability of positive information in the real-time public opinion data;

[0017] The logarithm of the probability of all words being negative information is obtained and multiplied to obtain the posterior probability of negative information in the real-time public opinion data.

[0018] In the above scheme, optionally, after obtaining the bag-of-words representation of each piece of historical public opinion data using the word library, the method further includes:

[0019] The number of occurrences of each word in the vocabulary is obtained according to the bag-of-words representation of each piece of historical public opinion data, the frequency distribution of each word in the vocabulary is constructed, and the words in the vocabulary whose frequency is greater than a certain value are removed.

[0020] In the above scheme, optionally, the parameter π of the Bayesian classifier is calculated c and θ jc A Beta distribution with parameters a=2 and b=2 is used when

[0021] In the above scheme, optionally, the validation set is used to verify the π c and θ jc Tuning includes:

[0022] According to the c and θ jc Calculate the prediction results of the historical public opinion data in the validation set, compare the prediction results of the historical public opinion data with the corresponding label vector, and obtain the prediction accuracy. c and θ jc Perform tuning.

[0023] In a second aspect, a network public opinion monitoring system based on a big data platform is provided, the system comprising:

[0024] Historical public opinion data acquisition module: used to collect historical public opinion data from news websites through crawler technology;

[0025] Thesaurus construction module: used to pre-process each piece of historical public opinion data, segment the pre-processed public opinion data, obtain the set of all different words appearing in all historical public opinion data and record them as a thesaurus;

[0026] Public opinion data processing module: used to obtain the bag-of-words representation of each piece of historical public opinion data using the vocabulary, and mark the label vector of each piece of public opinion data, wherein the label vector is positive information or negative information; a part of the historical public opinion data is used as a training set, and another part of the public opinion data is used as a verification set;

[0027] Bayesian classifier parameter calculation module: used to calculate the parameter π of the Bayesian classifier using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jcis the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning;

[0028] Prediction result output module: used to obtain real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of negative information of the real-time public opinion data, compare the posterior probability of positive information and the posterior probability of negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

[0029] In a third aspect, a computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method for monitoring network public opinion based on a big data platform described in the first aspect are implemented.

[0030] In a fourth aspect, a computer program product includes a computer program / instruction, which, when executed by a processor, implements the steps of the method for monitoring network public opinion based on a big data platform as described in the first aspect.

[0031] This application has at least the following beneficial effects:

[0032] This application collects a large amount of historical public opinion and builds a vocabulary based on the historical public opinion, thereby obtaining the bag-of-words representation of each piece of historical public opinion data, and annotating the label vector of whether it is positive information or negative information; the parameter prior probability π of the Bayes classifier is calculated based on the bag-of-words representation of the public opinion data and the corresponding label vector c and conditional probability θ jc, in order to calculate the posterior probabilities of the positive information and negative information of the public opinion data collected in real time and compare them, and the larger value is the prediction result of the real-time public opinion data. Therefore, the Bayesian algorithm implemented based on probability distribution can more intuitively understand the uncertainty of the model, provide a higher interpretability for the algorithm, and facilitate debugging and improvement. At the same time, the training efficiency of the Yes algorithm model within 10,000 training data is about 80% higher than that of the model based on neural network implementation. Since the weights do not need to be adjusted by back propagation during the training process, the prior probability of each category and the probability calculation of each feature under a given category can be realized through a single traversal, so that the training rate is greatly reduced, the model training cycle is short, and the development cycle of the prior art model can also be shortened by about 40%. Moreover, the prediction accuracy of this application is also higher than that of the neural network algorithm. It also has strong robustness to noise data. When processing incomplete data or noisy data, the Bayesian algorithm can still give reasonable prediction results. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1 A flowchart of a method for monitoring network public opinion based on a big data platform is provided for one embodiment of the present application;

[0034] Figure 2 A detailed flowchart of a method for monitoring network public opinion based on a big data platform is provided for one embodiment of the present application. DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0036] In one embodiment, Figure 1 As shown, a method for monitoring network public opinion based on a big data platform is provided, characterized in that the method includes:

[0037] Step S1: Collect a large amount of historical public opinion data from news websites through crawler technology;

[0038] Step S2: preprocess each piece of historical public opinion data, segment the preprocessed public opinion data, and obtain a collection of all different words appearing in all historical public opinion data as a word library;

[0039] Step S3: Using the word library to obtain the bag-of-words representation of each piece of historical public opinion data, and marking the label vector of each piece of public opinion data, wherein the label vector is positive information or negative information; using a part of the historical public opinion data as a training set, and another part of the public opinion data as a verification set;

[0040] Step S4: Calculate the parameter π of the Bayes classifier using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jc is the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning;

[0041] Step S5: Obtain the real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of negative information of the real-time public opinion data, compare the posterior probability of positive information and the posterior probability of negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

[0042] In this embodiment, for each piece of public opinion, all irrelevant characters in the title are removed and the title is segmented; a vocabulary is constructed and a bag-of-words representation of each piece of data and a label vector are generated, and the time complexity is O(len(data)*len(vocab));

[0043] The Bayesian classifier is constructed based on the following conditional independence assumptions:

[0044] p(c,x1,…,x D )=p(c)p(x1|c)…p(x D |c)

[0045] Where c is the label (positive or negative), each x j ∈0, 1 represents whether word j appears in the news title. By fitting the parameter π c and θ jc To implement prediction:

[0046] p(c=1)=π1, probability of positive information;

[0047] p(x j =1|c)=θ jc , the probability that word j appears in information category c;

[0048] The maximum a posteriori estimate (MAP) of the parameters is calculated by using the generated bag-of-words feature matrix and label vector. Then π is calculated c and θ jcThe estimated value of the posterior Maximize, where θ = π c ,θ jc All parameters are included. Then a Beta distribution with parameters a=2 and b=2 is used for all parameters.

[0049] Using the estimated parameters π c and θ jc Make predictions for the data set. Because calculating the product of many decimals will cause underflow. So avoid calculating the product of decimals by the following method:

[0050]

[0051] After model evaluation, the prediction accuracy can reach 80%.

[0052] At the same time, when outputting public opinion, public opinion analysis is performed on the big data platform, customer portraits are updated daily, and data permission control and customized report push are performed for each relevant person. For example, sales staff can only receive emails about their own customer public opinion analysis, and management can push all receivable customer public opinion of the day, as well as the corresponding public opinion analysis explanation and corresponding sales staff, etc.

[0053] In the above-mentioned network public opinion monitoring method based on a big data platform, a large amount of historical public opinion is collected, and a vocabulary is constructed according to the historical public opinion, so as to obtain the bag-of-words representation of each piece of historical public opinion data, and annotate the label vector of positive information or negative information; the parameter prior probability π of the Bayes classifier is calculated according to the bag-of-words representation of the public opinion data and the corresponding label vector c and conditional probability θ jc , in order to calculate the posterior probabilities of the positive information and negative information of the public opinion data collected in real time and compare them, and the larger value is the prediction result of the real-time public opinion data. Therefore, the Bayesian algorithm implemented based on probability distribution can more intuitively understand the uncertainty of the model, provide a higher interpretability for the algorithm, and facilitate debugging and improvement. At the same time, the training efficiency of the Yes algorithm model within 10,000 training data is about 80% higher than that of the model based on neural network implementation. Since the weights do not need to be adjusted by back propagation during the training process, the prior probability of each category and the probability calculation of each feature under a given category can be realized through a single traversal, so that the training rate is greatly reduced, the model training cycle is short, and the development cycle of the prior art model can also be shortened by about 40%. Moreover, the prediction accuracy of this application is also higher than that of the neural network algorithm. It also has strong robustness to noise data. When processing incomplete data or noisy data, the Bayesian algorithm can still give reasonable prediction results.

[0054] In one embodiment, after obtaining the real-time public opinion data of the target object, the method further includes: obtaining profile information of the target object, and vectorizing the profile information into a unified dimension d through a text vectorization model a;

[0055] Vectorize the real-time public opinion data of the target object into dimension d through the text vectorization model a;

[0056] Calculate the cosine similarity between each real-time public opinion data and the profile information of the target object, filter out the real-time public opinion data with a cosine similarity less than a preset threshold, and remove irrelevant public opinions.

[0057] In this embodiment, the cosine similarity of the related vectors is calculated by the following formula:

[0058]

[0059] After testing, this method can effectively screen out 90% of irrelevant public opinion.

[0060] In one embodiment, the profile information includes: brand information, product information, general agent information, policy information, economic information and technical information.

[0061] In one embodiment, the method of multiplying the probabilities of all words being positive information to obtain the posterior probability of the positive information of the real-time public opinion data, and multiplying the probabilities of all words being negative information to obtain the posterior probability of the negative information of the real-time public opinion data includes:

[0062] Obtain the logarithm of the probability of all words being positive information and multiply them to obtain the posterior probability of positive information in the real-time public opinion data;

[0063] The logarithm of the probability of all words being negative information is obtained and multiplied to obtain the posterior probability of negative information in the real-time public opinion data.

[0064] In one embodiment, after using the word library to obtain the bag-of-words representation of each piece of historical public opinion data, the method further includes:

[0065] The number of occurrences of each word in the vocabulary is obtained according to the bag-of-words representation of each piece of historical public opinion data, the frequency distribution of each word in the vocabulary is constructed, and the words in the vocabulary whose frequency is greater than a certain value are removed.

[0066] In one embodiment, the calculation of the parameter π of the Bayesian classifier c and θ jc A Beta distribution with parameters a=2 and b=2 is used when

[0067] In one embodiment, the validation set is used to test the π c and θ jc The tuning includes: according to the πc and θ jc Calculate the prediction results of the historical public opinion data in the validation set, compare the prediction results of the historical public opinion data with the corresponding label vector, and obtain the prediction accuracy. c and θ jc Perform tuning.

[0068] like Figure 2 As shown, this application is based on mainstream crawler technology to collect the latest public opinion information on the company's daily receivables, upstream manufacturers, and industry keywords on multiple mainstream news websites on a daily basis; through the vector library and text vectorization technology, the correlation matching algorithm between customer names and information is realized to filter out irrelevant public opinion information. Fully automatic labeling model: collect business focus points for focus labeling and generate training sets, build a bag of words model based on the open source word segmentation algorithm, and convert public opinion data into labeled supervised learning data and train the Bayes classifier through the maximum a posteriori probability to realize positive and negative intelligent classification of all public opinion information; perform public opinion analysis on the big data platform, update customer portraits on a daily basis, and control data permissions and push customized reports for each relevant person. The present invention uses artificial intelligence technology combined with a big data platform to realize the intelligence and automation of data processes. This invention effectively reduces the cost of public opinion monitoring for small and medium-sized enterprises by about 60%, while realizing process automation, which increases processing efficiency to three times the original.

[0069] In one embodiment, a network public opinion monitoring system based on a big data platform is provided, the system comprising:

[0070] Historical public opinion data acquisition module: used to collect historical public opinion data from news websites through crawler technology;

[0071] Thesaurus construction module: used to pre-process each piece of historical public opinion data, segment the pre-processed public opinion data, obtain the set of all different words appearing in all historical public opinion data and record them as a thesaurus;

[0072] Public opinion data processing module: used to obtain the bag-of-words representation of each piece of historical public opinion data using the vocabulary, and mark the label vector of each piece of public opinion data, wherein the label vector is positive information or negative information; a part of the historical public opinion data is used as a training set, and another part of the public opinion data is used as a verification set;

[0073] Bayesian classifier parameter calculation module: used to calculate the parameter π of the Bayesian classifier using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jcis the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning;

[0074] Prediction result output module: used to obtain real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of negative information of the real-time public opinion data, compare the posterior probability of positive information and the posterior probability of negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

[0075] For the specific definition of a method system for monitoring network public opinion based on a big data platform, please refer to the definition of a method for monitoring network public opinion based on a big data platform mentioned above, which will not be repeated here. Each module in the above-mentioned network public opinion monitoring system based on a big data platform can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0076] In one embodiment, a computer device is provided, which may be a server, and includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above-mentioned method of monitoring network public opinion based on a big data platform is implemented.

[0077] In one embodiment, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, involves all or part of the process in the above-mentioned embodiment method.

[0078] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0079] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0080] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for monitoring network public opinion based on a big data platform, characterized in that: The method comprises: Collect a large amount of historical public opinion data from news websites through crawler technology; Preprocess each piece of historical public opinion data, segment the preprocessed public opinion data, and obtain a collection of all different words that appear in all historical public opinion data as a vocabulary; Use the word library to obtain the bag-of-words representation of each piece of historical public opinion data, and mark the label vector of each piece of public opinion data, where the label vector is positive information or negative information; use part of the historical public opinion data as a training set and the other part of the public opinion data as a validation set; The parameter π of the Bayes classifier is calculated using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jc is the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning; Acquire the real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of the positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of the negative information of the real-time public opinion data, compare the posterior probability of the positive information and the posterior probability of the negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

2. The method for monitoring network public opinion based on a big data platform according to claim 1 is characterized in that: After obtaining the real-time public opinion data of the target object, the method further includes: obtaining profile information of the target object, and vectorizing the profile information into a unified dimension d through a text vectorization model a; Vectorize the real-time public opinion data of the target object into dimension d through the text vectorization model a; Calculate the cosine similarity between each real-time public opinion data and the profile information of the target object, filter out the real-time public opinion data with a cosine similarity less than a preset threshold, and remove irrelevant public opinions.

3. The method for monitoring network public opinion based on a big data platform according to claim 2 is characterized in that: The profile information includes: brand information, product information, general agent information, policy information, economic information and technical information.

4. The method for monitoring network public opinion based on a big data platform according to claim 1 is characterized in that: The method of multiplying the probabilities of all words being positive information to obtain the posterior probability of the positive information of the real-time public opinion data and multiplying the probabilities of all words being negative information to obtain the posterior probability of the negative information of the real-time public opinion data includes: Obtain the logarithm of the probability of all words being positive information and multiply them to obtain the posterior probability of positive information in the real-time public opinion data; The logarithm of the probability of all words being negative information is obtained and multiplied to obtain the posterior probability of negative information in the real-time public opinion data.

5. The method for monitoring network public opinion based on a big data platform according to claim 1 is characterized in that: After obtaining the bag-of-words representation of each piece of historical public opinion data using the word library, the method further includes: The number of occurrences of each word in the vocabulary is obtained according to the bag-of-words representation of each piece of historical public opinion data, the frequency distribution of each word in the vocabulary is constructed, and the words in the vocabulary whose frequency is greater than a certain value are removed.

6. The method for monitoring network public opinion based on a big data platform according to claim 1 is characterized in that: The calculation of the parameter π of the Bayes classifier c and θ jc A Beta distribution with parameters a=2 and b=2 is used when 7. The method for monitoring network public opinion based on a big data platform according to claim 1 is characterized in that: Use the validation set to test the c and θ jc Tuning includes: According to the c and θ jc Calculate the prediction results of the historical public opinion data in the validation set, compare the prediction results of the historical public opinion data with the corresponding label vector, and obtain the prediction accuracy. c and θ jc Perform tuning.

8. A network public opinion monitoring system based on a big data platform, characterized in that: The system comprises: Historical public opinion data acquisition module: used to collect historical public opinion data from news websites through crawler technology; Thesaurus construction module: used to pre-process each piece of historical public opinion data, segment the pre-processed public opinion data, obtain the set of all different words appearing in all historical public opinion data and record them as a thesaurus; Public opinion data processing module: used to obtain the bag-of-words representation of each piece of historical public opinion data using the vocabulary, and mark the label vector of each piece of public opinion data, wherein the label vector is positive information or negative information; a part of the historical public opinion data is used as a training set, and another part of the public opinion data is used as a verification set; Bayesian classifier parameter calculation module: used to calculate the parameter π of the Bayesian classifier using the bag-of-words representation of the corresponding public opinion data in the training set and the corresponding label vector c and θ jc , the π c is the prior probability of positive information or negative information, the θ jc is the conditional probability that word j in the vocabulary appears in positive information or negative information, where c is positive information or negative information; and the validation set is used to test the π c and θ jc Perform tuning; Prediction result output module: used to obtain real-time public opinion data of the target object, segment the real-time public opinion data, calculate the posterior probability of each word being positive information and negative information, multiply the probabilities of all words being positive information to obtain the posterior probability of positive information of the real-time public opinion data, multiply the probabilities of all words being negative information to obtain the posterior probability of negative information of the real-time public opinion data, compare the posterior probability of positive information and the posterior probability of negative information of the real-time public opinion data, and output the larger value as the prediction result of the real-time public opinion data.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Network public opinion security monitoring method based on deep learning neural network algorithm

    CN118193815A