Public opinion risk identification method and device, computer equipment and storage medium
By collecting, preprocessing and clustering analysis of public opinion text data, combining pre-training models and risk identification strategies, the problem of low timeliness and accuracy of public opinion risk assessment in the existing technology is solved, and real-time and accurate identification of corporate public opinion risks is achieved.
Patent Information
- Application Number
- CN202411893567.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
AI Technical Summary
The existing corporate public opinion risk assessment methods have problems with low timeliness and accuracy, especially when facing sudden or unprecedented public opinion events, it is difficult to capture new public opinion dynamics in real time and accurately evaluate their specific risks to the company.
By collecting public opinion text data from target companies from preset data channels, pre-processing of text to obtain public opinion text with negative emotional polarity, converting text into vectors based on the pre-training model, clustering initialization processing is performed to identify candidate public opinion risk events, and risk identification strategies are determined for risk identification through the comparison of the data accumulation time period and the training cycle threshold.
Real-time accuracy of the target enterprise's public opinion risk identification is achieved, the efficiency and accuracy of public opinion risk identification is improved, and the accuracy of risk identification results is ensured.
Smart Images

Figure CN119809342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence development technology and financial technology, and in particular to methods, devices, computer equipment and storage media for identifying public opinion risks. Background Art
[0002] In today's complex and ever-changing business environment, enterprise risk assessment is an important basis for ensuring the sound operation and investment decision-making of enterprises. The optimization and upgrading of its model and methods are particularly important. The current mainstream enterprise risk assessment framework focuses on the in-depth mining and analysis of numerical data, which include but are not limited to the basic nature of the enterprise (such as ownership type, industry affiliation), business scale, detailed financial statement information, and historical stock price trends. Such data is widely used to predict the financial risk and stock price volatility risk of enterprises because of its high degree of structure and easy quantitative analysis, providing key risk reference information for investors, creditors and management.
[0003] At present, with the rapid development of information dissemination technology, especially the popularization of the Internet and social media, corporate reputation and public opinion risk are increasingly becoming one of the key factors affecting corporate value and market performance. Corporate reputation is not only related to brand image and consumer trust, but also directly affects the company's market competitiveness and long-term development potential. Public opinion risk refers to uncertain events caused by online public opinion that may have a negative impact on the company. Its rapid spread and amplification effect make timely and effective risk assessment and management particularly urgent.
[0004] However, the current practice of assessing corporate reputation or public opinion risks is still at a relatively early stage. The mainstream method mainly relies on collecting and screening relevant data from the massive amount of information on the Internet, and then building a classification model to identify the positive and negative public opinions of the company. Although these traditional classification models show a certain degree of accuracy when processing data with known patterns, their operating logic is highly dependent on existing historical data and predefined labels. When faced with sudden and unprecedented public opinion events, these models often lack sufficient training samples and adaptive adjustment mechanisms, making it difficult to capture emerging public opinion dynamics in real time, and it is even more difficult to accurately assess the specific risks that these new public opinion events may cause to the company, thereby reducing the timeliness and accuracy of public opinion risk assessment. Summary of the invention
[0005] The purpose of the embodiments of the present application is to propose a public opinion risk identification method, device, computer equipment and storage medium to solve the technical problems of low timeliness and accuracy in existing corporate public opinion risk assessment methods.
[0006] In order to solve the above technical problems, the present application embodiment provides a method for identifying public opinion risks, which adopts the following technical solutions:
[0007] Collect the target company's public opinion text data from the preset data channels;
[0008] Performing text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity;
[0009] Convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model;
[0010] Performing clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events;
[0011] Obtaining the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window;
[0012] Obtaining a data accumulation time period corresponding to the public opinion risk event identification process, and generating a numerical comparison result between the data accumulation time period and a preset training cycle threshold;
[0013] Based on the risk identification strategy corresponding to the numerical comparison result, risk identification is performed on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event.
[0014] Furthermore, the step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain a risk identification result corresponding to the candidate public opinion risk event specifically includes:
[0015] If the numerical comparison result is that the data accumulation time period is less than the training period threshold, then obtaining the average number of public opinion texts corresponding to the candidate public opinion risk event within the historical time window;
[0016] Obtaining a numerical range corresponding to the mean value of the number of public opinion texts;
[0017] Determine a corresponding target risk identification rule based on the numerical interval, and generate a quantity threshold value corresponding to the quantity of the public opinion texts based on the target risk identification rule;
[0018] Determine whether the number of public opinion texts is greater than the number threshold;
[0019] If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0020] If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0021] Furthermore, the step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain a risk identification result corresponding to the candidate public opinion risk event specifically includes:
[0022] If the numerical comparison result is that the data accumulation time period is greater than or equal to the training period threshold, calling a pre-trained time series data fitting model;
[0023] Generate the predicted number of public opinion texts for the candidate public opinion risk event within the target time window based on the time series data fitting model;
[0024] Calculating the difference between the number of public opinion texts and the number of predicted public opinion texts;
[0025] Determine whether the difference is greater than a standard deviation value corresponding to a preset standard value rule;
[0026] If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0027] If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0028] Furthermore, the step of performing clustering initialization processing on the public opinion text vector to obtain the corresponding candidate public opinion risk event specifically includes:
[0029] Calculating the similarity of all the public opinion text vectors within a preset initial time window;
[0030] Filtering out a designated public opinion text vector whose similarity is greater than a preset similarity clustering threshold from all the public opinion text vectors;
[0031] Merging the specified public opinion text vectors to form a corresponding plurality of clusters;
[0032] Eliminate the first cluster whose number of cluster texts is less than a preset cluster text quantity threshold from all the clusters to obtain a second cluster after elimination processing;
[0033] The second cluster is used as the candidate public opinion risk event.
[0034] Furthermore, the step of performing text preprocessing on the public opinion text data to obtain a public opinion text with negative sentiment polarity specifically includes:
[0035] Performing data cleaning processing on the public opinion text data to obtain a corresponding first text;
[0036] Call the preset sentiment analysis tool;
[0037] Performing sentiment polarity analysis on the first text based on the sentiment analysis tool to obtain a corresponding sentiment polarity analysis result;
[0038] Based on the sentiment polarity analysis result, selecting a second text with negative sentiment polarity from the first text;
[0039] The second text is used as the public opinion text.
[0040] Furthermore, the step of collecting the public opinion text data of the target enterprise from the preset data channel specifically includes:
[0041] Call the preset data interface;
[0042] Get the preset keyword search strategy;
[0043] Based on the keyword search strategy, the public opinion text data of the target enterprise is collected from the data channel through the data interface.
[0044] Furthermore, after the step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain the risk identification result corresponding to the candidate public opinion risk event, the method further includes:
[0045] Determining whether the risk identification result indicates that the candidate public opinion risk event belongs to a public opinion risk event;
[0046] If yes, obtain detailed data and magnitude change trend chart of the candidate public opinion risk event;
[0047] Generate warning information corresponding to the candidate public opinion risk event based on the detailed data and the magnitude change trend graph;
[0048] Based on the target notification method, the alarm information is sent to relevant personnel.
[0049] In order to solve the above technical problems, the embodiment of the present application also provides a public opinion risk identification device, which adopts the following technical solution:
[0050] The collection module is used to collect the public opinion text data of the target enterprise from the preset data channels;
[0051] A preprocessing module, used to perform text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity;
[0052] A conversion module, used to convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model;
[0053] A clustering module is used to perform clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events;
[0054] A first acquisition module is used to acquire the number of public opinion texts corresponding to the candidate public opinion risk event within a target time window;
[0055] A first generating module is used to obtain a data accumulation time period corresponding to the public opinion risk event identification process, and generate a numerical comparison result between the data accumulation time period and a preset training cycle threshold;
[0056] An identification module is used to perform risk identification on the number of public opinion texts based on a risk identification strategy corresponding to the numerical comparison result, and obtain a risk identification result corresponding to the candidate public opinion risk event.
[0057] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:
[0058] Collect the target company's public opinion text data from the preset data channels;
[0059] Performing text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity;
[0060] Convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model;
[0061] Performing clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events;
[0062] Obtaining the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window;
[0063] Obtaining a data accumulation time period corresponding to the public opinion risk event identification process, and generating a numerical comparison result between the data accumulation time period and a preset training cycle threshold;
[0064] Based on the risk identification strategy corresponding to the numerical comparison result, risk identification is performed on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event.
[0065] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:
[0066] Collect the target company's public opinion text data from the preset data channels;
[0067] Performing text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity;
[0068] Convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model;
[0069] Performing clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events;
[0070] Obtaining the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window;
[0071] Obtaining a data accumulation time period corresponding to the public opinion risk event identification process, and generating a numerical comparison result between the data accumulation time period and a preset training cycle threshold;
[0072] Based on the risk identification strategy corresponding to the numerical comparison result, risk identification is performed on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event.
[0073] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0074] This application first collects the public opinion text data of the target enterprise from a preset data channel; and performs text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity; then converts the public opinion text into a corresponding public opinion text vector based on a pre-trained model; then performs clustering initialization processing on the public opinion text vector to obtain a corresponding candidate public opinion risk event; subsequently obtains the number of public opinion texts corresponding to the candidate public opinion risk event within a target time window; further obtains a data accumulation time period corresponding to the public opinion risk event identification processing, and generates a numerical comparison result between the data accumulation time period and a preset training cycle threshold; finally, based on a risk identification strategy corresponding to the numerical comparison result, performs risk identification on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event. The present application collects public opinion text data of the target enterprise from a preset data channel, and performs text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity, then converts the public opinion text into a corresponding public opinion text vector based on the use of a pre-trained model, and performs clustering initialization processing on the public opinion text vector to obtain candidate public opinion risk events, then obtains the number of public opinion texts corresponding to the candidate public opinion risk events within the target time window, and obtains the data accumulation time period corresponding to the public opinion risk event identification processing, and generates a numerical comparison result between the data accumulation time period and the preset training cycle threshold, and then performs risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result, and obtains the risk identification result corresponding to the candidate public opinion risk event, thereby realizing real-time and accurate public opinion risk identification of candidate public opinion risk events for the target enterprise, effectively improving the processing efficiency and accuracy of public opinion risk identification for the enterprise, and ensuring the accuracy of the obtained risk identification results. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0076] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0077] Figure 2 A flowchart of an embodiment of a method for identifying public opinion risks according to the present application;
[0078] Figure 3 It is a structural schematic diagram of an embodiment of a public opinion risk identification device according to the present application;
[0079] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0080] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0081] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0082] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0083] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0084] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0085] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to the laptop computer 1011, tablet computer 1012 or mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.
[0086] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .
[0087] It should be noted that the public opinion risk identification method provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the public opinion risk identification device is generally arranged in the server / terminal device.
[0088] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0089] Continue to refer Figure 2 , showing a flow chart of an embodiment of the method for identifying public opinion risks according to the present application. According to different requirements, the order of the steps in the flow chart can be changed, and some steps can be omitted. The public opinion risk identification method provided in the embodiment of the present application can be applied to any scenario where product recommendations are required, and the public opinion risk identification method can be applied to products in these scenarios, for example, product recommendations in the financial insurance field. The public opinion risk identification method comprises the following steps:
[0090] Step S201, collecting public opinion text data of the target enterprise from a preset data channel.
[0091] In this embodiment, the electronic device (eg Figure 1The server / terminal device shown in the figure) can obtain the public opinion text data of the target enterprise through a wired connection or a wireless connection. It should be pointed out that the above-mentioned wireless connection method may include but is not limited to 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future. The execution subject of this application may be a public opinion risk identification system, or simply referred to as a system. The system can be used for efficient processing and integration of heterogeneous data, and through the collection, preprocessing, clustering analysis and time series data anomaly detection of public opinion text data, to perform intelligent prediction and real-time analysis of corporate public opinion risks, thereby realizing intelligent early warning of corporate public opinion risks, which can be applied to scenarios such as corporate risk control management and investment analysis. Among them, in order to achieve multi-dimensional information coverage, the above-mentioned preset data collection channels may cover authoritative news websites, popular social media platforms, industry forums and blogs, etc. The above-mentioned collected public opinion text data may include news titles, WeChat article titles, Weibo blog titles and their corresponding comment data associated with the target enterprise.
[0092] Step S202, performing text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity.
[0093] In this embodiment, the above-mentioned specific implementation process of performing text preprocessing on the public opinion text data to obtain the public opinion text with negative sentiment polarity will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated in detail here.
[0094] Step S203: convert the public opinion text into a corresponding public opinion text vector based on the pre-trained model.
[0095] In this embodiment, the above-mentioned pre-trained model can adopt a pre-trained BERT model. Among them, the data stream corresponding to the public opinion text collected in real time can be vectorized, and the content and vector of the collected public opinion text can be stored in Elasticsearch using a streaming framework (such as Kafka+Flink or Spark Streaming), and the release time of each public opinion text is used as a time label. In addition, the generation of text vectors can adopt an open source pre-trained BERT model, and can also be based on the open source pre-trained model, using the collected historical public opinion text data for continued domain pre-training to improve the model to generate text vectors that are more in line with the characteristics of the domain. Continuous pre-training can be achieved using the Mask Language Model (MLM) method.
[0096] Step S204, performing clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events.
[0097] In this embodiment, the above-mentioned clustering initialization processing of the public opinion text vector is performed to obtain the specific implementation process of the corresponding candidate public opinion risk event. This application will provide further detailed descriptions of this in subsequent specific embodiments and will not be elaborated in detail here.
[0098] Step S205, obtaining the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window.
[0099] In this embodiment, the target time window is a preset current time window for public opinion risk identification. The number of public opinion texts matched by the candidate public opinion risk events can be monitored in real time within the target time window and analyzed to determine whether there is a risk. The target time window can be fixed, such as weekly, monthly or quarterly, or dynamic and adjusted according to actual needs.
[0100] Step S206, obtaining a data accumulation time period corresponding to the public opinion risk event identification process, and generating a numerical comparison result between the data accumulation time period and a preset training cycle threshold.
[0101] In this embodiment, the above-mentioned data accumulation time period refers to the time length covered by the amount of data currently available for analysis or prediction in the scenario of public opinion risk event identification, which has not yet reached the minimum time required to train an effective prediction model. The above-mentioned training cycle threshold is a preset threshold, which is determined based on experience or experiments to ensure that there is enough data to train the model so that it can accurately capture the law of changes in the number of public opinion texts over time. Specifically, if the system uses machine learning models such as LSTM for public opinion risk prediction, then these models usually require a certain amount of historical data to learn and train. The length of time covered by this certain amount of historical data is the training cycle threshold. If the length of time covered by the currently collected data is shorter than this threshold, the system may believe that the amount of data is insufficient to train a reliable prediction model.
[0102] Among them, the content of the numerical comparison result between the above-mentioned data accumulation time period and the preset training cycle threshold may include: the numerical comparison result is that the data accumulation time period is less than the training cycle threshold, or the numerical comparison result is that the data accumulation time period is greater than or equal to the training cycle threshold.
[0103] Step S207, performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result, and obtaining a risk identification result corresponding to the candidate public opinion risk event.
[0104] In this embodiment, different risk identification strategies, or time series data anomaly detection methods, are intelligently adopted to perform risk identification processing on the number of public opinion texts according to the data accumulation magnitude corresponding to the above numerical comparison results. Among them, the specific implementation process of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result and obtaining the risk identification result corresponding to the candidate public opinion risk event will be further described in detail in the subsequent specific embodiments of this application, and will not be elaborated on here.
[0105] This application first collects the public opinion text data of the target enterprise from a preset data channel; and performs text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity; then converts the public opinion text into a corresponding public opinion text vector based on a pre-trained model; then performs clustering initialization processing on the public opinion text vector to obtain a corresponding candidate public opinion risk event; subsequently obtains the number of public opinion texts corresponding to the candidate public opinion risk event within a target time window; further obtains a data accumulation time period corresponding to the public opinion risk event identification processing, and generates a numerical comparison result between the data accumulation time period and a preset training cycle threshold; finally, based on a risk identification strategy corresponding to the numerical comparison result, performs risk identification on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event. The present application collects public opinion text data of the target enterprise from a preset data channel, and performs text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity, then converts the public opinion text into a corresponding public opinion text vector based on the use of a pre-trained model, and performs clustering initialization processing on the public opinion text vector to obtain candidate public opinion risk events, then obtains the number of public opinion texts corresponding to the candidate public opinion risk events within the target time window, and obtains the data accumulation time period corresponding to the public opinion risk event identification processing, and generates a numerical comparison result between the data accumulation time period and the preset training cycle threshold, and then performs risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result, and obtains the risk identification result corresponding to the candidate public opinion risk event, thereby realizing real-time and accurate public opinion risk identification of candidate public opinion risk events for the target enterprise, effectively improving the processing efficiency and accuracy of public opinion risk identification for the enterprise, and ensuring the accuracy of the obtained risk identification results.
[0106] In some optional implementations, step S207 includes the following steps:
[0107] If the numerical comparison result is that the data accumulation time period is less than the training period threshold, then the average number of public opinion texts corresponding to the candidate public opinion risk event within the historical time window is obtained.
[0108] In this embodiment, the first public opinion text data related to the candidate public opinion risk event in the historical time window can be obtained, and the first public opinion text data can be pre-processed by cleaning, deduplication, denoising and other pre-processing operations to obtain the second public opinion text data, and then the mean number of public opinion texts corresponding to the above-mentioned candidate public opinion risk event can be calculated based on the second public opinion text data. Among them, the mean number of public opinion texts corresponding to the candidate public opinion risk event in the historical time window refers to the average value of the number of public opinion texts at all time points in the historical time window. This mean is used to compare with the number of public opinion texts in the current time window to determine whether there is an anomaly. In addition, the above-mentioned historical time window is a past time period selected when analyzing data. This time period is used to calculate statistics such as the mean and standard deviation of the number of public opinion texts for comparison with the data in the current time window. The length of the historical time window can be determined according to business needs and data availability.
[0109] Get the numerical range corresponding to the mean value of the number of public opinion texts.
[0110] In this embodiment, the above-mentioned numerical interval may include less than 10, or between 10 and 50, or more than 50. Among them, for the numerical intervals in which the mean values of the number of public opinion texts are located, corresponding different risk identification rules will be set. Specifically, the risk identification rules may include: the first risk identification rule: if the mean value of the number of public opinion texts in the historical time window is less than 10, and the number of public opinion texts in the current window reaches 5 times the number of public opinion texts in the last three time windows, it can be regarded as abnormal; the second risk identification rule: if the mean value of the number of public opinion texts in the historical time window is between 10 and 50, the number of public opinion texts in the current window reaches 2 times the number of public opinion texts in the last three time windows, it can be regarded as abnormal; the third risk identification rule: if the mean value of the number of public opinion texts in the historical time window exceeds 50, the number of public opinion texts in the current window reaches 1.5 times the number of public opinion texts in the last three time windows, it can be regarded as abnormal. In addition, the above risk identification rules can be flexibly adjusted according to specific business scenarios.
[0111] A corresponding target risk identification rule is determined based on the numerical interval, and a quantity threshold corresponding to the quantity of the public opinion texts is generated based on the target risk identification rule.
[0112] In this embodiment, the target risk identification rule that matches the above numerical range can be obtained from all preset risk identification rules. The obtained target risk identification rule is subjected to content analysis to extract the threshold for abnormal discrimination contained in the target risk identification rule, and used as the quantity threshold corresponding to the number of public opinion texts.
[0113] Determine whether the quantity of the public opinion texts is greater than the quantity threshold.
[0114] In this embodiment, a numerical comparison can be performed between the number of public opinion texts and the number threshold, and then whether the number of public opinion texts is greater than the number threshold can be determined based on the comparison result.
[0115] If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0116] In this embodiment, if the number of public opinion texts detected is greater than the above-mentioned number threshold, it is determined that the candidate public opinion risk event has a risk, and a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event is generated.
[0117] If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0118] In this embodiment, if the number of public opinion texts is less than the above-mentioned number threshold, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0119] When the present application detects that the numerical comparison result is that the data accumulation time period is less than the training cycle threshold, the present application obtains the mean number of public opinion texts corresponding to the candidate public opinion risk event within the historical time window, and obtains the numerical interval corresponding to the mean number of public opinion texts, and then determines the corresponding target risk identification rule based on the numerical interval, and generates a quantity threshold corresponding to the number of public opinion texts based on the target risk identification rule, and then determines whether the number of public opinion texts is greater than the quantity threshold, and based on the comparison result obtained, it realizes real-time and accurate public opinion risk identification of the target enterprise regarding the candidate public opinion risk event, thereby improving the processing efficiency and accuracy of public opinion risk identification and ensuring the accuracy of the risk identification result.
[0120] In some optional implementations of this embodiment, step S207 includes the following steps:
[0121] If the numerical comparison result is that the data accumulation time period is greater than or equal to the training period threshold, a pre-trained time series data fitting model is called.
[0122] In this embodiment, when it is detected that the data accumulation time period exceeds the training cycle threshold, a pre-trained time series data fitting model is used to fit and predict the time series data to complete the risk identification process for the candidate public opinion risk event. Specifically, the historical time series data within the most recent training time period is normalized to eliminate the influence of different dimensions on model training. Then, the LSTM model is used to perform short-term fitting on the normalized historical time series data to obtain the above-mentioned time series data fitting model.
[0123] In addition, in order to achieve unified detection and prediction of multiple candidate public opinion risk events, different public opinion risk events can be encoded, combined with the latest specified number (such as 30) time series data points (encoding + normalization) as features, to predict the value at the next moment. The model can be updated regularly with the latest data, and candidate public opinion risk events whose accumulated data time period in the new cycle exceeds the time series data training time period threshold will be included in the training. At the same time, for the abnormal points detected in the new training data, the model prediction value replaces the actual value to ensure the quality of the training data.
[0124] The predicted number of public opinion texts for the candidate public opinion risk event within the target time window is generated based on the time series data fitting model.
[0125] In this embodiment, the trained time series data fitting model can be used to predict the number of public opinion texts corresponding to the above-mentioned candidate public opinion risk events in the next time window (such as the target time window), thereby obtaining the above-mentioned predicted number of public opinion texts.
[0126] Calculate the difference between the number of public opinion texts and the number of predicted public opinion texts.
[0127] In this embodiment, the difference between the number of public opinion texts and the number of predicted public opinion texts can be calculated, and a corresponding difference sequence can be constructed as the original sequence of the standard value rule (3-sigma principle).
[0128] Determine whether the difference is greater than a standard deviation value corresponding to a preset standard value rule.
[0129] In this embodiment, the above-mentioned standard value rule is specifically the 3-sigma principle. The above-mentioned standard deviation value refers to 3 times the standard deviation. Among them, there is no specific limitation on the value of the standard deviation, and it can be set according to actual business needs. Specifically, under the 3-sigma principle, values exceeding 3 times the standard deviation can be regarded as outliers. The predicted value of the number of public opinion texts in the current time window is predicted by using the sequence data fitting model, and the current difference between the predicted value and the true value is calculated. If the current difference exceeds the 3-sigma range and the number of public opinion texts in the current time window shows an upward trend, it can be judged as abnormal, and an alarm needs to be issued for the corresponding public opinion risk event.
[0130] If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0131] In this embodiment, if it is detected that the difference is greater than the standard deviation value corresponding to the preset standard value rule, it is determined that the candidate public opinion risk event is risky, and a risk identification result is generated that the candidate public opinion risk event belongs to a public opinion risk event.
[0132] If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0133] In this embodiment, if it is detected that the difference is smaller than the standard deviation value corresponding to the preset standard value rule, it is determined that the candidate public opinion risk event does not have a risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
[0134] When the present application detects that the numerical comparison result is that the data accumulation time period is greater than or equal to the training period threshold, the present application calls a pre-trained time series data fitting model, and generates the predicted number of public opinion texts of the candidate public opinion risk event within the target time window based on the time series data fitting model, and then calculates the difference between the number of public opinion texts and the predicted number of public opinion texts, and subsequently determines whether the difference is greater than the standard deviation value corresponding to the preset standard value rule, and based on the comparison result obtained, it realizes real-time and accurate public opinion risk identification of the target enterprise regarding the candidate public opinion risk event, thereby improving the processing efficiency and accuracy of public opinion risk identification and ensuring the accuracy of the risk identification results obtained.
[0135] In some optional implementations, step S204 includes the following steps:
[0136] Calculate the similarity of all the public opinion text vectors within a preset initial time window.
[0137] In this embodiment, there is no limitation on the time selection of the initial time window, and it can be set according to actual business needs, for example, it can be set to one week. In addition, the cosine similarity algorithm can be used to calculate the similarity of all public opinion text vectors in the initial time window.
[0138] Filter out the designated public opinion text vectors whose similarity is greater than a preset similarity clustering threshold from all the public opinion text vectors.
[0139] In this embodiment, the value of the similarity clustering threshold is not specifically limited and can be set according to actual business needs, for example, it can be set to 0.8. The public opinion text vector whose similarity exceeds the similarity clustering threshold can be used as the designated public opinion text vector.
[0140] The specified public opinion text vectors are merged to form corresponding multiple clusters.
[0141] In this embodiment, multiple clusters are formed by merging vectors whose similarity exceeds the above similarity clustering threshold, and these clusters represent similar public opinion text contents. The cluster center of each cluster is the average value of the public opinion text vectors of the cluster.
[0142] A first cluster having a text quantity less than a preset cluster text quantity threshold is eliminated from all the clusters to obtain a second cluster after elimination processing.
[0143] In this embodiment, there is no specific limitation on the value of the above-mentioned cluster text quantity threshold, which can be set according to actual business needs. By removing clusters that do not meet the minimum cluster text quantity threshold from all clusters, the effect of controlling the number of clusters is achieved. In order to avoid generating too many small clusters, it is necessary to control the number of clusters. For the generated clusters, it is determined whether to remove them based on the number of public opinion texts contained. Clusters that exceed the minimum cluster text quantity threshold can be retained. The multiple clusters finally obtained after removal are the candidate public opinion risk events for the target enterprise. The i-th candidate public opinion risk event can be expressed as e i =(V i ,T i ), where V i is the cluster center vector of the public opinion risk event, T i It is the public opinion text id of the public opinion risk event, sorted from small to large according to the release time.
[0144] The second cluster is used as the candidate public opinion risk event.
[0145] In this embodiment, the second cluster finally obtained is the candidate public opinion risk events. These events are clustering results based on public opinion text vectors, and they reflect similar public opinion content that appeared in a specific time period.
[0146] In addition, it can also automatically and dynamically maintain candidate public opinion risk events and support incremental processing of new public opinion data. By reading the new public opinion text vector generated from Elasticsearch within the new time window T, the similarity is calculated one by one with the cluster center of the existing candidate public opinion risk event. For the new public opinion text, the cluster of candidate public opinion risk events with the maximum similarity and greater than the similarity clustering threshold is selected to be added, and the center vector of the cluster is updated. For the new public opinion text vectors whose maximum similarity within the time window is less than the similarity clustering threshold, the similarity between them is calculated, and the public opinion text vectors whose similarity exceeds the similarity clustering threshold are merged to form a new cluster. The cluster center is the average value of the public opinion text vectors of the cluster. Similarly, clusters that do not meet the minimum cluster public opinion text quantity threshold are eliminated, and clusters that have not been updated for the number of public opinion texts contained in m consecutive time windows are deleted, that is, new candidate corporate public opinion risk events are formed.
[0147] The present application calculates the similarity of all public opinion text vectors within a preset initial time window, and selects specified public opinion text vectors whose similarity is greater than a preset similarity clustering threshold from all public opinion text vectors, and then merges the specified public opinion text vectors to form corresponding multiple clusters, and then eliminates the first cluster whose number is less than the cluster text quantity threshold from all clusters, and uses the obtained second cluster after elimination as the final candidate public opinion risk event, thereby achieving efficient and accurate clustering initialization processing of public opinion text vectors and ensuring the accuracy of the obtained candidate public opinion risk events.
[0148] In some optional implementations, step S202 includes the following steps:
[0149] The public opinion text data is cleaned to obtain a corresponding first text.
[0150] In this embodiment, the above-mentioned data cleaning process may include deduplication and denoising of the public opinion text data, such as deleting duplicate articles, advertisements, etc., and filtering out some meaningless information, such as emoticons and pictures, so as to obtain the corresponding first text.
[0151] Call the preset sentiment analysis tool.
[0152] In this embodiment, the sentiment analysis tool can be implemented by weighted summation of sentiment words or a preset deep neural network model. Specifically, the sentiment analysis tool can perform polarity judgment by weighted summation of sentiment words appearing in the public opinion text. It is also possible to train a preset deep neural network model in advance based on the constructed sample library, determine the model parameters, and use the deep neural network model with the determined model parameters as the sentiment scoring model, that is, the sentiment analysis tool.
[0153] Based on the sentiment analysis tool, sentiment polarity analysis is performed on the first text to obtain a corresponding sentiment polarity analysis result.
[0154] In this embodiment, the sentiment polarity analysis can be performed on the first text by using a sentiment analysis tool to determine the sentiment polarity of the first text and output a corresponding sentiment polarity analysis result, wherein the content of the sentiment polarity analysis result may include that the sentiment polarity is negative, or the sentiment polarity is positive, or the sentiment polarity is neutral.
[0155] Based on the sentiment polarity analysis result, a second text with negative sentiment polarity is selected from the first text.
[0156] In this embodiment, content analysis may be performed on the above sentiment polarity analysis result to filter out the second text with negative sentiment polarity from the first text.
[0157] The second text is used as the public opinion text.
[0158] This application obtains the corresponding first text by performing data cleaning on the public opinion text data; then calls a preset sentiment analysis tool; and based on the sentiment analysis tool, performs sentiment polarity analysis on the first text to obtain the corresponding sentiment polarity analysis result; then, based on the sentiment polarity analysis result, screens out a second text with negative sentiment polarity from the first text; and subsequently uses the second text as the public opinion text. This application obtains the first text by performing data cleaning on the public opinion text data; then, based on the use of a sentiment analysis tool, performs sentiment polarity analysis on the first text to obtain the corresponding sentiment polarity analysis result; then, based on the sentiment polarity analysis result, screens out a second text with negative sentiment polarity from the first text and uses it as the final public opinion text, thereby achieving efficient and accurate text preprocessing of the public opinion text data, improving the text screening efficiency of public opinion texts with negative sentiment polarity, and ensuring the data accuracy of the obtained public opinion texts.
[0159] In some optional implementations of this embodiment, step S201 includes the following steps:
[0160] Call the preset data interface.
[0161] In this embodiment, the above-mentioned data interface can specifically adopt an API interface, RSS subscription, etc., to ensure that the public opinion text data of the target enterprise can be collected in real time.
[0162] Get the preset keyword search strategy.
[0163] In this embodiment, the keyword search strategy is an intelligent data collection strategy that uses keyword search technology to collect the public opinion text data of the target enterprise in real time based on the keywords related to the target enterprise. Among them, the keywords related to the target enterprise may include the full name, abbreviation, stock code, bond code and other related identifiers of the enterprise to ensure the accuracy and comprehensiveness of the data.
[0164] Based on the keyword search strategy, the public opinion text data of the target enterprise is collected from the data channel through the data interface.
[0165] In this embodiment, the above data interface can be used to collect the target enterprise's public opinion text data from the data channel according to the policy content of the above keyword search policy. The collected public opinion text data may include news titles, WeChat article titles, Weibo blog titles and corresponding comment data.
[0166] This application calls a preset data interface; then obtains a preset keyword search strategy; and subsequently collects the public opinion text data of the target enterprise from the data channel through the data interface based on the keyword search strategy. This application can quickly and accurately complete the data collection and processing of the public opinion text data of the target enterprise from the data channel by combining the data interface with the keyword search strategy, effectively improving the data collection efficiency of the public opinion text data.
[0167] In some optional implementations of this embodiment, after step S207, the electronic device may further perform the following steps:
[0168] Determine whether the risk identification result indicates that the candidate public opinion risk event belongs to a public opinion risk event.
[0169] In this embodiment, the content of the above risk identification result may include that the candidate public opinion risk event belongs to the public opinion risk event, or that the candidate public opinion risk event does not belong to the public opinion risk event. Among them, the risk identification result can be determined by performing content identification on the above risk identification result to determine whether the risk identification result indicates that the candidate public opinion risk event belongs to the public opinion risk event.
[0170] If so, obtain detailed data and magnitude change trend chart of the candidate public opinion risk event.
[0171] In this embodiment, the detailed data of the candidate public opinion risk event refers to the details of the candidate public opinion risk event being a public opinion text in the corresponding cluster, and the selection method is the public opinion text whose public opinion text vector is most similar to the cluster center vector. The magnitude change trend graph refers to the change trend of the number of public opinion texts of the candidate public opinion risk event over time.
[0172] Based on the detailed data and the magnitude change trend graph, warning information corresponding to the candidate public opinion risk event is generated.
[0173] In this embodiment, the above-mentioned detailed data and the above-mentioned magnitude change trend graph can be filled into the corresponding positions in the preset public opinion warning template, and the filled public opinion warning template can be obtained as the above-mentioned warning information. Among them, the template content of the above-mentioned public opinion warning template can be constructed according to actual business needs.
[0174] Based on the target notification method, the alarm information is sent to relevant personnel.
[0175] In this embodiment, the target notification method may be sending emails, text messages or message notifications, etc. The relevant personnel may refer to the public relations department or management of the enterprise.
[0176] This application determines whether the risk identification result is that the candidate public opinion risk event belongs to a public opinion risk event; if so, obtains the detailed data and magnitude change trend graph of the candidate public opinion risk event; then generates an alarm message corresponding to the candidate public opinion risk event based on the detailed data and the magnitude change trend graph; and subsequently sends the alarm message to relevant personnel based on a target notification method. This application automatically triggers an alarm mechanism when the risk identification result of a candidate public opinion risk event is that the candidate public opinion risk event belongs to a public opinion risk event, obtains the detailed data and magnitude change trend graph of the candidate public opinion risk event, and generates an alarm message corresponding to the candidate public opinion risk event based on the detailed data and the magnitude change trend graph, and then sends the alarm message to relevant personnel based on a target notification method, thereby helping relevant personnel to quickly understand the public opinion dynamics and take countermeasures, which is beneficial to improving the work experience of relevant personnel, and helps to improve the efficiency of problem solving for risky public opinion risk events, thereby ensuring the stable operation of the enterprise.
[0177] In some optional implementations, the user information obtained is subject to the user's consent and complies with relevant laws and policies.
[0178] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0179] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0180] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0181] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a public opinion risk identification device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0182] like Figure 3 As shown, the public opinion risk identification device 300 described in this embodiment includes: a collection module 301, a preprocessing module 302, a conversion module 303, a clustering module 304, a first acquisition module 305, a first generation module 306 and an identification module 307. Among them:
[0183] The collection module 301 is used to collect the public opinion text data of the target enterprise from a preset data channel;
[0184] A preprocessing module 302 is used to perform text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity;
[0185] A conversion module 303, used to convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model;
[0186] The clustering module 304 is used to perform clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events;
[0187] The first acquisition module 305 is used to acquire the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window;
[0188] The first generating module 306 is used to obtain a data accumulation time period corresponding to the public opinion risk event identification process, and generate a numerical comparison result between the data accumulation time period and a preset training cycle threshold;
[0189] The identification module 307 is used to perform risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result, and obtain a risk identification result corresponding to the candidate public opinion risk event.
[0190] In this embodiment, the operations performed by the above modules or units correspond one-to-one to the steps of the public opinion risk identification method in the aforementioned implementation mode, and will not be repeated here.
[0191] In some optional implementations of this embodiment, the identification module 307 includes:
[0192] A first acquisition submodule is used to acquire the average number of public opinion texts corresponding to the candidate public opinion risk event within the historical time window if the numerical comparison result is that the data accumulation time period is less than the training period threshold;
[0193] The second acquisition submodule is used to obtain a numerical range corresponding to the mean value of the number of public opinion texts;
[0194] A first generating submodule is used to determine a corresponding target risk identification rule based on the numerical interval, and generate a quantity threshold value corresponding to the quantity of the public opinion texts based on the target risk identification rule;
[0195] The first judgment submodule is used to judge whether the number of public opinion texts is greater than the number threshold;
[0196] The second generating submodule is used to determine that if so, the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0197] The third generating submodule is used to determine that the candidate public opinion risk event does not have any risk, and generate a risk identification result that the candidate public opinion risk event does not belong to the public opinion risk event.
[0198] In some optional implementations of this embodiment, the identification module 307 includes:
[0199] A first calling submodule is used to call a pre-trained time series data fitting model if the numerical comparison result is that the data accumulation time period is greater than or equal to the training period threshold;
[0200] A fourth generating submodule, configured to generate the number of predicted public opinion texts of the candidate public opinion risk event within the target time window based on the time series data fitting model;
[0201] A first calculation submodule, used to calculate the difference between the number of public opinion texts and the number of predicted public opinion texts;
[0202] A second judgment submodule is used to judge whether the difference is greater than a standard deviation value corresponding to a preset standard value rule;
[0203] A fifth generating submodule is used to determine that if so, the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event;
[0204] The sixth generation submodule is used to determine that the candidate public opinion risk event does not have any risk, and generate a risk identification result that the candidate public opinion risk event does not belong to a public opinion risk event.
[0205] In some optional implementations of this embodiment, the clustering module 304 includes:
[0206] The second calculation submodule is used to calculate the similarity of all the public opinion text vectors within a preset initial time window;
[0207] A first screening submodule is used to screen out, from all the public opinion text vectors, a designated public opinion text vector whose similarity is greater than a preset similarity clustering threshold;
[0208] A merging submodule, used to merge the specified public opinion text vectors to form a corresponding plurality of clusters;
[0209] A removal submodule is used to remove the first cluster whose number of cluster texts is less than a preset cluster text quantity threshold from all the clusters to obtain a second cluster after the removal process;
[0210] The first determination submodule is used to take the second type cluster as the candidate public opinion risk event.
[0211] In some optional implementations of this embodiment, the preprocessing module 302 includes:
[0212] A cleaning submodule, used for performing data cleaning processing on the public opinion text data to obtain a corresponding first text;
[0213] The second calling submodule is used to call a preset sentiment analysis tool;
[0214] An analysis submodule, configured to perform sentiment polarity analysis on the first text based on the sentiment analysis tool to obtain a corresponding sentiment polarity analysis result;
[0215] A second screening submodule, configured to screen out second texts with negative sentiment polarity from the first text based on the sentiment polarity analysis result;
[0216] The second determination submodule is used to use the second text as the public opinion text.
[0217] In some optional implementations of this embodiment, the acquisition module 301 includes:
[0218] The third calling submodule is used to call the preset data interface;
[0219] The third acquisition submodule is used to obtain a preset keyword search strategy;
[0220] The collection submodule is used to collect the public opinion text data of the target enterprise from the data channel through the data interface based on the keyword retrieval strategy.
[0221] In some optional implementations of this embodiment, the public opinion risk identification device further includes:
[0222] A judgment module, used to judge whether the risk identification result indicates that the candidate public opinion risk event belongs to a public opinion risk event;
[0223] A second acquisition module is used to obtain detailed data and a magnitude change trend chart of the candidate public opinion risk event if yes;
[0224] A second generating module, configured to generate warning information corresponding to the candidate public opinion risk event based on the detailed data and the magnitude change trend graph;
[0225] The sending module is used to send the alarm information to relevant personnel based on the target notification method.
[0226] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0227] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0228] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.
[0229] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the public opinion risk identification method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.
[0230] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run computer-readable instructions stored in the memory 41 or process data, such as computer-readable instructions for running the public opinion risk identification method.
[0231] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.
[0232] The present application also provides another implementation, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the public opinion risk identification method as described above.
[0233] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0234] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A method for identifying public opinion risks, characterized in that: The steps include: Collect the target company's public opinion text data from the preset data channels; Performing text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity; Convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model; Performing clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events; Obtaining the number of public opinion texts corresponding to the candidate public opinion risk event within the target time window; Obtaining a data accumulation time period corresponding to the public opinion risk event identification process, and generating a numerical comparison result between the data accumulation time period and a preset training cycle threshold; Based on the risk identification strategy corresponding to the numerical comparison result, risk identification is performed on the number of public opinion texts to obtain a risk identification result corresponding to the candidate public opinion risk event.
2. The method for identifying public opinion risks according to claim 1, characterized in that: The step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain a risk identification result corresponding to the candidate public opinion risk event specifically includes: If the numerical comparison result is that the data accumulation time period is less than the training period threshold, then obtaining the average number of public opinion texts corresponding to the candidate public opinion risk event within the historical time window; Obtaining a numerical range corresponding to the mean value of the number of public opinion texts; Determine a corresponding target risk identification rule based on the numerical interval, and generate a quantity threshold value corresponding to the quantity of the public opinion texts based on the target risk identification rule; Determine whether the number of public opinion texts is greater than the number threshold; If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event; If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
3. The method for identifying public opinion risks according to claim 1, characterized in that: The step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain a risk identification result corresponding to the candidate public opinion risk event specifically includes: If the numerical comparison result is that the data accumulation time period is greater than or equal to the training period threshold, calling a pre-trained time series data fitting model; Generate the predicted number of public opinion texts for the candidate public opinion risk event within the target time window based on the time series data fitting model; Calculating the difference between the number of public opinion texts and the number of predicted public opinion texts; Determine whether the difference is greater than a standard deviation value corresponding to a preset standard value rule; If so, determine that the candidate public opinion risk event has a risk, and generate a risk identification result that the candidate public opinion risk event belongs to a public opinion risk event; If not, it is determined that the candidate public opinion risk event does not have any risk, and a risk identification result is generated that the candidate public opinion risk event does not belong to a public opinion risk event.
4. The method for identifying public opinion risks according to claim 1, characterized in that: The step of performing clustering initialization processing on the public opinion text vector to obtain the corresponding candidate public opinion risk event specifically includes: Calculating the similarity of all the public opinion text vectors within a preset initial time window; Filtering out a designated public opinion text vector whose similarity is greater than a preset similarity clustering threshold from all the public opinion text vectors; Merging the specified public opinion text vectors to form a corresponding plurality of clusters; Eliminate the first cluster whose number of cluster texts is less than a preset cluster text quantity threshold from all the clusters to obtain a second cluster after elimination processing; The second cluster is used as the candidate public opinion risk event.
5. The method for identifying public opinion risks according to claim 1, characterized in that: The step of performing text preprocessing on the public opinion text data to obtain a public opinion text with negative sentiment polarity specifically includes: Performing data cleaning processing on the public opinion text data to obtain a corresponding first text; Call the preset sentiment analysis tool; Performing sentiment polarity analysis on the first text based on the sentiment analysis tool to obtain a corresponding sentiment polarity analysis result; Based on the sentiment polarity analysis result, selecting a second text with negative sentiment polarity from the first text; The second text is used as the public opinion text.
6. The method for identifying public opinion risks according to claim 1, characterized in that: The step of collecting the public opinion text data of the target enterprise from the preset data channel specifically includes: Call the preset data interface; Get the preset keyword search strategy; Based on the keyword search strategy, the public opinion text data of the target enterprise is collected from the data channel through the data interface.
7. The method for identifying public opinion risks according to claim 1, characterized in that: After the step of performing risk identification on the number of public opinion texts based on the risk identification strategy corresponding to the numerical comparison result to obtain a risk identification result corresponding to the candidate public opinion risk event, the method further includes: Determining whether the risk identification result indicates that the candidate public opinion risk event belongs to a public opinion risk event; If yes, obtain detailed data and magnitude change trend chart of the candidate public opinion risk event; Generate warning information corresponding to the candidate public opinion risk event based on the detailed data and the magnitude change trend graph; Based on the target notification method, the alarm information is sent to relevant personnel.
8. A public opinion risk identification device, characterized in that: include: The collection module is used to collect the public opinion text data of the target enterprise from the preset data channels; A preprocessing module, used to perform text preprocessing on the public opinion text data to obtain public opinion text with negative sentiment polarity; A conversion module, used to convert the public opinion text into a corresponding public opinion text vector based on a pre-trained model; A clustering module, used to perform clustering initialization processing on the public opinion text vector to obtain corresponding candidate public opinion risk events; A first acquisition module is used to acquire the number of public opinion texts corresponding to the candidate public opinion risk event within a target time window; A first generating module is used to obtain a data accumulation time period corresponding to the public opinion risk event identification process, and generate a numerical comparison result between the data accumulation time period and a preset training cycle threshold; An identification module is used to perform risk identification on the number of public opinion texts based on a risk identification strategy corresponding to the numerical comparison result, and obtain a risk identification result corresponding to the candidate public opinion risk event.
9. A computer device, characterized in that: It includes a memory and a processor, the memory stores computer-readable instructions, and the processor implements the steps of the public opinion risk identification method as described in any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the public opinion risk identification method according to any one of claims 1 to 7.
Citation Information
Cited By
Public opinion dynamic monitoring and early warning system based on text clustering analysis
CN122173656A