Lightweight integrated model system and its training method for public opinion heat prediction
By training the lightweight integrated model in the server module and deploying it in the browser module, the low efficiency of traditional public opinion heat prediction methods and the resource security challenges of deep learning models are solved, and efficient, fast and secure public opinion heat prediction is achieved.
Patent Information
- Application Number
- CN202411199387.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-08-29
AI Technical Summary
Traditional public opinion heat prediction methods are inefficient and difficult to adapt to the rapidly changing public opinion environment. Deep learning models face challenges in terms of resources and data security, especially when making real-time predictions on the client side, which results in high latency and privacy risks.
A multi-head attention model based on recurrent neural networks is constructed and deployed in the server module and browser module respectively. The server module performs model training and loads parameters into the browser module to achieve efficient training and fast inference of the lightweight integrated model.
It improves the response speed of the model, reduces network latency and data leakage risks, is suitable for resource-constrained environments, and ensures the rapid generation and privacy security of prediction results.
Smart Images

Figure CN119047646B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of neural network model technology, 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, businesses, news media, and public relations management. Public opinion intensity is a key indicator of public attention to an event, topic, or entity. Accurate public opinion intensity prediction can help stakeholders respond to emergencies, optimize publicity strategies, and enhance brand image. Therefore, efficient and accurate public opinion intensity prediction has become a hot topic in current research.
[0003] Traditional methods for predicting the intensity of public opinion rely primarily on statistical models or shallow machine learning models. These methods typically rely on simple feature extraction and linear analysis of historical data. However, due to the complexity, high dimensionality, and dynamic nature of public opinion data, traditional methods have significant limitations when processing this data, making it difficult to achieve high-precision predictions. Furthermore, these methods often require extensive manual intervention and feature engineering, resulting in low efficiency and difficulty adapting to the rapidly changing public opinion landscape.
[0004] In recent years, deep learning technology, owing to its powerful feature extraction and model generalization capabilities, has achieved remarkable results in fields such as natural language processing (NLP), image recognition, and speech recognition, and has gradually been applied to public opinion prediction. Deep learning models, particularly recurrent neural networks (RNNs) and their variants (such as long short-term memory networks (LSTMs) and gated recurrent units (GRUs), have become a mainstream technology in public opinion prediction due to their ability to effectively process sequential data and capture temporal dependencies within data. However, the application of deep learning models also faces several challenges. First, deep learning models typically require extensive computing resources and data support, resulting in high training costs. Second, model training is often centralized on the server, while in practice, many scenarios require real-time prediction on the client (such as the browser) to improve response speed and user experience. Traditional server-based model inference methods can lead to data transmission delays, which in turn affects the effectiveness of real-time predictions. Furthermore, data transmission can pose privacy and security risks, making data security particularly critical when processing sensitive information. 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. By constructing a multi-head attention model based on a recurrent neural network and deploying it in the server module and browser module respectively, and then 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 object of the invention, 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, including 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 is connected to the public opinion heat prediction model module, the server module, and the browser module, 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;
[0010] The collection module is connected to the server module and the browser module respectively, and is configured to collect public opinion data from 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, number of entities associated with the topic, number of collections, and number of media in 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 feature extraction method performed by the extraction unit includes:
[0016] The data in the first data set are divided into a number of time windows to obtain y pieces of first data; 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.
[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 integration model respectively, and is configured to input the data to be predicted into the lightweight integration 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 the trained complete prediction model, and completing the update training of the complete prediction model parameters.
[0030] Preferably, the pretreatment method comprises:
[0031] Divide the data to be processed by topic popularity to obtain x sets of first data sets for x topics; the characteristic data of the first data sets include: the number of forwarding, commenting, likes, reading, number of entities associated with the topic, number of favorites, and number of media;
[0032] Dividing the data in the first data set into a plurality of time windows to obtain y pieces of first data;
[0033] All the first data are output as a training set.
[0034] Beneficial effects
[0035] 1. This invention fully utilizes the powerful computing power of the server by training and optimizing the model in the server module. After training, the optimized model parameters are loaded into the lightweight integrated model in the browser module, achieving efficient utilization of computing resources and avoiding the computational overhead of complex training on the client. The lightweight integrated model is deployed in the browser module and can run locally on the client, significantly improving the system's response speed. It is particularly suitable for application scenarios requiring immediate 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 across the network, thereby reducing the risk of data leakage. This feature is particularly suitable for applications that process sensitive data and helps improve the privacy and security of user data.
[0037] 3. By completing model training and updates on the server module and deploying the trained parameters to the browser module, the model update process is simplified. Centralized training and maintenance of the server module reduces reliance on the client, facilitates model iteration and optimization, and enables the system to quickly respond to new changes in public opinion. By using a lightweight integrated model, while ensuring prediction accuracy, computing resource consumption is significantly reduced, allowing the model to run efficiently in resource-constrained environments and is suitable for a variety of different application scenarios, especially resource-constrained terminals such as mobile devices and embedded systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is 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 This is 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 This is a 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 objectives, technical solutions and advantages of the present invention more clear, the present invention is further described below with reference to 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", "inner", "outer", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the devices or components referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not 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 basic RNN (Recurrent Neural Network), Long Short-Term Memory (LSTM) and Gated Recurrent Unit (GRU) network structures. Since this type of network has great advantages in processing time series, this 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 comprises several groups of basic models whose structural complexity is proportional to the length of the time window during data extraction, 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 that process the same time window length, their structural design is unified to ensure that the model can extract data features stably and efficiently 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 volumes, the basic model needs to be adjusted based on these differences to ensure prediction accuracy throughout 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 base 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 base 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 of groups or complexity of the base model without significantly modifying the entire network structure.
[0048] When processing data in time windows of varying lengths, the outputs of the base network may have different shapes. To unify these outputs and facilitate input into the multi-head attention layer, the outputs of the base network are considered to be converted into a two-dimensional matrix. In some preferred embodiments, considering that data features are extracted across time windows of varying lengths, a preferred two-dimensional matrix conversion method is provided. Specifically, the base network comprises N groups of base models for N different time window lengths. Each group of base models specializes in processing a time window of a specific length to capture data features within that time window length. Each group of base models comprises M base models with the same network structure. The outputs of the base network are constructed as an M x N two-dimensional matrix. In this matrix, each row (M) represents the output of a group of base models, and each column (N) corresponds to the feature extraction results for different time window lengths. Specifically, each row of the matrix contains the outputs of the same group of base models for different time windows, while each column contains the outputs of different groups of base models for the same time window length. This arrangement ensures 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, some preferred embodiments also provide a method for inputting the two-dimensional matrix into the multi-head attention layer, specifically comprising: 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 them into the multi-head attention layer. The linear transformation can be achieved through 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 (Q) is used to determine the target features that need to be paid attention to in the attention mechanism. The key matrix (K) contains the feature representation of each input element and is used to match it with the query matrix to calculate the relevance. The value matrix (V) stores the feature information that needs to be transmitted and is weighted by the attention weight to obtain the final output. 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 to generate the final attention weight.
[0051] Those skilled in the art will appreciate that after the multi-head attention layer processing, the model typically requires further processing via stacking and normalization components and feedforward network layers to produce the final feature output. During this process, the output of the multi-head attention layer is superimposed with the original input via a skip connection and then subjected to normalization (e.g., Layer Norm) to ensure model stability and efficient training. After these processing steps, the key information in the feature output is further enhanced, while noise or unimportant features are effectively suppressed, allowing the model to focus more on the most valuable parts of the data. Next, the feature output passes through a feedforward network layer (typically comprising one or more fully connected layers) to further extract and combine high-order features, enhancing the model's predictive capabilities. Finally, the processed feature output is processed using an activation function (e.g., ReLU, Swish, etc.) to introduce nonlinear factors, enabling the model to capture more complex feature relationships. The choice of activation function can be adjusted based on specific application requirements to optimize model performance. After these processing steps, the model ultimately generates a prediction result. Those skilled in the art can design the specific structure and parameter configuration of the output component based on their 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] A 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 underlying mathematical operations or optimization algorithms from scratch. In the present invention, the deployment of the public opinion heat prediction model mainly considers cross-platform deployment capabilities, 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, a lightweight model needs to be run to achieve real-time reasoning and localized computing, avoiding network delays. In some preferred embodiments, it is considered to deploy the public opinion heat prediction model to the server module through the Tensorflow framework to obtain a complete prediction model; and to deploy the public opinion heat prediction model to the browser module through the Tensorflow.js framework to obtain a lightweight integrated model; the structures of the complete prediction model and the lightweight integrated model are the same. 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 models 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 requirements 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 from 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 to 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 include but are 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 for the article or topic per unit time.
[0056] After obtaining the first data set, it is necessary to extract the feature data therein for further processing. There are many ways to extract this feature data. In some preferred embodiments, a method of extracting feature data using a time window is provided. To this end, it is considered to add an extraction unit to the acquisition module. The extraction unit is configured to set a time window of 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 a plurality of time windows to obtain y pieces of first data; the label of the data in each time window is the label of the time step next to the last time step of the current time window.
[0057] The time windows can be of varying lengths, and the label for the data within each time window is the label for the time step immediately following the last time step in the current window. A time window refers to a portion of data captured from a time series. When processing time series, data is divided into multiple time windows, each containing a set of consecutive time steps. The label is the target of the model's prediction, predicting the value at a future point in time.
[0058] The last time step of the current time window is: assuming a time window contains data from time points t1 to tn, then the last time step of the current time window is tn. The label of the next time step is: assuming 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] This step means that for all feature data within 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 learns to predict this future value (label) from the data (feature data) within the time window.
[0060] The server module is connected to the deployment module, the acquisition module, and the browser module, and is configured to store the complete prediction model and obtain the training set to complete training of the complete prediction model. In this embodiment, model training is not performed on the lightweight integrated model deployed in the browser module, but rather relies on the complete prediction model in the server module for training. After 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 requires high accuracy, or needs to process large-scale data, or needs to update and train the public opinion heat prediction model, it can be considered to input the public opinion data to be predicted into the complete prediction model. By 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, and is configured to use the training set to initially train the complete prediction model, or to use the data to be predicted to perform update training on the complete prediction model. This unit considers performing initial training on the complete prediction model to generate the model's initial parameters; and also considers using the data to be predicted to update the complete prediction model during the model application process, continuously optimizing the model parameters to adapt to dynamic changes in public opinion and improve prediction accuracy.
[0063] The first prediction unit is connected to the acquisition module and the complete prediction model, 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 inference process, and needs to handle more complex computing tasks to provide more accurate prediction results, ensuring 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 immediate 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 data privacy and security. 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 integration model respectively, and is configured to transmit and load the model parameters trained by the server module to the lightweight integration 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 integration model respectively, and is configured to input the data to be predicted into the lightweight integration 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 between a full prediction model and a lightweight integrated model based on their specific needs. For tasks requiring high precision and complex computations, a full prediction model is appropriate; whereas for scenarios emphasizing real-time performance and data privacy, a lightweight integrated model is a more ideal choice. This flexibility ensures the applicability and practicality of this invention in diverse 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 following steps:
[0070] S1. Collect public opinion data from social platforms and store it 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. 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 appreciate that a key prerequisite for model training is the preparation of a training set. In some preferred embodiments, 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 noted 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. Divide the data to be processed by topic popularity to obtain x sets of first data sets for x topics; the characteristic data of the first data sets include: the number of forwarding, commenting, likes, reading, number of entities associated with the topic, number of favorites, and number of media;
[0073] S22. Divide the data in the first dataset into a plurality of time windows to obtain y pieces of first data; wherein the time windows may be of different lengths, and the label of the data in each time window is the label of the time step following the last time step of the current time window. A time window refers to a portion of data captured from a time series. When processing a time series, data is divided into multiple time windows, each containing a set of consecutive time steps. The label is the target of the model prediction and is the value predicted at a certain point in the future.
[0074] The last time step of the current time window is: assuming a time window contains data from time points t1 to tn, then the last time step of the current time window is tn. The label of the next time step is: assuming 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] This step means that for all feature data within 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 learns to predict this future value (label) from the data (feature data) within 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. Loading 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 basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.
Claims
1. A lightweight integrated model system for public opinion heat prediction, characterized by: include: The public opinion heat prediction model module has a built-in public opinion heat prediction model based on a recurrent neural network, including 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 is connected to the public opinion heat prediction model module, the server module, and the browser module, 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; The collection module is connected to the server module and the browser module respectively, and is configured to collect public opinion data from 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; The acquisition module includes a preprocessing unit configured to divide the data to be processed by topic popularity to obtain x sets of first data sets regarding x topics; the characteristic data of the first data sets include: the number of forwarding, commenting, likes, reading, number of entities associated with the topic, number of favorites, and number of media in a unit time; 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 integration model respectively, and is configured to input the data to be predicted into the lightweight integration model to complete the public opinion heat prediction.
2. The lightweight integrated model system for public opinion heat prediction according to claim 1 is characterized by: 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.
3. The lightweight integrated model system for public opinion heat prediction according to claim 2 is characterized in that: The method for the extraction unit to perform feature extraction includes: The data in the first data set are divided into a number of time windows to obtain y pieces of first data; 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.
4. The lightweight integrated model system for public opinion heat prediction according to claim 1 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.
5. A lightweight integrated model training method for public opinion heat prediction, characterized by: Including 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.
6. The lightweight integrated model training method for public opinion heat prediction according to claim 5 is characterized in that: The method also includes the following steps: collecting public opinion data to be predicted, inputting the trained complete prediction model, and completing the update training of the complete prediction model parameters.
7. The lightweight integrated model training method for public opinion heat prediction according to claim 5 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 for x topics; the characteristic data of the first data sets include: the number of forwarding, commenting, likes, reading, number of entities associated with the topic, number of favorites, and number of media; Dividing the data in the first data set into a plurality of time windows to obtain y pieces of first data; All the first data are output as a training set.
Citation Information
Patent Citations
Scenic spot public opinion monitoring and analyzing system and method
CN111461553A
Public opinion sentiment analysis method based on time sequence-popularity double-attention mechanism fused with bidirectional long-short term memory network
CN116562298A
Automated fine-tuning and deployment of pre-trained deep learning models
US20220398462A1