A generative AI emotion propagation prediction and guidance large model construction method and system

By constructing a large-scale generative sentiment analysis model driven by semantics, syntax, and memory, and combining it with deep pre-training and sparse gating DeepSpeed-MoE models, the problem of insufficient accuracy and timeliness of traditional sentiment analysis methods on social media is solved, achieving efficient sentiment guidance and public opinion response, and improving the level of intelligence in online public opinion management.

CN119047512BActive Publication Date: 2025-11-07BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411160140.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2025-11-07
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

Traditional sentiment analysis methods lack accuracy and timeliness when faced with massive amounts of social media data. They cannot fully utilize information dissemination and user social relationships in social networks, and are unable to deeply explore the polarization and contagion mechanisms of individual emotions in dynamic dissemination. They also lack personalized emotion guidance strategies and cannot meet the needs of complex public opinion environments.

Method used

By employing a deep pre-trained large language model combined with a memory mechanism, and through multi-task learning and reinforcement learning, a generative sentiment analysis model driven by semantics, grammar, and memory is constructed. Personalized sentiment guidance is then implemented by incorporating user feedback. The model is trained using a sparse gating DeepSpeed-MoE model to construct a multi-dimensional guidance strategy and a sentiment propagation prediction model.

Benefits of technology

It improves the accuracy of sentiment analysis and the effectiveness of guidance, enabling rapid identification and response to changes in online sentiment, reducing the spread of negative emotions, enhancing the intelligence level of public opinion management, optimizing the utilization of computing resources, and adapting to diverse and sudden public opinion events.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119047512B_ABST
    Figure CN119047512B_ABST
Patent Text Reader

Abstract

The application provides a kind of emotion propagation prediction and guide large model construction method and system based on generative AI, first, construct emotion analysis large model, utilize large language model and multi-source social media data, fusion syntax, semantics and memory drive, adopt sparse gate mixed expert training technology, improve training efficiency and performance;Second, based on emotion analysis large model, carry out public opinion event propagation prediction and generate individual emotion and multi-dimensional guide controlled product of propagation content, carry out propagation prediction, generate emotion guide strategy and content simultaneously;Finally, build comprehensive system to demonstrate and verify, for diversification sudden public opinion event, based on space-time feature analysis network public opinion event propagation, carry out empirical analysis, improve the precision and efficiency of prediction model.The application breaks through the limitations of existing methods in dealing with complex, multi-modal emotion expression and dynamic change prediction and guidance, which helps to discover and alleviate social contradictions and maintain social stability.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of AI large models and emotion analysis prediction and public opinion dissemination, and particularly relates to a generative AI emotion dissemination prediction and guidance large model construction method and system. BACKGROUND

[0002] With the rapid development of the Internet and social media, the network has become an important position for people to express emotions, exchange views and participate in public opinion. Individual emotions in the network space show new characteristics of frequent expression, extensive dissemination and interactive influence. However, traditional emotion analysis methods are inadequate when faced with massive social media data, lacking sufficient precision and timeliness, and difficult to meet the needs of the current complex public opinion environment.

[0003] Traditional emotion analysis methods usually rely on the following technical means: keyword matching and sentiment dictionary, this method identifies the sentiment tendency in the text through predefined keywords and sentiment dictionary, which is simple and direct, but powerless to diversified and complex emotional expression, unable to capture context and implicit emotions; machine learning classifier, based on feature engineering and machine learning classifier (such as SVM, Naive Bayes, etc.), the method identifies emotions by manually extracting text features and training classifiers. This method requires a lot of feature engineering, and is highly dependent on the quality of feature extraction, with limited generalization ability; shallow neural network, using shallow neural network for emotion analysis, although it can automatically learn some features, but it is still insufficient when facing long text, complex context and emotion evolution, unable to handle long-range dependencies and multi-modal data. More importantly, traditional methods cannot fully utilize important factors such as information diffusion and user social relationships in social networks, making it difficult to explore the polarization and infection mechanism of individual emotions in dynamic dissemination, as well as the heterogeneous evolution patterns of emotions among different user groups. At the same time, lacking personalized emotion relief strategies combined with user feedback dynamic adjustment, it is difficult to provide strong support for the intelligent upgrading of public opinion management.

[0004] Currently, the rapid development of information technology represented by big data and artificial intelligence brings new opportunities for intelligent analysis and accurate guidance of network public opinion. Large language models (such as GPT-4, Claude-3, etc.) greatly improve the ability of machines to understand and generate natural language, laying the foundation for applications such as sentiment analysis, propagation tracking, and intelligent question answering. Through massive data pre-training, large models can better understand emotional semantics and model the emotional evolution process. Using deep learning networks, large models can automatically learn emotional features, overcoming the complexity of feature engineering in traditional methods. The introduction of a memory mechanism enables the model to capture long-range dependencies in emotional information, breaking through the bottleneck of limited time scales in existing methods. The present invention aims to achieve organic integration at the levels of semantic understanding, syntax analysis, and memory-driven, building a large emotional analysis model for individual expression on social media, accurately analyzing individual emotional states, revealing their derivative patterns and influence mechanisms in the time and space dimensions, and accurately sensing public emotional trends. Related research can help to discover and alleviate social conflicts, maintain social stability, and provide a basis for scientific decision-making and precise policy implementation.

[0005] To understand the mechanism of emotional generation and evolution, improve the accuracy of network public opinion analysis and prediction, and reasonably guide individual emotions on social media, the present invention will build a semantic, syntactic, and memory-driven emotional analysis large model, generate multi-dimensional controlled products with emotional guidance, and build an evaluation and prediction index system for the spread of network public opinion events. The present invention will focus on the core scientific problems of intelligent analysis and guidance optimization of individual emotions in complex social network environments, break through the semantic understanding bottleneck in emotional representation learning, consider social network information diffusion and user social relationships, explore the polarization and infection mechanisms of individual emotions in dynamic propagation, reveal the heterogeneous derivative patterns and mutual influence of different user groups, depict the spatiotemporal cognitive patterns of individual and group emotions in social networks, explore personalized emotional guidance strategies that dynamically adjust based on user feedback, guide internet platform's public opinion trend sensing, propagation path tracing, risk assessment and early warning, and promote the intelligent upgrading of public opinion management methods, providing key technical support for strengthening network space governance and building a harmonious and clear network ecology. SUMMARY

[0006] In view of this, the embodiments of the present invention provide a generative AI emotional propagation prediction and guidance large model construction method and system. Based on big data and artificial intelligence technology, the present invention breaks through the bottleneck of traditional methods and has the following innovations and advantages:

[0007] Deep pre-training model: using large language models (such as GPT-4, Claude-3) for massive data pre-training can deeply understand emotional semantics and automatically learn emotional features, avoiding tedious feature engineering;

[0008] Memory mechanism: Introduce memory mechanism to enable the model to capture the long-range dependence of emotional information, breaking through the bottleneck of the limited time scale of existing methods;

[0009] Multi-task learning combined with reinforcement learning: In the multi-task learning framework, the sentiment analysis and text generation tasks are combined, the loss functions of multiple sub-tasks are combined by weighting, and multi-task fine-tuning is realized. Reinforcement learning combined with human feedback (RLHF) is used for fine-tuning with a reward model, so that the emotion-guided content generated by the model is more in line with user needs and actual scenarios;

[0010] Personalized emotional relief strategy: By exploring the polarization and infection mechanism of individual emotions in dynamic propagation, combined with user feedback, a personalized emotional relief strategy is dynamically adjusted to guide the public opinion situation awareness, propagation path tracing and risk assessment and early warning of Internet platforms, and the intelligent level of public opinion management is improved.

[0011] The present application proposes to construct a semantic, syntactic and memory driven generative emotional analysis large model, which solves the limitations of existing emotional analysis and propagation prediction methods, such as insufficient context understanding, difficulty in capturing implicit emotions, poor flexibility, inability to handle long texts, etc. In particular, the processing of complex, multi-modal emotional expressions on social media is not sufficient, and the prediction and guidance of dynamic changes in emotions are not accurate.

[0012] The present application has both innovation and practicality. The present application first applies multi-level information fusion of syntax, semantics and memory to social media emotional analysis, uses an improved DeepSpeed-MoE model training technology with multi-expert and multi-data parallel, simplified routing, load balancing, gradient quantization and asynchronous training, which significantly improves the training efficiency and accuracy of the large model. By constructing a multi-dimensional guidance strategy and an emotional propagation prediction model, the ability to guide and respond to public opinion on social media is effectively improved, which has important practical application value.

[0013] The present application provides a generative AI emotional propagation prediction and guidance large model construction method, characterized in that the construction of the large model and system includes the following steps:

[0014] Step 1: Constructing an emotional analysis large model based on syntax, semantics and memory for social media, using a language large model to model the syntax structure and meaning, and combining the storage and tracing of historical information, using an open-source Chinese large language model as the basis, combining social media data, using sparse gate mixed expert training technology to construct an emotional analysis large model, and realizing emotional understanding and generation of replies to individual expressions on social media;

[0015] Step two, based on the emotional analysis of large model to carry out public opinion event spread prediction, collect and pretreat social media data, extract emotional features and transmission path, construct transmission model based on graph theory and complex network theory, simulate the transmission process of information in social network, use LSTM and random forest to train and optimize the model to improve the prediction accuracy, finally, combine the emotional analysis results to predict the transmission path and influence range of public opinion event;

[0016] Step three, generate individual emotion and multi-dimensional guidance strategy of transmission content, trace the transmission path of individual emotion, use target emotion controlled generation algorithm to generate multi-dimensional guidance strategy, realize effective guidance of individual emotion and transmission content, and enhance the ability of group negative emotion discrimination and public opinion response;

[0017] Step four, build emotional transmission prediction model and large model system demonstration and verification, establish network public opinion event transmission prediction model based on spatiotemporal feature analysis, select typical public opinion cases for empirical analysis, verify the accuracy and efficiency of the prediction model, and realize efficient prediction of the transmission range and effect of public opinion event.

[0018] Collect and process multi-source social media individual expression data, combine historical and real-time data of 12345, use crawler technology and API interface to obtain representative and diverse individual expression data from major social media platforms, the goal is to obtain data covering social media and dialogue content under different themes, fields and contexts, and support the generalization ability of emotional analysis large model for various emotional expressions, and then through the data preprocessing stage including text cleaning, word segmentation, entity recognition and denoising, shallow noise removal of punctuation marks, redundant spaces and HTML tags, and noise reduction based on regular expression:

[0019] T ′ = regex.sub(pattern, replacement, T)

[0020] Using T ′ = regex.sub('<.*?>',”, T) can remove the crawled HTML tags, and regular expression can also be used as a dictionary mapping to replace noise;

[0021] For deep syntax errors, spelling errors, irrelevant words, repeated words, semantic noise and ambiguous noise, use BERT pre-trained language model to monitor and remove deep noise:

[0022] First, convert the input text into embedded representation, for an input text, get its embedded representation through BERT pre-trained language model:

[0023] F = BERT(T)

[0024] A classification layer is used to determine whether a word or sentence is noise. Since the specific noise category is not concerned, in order to reduce the output category, only a binary classification task of noise and non-noise is defined, and the classification probability of each embedding vector is calculated by the following formula:

[0025] p i =softmax(We i +b)

[0026] Where W is the weight matrix of the classification layer, b is the bias vector, softmax(·) is the activation function for binary classification, and p i represents the probability that the ith word is noise:

[0027] T′={w i ∣p i ≤τ}

[0028] According to the detected noise probability, a threshold τ is set. If p i ≤τ, it is considered that the word or sentence is noise and is removed, otherwise it is retained, T ′ represents the text after noise removal. The preprocessed text data is added with emotional labels and basic event statistical classification by artificial means, and based on these labels and classifications, the GPT generative language model is used to generate answers, the generated answers are manually reviewed to determine whether they meet the actual situation and context, and necessary adjustments are made. Further introduce the opinions of psychological experts, evaluate and adjust the answers generated by the model to ensure professionalism and accuracy, and obtain the answers to these individual expression data, providing training data required for supervised learning for the emotional analysis large model;

[0029] A generative multi-modal and multi-scale emotional analysis large model is constructed. Multi-modal refers to text, image, speech, and video modalities, and multi-scale refers to pixel-level scale and region-level scale. The open-source Chinese large language model is used as the basis for the generative emotional analysis large model. The function of the generative multi-modal and multi-scale emotional analysis large model is to generate text replies with emotional color, while supporting the access of multi-modal generation models such as images, speech, and videos. Different types of data are handled, and multi-modal feature fusion is performed from three aspects: feature level, attention level, and decision level. Meanwhile, a multi-scale fusion method based on attention mechanism is used to improve the contribution of each image modality feature. The generative multi-modal and multi-scale emotional analysis large model is constructed based on training data, and supervised learning and reinforcement learning methods are used to train and fine-tune the model, reduce hallucinations, and increase consistency. Specifically, the pre-trained model parameters are kept unchanged, an output layer with an output size equal to the number of emotional categories is added to the target model, and the model parameters of this layer are randomly initialized. The target model output layer is trained from scratch on the target data set, and the model output fθ (x i ) forward propagation and loss calculation The backward propagation of the gradient of the loss and the updating of the parameters of the remaining layers are based on the fine-tuning of the parameters of the source model, and the key of the fine-tuning is to enable the model to learn specific contexts and expression ways in the field of emotion analysis, so that the model can be more flexible to adapt to different emotion expression ways, thereby improving the overall performance of emotion analysis and generating emotion content that is more consistent with the expression of individuals on social media.

[0030] To address the problems of high computing power demand and multi-card reasoning difficulty in multi-task reinforcement learning training, a sparse gating hybrid expert network is used for multi-task training, and an improved DeepSpeed-MoE model training technology with multi-expert and multi-data parallelism, simplified routing, load balancing, gradient quantization and asynchronous training is proposed. In a simple and computationally efficient way, the pre-training parameter quantity is maximized, and the allocation strategy of the expert model is dynamically adjusted according to the load and performance of each expert model to efficiently utilize computing resources. Real-time monitoring of the load status of each expert model, including computing load and memory usage, distributes the model in parallel on multiple computing nodes, with each node responsible for a part of the model parameters, reducing the computing load and memory usage of a single node, and improving the reasoning speed. Compared with the traditional MoE routing strategy, the gating network sends the input x of each token to the top-k expert model. To reduce communication and computing costs, each input x is sent to only one expert model. In order to make the load of the expert model more balanced, an auxiliary loss is added:

[0031]

[0032] Where N is the number of experts, f i is the proportion of tokens allocated to expert i, P i is the sum of the probabilities of all tokens in a batch being allocated to expert i, and the gradient quantization and compression formula is:

[0033]

[0034] Where is the gradient vector, and the quantization scaling factor To control quantization precision, reduce the amount of gradient data transmitted over the network, and lower communication bandwidth requirements, where n is the quantization bit width; an asynchronous training strategy is used, with each computing node independently performing gradient calculation and updates, reducing synchronization overhead and improving training speed. Each computing node independently calculates gradients and updates parameters, reducing synchronization waiting time. Each node performs gradient calculation and parameter updates at its own speed, adapting to different computing resources and data distributions. A two-stage fine-tuning strategy is adopted in the multi-task training phase to improve the training efficiency and performance of the DeepSpeed-MoE model.

[0035] The first stage uses a large-scale corpus to pre-train the sparse gated DeepSpeed-MoE network. Assuming there are E expert networks and one input sample x, the router output can be represented as g(x) = (g1(x), g2(x), ..., g E (x)) are used to convert these scores into probabilities using the softmax function. After probability sorting and mask selection, a mask vector is created, where 1 represents the selected expert and 0 represents the unselected expert. The expert with the highest probability is selected for dynamic activation, realizing the dynamic allocation of the expert network to achieve effective information integration and learning. Sparsity constraints are used to limit the number of parameters in the gating network, thereby reducing the computational cost and memory usage of the DeepSpeed-MoE model.

[0036] The second stage uses data from two target tasks—sentiment analysis and text generation—to fine-tune the entire DeepSpeed-MoE model. Layers closer to the input layer are frozen, and only the later layers and the output layer are trained. This is because earlier layers capture lower-level features, while later layers and the output layer can recognize higher-level features and ultimately complete the task. The knowledge learned in the first stage is fine-tuned to better fit the tasks of sentiment analysis and text generation. By fine-tuning on the target tasks, the entire DeepSpeed-MoE model is made more consistent with the data distribution and features of specific tasks, thereby improving the performance and generalization ability of the DeepSpeed-MoE model.

[0037] Sentiment polarity analysis was performed using the SnowNLP sentiment analysis library to extract emotional features, sentiment polarity, and sentiment intensity. Furthermore, based on user interaction relationships, a propagation network graph was constructed using the NetworkX library. The formula for extracting propagation paths is as follows:

[0038]

[0039] Where P(u, v) represents the probability of user u propagating information to user v, W(u, v) represents the interaction weight between user u and user v, and D(u) is the out-degree of user u. Based on graph theory, the classic SIR (Susceptible-Infected-Recovered) model is used to simulate the propagation process of public opinion in social networks. The specific model definition is as follows: S(t) is the proportion of infected individuals at time t, I(t) is the proportion of susceptible individuals at time t, and R(t) is the proportion of recovered individuals at time t. The dynamic equation of the model is:

[0040]

[0041]

[0042]

[0043] where β is the propagation rate and γ is the recovery rate. In addition, a social media public opinion propagation model is constructed using complex network theory. The specific method is to generate a scale-free network using the Barabasi-Albert (BA) model to simulate the interaction between social media users, use the PageRank algorithm to calculate the importance of user nodes, and identify key propagation nodes:

[0044]

[0045] where PR(u) is the PageRank value of node u, d is the damping factor, N is the total number of nodes, M(u) is the set of all incoming link nodes of node u, and L(v) is the out-degree of node v. The LSTM network is used for time series prediction, with the input of the LSTM being the emotion feature sequence and the output being the emotion state at the next time step. The calculation formula of LSTM is as follows:

[0046] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0047] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0048]

[0049]

[0050] o t =σ(W o ·[ht-1 ,x t ]+b o )

[0051] h t =o t ·tanh(C t )

[0052] Among them, f t i t , C t o t and h t The parameters are the forget gate, input gate, candidate cell state, cell state, output gate, and hidden state. Finally, the random forest algorithm is used to classify and predict the propagation path. The calculation formula for random forest is:

[0053]

[0054] Where h(x) represents the prediction result of the random forest, N is the number of trees, and h i (x) represents the prediction result of the i-th tree. Combining the sentiment analysis results, a trained LSTM and random forest model is used to predict the propagation path and scope of influence of the public opinion event. The propagation probability and propagation speed of each node are calculated, and a propagation path diagram is drawn. Using the results of the PageRank and LSTM models, key propagation nodes are identified, focusing on the emotional state and interactive behavior of these nodes, and predicting their impact on the overall propagation.

[0055] This paper constructs a framework and method for emotion-oriented content generation. Addressing the issues of existing generative language models' limited and monotonous generation of emotion-oriented content based on individual emotional states, it proposes guidance strategies and content generation model optimization schemes based on generative adversarial networks (GANs) and variational autoencoders (VAEs). This generates text, images, audio, and other content that aligns with the target emotion. Key technologies include memory-driven evaluation, correction, and follow-up of guidance effects. An adversarial state tracking technology, combined with natural language processing and named entity recognition (NER), is used to establish a dialogue state tracking module. This module evaluates the topics and viewpoints in the dialogue and makes corrections. A named entity recognition model is constructed using a bidirectional long short-term memory (BSSM) network combined with conditional random fields (CRFs). Based on dialogue history and user feedback, the dialogue state is updated, and key correction information is recorded and fed back to the generative model. The output of the bidirectional BSSM network is represented as follows:

[0056]

[0057] in and h represents the hidden states of the forward and backward long short-term memory units at time step t, respectively. tis the connection of forward and backward hidden states, conditional random fields are used to capture the dependencies between labels, especially the label transition relationship in the sequence labeling task, define the transition matrix A, where A i,j represents the score of transition from label i to label j, given the input sequence x and its corresponding label sequence y = (y1, y2, …, y n ), the score function is calculated as:

[0058]

[0059] where P represents the output score matrix of the bidirectional long short-term memory network, represents the score of label y t at time step t, the score function is the core tool for evaluating the quality of generated content, which solves the difficulty of guiding the direction of propagation for the target emotion, the lack of emotion guidance evaluation and follow-up, and constructs an individual emotion multi-dimensional feature fusion generation framework. According to the specific emotion target, the propagation content and emotion guidance scheme strategy and specific content conforming to the individual emotion are generated;

[0060] The propagation content guidance strategy is formed, the difference processing mode problem of the emotion intensity, emotion vocabulary, expression mode, social network relationship and other differences of the emotion source individual is solved, the target individual characteristics are combined, the model generation mechanism research of the emotion guidance content elements based on social network analysis and propagation model, the key node and propagation path confirmation and evaluation verification method in emotion propagation are broken through, the multi-dimensional guidance strategy generation algorithm model conforming to the target emotion is generated, starting from the expression symbol embedding coding technology and model word segmentation technology, the multi-dimensional guidance strategy formation of the propagation content adapting to the individual emotion characteristics is realized, the technology support for the multi-dimensional guidance scheme generation adapting to the individual emotion characteristics is provided, the expression symbol embedding coding technology is added, the multi-dimensional guidance strategy generation algorithm model will take the expression symbol as a special mark, and encode with other text marks, and then embed the expression symbol in the generated text, so as to enhance the emotion expression. The expression symbol is represented as an embedding vector, E is the expression symbol set, T is the text mark set, V = E U T is the expanded vocabulary table, each expression symbol e E E and text mark t E T has a corresponding embedding vector e and t, and a one-hot vector is used to represent:

[0061] e onehot ∈{0,1} |V|

[0062] t onehot ∈{0,1} |V|

[0063] The embedding matrix is the selection of expression and text, and each row corresponds to the vector representation of a specific word or expression symbol mark. The embedding vector is obtained by using the embedding matrix:

[0064] e = We ·e onehot

[0065] t=W t ·t onehot

[0066] wherein is an embedding matrix corresponding to the expression, is an embedding matrix corresponding to the text, d is the dimension of the embedding vector;

[0067] The model word segmentation technology regards the segmentation of words as a state transition process in a Hidden Markov Model (HMM), helps to identify and segment proper nouns and terms, and improves the accuracy of text processing. In the HMM model, each word is regarded as a hidden state. The HMM model calculates the probability of each state through the observed character sequence, and determines the segmentation position of the word through these probabilities. The HMM model consists of five parts: state set S, observation set V, initial state probability distribution π, state transition probability matrix A, and observation probability matrix B:

[0068] S={s1,s2,…,s N}

[0069] V={v1,v2,…,v M}

[0070] π={π i}

[0071] A={a ij}

[0072] B={b ij}

[0073] wherein s i represents a hidden state, for example, the beginning (B), middle (M), end (E) and single word (S) states of the emotional word, v i in the observation set represents an observation value (character), π i in the initial state probability distribution represents the probability of state s i at the initial time, a ij in the state transition probability matrix represents the probability of transition from state i to state j, b ij in the observation probability matrix represents the probability of generating observation value v i in state s i :

[0074] Given an observation sequence O=(o1,o2,…,o TThe Hidden Markov Model (HMM) determines the word segmentation position by calculating the probability of each state sequence. The forward algorithm calculates the segmentation position at time step t, with state s... i The probability α of the last part of the sequence t (i):

[0075] α t (i) = P(o1,o2,…,o t ,q t =s i )

[0076] The recursive formula is:

[0077]

[0078] Where α t (i) At time step t, with state s i The probability of the last part of the sequence, a ij State transition probability, from state s i Transition to state s j The probability, b j (o t+1 In state s j Generate observations o t+1 The probability is calculated at time step t from state s. i The probability β of generating a partial sequence. t (i):

[0079] β t (i)=P(o t+1 ,o t+2 ,…,o T |q t =s i )

[0080] The recursive formula is:

[0081]

[0082] Where, β t (i) is at time step t, with state s i The probability of the starting partial sequence, a ij State transition probability, from state s i Transition to state s j The probability, b j (o t+1 In state s j Generate observations o t+1 The probability is used to find the most likely state sequence, i.e., the position of word segmentation, using the Viterbi algorithm:

[0083]

[0084] The recursive formula is:

[0085]

[0086] An emotion propagation prediction and guidance system is established, and the application and evaluation of the emotion analysis large model in the network individual and group emotion analysis and cognitive mode, multi-modal emotion derivative representation, individual emotion and multi-dimensional guidance of the controlled generation of propagation content are designed, and the corresponding system and software architecture are designed, and the emotion propagation prediction and guidance system is developed;

[0087] An opinion event propagation state and trend analysis prediction model is established, and the space-time propagation evaluation and prediction demand of various opinion events generated in the network space is constructed, and an opinion event propagation range and guidance effect prediction model is constructed, and an opinion event propagation evaluation method based on BP neural network and multi-layer social network research is established:

[0088] An index system framework is constructed from the perspectives of opinion source, opinion propagation and opinion audience, and a multi-factor input modeling and multi-layer social network modeling of the three indexes of opinion source, opinion propagation and opinion audience is performed by using BP neural network and graph convolution network, and the best opinion event propagation prediction model is trained, 16 three-level indexes affect the opinion event propagation evaluation index, therefore the number of input layer neurons in the BP neural network model is 16, only the opinion event propagation evaluation index needs to be obtained, therefore the number of output layer neurons is 1, there is a direct correlation between the number of hidden layers of the BP neural network and its learning efficiency, and theoretical proof shows that a BP neural network with at least 3 layers can approximate any continuous function, that is, a BP network with only one hidden layer can relatively simply realize the required function, model almost all nonlinear systems, with the increase of the number of hidden layers, the network error gradually decreases, but the network structure becomes more complex, which easily causes longer network training time or overfitting phenomenon, therefore a 3-layer BP neural network is adopted, the number of neurons in the hidden layer is 6, if no excitation function is selected, each layer of the neural network is only a linear transformation of the previous layer, and the final output after multi-layer superposition is still a linear transformation of the original input, therefore a nonlinear factor is introduced, and a Sigmod function is used as the excitation function, as shown in the following formula:

[0089]

[0090] The modeling of the multi-layer social network involves processing network data of multiple relationship levels, which contains multiple types of nodes and edges, the nodes represent users and posts, and the edges represent friend and like follow relationships, in combination with the BP neural network, complex multi-factor input modeling can be realized, the multi-layer social network modeling: through the GNN graph neural network, the nodes and edge features in each layer of the network are extracted, assuming that there are L layers of social networks, the node feature matrix of each layer of the network is H (l) , and the edge feature matrix is A (l) , wherein l=1, 2, …, L, the GCN graph convolution network processes each layer of the social network to generate node embedding H (l+1) =σ(A (l) H (l) W (l) ), wherein σ is an activation function, W (l) is the weight matrix of the lth layer, the original input feature x is spliced with the node H (l) generated by each layer of the social network to form a comprehensive feature vector z=[x;H (1) ;H (2) ;…;H (L) ], the multi-layer social network is combined with the BP network, and the comprehensive feature vector z is input into the BP neural network for training, the weight matrix W is adjusted by the back propagation algorithm, the loss function is minimized, and finally the prediction model is obtained Based on the combination of the BP neural network and the multi-layer social network, the propagation feature extraction of the public opinion event in the space and time dimensions is realized, and then the propagation state and evolution trend of the public opinion event are analyzed, which provides strong technical support for improving the performance and accuracy of the public opinion event prediction model and the management and guidance of the public opinion event.

[0091] Demonstrate and verify the personal analysis and prediction guidance of the public opinion event, carry out the demonstration and verification of the personal and group emotion propagation state analysis and trend prediction guidance according to the typical hot event public opinion guidance demand, analyze and predict the historical and present hot public opinion events through the corresponding emotion propagation prediction and guidance large model and system in the previous research content, verify and confirm the path feasibility and guidance method effect of the emotion propagation of the public opinion event, realize the iterative optimization of the public opinion event management and guidance, and evaluate the performance and application effect of the research results of the subject on the public opinion event propagation analysis and guidance.

[0092] A computer readable storage medium, having stored thereon a computer program, wherein the program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 4.

[0093] The beneficial effects of the present application are at least:

[0094] 1. Comprehensive sentiment analysis: On social media, people's emotional expressions are often complex and may even contain multiple emotions at the same time. By building a sentiment analysis large model based on grammar, semantics and memory-driven, we can deeply understand these complex emotions and more accurately capture the emotional state of individuals. Traditional sentiment analysis methods often only focus on the surface information of the text, ignoring the deep meaning and context relationship behind the text. The sentiment analysis large model of the invention can comprehensively consider the grammatical structure, semantic information and memory factors of the text, greatly improving the accuracy of sentiment analysis.

[0095] 2. Efficient emotion guidance: The controlled product generated by individual emotion and multi-dimensional guidance of communication content can provide stable and effective emotion guidance strategies and specific guidance content, improve the consistency and traceability of emotion guidance, and help to evaluate and follow up the subsequent guidance effect. By generating a controlled product of individual emotion and multi-dimensional guidance of communication content, the invention can provide stable and effective emotion guidance strategies. These strategies not only consider the individual emotional state of the target audience, but also combine the characteristics of the communication content and the characteristics of the communication channel, ensuring the stability and consistency of the guidance effect. The emotion guidance method of the invention has high traceability. In the guidance process, we can clearly track and record the guidance content and effect of each link, which is convenient for subsequent effect evaluation and follow-up. This traceability helps to continuously optimize the guidance strategy and improve the guidance effect. Efficient emotion guidance can make information produce more positive effects in the process of communication. This helps to improve public awareness, enhance social cohesion and promote the harmonious and stable development of society.

[0096] 3. Improve public opinion response ability: Through comprehensive sentiment analysis and efficient emotion guidance, the invention significantly improves the public opinion response ability. Specifically, it includes: rapid identification and response: comprehensive sentiment analysis enables public opinion managers to quickly identify changes in emotions and potential crises in the network, and take timely response measures. Precise intervention and guidance: efficient emotion guidance strategies can quickly stabilize the emotions of individuals affected by public opinion events, reduce the spread of negative emotions, promote the spread of positive emotions, and alleviate public opinion crises. Systematic public opinion management: based on sentiment analysis and guidance models, a systematic public opinion response mechanism can be built to improve the scientificity and effectiveness of public opinion response.

[0097] 4. Optimal utilization of resources: By adopting the sparse gating DeepSpeed-MoE training technology, the problem of large computational resources required for large model training is solved, and the utilization of computational resources is optimized, improving the efficiency and effectiveness of DeepSpeed-MoE model training. In large model training, computational resources are usually a huge expense. By adopting the sparse gating DeepSpeed-MoE training technology, the invention can significantly reduce the consumption of computational resources, thereby reducing the training cost and making large model training more economical and efficient. The sparse gating DeepSpeed-MoE training technology can intelligently select and process key data, reducing redundant calculations. This not only speeds up the training, but also improves the resource utilization rate during the training process, making large model training more efficient. By optimizing the utilization of computational resources, the invention can enable large models to better learn and adapt to data during the training process, thereby improving the performance of the model. This optimization not only reflects in the accuracy of the model, but also in the robustness and generalization ability of the model.

[0098] 5. Wide application: In the face of diverse and sudden public opinion events and the demand for public opinion event transmission prediction and verification in the big data environment, the invention has a wide range of application scenarios and applicability. Whether it is economic, social or cultural public opinion events, the invention can provide effective sentiment analysis and guidance strategies. By providing sentiment analysis and guidance strategies for different types of public opinion events, the invention can help decision-makers better understand public sentiment and grasp the direction of public opinion. This will help improve the scientificity and effectiveness of decision-making and reduce decision-making risks. In sudden public opinion events, public sentiment is often volatile and may even lead to social unrest. Through the sentiment analysis and guidance strategies provided by the invention, we can effectively stabilize public sentiment and prevent the spread and escalation of negative emotions, thereby enhancing the stability and harmony of society.

[0099] Additional advantages, objects, and features of the application will be set forth in part in the description which follows, and in part will become apparent to those skilled in the art upon examination of the following or can be learned by practice of the application. The objects and other advantages of the application can be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.

[0100] It will be understood by those skilled in the art that the objects and advantages of the present application can be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings. BRIEF DESCRIPTION OF DRAWINGS

[0101] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the principles of the application. In the drawings:

[0102] Figure 1 A step schematic diagram of the emotion propagation prediction and guidance large model and system based on generative AI in the present application.

[0103] Figure 2 A technical process schematic diagram of the multi-source social media individual expression data collection and processing in the present application.

[0104] Figure 3 A technical process schematic diagram of the generative multi-modal multi-scale emotion analysis large model construction in the present application.

[0105] Figure 4 A sparse mixed expert model training schematic diagram in the present application.

[0106] Figure 5 A multi-dimensional individual emotion feature fusion generation schematic diagram in the present application.

[0107] Figure 6 A multi-dimensional guidance strategy content controlled generation mechanism process schematic diagram in the present application.

[0108] Figure 7 A system hierarchical architecture diagram in the present application.

[0109] Figure 8 A multi-layer social network propagation model structure diagram in the present application.

[0110] Figure 9 A demonstration emotion propagation prediction and guidance large model verification system schematic diagram in the present application. DETAILED DESCRIPTION

[0111] In order to make the objectives, technical solutions and advantages of the present application clearer, further detailed description will be given to the present application in combination with embodiments and drawings. Herein, the illustrative embodiments of the present application and the description thereof are used to explain the present application, but not as a limitation to the present application.

[0112] Herein, it also needs to be explained that, in order to avoid the present application being obscured by unnecessary details, only the structures and / or processing steps closely related to the solutions according to the present application are shown in the drawings, and other details not closely related to the present application are omitted.

[0113] It should be emphasized that the term “comprise / comprising” is used herein to indicate the presence of a feature, element, step or component, but not to exclude the presence or addition of one or more other features, elements, steps or components.

[0114] Herein, it also needs to be explained that, if not specially stated, the term “connection” herein can not only mean direct connection, but also mean indirect connection with an intermediate.

[0115] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0116] To understand the evolution mechanism of emotion generation, improve the accuracy of network public opinion analysis and prediction, reasonably guide individual emotions in social media, and further perfect the social governance system, to solve the limitations of existing emotion analysis methods, especially the insufficient processing of complex and multi-modal emotion expression on social media and the inaccurate prediction and guidance of dynamic changes of emotions, the present application provides a large model and system for emotion propagation prediction and guidance based on generative AI, as shown in Figure 1 The method comprises the following steps S101-S108:

[0117] Step S101: Multi-source social media individual expression data acquisition and processing. In combination with the 12345 dialogue text database, a large amount of network public opinion data is obtained through multi-source social media individual expression data acquisition, text preprocessing is performed, and further through artificial processing, the construction of emotion analysis data set is completed.

[0118] Step S102: Construct a generative multi-modal and multi-scale emotion analysis large model. Take the open source Chinese large language model as the base to become the basis of the generative emotion analysis large model. The function of this model is to generate text replies with emotional color, and at the same time support the access of multi-modal generation models of text, image, voice and video. The model is constructed based on training data, and the methods of supervised learning and reinforcement learning are used to train and fine-tune the model, reduce hallucinations and increase consistency. Specifically, keep the pre-training model parameters unchanged, add an output layer with an output size of the number of emotion categories to the target model, and randomly initialize the model parameters of this layer. Train the target model from scratch to train the output layer, calculate the forward propagation of the model output f θ (x i ) and the loss The parameters of the remaining layers are fine-tuned based on the parameters of the source model. The key to fine-tuning is to enable the model to learn specific contexts and expressions in the field of sentiment analysis, making the model more flexible to adapt to different emotional expressions, thereby improving the overall performance of sentiment analysis. In the modeling of emotion propagation and public opinion evolution, a graph model is used to simulate the propagation process of emotions in the network, and combined with traditional random walk and propagation algorithm, the emotion diffusion path and trend are predicted. At the same time, the autoregressive integrated moving average model (ARIMA) is applied to the time series prediction of public opinion data, capturing the trend of emotion propagation and the change of public opinion. In the aspect of multi-modal feature fusion, the weighted fusion and multi-layer perception (MLP) method is used to fuse and process the features of text, image, audio and other modalities, capturing the complex nonlinear relationship between features. In the study of the relationship between individual emotion and group emotion, social network analysis method is used to study the relationship and influence between individuals, and the node centrality index is used to determine the status and influence of individuals in the network. The decision tree algorithm is applied to study the influence of individual characteristics on group emotion, and the support vector machine method is used to establish the mathematical relationship between individual emotion and group emotion, and analyze the influence degree and trend of different characteristics on emotion.

[0119] Step S103: Sparse gated hybrid expert multi-task training is used. Based on the business model and sub-tasks supported by the large model, DeepSpeed-MoE with multi-expert and multi-data parallelism, simplified routing, load balancing, gradient quantization, and asynchronous training is improved for multi-task training to obtain an emotion analysis basic large model supporting specific tasks and businesses. First, the input data is divided into multiple regions according to the task type and assigned to the corresponding GRU, and the input data is dynamically allocated by the gating unit. In order to reduce the amount of calculation and memory occupation, the parameters of the gating unit are sparsely constrained, which is realized by L1 regularization and sparsity penalty. The GRU uses the gating mechanism to control the information flow and capture the long-term and short-term dependencies in the sequence data. In the multi-task fine-tuning process, combined with sub-tasks such as sentiment analysis and text generation, a joint loss function is designed, and a multi-task learning framework is used to optimize the performance of the model between multiple sub-tasks. Specifically, the sentiment analysis task uses a cross-entropy loss function, while the text generation task uses a negative log-likelihood loss function. During the fine-tuning process, a combination of supervised learning and reinforcement learning is used to gradually adjust the model parameters to better fit the data distribution and features of specific tasks.

[0120] Step S104: Based on the mood analysis large model, the public opinion event propagation prediction is carried out. The information propagation model is constructed by using graph theory and complex network theory to determine the nodes, edges and propagation strength of information propagation, so as to simulate the propagation process of information in social network. Long short-term memory network (LSTM) and random forest algorithm are used to train and optimize the propagation model to improve the prediction accuracy. Combined with the mood analysis result, the propagation path and influence range of public opinion event are predicted, and the potential key propagation nodes and information influence are identified to support the management and intervention of public opinion event.

[0121] Step S105: Individual mood multi-dimensional feature fusion generation framework. The individual mood difference multi-dimensional representation demand is combed. The mood effect is affected by multiple features. The guided strategy and content generation model optimization scheme based on generative adversarial network, variational autoencoder and other technologies are used to generate text, image, audio and other propagation content conforming to the target mood. The key technologies such as memory driven guide effect evaluation, correction and follow-up are used. The dialogue state tracking module is established by using the opposite state tracking technology combined with natural language processing (NLP) and named entity recognition (NER). The theme and viewpoint in the dialogue are evaluated and corrected. The NER model is constructed by using bidirectional long short-term memory network (BiLSTM) combined with conditional random field (CRF). According to the dialogue history and user feedback, the dialogue state is updated, and the key correction information is recorded and fed back to the generative model.

[0122] Step S106: Constructing multi-dimensional guided strategy content controlled generation mechanism. The mood-oriented content multi-modal generation technology of expression symbol embedding coding and model word segmentation is used to carry out multi-dimensional design of individual mood features, break through the memory driven mechanism, construct a multi-dimensional guided content generation evaluation verification mechanism with strong controllability and high reliability, solve the problems of lack of pertinence and interactivity of complex network environment emotion guidance, and ensure the efficiency and stability of network public opinion guidance.

[0123] Step S107: Emotion propagation prediction and guidance system. The system is composed of data processing layer, model integration layer, demonstration verification layer and computing resource. The emotion propagation prediction and guidance large model is demonstrated and verified.

[0124] Step S108: Public opinion event propagation range and guidance effect prediction model. A network public opinion detection index system is established from three aspects of network public opinion source, public opinion propagation and public opinion audience to provide theoretical support for comprehensive evaluation of public opinion event propagation in network. The BP neural network structure of public opinion event propagation evaluation is established to improve the accuracy and precision of public opinion event propagation comprehensive effect evaluation. The BP neural network structure can process multi-dimensional data and model complex nonlinear relationship, realize real-time dynamic learning and self-adaptive adjustment, so as to better analyze the propagation situation of public opinion event and provide reliable decision support and guidance strategy for public opinion control.

[0125] Step S109: Typical public opinion event emotion propagation state analysis and prediction guidance demonstration verification system. From data collection and processing, emotion analysis model construction, emotion propagation path analysis to emotion trend prediction guidance, system verification and optimization, to real-time data monitoring and updating, visualization display and report generation, and user feedback and system optimization, each step will provide key support and optimization for the establishment of the system. This complete technical route will ensure that the system built will play the greatest effect in public opinion event management and provide users with comprehensive and accurate emotion propagation analysis and prediction guidance services.

[0126] Steps S101-S103 are specific steps for constructing an emotion analysis large model based on syntax semantics and memory drive.

[0127] As Figure 2 In step S101, multi-source social media individual expression data collection and processing is implemented. First, the existing 12345 government affairs convenient service hotline dialogue data is processed and texted to obtain the corresponding dialogue time and content. Under the premise of complying with relevant regulations and legal requirements, intelligent crawler programs and data collection APIs provided by social media (such as Weibo, Baidu Post Bar, Douyin, Xiaohongshu, Zhihu, etc.) are used to realize the targeted grabbing of public dialogue content on different public opinion events on social media platforms. The collected social media dialogue text needs to be preprocessed, including text cleaning, standardization, deduplication, desensitization, formatting, and denoising, etc. steps to ensure the accuracy of subsequent emotion analysis and time series analysis.

[0128] The noise in the text is divided into shallow and deep levels. Shallow noise such as extra symbols, HTML tags, punctuation marks, and other irrelevant characters. Remove punctuation marks, extra spaces, and HTML tags, and use regular expression-based noise reduction:

[0129] T ′ = regex.sub(pattern, replacement, T)

[0130] For example, T ′ = regex.sub('<.*?>',”,T) can remove the crawled HTML tags. Regular expressions can also be used as dictionary mappings to replace noise.

[0131] For deep-level noise, such as syntax errors, spelling errors, stop words and irrelevant words, repeated words, semantic noise and ambiguous noise. Use the BERT pre-training language model to monitor and remove deep-level noise.

[0132] First, convert the input text into an embedded representation. For an input text, obtain its embedded representation through the BERT model:

[0133] F = BERT(T)

[0134] A classification layer is used to determine whether a word or sentence is noise. Since the specific noise category is not concerned, in order to reduce the output category, only one binary classification task (noise vs. non-noise) is defined, and the classification probability of each embedding vector is calculated by the following formula:

[0135] p i =softmax(We i +b)

[0136] where W is the weight matrix of the classification layer, b is the bias vector, softmax(·) is the activation function for binary classification, and p i represents the probability that the i-th word is noise.

[0137] T' = {w i ∣p i ≤τ}

[0138] According to the detected noise probability, a threshold τ is set, if p i ≤τ, it is considered that the word or sentence is noise and is removed, otherwise it is retained, and T' represents the text after noise removal.

[0139] The cleaned dialogue information is accurately sorted according to the timestamp, and by establishing a time series dataset, the user's emotional evolution trend over time can be captured, providing strong support for in-depth mining of the rules of emotional changes in the dialogue process. On the basis of collecting data, the content classification and emotional categories analyzed by statistical analysis are used as prompt words, a large language model is used to generate a rough dataset, and then the automatically generated training data is screened and checked to select high-quality data as the training set.

[0140] As Figure 3 , in step S102, a multi-modal and multi-scale generative emotion analysis large model is constructed. A multi-modal emotion analysis model capable of comprehensive analysis of multiple information is constructed by combining multiple data sources such as text, image, and sound. The BERT model is used to extract the processed text mentioned above, and the CNN is used to extract image and sound features.

[0141] H text =BERT(T ′ )

[0142] H video =CNN(X video )

[0143] H audio =CNN(X audio )

[0144] Feature-level fusion, training stage attention, and output stage decision-level fusion are performed at different stages. Feature-level fusion concatenates features of different modalities in feature space.

[0145] H fusion = Concat(H text ,H video ,H audio )

[0146] On the basis of feature-level fusion, an attention mechanism is introduced to further focus on important features. The attention weight is calculated using softmax, and the weighted sum is calculated:

[0147] α audio = softmax(W audio H fusion )

[0148] α image = softmax(W image H fusion )

[0149] α text = softmax(W text H fusion )

[0150] H attention = α audio H audio + α image H image + α text H text

[0151] On the basis of feature-level and attention fusion, the decision results of each modality are fused:

[0152] y audio = MLP(H audio )

[0153] y image = MLP(H image )

[0154] y text = MLP(H text )

[0155] y final = softmax(w audio y audio + w image y image + w text y text )

[0156] By effectively combining feature-level fusion, attention fusion, and decision-level fusion, a more robust and accurate multi-modal emotion analysis model is constructed. This multi-level fusion method can fully utilize the advantages of each modality data and improve the overall performance of emotion analysis.

[0157] Compared with audio data and text data, visual data contains rich and complex emotional information, including facial expressions and body movements. For example, wide-open eyes may indicate surprise, while slightly narrowed eyes may indicate suspicion or anger. The upward or downward tilt of the mouth, the degree of opening, and other factors can convey emotions such as happiness, sadness, surprise, etc. A hunched back may indicate fatigue or frustration, while an upright posture may indicate confidence and positivity. Gestures and movements such as clenched fists, pointing fingers, and waving hands can also convey different emotions and intentions. This information is distributed on different scales, so it is necessary to obtain multi-scale information from visual data to make a comprehensive judgment of emotions.

[0158] Using a multi-scale emotion feature fusion module, multi-scale convolution fusion and multi-scale attention fusion can effectively capture these complex information. Small-scale convolution kernels (such as 3x3) can capture detailed information features; medium-scale convolution kernels (such as 5x5) can capture texture and local patterns; large-scale convolution kernels (such as 16x16 and above) can capture global patterns and scene information. Multi-scale attention fusion aims to achieve selective learning between two different branches. The main idea is to let the network learn feature weights according to the loss, allowing the model to selectively fuse information from different scales. Multi-scale attention fusion mainly consists of two parts: multi-scale attention module and multi-scale attention fusion module.

[0159] Multi-scale attention includes regional attention and pixel-level attention. Regional attention measures the importance of different size regions in the feature map. Specifically, different scale average pooling is used on the fused features, such as 1x1 for a block, 2x2 for 4 blocks, and 4x4 for 16 blocks. After channel compression and expansion, it is restored to the size before pooling. Taking 4x4 as an example, first, the feature map is averaged pooled, F Fuse ∈R C×H×W Get fc4∈R C×4×4 Then, channel compression and expansion are performed to obtain After restoration, we get

[0160]

[0161] Pixel attention measures the importance of each pixel. This module does not require pooling and reshaping, but directly performs channel compression and expansion to obtain The importance of each pixel can be measured from a micro scale.

[0162]

[0163] Multi-scale attention fusion, by superimposing pixel attention and region attention to obtain the weight of different positions in the feature map:

[0164]

[0165] In the training and fine-tuning stage, first, the pre-trained model for emotion analysis is supervised fine-tuned (Supervised Fine-Tuning, SFT), namely instruction fine-tuning. The supervised fine-tuning stage aims to adapt the pre-trained model to the downstream task of emotion analysis. Specifically, the pre-trained model parameters are kept unchanged, an output layer with an output size of the number of emotion categories is added to the target model, and the model parameters of this layer are randomly initialized. The target model is trained from scratch to train the output layer, calculate the forward propagation of the model output f θ (x i ), and calculate the gradient of the loss and update the parameters by back propagation, while the parameters of the remaining layers are fine-tuned based on the parameters of the source model. This process uses the emotion analysis dataset to adjust the model parameters through forward propagation and back propagation to minimize the loss. In this stage, the model fine-tunes the pre-trained language model based on the query and answer pairs of the emotion analysis dataset to deal with various different basic events and emotion categories of queries for emotion analysis. The fine-tuning process includes forward propagation and back propagation on the training set to adjust the model parameters to minimize the loss on the validation set. At the same time of fine-tuning, different learning rates, batch sizes and other hyperparameters are adjusted to obtain better performance.

[0166] The pre-trained model f θ is an open source large language model that has been pre-trained on a large scale, and the training data where x i is the input text, and y i is the corresponding emotion label or emotional reply. The fine-tuning goal is to minimize the cross-entropy loss function:

[0167]

[0168] where the cross-entropy loss function is defined as:

[0169]

[0170] where y i,k is the emotion label of sample i in the kth category (usually one-hot encoded). fθ (c i ) k is the predicted probability of the model for the kth emotion. The model parameters are fine-tuned using batch gradient descent, minimizing the cross-entropy loss function:

[0171]

[0172] where θ is the parameter vector to be optimized. α is the learning rate, controlling the step size of parameter updates. is the objective function with respect to the parameters θ. The learning rate and batch size are hyperparameters that are manually adjusted.

[0173] The fine-tuning process includes the forward propagation of the model output f θ (c i ) and the calculation of the loss gradient and updating the parameters. The key to fine-tuning is to let the model learn the specific context and expression in the field of sentiment analysis, to improve the model's generalization ability for specific sentiment analysis tasks. The best fine-tuned model can be selected by monitoring the performance on the validation set to ensure good performance on the test set of sentiment analysis, and finally obtain the SFT model.

[0174] Secondly, further fine-tune the language model through direct feedback from humans, mainly including two links: reward model fine-tuning and RLHF training. Reward model fine-tuning first needs to perform reward modeling (Reward Modeling, RM), the goal of this step is to build a sentiment analysis text quality comparison model, for the same prompt word, the quality of multiple different output results given by the SFT model is sorted. By sampling the sentiment analysis dataset, and according to the process of building the dataset, multiple answers are generated for the same query, that is, query multi-answer pairs, and each answer is manually scored, a scoring dataset is constructed. The goal of reward model fine-tuning is to evaluate the quality of generated sentiment analysis text through the establishment of a reward model. This process involves multiple steps, including reward modeling (Reward Modeling, RM) and reward model-based clipping proximal policy optimization (Proximal Policy Optimization Clip, PPO-Clip). The following will introduce these steps and related formulas in detail.

[0175] The goal of reward modeling is to train a reward model R φ to evaluate the quality of generated text. This model compares different generated texts and scores based on human feedback. The training goal of the reward model is to make the predicted score close to the human score, which can be described as:

[0176]

[0177] The mean square error is used as the loss function:

[0178]

[0179] where R φ (x i ,y i ) is the predicted score of the reward model. s i is the standard score of human scoring.

[0180] Based on this dataset, an independent reward model is trained for subsequent RLHF training. In the RLHF training phase, the improved PPO-Clip algorithm is used. The traditional update strategy needs to ensure that the change of the strategy is within a trust region to prevent instability caused by excessive strategy updates. PPO-Clip introduces a simple and efficient clipping mechanism to approximate the effect of TRPO, and further fine-tunes the SFT model according to the reward feedback of the reward model. PPO-Clip is suitable for fine-tuning the generation model π θ to generate high-quality emotional text. Based on the score of the reward model R φ , PPO-Clip optimizes the generation strategy π θ (y|x),θ as the parameter. The optimization goal of the proximal policy is:

[0181]

[0182] where r=R φ (x,y). To prevent instability caused by excessive policy updates, a trust region constraint is used to limit the magnitude of policy updates:

[0183]

[0184] where represents the probability distribution of the old policy. clip(·,1-∈,1+∈) is a clipping function used to limit the magnitude of policy updates, and the hyperparameter ∈ controls the clipping range. Reward model fine-tuning is: initialize the policy π θ and the reward model R φ ; sample generated text, use the current policy π θ to generate text y~π θ (x); calculate the reward, use the reward model R φ to score the generated text y and get the reward value r=R φ (x,y); update the policy, update the parameters θ of the generation model according to the PPO-Clip optimization goal L CLIP (θ).

[0185] By using this reinforcement learning method based on human feedback, the model can be more flexible to adapt to different emotional expressions, thus improving the overall performance of emotion analysis. In addition, this personalized fine-tuning can make the model more accurately capture emotional information and improve its performance in real application scenarios. Through these steps, a more powerful and intelligent generative emotion analysis large model is constructed, which can better cope with complex emotion analysis and text generation tasks.

[0186] In the modeling of emotion propagation and public opinion evolution, we use a graph model to simulate the propagation process of emotions in the network, and combine traditional random walk and propagation algorithms to predict the emotion diffusion path and trend. At the same time, we apply the autoregressive integrated moving average model (ARIMA) to time series prediction of public opinion data to capture the trend of emotion propagation and public opinion change. The graph model is represented as G=(V,E), where V is the node set representing users, and E is the edge set representing the relationship between users. Each node v has an emotional state S v , and the propagation can be regarded as the propagation of node state. Suppose the probability of node u infecting node v is p uv , in the propagation process:

[0187]

[0188] where N(v) represents the neighbor node set of node v. In the modeling of emotion propagation and public opinion evolution, random walk can help us understand how emotions spread in social networks. In simple random walk, the current node v selects a neighbor node u according to uniform probability for the next move. The random walk process can be represented by the following formula:

[0189]

[0190] p t (v) represents the emotion infection probability of node v at time t, and d(u) represents the degree of node u.

[0191] The autoregressive integrated moving average model (ARIMA) is an important method for time series prediction of public opinion data to capture the trend of emotion propagation and public opinion change. This method uses historical values of time series to predict future corresponding values, which is a typical method for time series prediction. ARIMA model combines autoregressive (AR), difference (I) and moving average (MA) three parts, which can effectively analyze and predict the dynamic changes of time series data. The ARIMA model consists of three parts:

[0192] The autoregressive part predicts future values from past values of the time series itself; the difference part makes the time series stationary by differencing it; the moving average part corrects the prediction by past prediction errors. The above three parts correspond to the three parameters p, d and q in ARIMA(p, d, q), where p is the order of the autoregressive term, d is the number of differences, and q is the number of moving average terms. The time series y t represents the public opinion data value at a certain time point t, which can be one of the quantitative indicators of emotion propagation and public opinion change. Specifically, public opinion data includes the following business indicators: sentiment score (Sentiment Score), representing the average or weighted value of overall sentiment at a certain time point. Sentiment score is usually calculated by sentiment analysis model, reflecting the positive or negative tendency of public sentiment; emotion intensity (Emotion Intensity), indicating the intensity or frequency of a certain specific emotion (such as anger, joy, sadness, etc.), which can be obtained by classifying text data through emotion classifier; topic popularity (Topic Popularity), indicating the discussion popularity or attention of a specific topic at a certain time point. Usually quantified by keyword frequency, topic label, etc.; information diffusion rate (Information Diffusion Rate), representing the propagation speed or range of information in social networks. Can be quantified by the number of forwards, the number of comments, the number of likes, etc. Public engagement (Public Engagement), indicating the public's participation in a certain event or topic, usually measured by the number of user-generated content, interaction frequency, etc.

[0193] Assuming the current value y t can be obtained by linear regression of the previous p time steps, then the autoregressive part is:

[0194] y t = φ1y t-1 + φ2y t-2 + … + φ p y t-p + ∈ t

[0195] where φ i is the autoregressive coefficient. ∈ t is white noise.

[0196] The difference part makes the time series stationary by differencing it d times. Its formula is:

[0197] y t ′ = (1-B) d y t

[0198] where B is the backshift operator, defined as y t ′ is the differenced time series.

[0199] Assume the current value y t can be obtained by linear regression of the error term at the current and previous q time steps, resulting in the moving average formula:

[0200] y t = ∈ t + θ1 ∈ t-1 + θ2 ∈ t-2 + … + θ q ∈ t-q

[0201] where θ i is the autoregressive coefficient. ∈ t is white noise. Combining the above three parts, the ARIMA (p, d, q) model is modeled as:

[0202] (1-φ1B-φ2B 2 -…-φ p B p )(1-B) d y t = (1+θ1B+θ2B 2 +…+θ q B q ) ∈ t

[0203] Applying the ARIMA model to capture the trend of emotional transmission and public opinion changes First, data preprocessing is performed, and the time series data is differenced to make it stationary. The order of the autoregressive term, the difference term and the moving average term is determined by the autocorrelation function and the partial autocorrelation function diagram. The ARIMA model is fitted according to the identified model structure, and the parameters φ and θ are estimated. The goal of fitting is to minimize the mean square error of the residual series.

[0204] As Figure 4In step S103, the construction of the emotion analysis large model for social media individual expression is completed using sparse gating hybrid expert training. Using the improved DeepSpeed-MoE model training technology with multi-expert and multi-data parallelism, simplified routing, load balancing, gradient quantization, and asynchronous training, the pre-training parameter quantity is maximized in a simple and computationally efficient manner, while the allocation strategy of the expert model is dynamically adjusted according to the load and performance of each expert model to efficiently utilize computing resources, real-time monitoring of the load status of each expert model, including computing load and memory usage, distributing the model in parallel on multiple computing nodes, each node responsible for a part of the model parameters, reducing the computing load and memory usage of a single node, improving the inference speed, compared to the traditional MoE routing strategy, the gating network sends the input x of each token to the top-k expert model, in order to reduce the communication and computing cost, a simplified strategy is adopted, each input x is only sent to one expert model. In order to make the load of the expert model more balanced, an auxiliary loss is added to achieve this goal, where N is the number of experts. i P i is the proportion of tokens allocated to expert i, P g is the sum of the probabilities of all tokens in a batch being allocated to expert i, the gradient quantization and compression formula is:

[0205]

[0206] where is the gradient vector, and the quantization scaling factor is used to control the quantization precision, reduce the gradient data volume of network transmission, and reduce the communication bandwidth requirement, where n is the quantization bit width; using an asynchronous training strategy, each computing node independently performs gradient calculation and update, reducing synchronization overhead and improving training speed, each computing node independently calculates the gradient and updates the parameters, reducing synchronization waiting time, each node performs gradient calculation and parameter update according to its own speed, adapting to different computing resources and data distribution, and using a two-stage fine-tuning strategy in the multi-task training stage to improve the training efficiency and performance of the model:

[0207] The first stage uses a large-scale corpus to pre-train the sparse gating network, which is responsible for dynamically allocating input data to different expert networks to achieve efficient information integration and learning, and uses sparse constraints to limit the number of parameters in the gating network, thereby reducing the computational load and memory usage of the model

[0208] G(x)=softmax(W g ·x)

[0209] where G(x) is the output of the gating network, representing the probability of selecting each expert, W gis the weight matrix of the gating network, and x is the input token. The gating model divides the input data into multiple regions according to the task type, and assigns one or more expert models to each region of data. Each expert model focuses on processing this part of the input data, thereby improving the overall performance of the model. The gating unit is used to dynamically allocate input data to different expert networks to achieve information integration and learning. The expert network is a GRU. In order to reduce the amount of calculation and memory occupation, the parameters of the gating unit are sparsely constrained. This is achieved through L1 regularization, sparsity penalty, or the design of the gating mechanism. The number of parameters in the gating unit is limited, so that only part of the neurons is activated in actual operation.

[0210] The L1 regularization loss function is:

[0211]

[0212] Loss data is the original loss function, λ is the regularization strength parameter, which controls the degree of sparsity penalty, and ω i is the parameter of the model. n is the number of parameters. In the analysis of individual and group emotions and cognitive patterns, the model needs to process a large amount of emotional data and perform calculations in a complex neural network. The parameters can be sparsely constrained to enhance the performance of the model by reducing the parameter range and controlling the size of the model through L1 regularization, and to improve the generalization ability of the model. The number of parameters in the gating unit is limited, so that only part of the neurons is activated in actual operation.

[0213] The Gated Recurrent Unit (GRU) uses a gating mechanism to control the flow of information, allowing the network to effectively capture long-term and short-term dependencies in sequence data. The update gate of the GRU is:

[0214] z t =σ(W z ·[h t-1 ,x t ]+b z )

[0215] The update gate determines how much of the hidden emotional state at the current time step comes from the hidden emotional state at the previous time step and how much comes from the current emotional state input. Its role is similar to the combination of the forget gate and the input gate in LSTM. Where z t represents the output of the update gate, which determines the mixing ratio of the hidden emotional state h t-1 at the previous time step and the candidate hidden emotional state . σ represents the Sigmoid activation function, which maps the output value to (0, 1), reflecting the probability of the emotional state. W z represents the weight matrix of the update gate. [ht-1 t represents the concatenation of the previous hidden emotional state h t-1 and the current input x t . b z represents the bias vector of the update gate.

[0216] The reset gate controls the influence of the previous hidden emotional state on the current candidate hidden emotional state. When the reset gate is close to 0, the network discards the hidden emotional state information of the previous time step; when the reset gate is close to 1, the hidden emotional state information of the previous time step is retained. The forget gate of the GRU is:

[0217] r t = σ(W r · [h t-1 , x t ] + b r )

[0218] r t represents the output of the reset gate, which determines the degree of influence of the previous hidden emotional state h t-1 on the calculation of the candidate hidden emotional state . Similar to the update gate, σ represents the Sigmoid activation function, which maps the output value to (0, 1), reflecting the emotional state probability. W r represents the weight matrix of the reset gate. [h t-1 , x t ] represents the concatenation of the previous hidden emotional state h t-1 and the current input x t . b r represents the bias vector of the update gate.

[0219] The candidate hidden emotional state is calculated by the current input emotional state and the hidden emotional state of the previous time step (controlled by the reset gate). Its formula is:

[0220]

[0221] wherein, represents the candidate hidden emotional state, which combines the current input and the hidden emotional state of the previous time step (affected by the reset gate r t ​The tanh(·) represents the hyperbolic tangent activation function, which maps the output value to (-1, 1). When the input value is close to 0, the tanh(·) gradient is large; when the input value is large or small, the tanh(·) gradient is far from 0 compared to Sigmoid, which performs better in overcoming the gradient vanishing problem. It has the advantage that the mean of the output value is close to 0, which can help to alleviate the bias problem of subsequent layers in the neural network, thereby accelerating convergence. The tanh(·) has a strong gradient in the input value range, which is conducive to faster convergence. h represents the weight matrix of the candidate hidden emotional state, [r t ⊙h t-1 , x t represents the concatenation of the hidden emotional state h t-1 of the previous time step (controlled by the reset gate r t ) and the current input x t . b h represents the bias vector of the candidate hidden emotional state.

[0222] The final hidden emotional state h t is a mixture of the current candidate hidden emotional state and the hidden emotional state of the previous time step controlled by the update gate. Its formula is:

[0223]

[0224] where h t represents the final hidden emotional state of the current time step. ⊙ represents element-wise multiplication. (1-z t ) represents the inverse output of the update gate, which controls the preservation ratio of the hidden emotional state h t-1 of the previous time step. z t represents the output of the update gate, which controls the preservation ratio of the candidate hidden emotional state .

[0225] In the second stage, sub-tasks such as sentiment analysis and text generation are selected as target tasks for multi-task fine-tuning. The sentiment analysis task aims to identify the sentiment orientation in the text, while the text generation task aims to generate corresponding text according to the given sentiment. A joint loss function is designed to combine the goals of sub-tasks such as sentiment analysis and text generation, and a multi-task learning framework is used to combine the loss functions of multiple sub-tasks by weighting to realize the weight distribution of DeepSpeed-MoE large model between multiple sub-tasks, so as to optimize the performance of the model.

[0226] The core of the multi-task learning framework is to train a unified model by weighted combination of the loss functions of multiple sub-tasks. For sentiment analysis and text generation tasks, the following sentiment analysis loss function and text generation loss function Loss function

[0227]

[0228] where a and b are hyperparameters that control the loss weights for sentiment analysis and text generation tasks.

[0229] The sentiment analysis task is treated as a classification problem, with the goal of predicting the sentiment label y SA of an input text x. The loss function uses cross-entropy loss:

[0230]

[0231] where N is the number of samples, C is the number of sentiment classes, is the true sentiment label of sample i, is the sentiment probability predicted by the model, with parameters.

[0232] The text generation task is a generative task, with the goal of generating sentimentized text y TG from an input x. The loss function uses sequence-to-sequence negative log-likelihood (NLL) loss:

[0233]

[0234] where T is the length of the generated text, y TG,i,t is the target word of sample i at time step t, and y TG,i,<t is all the words of sample i before time step t.

[0235] During the fine-tuning process, the entire DeepSpeed-MoE model is fine-tuned using data from the target task, with earlier layers (layers close to the input layer) frozen and only the later layers and output layer trained. This is because the earlier layers capture lower-level features, while the later layers and output layer can recognize higher-level features and ultimately complete the task. Freezing early layers freezes parameters close to the input layer, keeping them in the state learned during pre-training; fine-tuning later layers only trains parameters close to the output layer, allowing them to better adapt to the characteristics of the specific task. A combination of supervised learning and reinforcement learning is used to gradually adjust the model's parameters to better fit the data distribution and features of the specific task. The batch gradient descent method in S102 is used to update the model's parameters during the fine-tuning process to reduce the value of the loss function.

[0236] Step S104 is a specific step for public opinion event propagation prediction.

[0237] In step S104, sentiment polarity analysis is performed using the sentiment analysis library SnowNLP to extract emotional features, sentiment polarity, and sentiment intensity. Specifically, SnowNLP uses a dictionary-based method to perform sentiment polarity scoring on the input text, classifying sentiment into three categories: positive, neutral, and negative. These sentiment polarity values are used as emotional features to provide foundational data support for subsequent propagation simulation and prediction. In addition, based on the interaction relationships between users, a propagation network graph is constructed using the NetworkX library, and the extraction formula for the propagation path is:

[0238]

[0239] where P(u,v) represents the probability of user u propagating information to user v, W(u,v) represents the interaction weight between user u and user v, and D(u) is the out-degree of user u. The interaction weight W(u,v) reflects the frequency of interaction between user u and user v, and the out-degree D(u) represents the information propagation influence of user u. By combining these two factors, the propagation path of information in the social network can be more accurately predicted.

[0240] Based on graph theory, the classic SIR (Susceptible-Infected-Recovered) model is used to simulate the propagation process of public opinion in social networks. The specific model definition is as follows: S(t) is the proportion of infected individuals at time t, I(t) is the proportion of susceptible individuals at time t, and R(t) is the proportion of recovered individuals at time t. The dynamic equation of the model is:

[0241]

[0242]

[0243]

[0244] where β is the propagation rate and γ is the recovery rate. Through this dynamic simulation based on differential equations, the evolution process of public opinion propagation can be better captured. It is worth noting that the SIR model assumes that users are either in a susceptible state, an infected state, or a recovered state at a certain time point. This discrete state transition can better describe the dynamic characteristics of public opinion propagation.

[0245] In addition, a social media public opinion propagation model is constructed using complex network theory. The specific method is to generate a scale-free network using the Barabasi-Albert (BA) model to simulate the interaction between social media users. The BA model assumes that newly added nodes in the network are more likely to be connected to nodes with larger degrees, thereby forming a power-law distributed degree distribution, which is very consistent with the characteristics of real social networks. With such a network topology, we can further analyze the importance of nodes. The PageRank algorithm is used to calculate the importance of user nodes to identify key propagation nodes.

[0246]

[0247] where PR(u) is the PageRank value of node u, d is the damping factor (usually 0.85), N is the total number of nodes, M(u) is the set of all incoming link nodes of node u, L(v) is the out-degree of node v. Nodes with high PageRank values tend to represent strong propagation influence and are key nodes in the propagation of public opinion events, which deserve special attention.

[0248] To further improve the prediction accuracy, the LSTM network is used for time series prediction. The input of LSTM is the emotion feature sequence, and the output is the emotion state at the next time step. The calculation formula of LSTM is as follows:

[0249] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0250] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0251]

[0252]

[0253] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0254] h t =o t ·tanh(C t )

[0255] where f t , it 、 C t 、o t and h t are the forget gate, input gate, candidate cell state, cell state, output gate and hidden state, respectively. LSTM can effectively model long-range dependencies in time series data and is very suitable for predicting the process of public opinion propagation.

[0256] Finally, the random forest algorithm is used to classify and predict the propagation path. The calculation formula of the random forest is:

[0257]

[0258] where h(x) is the prediction result of the random forest, N is the number of trees, h i (x) is the prediction result of the i-th tree, and the random forest can fully utilize the integration advantage of multiple propagation path decision trees. Specifically, the random forest first generates multiple decision trees on the training set, and each tree is trained on a randomly selected feature subset. When predicting new samples, the random forest allows all decision trees to make predictions, and then uses voting to obtain the final classification result. This ensemble learning method can effectively deal with overfitting problems and improve the generalization ability of the model. Combined with the emotion analysis results, the trained LSTM and random forest models are used to predict the propagation path and influence range of public opinion events, calculate the propagation probability and propagation speed of each node, and draw the propagation path diagram. Using the results of PageRank and LSTM model, key propagation nodes are identified, and the emotional state and interactive behavior of these nodes are focused on to predict their influence on the overall propagation.

[0259] Steps S105-S106 are specific steps for generating individual emotions and multi-dimensional guidance of controlled products.

[0260] In step S105, the features that affect the emotional effect are divided into four dimensions: media dimension, image dimension, text dimension and fusion dimension. On this basis, a multi-dimensional feature fusion generation framework for individual emotions is constructed. An emotion-oriented content generation framework and method based on a generative adversarial network is used to generate text, images, audio and other propagation content that conforms to the target emotion.

[0261] The mood-oriented graphic content controllable generation technology uses Conditional Generative Adversarial Networks (CGANs) to combine a generation model and a discrimination model, and generates mood-oriented strategies and graphic contents matched with a given condition (such as a mood category or a description). CGANs introduce a condition variable on the basis of traditional GANs to control specific attributes of generated contents. CGANs include two neural networks: a generator (G) and a discriminator (D). The generator G receives random noise z and a condition variable c to generate a sample G(z) matched with the condition; the discriminator D receives a real sample or a generated sample and the condition variable c to discriminate whether the input sample is real or generated. The goal of CGANs is to enable the generator to generate high-quality samples guided by the condition variable through mutual game playing, and the maximum-minimum strategy is used to realize the adversarial training between the generator and the discriminator. The core idea of this training strategy is to enable the generator to generate more and more realistic samples through the adversarial process, and the discriminator constantly improves its ability to distinguish real samples and generated samples. The goal of the generator is to generate samples that can "deceive" the discriminator, minimize the difference between the generated samples and the real samples, and make the generated samples more realistic, so that the discriminator cannot distinguish the difference between the samples and the real samples. The goal of the discriminator is to distinguish real samples and generated samples, maximize the loss function, and make its discrimination ability strongest, so as to accurately judge the authenticity of the input samples. The optimization goal is:

[0262]

[0263] The loss function of CGANs is:

[0264]

[0265] Where x represents a real sample. p data (x) represents the distribution of real data. z represents random noise sampled from the noise distribution p z (z). c represents a condition variable, such as a mood category or a description. G(z|c) represents a sample generated by the generator. D(x|c) represents the judgment of the discriminator on the real sample x. D(G(z|c)|c) represents the judgment of the discriminator on the generated sample.

[0266] ​Using the state tracking technology, combined with natural language processing (NLP) and named entity recognition (NER), a dialogue state tracking module is established to evaluate the topic, point of view and complete the correction in the dialogue. A NER model is constructed using a bidirectional long short-term memory network (BiLSTM) combined with a conditional random field (CRF), according to the dialogue history and user feedback, the dialogue state is updated, and the key correction information is recorded and fed back to the generation model. Given an input sequence x = (c1, x2, …, x n ,) each x i represents a word vector or character vector. BiLSTM can capture context information by processing input sequences through forward and backward LSTM units. The output of BiLSTM is represented as:

[0267]

[0268] where and represent the hidden states of the forward and backward LSTM units at time step t, h t is the concatenation of the forward and backward hidden states. The CRF layer is used to capture the dependencies between labels, especially the label transition relationships in sequence labeling tasks. Define the transition matrix A, where A i,j represents the score of transitioning from label i to label j. Given the input sequence x and its corresponding label sequence y = (y1, y2, …, y n ), the score function is calculated as:

[0269]

[0270] where P represents the output score matrix of BiLSTM, represents the score of label y t at time step t. The score function is a core tool for evaluating the quality of generated content. The level of the score function directly reflects the quality of the generated text. High scores mean that the generated text is more consistent with expectations, and low scores may indicate that the generated text has problems. During training, by optimizing the score function, the model can learn better generation strategies. The common optimization goal is to maximize the value of the score function.

[0271] Media features include user-generated content itself and publisher features. Image features are divided into pixel shallow features and semantic deep features. Text features are divided into text attribute shallow features and text semantic deep features. Fusion features are used to represent the association properties between images and text.

[0272] As Figure 5The individual emotion multi-dimensional feature fusion generation framework includes image dimension generation and text dimension generation. The individual emotion expression content with multi-dimensional guidance is generated. The framework fuses the features of the image and text dimensions to improve the richness and accuracy of the generation results. The fused features have content coordination and emotional coordination. The content coordination represents the noun similarity, and the emotional coordination represents the adjective similarity. In the image dimension generation, the framework uses an image as input, extracts visual features of the image through image processing technology, and shallow features include spatial size, color, shape, texture, structure, and information amount. The storage space size and information entropy are used to represent the features. Deep features include emotional coordination, which is represented by the adjective similarity. In order to better capture the visual features of individual emotions, a recurrent neural network (RNN) is used to extract image features. By fusing these image features with the multi-dimensional features of individual emotions, image-based individual emotion generation can be achieved. For example, for an image expressing a happy emotion, the framework can first measure the features of each dimension, and then generate a text description or emoji that is similar to the features. In the text dimension generation, the framework uses the text description of individual emotions as input, and extracts semantic features of the text through natural language processing technology. Shallow features are text length and liveliness, which are represented by the total number of words and the ratio of emoji words. Deep features are general and trait, which are represented by general keywords and trait keywords. In order to better capture the text features of individual emotions, a recurrent neural network (RNN) model is used to extract text features. By fusing the text features with the multi-dimensional features of individual emotions, text-based individual emotion generation can be achieved. For example, for a text describing a sad emotion, the framework first measures the features of each dimension, and then generates an image or emoji that is similar to the features.

[0273] As Figure 6 In step S106, the memory driving module processes event information according to historical information related knowledge, processes individual characteristics according to individual emotion characteristics and viewpoint content, and further tracks the dialogue state through dialogue history and user feedback to realize optimization design such as opposition relationship cognition, content correction, evaluation optimization, and the like. The above two parts assist the multi-dimensional guidance strategy generation module.

[0274] The content correction part introduces emoji embedding coding technology and model word segmentation technology to form a multi-dimensional guidance strategy content controlled generation mechanism with high controllability and strong interactivity. By adding emoji embedding coding technology, the model encodes emojis as special markers together with other text markers, and then embeds emojis in the generated text to enhance emotion expression. The coding scheme of emojis should have self-iteration ability to cope with the rapid trend of Internet vocabulary.

[0275] Emojis are represented as embedding vectors. Let E be the set of emojis, T be the set of text tokens, and V = E U T be the extended vocabulary. Each emoji e E E and text token t E T has a corresponding embedding vector e and t. A one-hot vector is used to represent:

[0276] e onehot ∈{0,1} |V|

[0277] t onehot ∈{0,1} |V|

[0278] The embedding matrix is a selection of emojis and text, with each row corresponding to a vector representation of a particular token (e.g., word or emoji). The embedding vectors are obtained using the embedding matrix:

[0279] e=W e ·e onehot

[0280] t=W t ·t onehot

[0281] where is the embedding matrix corresponding to emojis, is the embedding matrix corresponding to text, and d is the dimension of the embedding vector.

[0282] The model word segmentation technique treats word segmentation as a state transition process in a Hidden Markov Model (HMM). It helps identify and segment proper nouns and terms, improving the accuracy of text processing. In the HMM model, each word is treated as a hidden state, and the model calculates the probability of each state based on the observed character sequence and determines the segmentation position of the word based on these probabilities. The HMM model consists of five parts: a state set S, an observation set V, an initial state probability distribution π, a state transition probability matrix A, and an observation probability matrix B:

[0283] S={s1,s2,…,s N}

[0284] V={v1,v2,…,v M}

[0285] π={π i}

[0286] A={a ij}

[0287] B={b ij}

[0288] where s iThis represents a hidden state, such as the beginning (B), middle (M), end (E), and single-word (S) states of an emotion word. v in the observation set i Represents an observation (character). π in the initial state probability distribution. i Represents the initial state s i The probability of . In the state transition probability matrix, a ij This represents the probability of transitioning from state i to state j. In the observation probability matrix, b... ij Indicates that in state s i Generate observation value v i The probability of.

[0289] Given an observation sequence O = (o1, o2, ..., o T The Hidden Markov Model (HMM) determines the word segmentation position by calculating the probability of each state sequence. The forward algorithm calculates the probability at time step t, with state s... i The probability α of the last part of the sequence t (i):

[0290] α t (i) = P(o1,o2,…,o t ,q t =s i )

[0291] The recursive formula is:

[0292]

[0293] Where α t (i) At time step t, with state s i The probability of the final part of the sequence. ij State transition probability, from state s i Transition to state s j The probability of b. j (o t+1 In state s j Generate observations o t+1 The probability of [the outcome] is calculated at time step t, from state s. i The probability β of generating a partial sequence. t (i):

[0294] β t (i)=P(o t+1 ,o t+2 ,…,o T |q t =s i )

[0295] The recursive formula is:

[0296]

[0297] where β t (i) is the probability of the partial sequence starting at time step t in state s i a ij state transition probability from state s i to state s j b j (o t+1 ) is the probability of generating observation o j in state s t+1 Using the Viterbi algorithm, the most likely sequence of states, i.e., the position of the word segmentation, is found:

[0298]

[0299] The recursive formula is:

[0300]

[0301] Emoticon embedding coding technology and model word segmentation technology can cooperate with each other to optimize and correct the generated content of the dialogue system from different angles, making it more in line with user needs and expectations. Emoticons play an important role in emotional expression, and by embedding emoticons, the system can better understand and generate content rich in emotion. By combining emotion-oriented image and text generation technology, more natural and expected content generation can be achieved, and using HMM for word segmentation ensures that the generated content is grammatically and semantically correct.

[0302] Steps S107-S109 are specific steps for demonstrating and verifying the construction of the emotion propagation prediction and guidance large model system.

[0303] In step S107, the emotion propagation prediction and guidance large model system is constructed. As Figure 7 , the system is composed of a data processing layer, a model construction layer, a demonstration and verification layer, and computing resource. The data processing layer is responsible for the classification and storage of various data, and also has the function of labeling these data; the model construction layer is responsible for constructing the models in each research content to complete the task of controlled product generation in a complex network environment; the demonstration and verification layer is a demonstration and verification of the analysis and prediction of individual and group emotion propagation in specific public opinion events under the support of the public opinion event propagation state and trend analysis prediction model.

[0304] In step S108, the public opinion event propagation state and trend analysis prediction model is established, such as Figure 8The emotion analysis dataset including review data, user information and user behavior data, and emotion analysis and cognitive models are used for user interaction multi-layer network construction, generation of emotion propagation prediction model based on network, and finally the propagation law is summarized from the simulation results and the propagation is predicted.

[0305] The generation and development of network public opinion events first arise from the sender of public opinion messages, are transmitted and spread through network media, and finally involve the public opinion audience, and are generated, developed and expanded according to the initiative of the public opinion audience. Network public opinion indicators are established from three aspects of network public opinion sources, public opinion propagation and public opinion audience according to the generation and development law of network public opinion events.

[0306] A BP neural network model for public opinion event propagation evaluation is established to improve the accuracy and precision of public opinion event propagation comprehensive effect evaluation. This neural network structure can process multi-dimensional data, model complex nonlinear relationships, realize real-time dynamic learning and adaptive adjustment, and thus better analyze the propagation of public opinion events, and provide reliable decision support and guidance strategies for public opinion control.

[0307] According to the number of indicators in the system described previously, there are 16 third-level indicators affecting the public opinion event propagation evaluation index, so the number of input layer neurons in the BP neural network model is 16. Only the public opinion event propagation evaluation index needs to be obtained, so the number of output layer neurons is 1. There is a direct correlation between the number of hidden layers of the BP neural network and its learning efficiency. The theory proves that a BP neural network with at least 3 layers can approximate any continuous function, that is, a BP network with only one hidden layer can relatively simply realize the required function, and model almost all nonlinear systems. With the increase of the number of hidden layers, the network error gradually decreases, but the network structure becomes more complex, which easily causes longer network training time or overfitting phenomenon, so a 3-layer BP neural network is adopted. The number of neurons in the hidden layer is 6. If no excitation function is selected, each layer of the neural network is only a linear transformation of the previous layer, and the final output after multi-layer stacking is still a linear transformation of the original input. Therefore, a nonlinear factor is introduced, and the Sigmod function is used as the excitation function, as shown in the following formula:

[0308]

[0309] The modeling of the multi-layer social network involves processing network data of multiple relationship levels, which contains multiple types of nodes (users, posts, etc.) and edges (friendship, attention relationship, etc.). Combined with the BP neural network (back propagation neural network), a complex multi-factor input modeling can be realized. The multi-layer social network modeling: through the graph neural network (GNN), the nodes and edge features in each layer of the network are extracted. Assuming that there are L layers of social networks, the node feature matrix of each layer of the network is H (l) , and the edge feature matrix is A (l) , where l = 1, 2, …, L. The graph convolution network (GCN) processes each layer of the social network to generate node embedding H (l+1) = σ(A (l) H (l) W (l) ), where σ is an activation function, and W (l) is the weight matrix of the lth layer. The original input feature x is spliced with the node H (l) generated by each layer of the social network to form a comprehensive feature vector z = [x; H (1) ; H (2) ; …; H (L) ]. The multi-layer social network is combined with the BP network, and the comprehensive feature vector z is input into the BP neural network for training. The back propagation algorithm adjusts the weight matrix W to minimize the loss function, and finally obtains the prediction model Based on the combination of BP neural network and multi-layer social network, the spatial and temporal propagation characteristics of public opinion events are extracted, and the propagation state and evolution trend of public opinion events are analyzed, which provides strong technical support for improving the performance and accuracy of the public opinion event prediction model and the management and guidance of public opinion events.

[0310] In step S109, the typical public opinion event emotion propagation state analysis and prediction guidance demonstration verification are performed. As Figure 9 In the demonstration verification of the typical public opinion event emotion propagation state analysis and prediction guidance, from data collection and processing, emotion analysis model construction, emotion propagation path analysis to emotion trend prediction guidance, system verification and optimization, real-time data monitoring and updating, visualization display and report generation, and user feedback and system optimization, each step will provide key support and optimization for the establishment of the system. This complete technical route will ensure that the system built in the management of public opinion events will play the greatest effect and provide comprehensive and accurate emotion propagation analysis and prediction guidance services for users. The following are the detailed steps of the typical public opinion event emotion propagation state analysis and prediction guidance demonstration verification.

[0311] (1) Data collection and processing: Collect relevant data for historical and current hot public opinion events, including original information, forwarded comments, mainstream media reports, etc. Clean, integrate, and label the data to ensure its quality and accuracy.

[0312] (2) Call emotion analysis model: Build an emotion analysis model based on natural language processing techniques to identify and analyze the emotional color and sentiment orientation in the text. Integrate sentiment recognition and sentiment classification technologies to accurately capture and analyze individual and group emotions.

[0313] (3) Emotion transmission path analysis: Use network science methods and data mining techniques to analyze the path and key nodes of emotion transmission in public opinion events. Explore the transmission rules and influencing factors of individual and group emotions in network space, and reveal the mechanism of emotion transmission.

[0314] (4) Emotion trend prediction and guidance: Based on historical data and emotion analysis model, predict and analyze the development trend of individual and group emotions. Provide targeted emotion guidance strategies and suggestions to help managers guide the direction of emotion transmission in public opinion events.

[0315] (5) System verification and optimization: In typical hot event scenarios, demonstrate the analysis of individual and group emotion transmission status and the guidance of trend prediction. Verify the feasibility of emotion transmission path and the effectiveness of guidance methods in public opinion events, and continuously optimize and improve the emotion analysis model and system performance.

[0316] (6) Real-time data monitoring and updating: Establish a real-time data monitoring mechanism to capture new data and update the analysis model in a timely manner to ensure the system's rapid response capability to public opinion events. Perform data stream processing to continuously collect, clean, and update data, maintaining the system's real-time and accuracy.

[0317] (7) Visualization display and report generation: Design a visual interface to present the results of individual and group emotion transmission analysis, including emotion trend charts and key node network diagrams, to improve user understanding and utilization efficiency of data. Automatically generate detailed reports summarizing the analysis results and providing targeted suggestions to help managers quickly understand the situation and trend development of public opinion events.

[0318] (8) User feedback and system optimization: Collect user feedback and demands to continuously improve system functions and performance to ensure that the system meets the needs of users in actual application scenarios. Use machine learning and deep learning techniques to continuously optimize the system to improve the accuracy and prediction ability of emotion analysis to cope with changing public opinion environments.

[0319] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps of the emotion propagation prediction and guidance large model and system based on generative AI.

[0320] Corresponding to the above method, the application further provides a device, which comprises a computer device including a processor and a memory, and the memory stores computer instructions, and the processor is configured to execute the computer instructions stored in the memory, and the device implements the steps of the above method when the computer instructions are executed by the processor.

[0321] The application further provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps of the edge computing server deployment method. The computer readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0322] In summary, the application provides an emotion propagation prediction and guidance large model and system based on generative AI, which comprises: constructing an emotion analysis large model. Facing social media, using an open-source Chinese large language model and multi-source social media data, and fusing syntax, semantics and memory driving, a generative emotion analysis large model is constructed. A sparse gate mixed expert training technology is used to improve the model training efficiency and performance; a controlled product of individual emotion and multi-dimensional guidance of propagation content is generated. The model provides stable and effective emotion guidance strategies and content according to individual emotion characteristics and change link analysis, ensures high consistency and traceability, meets the rapid evolution of Internet public opinion demand, improves the group negative emotion discrimination and coping ability, and supports typical individual emotion crisis intervention; an emotion propagation prediction and guidance large model system is constructed for demonstration and verification. For diversified sudden public opinion events, an emotion propagation prediction and guidance large model system is constructed, network public opinion event propagation is analyzed based on space-time characteristics, empirical analysis is carried out, the accuracy and efficiency of the prediction model are improved, and technical support is provided for public opinion event management and guidance.

[0323] Further, the application further designs a multi-source social media individual expression data acquisition and processing technology, uses a crawler and an API interface to obtain representative and diverse social media data, performs text cleaning, word segmentation, entity recognition and denoising and other preprocessing, and provides training data required for supervised learning through artificial labeling and generative language models.

[0324] Meanwhile, the emotion-oriented content generation framework is optimized by using technologies such as a generative adversarial network and a variational autoencoder, so as to solve the problem of single content generated by an existing model. In view of the differences in emotional intensity, vocabulary and expression mode of the emotion source individual, the emotion-guided content element generation mechanism is researched by combining social network analysis and a propagation model, so as to generate a propagation content guiding strategy that is adapted to the emotional characteristics of the individual.

[0325] In addition, an emotion propagation prediction and guidance system is constructed, a corresponding software architecture is designed, and the prediction and guidance system is developed. In view of the space-time propagation evaluation and prediction demand of network public opinion events, a public opinion event propagation range and guidance effect prediction model is constructed, a public opinion event propagation evaluation index system based on a BP neural network and a multi-layer social network is established, multi-dimensional propagation feature extraction of the public opinion event is realized through multi-factor input modeling, and the propagation state and evolution trend are analyzed.

[0326] Finally, in view of the public opinion guidance demand of a typical hot event, demonstration verification of the individual and group emotion propagation state analysis and trend prediction guidance is carried out, the model and the system are used to analyze and predict guide the historical and present hot public opinion events, the emotion propagation path and the guidance method effect are verified, the iteration optimization of the public opinion event management guidance is realized, and the performance and application effect of the research results are evaluated.

[0327] Those of ordinary skill in the art should understand that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether the implementation is in hardware or software depends on the specific application and design constraints imposed on the overall system. Skilled artisans can employ different methods to implement the described functions depending on the specific application. Such implementation should not be construed as a departure from the scope of the present application. When implemented in hardware, the hardware can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and the like. When implemented in software, the elements of the present application are the program or code segments to perform the required tasks. The program or code segments can be stored in a machine-readable medium, or transmitted by a data signal carried in a carrier wave over a transmission medium or communication link.

[0328] It should be noted that the present application is not limited to the specific configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of well-known methods are omitted. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.

[0329] In this disclosure, features described and / or illustrated with respect to one implementation can be used in the same manner or in an analogous manner in one or more other implementations, and / or in combination with or in place of features of other implementations.

[0330] The above descriptions are only the preferred embodiments of the present application, not intended to limit the present application. The embodiments of the present application can be variously changed and / or modified by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall fall within the scope of the present application.

Claims

1. A generative AI emotion propagation prediction and guidance large model construction method, characterized in that, The method comprises the following steps: Step one, build a syntax semantics and memory driven emotion analysis large model facing social media, use language large model to model syntax structure and meaning, combine with storage and tracing of historical information, use open source Chinese large language model as foundation, combine with social media data, use sparse gate mixed expert training technology to build emotion analysis large model, realize emotion understanding and reply generation of individual expression on social media; Step two, carry out public opinion event transmission prediction based on emotion analysis large model, collect and preprocess social media data, extract emotion features and transmission path, build transmission model based on graph theory and complex network theory, simulate information transmission process in social network, use LSTM and random forest to train and optimize model to improve prediction accuracy, finally, combine emotion analysis results to predict transmission path and influence range of public opinion event; Step three, generate individual emotion and multi-dimensional guidance strategy of transmission content, trace individual emotion transmission path, according to emotion intensity, emotion vocabulary, expression mode and social network relationship difference of emotion source individual, combine target individual characteristics, based on social network analysis and emotion guidance content element model generation mechanism of transmission model, break through key node and transmission path confirmation and evaluation verification method in emotion transmission, conform to multi-dimensional guidance strategy generation algorithm model of target emotion, start from expression symbol embedding coding technology and model word segmentation technology, realize multi-dimensional guidance strategy formation of transmission content adapting to individual emotion characteristics, provide technical support for multi-dimensional guidance scheme generation adapting to individual emotion characteristics, add expression symbol embedding coding technology, multi-dimensional guidance strategy generation algorithm model will take expression symbol as special mark, code with other text marks, then embed expression symbol in generated text to enhance emotion expression, realize effective guidance of individual emotion and transmission content, enhance group negative emotion discrimination and public opinion coping ability; Step four, establish public opinion event transmission range and guidance effect evaluation model based on space-time feature analysis, select typical public opinion cases for empirical analysis, verify accuracy and efficiency of evaluation model, realize efficient evaluation of public opinion event transmission range and effect, and then provide scientific basis for improving emotion analysis prediction large model and multi-dimensional guidance strategy.

2. The generative AI emotion propagation prediction and guidance large model construction method according to claim 1, characterized in that, The emotion analysis large model based on syntax semantics and memory driving facing social media comprises the following steps: Collect and process multi-source social media individual expression data, combine historical and real-time data of 12345, use crawler technology and API interface to obtain representative and diverse individual expression data from major social media platforms, the goal is to obtain data covering social media and dialogue content under different themes, fields and contexts, provide support for emotion analysis large model to generalize various emotion expressions on data, then go through data preprocessing stage including text cleaning, word segmentation, entity recognition and denoising steps, remove shallow noise such as punctuation marks, redundant spaces and HTML tags, use regular expression based denoising: T' = regex.sub(pattern, replacement, T) The crawled HTML tags are removed using T' = regex.sub('<.*?>', ”, T), and the regular expression can also be used as a dictionary mapping to replace the noise; For deep syntax errors, spelling errors, irrelevant words, repeated words, semantic noise and ambiguous noise, use the BERT pre-training language model to monitor and remove deep noise: First, convert the input text into an embedded representation. For an input text, obtain its embedded representation through the BERT pre-training language model: E = BERT(T) Use the classification layer to determine whether a word or sentence is noise. Since we are not concerned about the specific noise category, in order to reduce the output category, only define a two-class task of noise and non-noise. For each embedded vector, calculate its classification probability by the following formula: p i = softmax(We i +b) where W is the weight matrix of the classification layer, b is the bias vector, softmax(·) is the activation function for binary classification, and p i P(noise | w) represents the probability that the ith word is noise: T' = {w i ∣p i ≤τ} According to the detected noise probability, a threshold τ is set, if p i ≤τ, it is considered that the word or sentence is noise and is removed, otherwise it is retained, T' represents the text after noise removal, the preprocessed text data is added with emotional labels by manual operation and statistically classified with basic events, and based on these labels and classifications, the GPT generative language model is used to preliminarily generate answers, the generated answers are manually reviewed to determine whether they meet the actual situation and context, necessary adjustments are made, the opinions of psychological experts are further introduced, the answers generated by the model are evaluated and adjusted to ensure professionalism and accuracy, and the answers of these individual expression data are obtained to provide training data required for supervised learning for the emotional analysis large model; The generated multi-modal and multi-scale emotion analysis large model is constructed, the multi-modal refers to text, image, voice and video modalities, and the multi-scale refers to pixel-level scale and region-level scale. The open source Chinese large language model is used as the basis of the generated emotion analysis large model. The function of the generated multi-modal and multi-scale emotion analysis large model is to generate text replies with emotional color. Meanwhile, the multi-modal generated model of image, voice and video is supported to access different types of data and perform multi-modal feature fusion. The multi-modal fusion is performed from three aspects of feature level, attention level and decision level. Meanwhile, the multi-scale fusion based on attention mechanism is used to improve the contribution of each image modal feature. The generated multi-modal and multi-scale emotion analysis large model is constructed based on training data. The method of supervised learning and reinforcement learning is used to train and fine-tune the model, reduce hallucination and increase consistency. Specifically, the pre-training model parameters are kept unchanged. An output layer with an output size of the number of emotion categories is added to the target model, and the model parameters of the layer are randomly initialized. The target model output layer is trained from scratch on the target data set. The forward propagation of the model output fθ(x i ) is calculated, the gradient of the loss is calculated, and the parameters are updated by back propagation. The parameters of the remaining layers are fine-tuned based on the parameters of the source model. The key of fine-tuning is to make the model learn specific context and expression in the emotion analysis field, so that the model can more flexibly adapt to different emotional expression methods, thereby improving the overall performance of emotion analysis and generating emotional content that is more consistent with individual expression on social media. To address the high computing power demand and multi-card inference difficulty of multi-task reinforcement learning training, a sparse gated hybrid expert network is used for multi-task training, and an improved DeepSpeed-MoE model training technology with multi-expert and multi-data parallelism, simplified routing, load balancing, gradient quantization and asynchronous training is proposed. In a simple and computationally efficient way, maximize the pre-training parameter quantity, while dynamically adjusting the allocation strategy of the expert model according to the load and performance of each expert model, to efficiently use computing resources, real-time monitoring of the load state of each expert model, including computing load and memory usage, distributing the model in parallel on multiple computing nodes, each node is responsible for a part of the model parameters, reducing the computing load and memory usage of a single node, improving the inference speed, compared with the traditional MoE routing strategy, the gating network sends each token input x to the top-k expert model, in order to reduce the communication and computing cost, a simplified strategy is adopted, each input x is only sent to one expert model, in order to make the load of the expert model more balanced, an auxiliary loss is added: where N is the number of experts, f i P is the proportion of tokens assigned to expert i i The gradient quantization and compression formula is: wherein is the gradient vector, the quantization scaling factor for controlling the quantization precision, reducing the amount of gradient data transmitted over the network, and reducing the communication bandwidth requirement, wherein n is the quantization bit width; using an asynchronous training strategy, each computing node independently performs gradient calculation and update, reduces the synchronization overhead, and improves the training speed, each computing node independently calculates the gradient and updates the parameters, reduces the synchronization waiting time, each node performs gradient calculation and parameter update according to its own speed, adapts to different computing resources and data distribution, and adopts a two-stage fine-tuning strategy in the multi-task training stage to improve the training efficiency and performance of the DeepSpeed-MoE model: The first stage uses a large corpus to pre-train the sparse gated DeepSpeed-MoE network. Assuming that there are E expert networks and an input sample x, the output of the router can be represented as g(x) = (g1(x), g2(x), …, g E (x)) and these scores are converted into probabilities using the softmax function, After probability sorting and mask selection, a mask vector is created, with element values of 1 representing selected experts and 0 representing unselected experts. The expert with the highest probability is selected for dynamic activation, achieving dynamic allocation of expert networks to effectively integrate and learn information. Sparse constraints are used to limit the number of parameters in the gating network, thereby reducing the computational load and memory usage of the DeepSpeed-MoE model. The second stage uses the data of the two target tasks of emotion analysis and text generation to fine-tune the entire DeepSpeed-MoE model, freezes the layers close to the input layer, and only trains the later layers and the output layer. Because the earlier layers capture lower-level features, the later layers and the output layer can recognize higher-level features and ultimately complete the task. The knowledge learned in the first stage is fine-tuned to be closer to the emotion analysis and text generation tasks. By fine-tuning on the target task, the entire DeepSpeed-MoE model is more consistent with the data distribution and features of a specific task, thereby improving the performance and generalization ability of the DeepSpeed-MoE model.

3. The generative AI emotion propagation prediction and guidance large model construction method according to claim 1, characterized in that, The emotion analysis-based large model is used to carry out the following steps to predict the spread of public opinion events: Use the sentiment analysis library SnowNLP to perform sentiment polarity analysis and extract emotion features, sentiment polarity and sentiment intensity. In addition, based on the interaction relationship between users, use the NetworkX library to construct a propagation network graph, and the extraction formula of the propagation path is: Wherein, P(u, v) represents the probability of user u to user v to spread information, W(u, v) represents the interaction weight between user u and user v, D(u) is the out-degree of user u, based on graph theory, the classic SIR (Susceptible-Infected-Recovered) model is used to simulate the propagation process of public opinion in social network, the specific model definition is as follows: S(t) is the proportion of infected persons at time t, I(t) is the proportion of susceptible persons at time t, R(t) is the proportion of recovered persons at time t, the dynamic equation of the model is: Wherein, β is the propagation rate, γ is the recovery rate, in addition, by using complex network theory, a social media public opinion propagation model is constructed, the specific method is to generate a scale-free network by using Barabasi-Albert (BA) model to simulate the interaction relationship between social media users, and the importance of user nodes is calculated by using PageRank algorithm to identify key propagation nodes: Wherein, PR(u) is the PageRank value of node u, d is the damping factor, N is the total number of nodes, M(u) is the set of all incoming link nodes of node u, L(v) is the out-degree of node v, the LSTM network is used for time series prediction, the input of LSTM is the emotion feature sequence, and the output is the emotion state at the next time step, the calculation formula of LSTM is as follows: f t = σ(W f · [h t-1 , x t ]+ b f ) i t = σ(W i · [h t-1 , x t ]+ b i ) o t = σ(W o · [h t-1 , x t ]+ b o ) h t = o t tanh(C t ) Wherein, f t , i t , C t , o t and h t are the forget gate, input gate, candidate cell state, cell state, output gate and hidden state, respectively, and finally, the propagation path is classified and predicted using a random forest algorithm, and the calculation formula of the random forest is: where h(x) is the prediction result of the random forest, N is the number of trees, h i (x) is the prediction result of the ith tree, combined with the emotional analysis result, using the trained LSTM and random forest model, the propagation path and influence range of public opinion events are predicted, the propagation probability and propagation speed of each node are calculated, the propagation path graph is drawn, the key propagation nodes are identified using the results of PageRank and LSTM model, and the emotional state and interaction behavior of these nodes are focused on to predict their influence on the overall propagation.

4. The generative AI emotion propagation prediction and guidance large model construction method according to claim 1, characterized in that, The generated individual emotion and propagation content multi-dimensional guidance strategy comprises the following steps: An emotion-oriented content generation framework and method are constructed, aiming at the single form and content of the emotion-oriented content generation of the existing generative language model on the individual's own emotional state, based on the guided strategy and content generation model optimization scheme of the generative adversarial network and variational autoencoder technology, the text, image and audio propagation content conforming to the target emotion are generated, the memory-driven guided effect evaluation, correction and follow-up key technology is used, the opposite state tracking technology is combined with natural language processing and named entity recognition to establish a dialogue state tracking module, the theme and viewpoint in the dialogue are evaluated and corrected, a named entity recognition model is constructed by using a bidirectional long short-term memory network combined with a conditional random field, according to the dialogue history and user feedback, the dialogue state is updated, and the key correction information is recorded and fed back to the generative model, the output of BiLSTM is represented as: where and denote the forward and backward LSTM unit’s hidden state at time step t, h t is the concatenation of the forward and backward hidden states, a CRF layer is used to capture the dependencies between labels, in particular the label transition relations in a sequence labeling task, defining a transition matrix A, where A i,j denotes the score of transitioning from label i to label j given the input sequence x and its corresponding label sequence y = (y1, y2,..., y n The score function is computed as: where P denotes the output score matrix of the bidirectional long short-term memory network, denotes the score of the label y t at time step t, and the score function is a core tool for evaluating the quality of generated content, which solves the difficulties of guiding the direction of propagation for the target emotion, the lack of emotion guidance evaluation and follow-up, and constructs an individual emotion multi-dimensional feature fusion generation framework to generate propagation content and emotion guidance scheme strategies and specific content that meet the individual emotions according to the specific emotion target. A multi-dimensional guidance strategy for propagation content is formed, the emoticon is represented as an embedding vector, E is an emoticon set, T is a text token set, V=E∪T is an expanded vocabulary, each emoticon e∈E and text token t∈T has a corresponding embedding vector e and t, and a one-hot vector is used to represent: e onehot ∈{0,1} |V| t onehot ∈{0,1} |V| The embedding matrix is the selection of emoticons and texts, and each row corresponds to a vector representation of a specific word or emoticon token, and the embedding vector is obtained by using the embedding matrix: The embedding matrix is the selection of emoticons and texts, and each row corresponds to a vector representation of a specific word or emoticon token, and the embedding vector is obtained by using the embedding matrix: e = W e • e onehot t = W t • t onehot wherein is an embedding matrix corresponding to the expression, is an embedding matrix corresponding to the text, d is the dimension of the embedding vectors; The model word segmentation technology takes the segmentation of a word as a state transition process in a Hidden Markov Model (HMM), helps to identify and segment proper nouns and terms, and improves the accuracy of text processing. In the HMM model, each word is regarded as a hidden state. The HMM model calculates the probability of each state through the observed character sequence and determines the segmentation position of the word through these probabilities. The HMM model consists of five parts: a state set S, an observation set V, an initial state probability distribution π, a state transition probability matrix A, and an observation probability matrix B: S = {s1, s2,..., s N} V = {v1, v2,..., v M} π={π i} A = {a ij} B = {b ij} where s i represents a hidden state, v i represents an observation (character), π i represents the probability of state s i at the initial time, a ij represents the probability of transition from state i to state j, b ij represents the probability of generating observation v i in state s i . Given an observation sequence O = (o1, o2,..., o T ), an HMM model determines the word segmentation positions by computing the probability of each state sequence, the forward algorithm computes the probability of a partial sequence ending in state s i at time step t, α t (i): a t (i) = P (o1, o2,..., o t q t = s i ) The recursive formula is: where a t (i) the probability of the partial sequence ending in state s i at time step t, a ij the state transition probability from state s i to state s j at time step t, b j the probability of generating observation o t+1 at state s j at time step t, and t+1 the probability of generating the partial sequence from state s i at time step t, β t (i) is computed as: β t (i) = P(o t+1 ,o t+2 ,…,o T ∣q t = s i ) The recursive formula is: where βt(s) is the probability of being in state s at time step t t (i) is the probability of being in state s i at time step t given the partial sequence of observations up to that point, a ij is the state transition probability from state s i to state s j at time step t, b j (o t+1 ) is the probability of generating observation o j in state s t+1 at time step t, and Viterbi algorithm is used to find the most likely sequence of states, i.e., the position of the word breaks: The recursive formula is: Finally, the position of word segmentation can be found.

5. The generative AI emotion propagation prediction and guidance large model construction method according to claim 1, characterized in that, The method comprises the following steps: The method comprises the following steps: The method comprises the following steps: The modeling of the multi-layer social network involves processing network data of multiple relationship levels, which contains multiple types of nodes and edges, nodes representing users and posts, and edges representing friend and like follow relationships. Combined with the BP neural network, complex multi-factor input modeling can be achieved. The multi-layer social network modeling: through the GNN graph neural network, the nodes and edge features in each layer of the network are extracted, assuming that there are L layers of social networks, the node feature matrix of each layer of the network is H (l) , and the edge feature matrix is A (l) , where l = 1, 2, …, L, the GCN graph convolution network processes each layer of the social network to generate node embedding H (l+1) = σ(A (l) H (l) W (l) ), where σ is an activation function, and W (l) is the weight matrix of the lth layer. The original input feature x is spliced with the node H (l) generated by each layer of the social network to form a comprehensive feature vector z = [x; H (1) ; H (2) ; …; H (L) ]. The multi-layer social network is combined with the BP network, and the comprehensive feature vector z is input into the BP neural network for training. The back propagation algorithm adjusts the weight matrix W to minimize the loss function, and finally obtains the prediction model Based on the combination of BP neural network and multi-layer social network, the spatial and temporal dimension propagation feature extraction of public opinion events is realized, and the propagation state and evolution trend of public opinion events are analyzed, which provides strong technical support for improving the performance and accuracy of the public opinion event prediction model and the management and guidance of public opinion events.

6. A computer-readable storage medium having stored thereon a computer program, characterized in that, An index system framework is constructed from three aspects of public opinion sources, public opinion dissemination, and public opinion audiences. BP neural network and GCN graph convolution network are used for multi-factor input modeling and multi-layer social network modeling of the three indexes of public opinion sources, public opinion dissemination, and public opinion audiences. The best public opinion event dissemination prediction model is obtained through training. There are 16 three-level indexes affecting the public opinion event dissemination evaluation index. Therefore, the number of input layer neurons in the BP neural network model is 16. Only the public opinion event dissemination evaluation index is obtained. Therefore, the number of output layer neurons is 1. There is a direct correlation between the number of layers of the hidden layer of the BP neural network and its learning efficiency. The theory proves that a BP neural network with at least 3 layers can approximate any continuous function. Therefore, a BP network with only one hidden layer can relatively simply realize the required function. The model can be built for almost all nonlinear systems. With the increase of the number of hidden layers, the network error gradually decreases, but the network structure becomes more complex, which may cause longer network training time or overfitting phenomenon. Therefore, a 3-layer BP neural network is used, and the number of neurons in the hidden layer is 6. If no activation function is selected, each layer of the neural network is only a linear transformation of the previous layer. After multi-layer stacking, the final output is still a linear transformation of the original input. Therefore, a nonlinear factor is introduced, and the Sigmod function is used as the activation function, as shown in the following formula: The program, when executed by the processor, implements the steps of the method of any one of claims 1 to 4.

Citation Information

Patent Citations

  • Large language model training method and device

    CN118246505A

  • Deep learning-based system for improving the performance of sentiment analysis using social media data and management strategies

    DE202023105444U1