Lightweight integrated model system for public opinion popularity prediction and training method thereof

By training and deploying the public opinion heat prediction model in the server module and loading the model parameters into the browser module, the problems of low efficiency and insufficient security of public opinion data processing in traditional methods are solved, and efficient and fast public opinion heat prediction is achieved and data security.

CN119047646AActive Publication Date: 2024-11-29SICHUAN JIUZHOU SOFTWARE CO LTD

Patent Information

Application Number
CN202411199387.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2024-11-29
Estimated Expiration
2044-08-29

AI Technical Summary

Technical Problem

Traditional public opinion heat prediction methods are difficult to process complex, high-dimensional and dynamically changing public opinion data, resulting in low prediction accuracy and low efficiency. Deep learning models have challenges in computing resources and data transmission delays, especially in real-time prediction and data security of client side. There are privacy and security risks in the aspect.

Method used

Build a multi-head attention model based on recurrent neural network and deploy it in the server module and browser module respectively. After completing model training through the server module, the model parameters are loaded into the browser module to realize efficient training and rapid inference of the model. Avoid data transmission delays and security risks.

Benefits of technology

It improves the response speed and user experience of public opinion hot prediction, reduces computing resource consumption, enhances data privacy and security, and is suitable for environments with limited resources and real-time prediction scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047646A_ABST
    Figure CN119047646A_ABST
Patent Text Reader

Abstract

The invention discloses a lightweight integrated model system for public opinion popularity prediction and a training method thereof, and the system is characterized in that the system comprises a public opinion popularity prediction model module, the public opinion popularity prediction model comprises a plurality of parallel basic networks and a multi-head attention layer which is used for converting the output of the basic networks into a two-dimensional matrix form as input and is constructed based on a recurrent neural network; the deployment module is configured to deploy the public opinion popularity prediction model as a complete prediction model and a lightweight integration model to the server module and the browser module through a deep learning framework; the acquisition module is configured to acquire public opinion data of the social platform as a training set or to-be-predicted data; the server module is configured to store the complete prediction model and obtain a training set to complete training of the complete prediction model; and the browser module is configured to load model parameters of the trained complete prediction model to the lightweight integrated model, acquire to-be-predicted data, input the to-be-predicted data into the lightweight integrated model, and complete public opinion popularity prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of neural network models, and in particular to a lightweight integrated model system for public opinion heat prediction and a training method thereof. Background Art

[0002] With the rapid development of the Internet and social media, public opinion monitoring and analysis are playing an increasingly important role in government agencies, enterprises, news media and public relations management. Public opinion heat is a key indicator to measure the public's attention to an event, topic or entity. Accurate public opinion heat prediction can help relevant parties respond to emergencies in a timely manner, optimize publicity strategies, and enhance brand image. Therefore, how to efficiently and accurately predict public opinion heat has become one of the current research hotspots.

[0003] Traditional methods for predicting the heat of public opinion mainly rely on statistical models or shallow machine learning models. These methods are usually based on simple feature extraction and linear analysis of historical data for prediction. However, due to the complexity, high dimensionality and dynamic changes of public opinion data, traditional methods have great limitations in processing these data and it is difficult to obtain high-precision prediction results. In addition, these methods often require a lot of manual intervention and feature engineering, are inefficient and difficult to adapt to the rapidly changing public opinion environment.

[0004] In recent years, deep learning technology has achieved remarkable results in natural language processing (NLP), image recognition, speech recognition and other fields due to its powerful feature extraction and model generalization capabilities, and has gradually been applied to public opinion heat prediction. Deep learning models, especially recurrent neural networks (RNN) and their variants (such as long short-term memory networks LSTM and gated recurrent units GRU), have become one of the mainstream technologies in the field of public opinion prediction because they can effectively process sequence data and capture the temporal dependencies in data. However, the application of deep learning models also faces some challenges. First, deep learning models usually require a lot of computing resources and data support, and the training cost is high. Second, model training is often concentrated in the server module, while in actual applications, many scenarios require real-time prediction on the client (such as the browser module) to improve response speed and user experience. The traditional server module model inference method will cause data transmission delays, which in turn affects the effect of real-time prediction. At the same time, there may be privacy and security risks in the data transmission process, especially when processing sensitive information, data security issues are particularly important. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a lightweight integrated model system and a training method for public opinion heat prediction. A multi-head attention model based on a recurrent neural network is constructed and deployed in a server module and a browser module respectively. After the server module completes the model training, the model parameters are directly loaded into the browser module, so as to achieve efficient training and fast reasoning of the model.

[0006] In order to achieve the above-mentioned invention object, the technical solution provided by the present invention includes:

[0007] A lightweight integrated model system for public opinion heat prediction, including:

[0008] The public opinion heat prediction model module has a built-in public opinion heat prediction model based on a recurrent neural network, which includes several parallel basic networks and a multi-head attention layer that converts the output of the basic network into a two-dimensional matrix form as input;

[0009] A deployment module, connected to the public opinion heat prediction model module, the server module and the browser module respectively, and configured to deploy the public opinion heat prediction model as a complete prediction model and a lightweight integrated model to the server module and the browser module respectively through a deep learning framework;

[0010] A collection module, connected to the server module and the browser module respectively, configured to collect public opinion data of the social platform as a training set or data to be predicted;

[0011] A server module is connected to the deployment module, the acquisition module and the browser module respectively, and is configured to store the complete prediction model and obtain the training set to complete the training of the complete prediction model;

[0012] The browser module is connected to the deployment module, the collection module and the server module respectively, and is configured to load the model parameters of the trained complete prediction model into the lightweight integrated model, obtain the data to be predicted and input it into the lightweight integrated model to complete the public opinion heat prediction.

[0013] Preferably, the acquisition module includes a preprocessing unit, which is configured to divide the data to be processed according to the popularity of the topic to obtain x groups of first data sets about x topics; the characteristic data of the first data set include: the number of reposts, comments, likes, readings, the number of entities associated with the topic, the number of collections, and the number of media in a unit time.

[0014] Preferably, the acquisition module further includes an extraction unit configured to set a time window with at least one length for performing feature extraction on the training set or the data to be predicted.

[0015] Preferably, the method for extracting features by the extraction unit includes:

[0016] The data in the first data set are divided into a number of time windows respectively to obtain y pieces of first data; the label of the data in each time window is the label of the next time step of the last time step of the current time window.

[0017] Preferably, the server module includes a training unit and a first prediction unit;

[0018] The training unit is connected to the acquisition module and the complete prediction model respectively, and is configured to use the training set to perform initial training on the complete prediction model, or use the data to be predicted to perform update training on the complete prediction model;

[0019] The first prediction unit is connected to the acquisition module and the complete prediction model respectively, and is configured to input the data to be predicted into the complete prediction model to complete the public opinion heat prediction.

[0020] Preferably, the browser module includes a parameter loading unit and a second prediction unit;

[0021] The parameter loading unit is connected to the complete prediction model and the lightweight integrated model respectively, and is configured to transmit and load the model parameters trained by the server module to the lightweight integrated model of the browser module through API calls;

[0022] The second prediction unit is connected to the acquisition module and the lightweight integrated model respectively, and is configured to input the data to be predicted into the lightweight integrated model to complete the public opinion heat prediction.

[0023] The present invention also provides a lightweight integrated model training method for public opinion heat prediction, comprising the steps of:

[0024] Collect public opinion data from social platforms and store them in chronological order as data to be processed;

[0025] Preprocessing the data to be processed as a training set;

[0026] Inputting the training set into the complete prediction model deployed in the server module to complete the complete pre-training and store the model parameters;

[0027] Loading the model parameters into a lightweight integrated model deployed in a browser module;

[0028] Among them, the complete prediction model and the lightweight integrated model are public opinion heat prediction models with the same structure built based on recurrent neural networks.

[0029] Preferably, the method further includes the steps of collecting public opinion data to be predicted, inputting a trained complete prediction model, and completing update training of parameters of the complete prediction model.

[0030] Preferably, the pretreatment method comprises:

[0031] Divide the data to be processed by topic popularity to obtain x sets of first data sets about x topics; the characteristic data of the first data set includes: the number of reposts, comments, likes, readings, entities associated with the topic, collections, and media within a unit time;

[0032] Dividing the data in the first data set into a plurality of time windows respectively to obtain y pieces of first data;

[0033] All the first data are output as a training set.

[0034] Beneficial Effects

[0035] 1. The present invention fully utilizes the powerful computing power of the server by training and optimizing the model in the server module. After the training is completed, the optimized model parameters are loaded into the lightweight integrated model of the browser module, which realizes the efficient use of computing resources and avoids the computational overhead of complex training on the client. The lightweight integrated model is deployed in the browser module and can be run locally on the client, which significantly improves the response speed of the system and is particularly suitable for application scenarios that require instant feedback and real-time prediction.

[0036] 2. By avoiding data transmission to the server for inference, network latency is effectively reduced, ensuring rapid generation of prediction results, and reducing the frequency of user data transmission on the network, thereby reducing the risk of data leakage. This feature is particularly suitable for application scenarios that process sensitive data and helps to improve the privacy and security of user data.

[0037] 3. The model update process is simplified by completing the training and updating of the model in the server module and deploying the trained parameters to the browser module. The centralized training and maintenance of the server module reduces the dependence on the client, facilitates the iteration and optimization of the model, and enables the system to respond quickly to new changes in public opinion. By using a lightweight integrated model, while ensuring the prediction accuracy, the consumption of computing resources is greatly reduced, so that the model can run efficiently in a resource-limited environment and is suitable for a variety of different application scenarios, especially resource-limited terminals such as mobile devices and embedded systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of the structure of a lightweight integrated model system for public opinion heat prediction provided in a preferred embodiment of the present invention;

[0039] Figure 2 A schematic diagram of the structure of a public opinion heat prediction model provided in a preferred embodiment of the present invention;

[0040] Figure 3 A schematic flow chart of a lightweight integrated model system training method for public opinion heat prediction provided in a preferred embodiment of the present invention; DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the present invention is further described below in conjunction with the accompanying drawings. In the description of the present invention, it should be understood that the terms "upper", "lower", "front", "back", "left", "right", "top", "bottom", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention.

[0042] Example 1

[0043] like Figure 1 As shown, this embodiment provides a lightweight integrated model system for public opinion heat prediction, including:

[0044] The public opinion heat prediction model module has a built-in public opinion heat prediction model based on a recurrent neural network, which includes several parallel basic networks and a multi-head attention layer that converts the output of the basic network into a two-dimensional matrix form as input.

[0045] The recurrent neural network (RNN) is an artificial neural network structure used to process sequence data. This series of networks includes network structures such as basic RNN (Recurrent Neural Network), long short-term memory network (LSTM) and gated recurrent unit (GRU). Since this type of network has great advantages in processing time series, the present invention uses it as the basis, such as Figure 2 As shown, the present invention does not further limit the specific type to be selected, but in order to achieve the purpose of the present invention, the public opinion heat prediction model needs to include several parallel basic networks and a multi-head attention layer that converts the output of the basic network into a two-dimensional matrix form as input.

[0046] In this embodiment, in order to effectively extract data features when processing time windows of different lengths, the design of the basic network needs to flexibly adapt to changes in the length of the time window. Therefore, in some preferred embodiments, the basic network includes several groups of basic models whose structural complexity is proportional to the length of the time window when extracting data, that is, the longer the time window, the more complex the structure of the basic model. The basic models with the same time window length have the same structure. Specifically, the structural complexity of the basic model is mainly reflected in hyperparameters such as the number of network layers and the number of hidden nodes. For the basic models processing the same time window length, the structural design is unified to ensure that the model can stably and efficiently extract data features under a specific time window length. At the same time, since the data features corresponding to different time window lengths have different complexities and information amounts, the basic model needs to be adjusted for these differences to ensure the prediction accuracy in the entire data processing process.

[0047] A key advantage of this design is that it can adapt to different data processing requirements by adjusting the complexity of the basic model, thereby avoiding unnecessary computational overhead while maintaining high prediction accuracy. This not only improves the flexibility and adaptability of the model, but also makes it more suitable for application in resource-constrained environments. In addition, this basic network composed of multiple groups of basic models also has good scalability. When faced with new data features or changing time window requirements, optimization can be achieved by adjusting or increasing the number or complexity of the basic model without making major modifications to the entire network structure.

[0048] When processing data of different lengths of time windows, the output of the basic network may have different shapes. In order to unify these outputs and facilitate input into the multi-head attention layer, it is considered to convert the output of the basic network into a two-dimensional matrix form. In some preferred embodiments, considering that the data features are extracted through time windows of different lengths, a preferred two-dimensional matrix conversion method is provided, which specifically includes: the basic network includes N groups of basic models for N time window lengths, and each group of basic models specifically processes a time window of a specific length to capture the data features under the time window length. Each group of basic models includes M basic models, which have the same network structure; the output of the basic network is constructed as an M x N two-dimensional matrix. In this matrix, each row (M) represents the output of a group of basic models, and each column (N) corresponds to the feature extraction results of different time window lengths. Specifically, each row of the matrix contains the output of the same group of basic models under different time windows; and each column of the matrix contains the output of different groups of basic models for the same time window length. Through this arrangement, it can be ensured that the feature information contained in the matrix is ​​comprehensive and representative.

[0049] Furthermore, in order to match the characteristics of the multi-head attention layer, in some preferred embodiments, a method for inputting the two-dimensional matrix into the multi-head attention layer is also provided, specifically including: performing a linear transformation on the two-dimensional matrix, converting it into a query matrix, a key matrix and a value matrix respectively, and inputting the multi-head attention layer. Among them, the linear transformation can be achieved by matrix multiplication, that is, applying different weight matrices to the two-dimensional matrix to generate a new feature representation. The purpose of this process is to map the input two-dimensional matrix to a higher dimensional space in order to better capture the important features in the data.

[0050] The query matrix (Query Matrix, Q) is used to determine the target features that need to be paid attention to in the attention mechanism. The key matrix (Key Matrix, K) contains the feature representation of each input element, which is used to match the query matrix to calculate the relevance. The value matrix (Value Matrix, V) stores the feature information that needs to be transmitted, and the final output is obtained by weighting it with the attention weight. The above matrix is ​​input into the multi-head attention layer, and the importance of each element is calculated through dot product operation and weighted summation, and the final attention weight is generated.

[0051] Those skilled in the art should know that after the multi-head attention layer processing, the model usually needs to be further processed by the superposition and normalization components and the feedforward network layer to obtain the final feature results. In this process, the output of the multi-head attention layer will be superimposed with the original input through the residual connection (skip connection), and then normalized (such as Layer Norm) to ensure the stability of the model and the efficiency of training. After these processes, the key information in the feature results is further strengthened, while the noise or unimportant features are effectively suppressed, so that the model can focus more on the most valuable part of the data. Then, the feature results will pass through the feedforward network layer (usually including one or more fully connected layers) to further extract and combine high-order features and enhance the prediction ability of the model. Finally, the processed feature results will introduce nonlinear factors through activation functions (such as Relu, Swish, etc.) to enable the model to capture more complex feature relationships. The choice of activation function can be adjusted according to specific application requirements to optimize the performance of the model. After these processing steps, the model finally generates a prediction result. Those skilled in the art can design the specific structure and parameter configuration of the output part by themselves based on existing technical knowledge and specific application scenarios. The present invention does not further limit the design of the output part, and allows flexible adjustment to adapt to different needs and conditions.

[0052] The deployment module is connected to the public opinion heat prediction model module, the server module and the browser module respectively, and is configured to deploy the public opinion heat prediction model as a complete prediction model and a lightweight integrated model to the server module and the browser module respectively through a deep learning framework.

[0053] Deep learning framework refers to a software tool or library used to design, train and deploy deep learning models. These frameworks provide a series of predefined functions, modules and APIs, allowing developers to efficiently build complex neural network models without having to implement the underlying mathematical operations or optimization algorithms from scratch. In the present invention, the deployment of the public opinion heat prediction model mainly considers the cross-platform deployment capability, that is, deploying the same model architecture in different computing environments. In the server module, its powerful computing power is used to process large-scale data and perform complex training tasks; while in the browser module, it is necessary to run a lightweight model to achieve real-time reasoning and localized calculations, avoiding network delays. In some preferred embodiments, consider deploying the public opinion heat prediction model to the server module through the Tensorflow framework to obtain a complete prediction model; deploying the public opinion heat prediction model to the browser module through the Tensorflow.js framework to obtain a lightweight integrated model; the complete prediction model and the lightweight integrated model have the same structure. Among them, TensorFlow and TensorFlow.js are deep learning frameworks developed and maintained by Google, and the two have good compatibility. TensorFlow can perform efficient model training in the server module, while TensorFlow.js allows model reasoning in the browser module. Specifically, TensorFlow.js provides an API optimized specifically for the JavaScript environment, which can directly load the model trained by TensorFlow and perform reasoning operations in the browser, which is very important for applications that require real-time response on the client side. This seamless cross-platform support enables the model to be deployed and run in a variety of environments, meeting the needs of the present invention for multi-terminal applications. It should be understood that the present invention can also use other deep learning frameworks such as PyTorch and MXNet to implement this step, and its specific framework selection and implementation method can be reasonably designed by those skilled in the art based on its user manual and the purpose of the present invention.

[0054] The collection module is connected to the server module and the browser module respectively, and is configured to collect public opinion data of the social platform as a training set or data to be predicted.

[0055] Those skilled in the art will appreciate that the collected public opinion data often cannot be used directly for training or prediction. Therefore, in some preferred embodiments, it is considered to add a preprocessing unit in the collection module, and the preprocessing unit is configured to divide the data to be processed according to the popularity of the topic to obtain x groups of first data sets about x topics; the characteristic data of the first data set includes but is not limited to: the number of reposts, comments, likes, readings, the number of entities associated with the topic, the number of collections, and the number of media per unit time.

[0056] After obtaining the above-mentioned first data set, it is necessary to extract the feature data therein as the object for further processing. There are many ways of extraction here. In some preferred embodiments, an idea of ​​extracting feature data using a time window is provided. For this purpose, it is considered to add an extraction unit to the acquisition module. The extraction unit is configured to set a time window with at least one length for feature extraction of the training set or the data to be predicted. Specifically, the method for extracting features by the extraction unit includes: dividing the data in the first data set into several time windows respectively to obtain y first data; the label of the data in each time window is the label of the next time step of the last time step of the current time window.

[0057] The length of the time window can be different, and the label of the data in each time window is the label of the next time step after the last time step of the current time window. The time window refers to a portion of data intercepted from a time series. When processing a time series, the data is divided into multiple time windows, each of which contains a set of consecutive time steps. The label is the target of model prediction and is the value predicted at a certain point in the future.

[0058] The last time step of the current time window means: Assuming that a time window contains data from time point t1 to tn, then the last time step of the current time window is tn. The label of the next time step: Assuming that the time series from t1 to tn+1 is continuous, then the next time step is the label corresponding to tn+1, that is, the value of tn+1.

[0059] The meaning of this step is: for all feature data in a time window (from t1 to tn), the corresponding label (or target value) is the value at the next time point tn+1 immediately after the end of the time window. The model will learn to predict this future value (label) from the data (feature data) in the time window.

[0060] The server module is connected to the deployment module, the acquisition module and the browser module respectively, and is configured to store the complete prediction model, obtain the training set and complete the training of the complete prediction model. In this embodiment, the lightweight integrated model deployed in the browser module does not perform model training, but relies on the complete prediction model of the server module to complete the training. After the training is completed, the model parameters of the complete prediction model are retained.

[0061] It should be understood that the complete prediction model is deployed in the server module. When the prediction task has high requirements on accuracy, or needs to process large-scale data, or needs to update and train the public opinion heat prediction model, it is possible to consider inputting the public opinion data to be predicted into the complete prediction model. Utilizing the powerful computing power and abundant resources of the server, the complete prediction model can handle more complex computing tasks, thereby providing more accurate prediction results. In addition, the model update and training of the server module can also be carried out efficiently in this environment to ensure that the model is always in the optimal state. Accordingly, in some preferred embodiments, it is considered to set a training unit and a first prediction unit in the server module.

[0062] The training unit is connected to the acquisition module and the complete prediction model respectively, and is configured to use the training set to perform initial training on the complete prediction model, or use the data to be predicted to perform update training on the complete prediction model. On the one hand, the unit considers performing initial training on the complete prediction model to generate the initial parameters of the model; on the other hand, during the model application process, the complete prediction model is updated and trained using the data to be predicted, and the model parameters are continuously optimized to adapt to the dynamic changes of public opinion and improve the prediction accuracy.

[0063] The first prediction unit is connected to the acquisition module and the complete prediction model respectively, and is configured to input the data to be predicted into the complete prediction model to complete the public opinion heat prediction. The first prediction unit is responsible for coordinating the data flow and model reasoning process, and needs to handle more complex computing tasks to provide more accurate prediction results and ensure that the data to be predicted can be obtained efficiently and accurately.

[0064] The lightweight integrated model is deployed in the browser module and is suitable for scenarios that require instant feedback or real-time prediction. When the lightweight integrated model is input, since it runs locally on the client, it can significantly improve the response speed and provide fast prediction results. This localization process also effectively avoids network delays and data leakage problems that may occur during data transmission, thereby enhancing the privacy and security of the data. Accordingly, in some preferred embodiments, it is considered to set a parameter loading unit and a second prediction unit in the browser module of the server module.

[0065] The parameter loading unit is connected to the complete prediction model and the lightweight integrated model respectively, and is configured to transmit and load the model parameters trained by the server module to the lightweight integrated model of the browser module through API calls to ensure the consistency of the model parameters at both ends.

[0066] The second prediction unit is connected to the acquisition module and the lightweight integrated model respectively, and is configured to input the data to be predicted into the lightweight integrated model to complete the public opinion heat prediction and generate a fast and safe public opinion heat prediction result.

[0067] It should be noted that users can flexibly choose to use a complete prediction model or a lightweight integrated model according to their actual needs. For tasks that require high precision and complex calculations, a complete prediction model can be selected; while in scenarios that emphasize real-time and data privacy, a lightweight integrated model is a more ideal choice. This flexibility of choice ensures the applicability and practicality of the present invention in different application scenarios.

[0068] Example 2

[0069] like Figure 3 As shown, this embodiment provides a lightweight integrated model training method for public opinion heat prediction, including the steps of:

[0070] S1. Collect public opinion data from social platforms and store them in chronological order as data to be processed. Select at least one social platform as a public opinion collection platform to collect public opinion-related data, and the social platform includes mainstream social platforms such as Weibo, WeChat, Twitter, Facebook, etc.

[0071] S2. Preprocess the data to be processed and use it as a training set. Those skilled in the art will know that the key pre-step of model training is the preparation of the training set. In some preferred embodiments, in order to better collect training data that meets the characteristics of public opinion prediction and ensure effective preliminary screening of the data to be predicted in practical applications, the following example of a training set processing method is proposed. It should be pointed out that the data processing method proposed below is not only applicable to the preparation of training sets, but also to the preparation of data to be predicted.

[0072] S21, dividing the data to be processed according to the popularity of the topic to obtain x groups of first data sets about x topics; the characteristic data of the first data set includes: the number of reposts, comments, likes, readings, entities associated with the topic, collections, and media within a unit time;

[0073] S22. Divide the data in the first data set into a number of time windows to obtain y first data; wherein the lengths of the time windows may be different, and the label of the data in each time window is the label of the next time step of the last time step of the current time window. The time window refers to a portion of data intercepted from a time series. When processing a time series, the data is divided into multiple time windows, each time window containing a set of continuous time steps. The label is the target of model prediction, which is the value predicted at a certain time point in the future.

[0074] The last time step of the current time window means: Assuming that a time window contains data from time point t1 to tn, then the last time step of the current time window is tn. The label of the next time step: Assuming that the time series from t1 to tn+1 is continuous, then the next time step is the label corresponding to tn+1, that is, the value of tn+1.

[0075] The meaning of this step is: for all feature data in a time window (from t1 to tn), the corresponding label (or target value) is the value at the next time point tn+1 immediately after the end of the time window. The model will learn to predict this future value (label) from the data (feature data) in the time window.

[0076] S23. Output all the first data as a training set.

[0077] S3. Input the training set into the complete prediction model deployed in the server module to complete the complete pre-training, and store the model parameters.

[0078] S4. Load the model parameters into the lightweight integrated model deployed in the browser module.

[0079] Among them, the complete prediction model and the lightweight integrated model are public opinion heat prediction models with the same structure built based on recurrent neural networks.

[0080] The above shows and describes the basic principles, main features and advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments, and the above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.

Claims

1. A lightweight integrated model system for public opinion heat prediction. It is characterized in that include: The public opinion heat prediction model module has a built-in public opinion heat prediction model based on a recurrent neural network, which includes several parallel basic networks and a multi-head attention layer that converts the output of the basic network into a two-dimensional matrix form as input; A deployment module, connected to the public opinion heat prediction model module, the server module and the browser module respectively, and configured to deploy the public opinion heat prediction model as a complete prediction model and a lightweight integrated model to the server module and the browser module respectively through a deep learning framework; A collection module, connected to the server module and the browser module respectively, configured to collect public opinion data of the social platform as a training set or data to be predicted; A server module is connected to the deployment module, the acquisition module and the browser module respectively, and is configured to store the complete prediction model and obtain the training set to complete the training of the complete prediction model; The browser module is connected to the deployment module, the collection module and the server module respectively, and is configured to load the model parameters of the trained complete prediction model into the lightweight integrated model, obtain the data to be predicted and input it into the lightweight integrated model to complete the public opinion heat prediction.

2. The lightweight integrated model system for public opinion heat prediction according to claim 1, Features: The acquisition module includes a preprocessing unit, which is configured to divide the data to be processed according to the popularity of the topic to obtain x groups of first data sets about x topics; the characteristic data of the first data set include: the number of reposts, comments, likes, readings, the number of entities associated with the topic, the number of collections, and the number of media in a unit time.

3. The lightweight integrated model system for public opinion heat prediction according to claim 2, Features: The acquisition module also includes an extraction unit configured to set a time window with at least one length for extracting features from the training set or the data to be predicted.

4. The lightweight integrated model system for public opinion heat prediction according to claim 3, It is characterized in that The method for extracting features by the extraction unit includes: The data in the first data set are divided into a number of time windows respectively to obtain y pieces of first data; the label of the data in each time window is the label of the next time step of the last time step of the current time window.

5. The lightweight integrated model system for public opinion heat prediction according to claim 1, It is characterized in that The server module includes a training unit and a first prediction unit; The training unit is connected to the acquisition module and the complete prediction model respectively, and is configured to use the training set to perform initial training on the complete prediction model, or use the data to be predicted to perform update training on the complete prediction model; The first prediction unit is connected to the acquisition module and the complete prediction model respectively, and is configured to input the data to be predicted into the complete prediction model to complete the public opinion heat prediction.

6. The lightweight integrated model system for public opinion heat prediction according to claim 1, It is characterized in that The browser module includes a parameter loading unit and a second prediction unit; The parameter loading unit is connected to the complete prediction model and the lightweight integrated model respectively, and is configured to transmit and load the model parameters trained by the server module to the lightweight integrated model of the browser module through API calls; The second prediction unit is connected to the acquisition module and the lightweight integrated model respectively, and is configured to input the data to be predicted into the lightweight integrated model to complete the public opinion heat prediction.

7. Lightweight integrated model training method for public opinion heat prediction, It is characterized in that Includes steps: Collect public opinion data from social platforms and store them in chronological order as data to be processed; Preprocessing the data to be processed as a training set; Inputting the training set into the complete prediction model deployed in the server module to complete the complete pre-training and store the model parameters; Loading the model parameters into a lightweight integrated model deployed in a browser module; Among them, the complete prediction model and the lightweight integrated model are public opinion heat prediction models with the same structure built based on recurrent neural networks.

8. The lightweight integrated model training method for public opinion heat prediction according to claim 7, It is characterized in that The method also includes the steps of collecting public opinion data to be predicted, inputting a trained complete prediction model, and completing the update training of the complete prediction model parameters.

9. The lightweight integrated model training method for public opinion heat prediction according to claim 7, It is characterized in that The pretreatment method comprises: Divide the data to be processed by topic popularity to obtain x sets of first data sets about x topics; the characteristic data of the first data set includes: the number of reposts, comments, likes, readings, entities associated with the topic, collections, and media within a unit time; Dividing the data in the first data set into a plurality of time windows respectively to obtain y pieces of first data; All the first data are output as a training set.

Citation Information

Patent Citations

  • Hotspot classification method of public opinion based on deep learning

    CN107239529A

  • Modular public opinion monitoring method and system aiming at network public opinion events

    CN109446394A

  • Network public opinion analysis method and system

    CN110232109A

  • Scenic spot public opinion monitoring and analyzing system and method

    CN111461553A

  • Public opinion monitoring method and device, electronic equipment and storage medium

    CN112487188A

Cited By

  • Method and system for predicting public opinion hotspot information based on AI

    CN120338189A