Social media sentiment analysis method and system based on deep learning driving
Through the emotion analysis method combined with deep learning and graph neural network, the problem of neglecting the impact of situational information and user interaction relationships in social media is solved, the accuracy and prediction ability of emotion analysis are improved, and accurate public opinion prediction and emotional guidance are provided.
Patent Information
- Application Number
- CN202510442586.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing social media sentiment analysis methods ignore the impact of situational information and user interaction on emotional communication, resulting in insufficient accuracy of emotion analysis, especially in the face of complex emotional expression and dynamic emotional changes.
Deep learning-driven social media sentiment analysis method is adopted to dynamically adjust the emotion classification results and predict the emotion propagation trend through situational information adjustment factors and graph neural network technology. The method includes data cleaning, situational information extraction, emotion classification, emotion propagation intensity calculation and future emotional fluctuation prediction, combining time characteristics, popular events and user interaction relationships.
It improves the accuracy and prediction ability of emotion analysis, can dynamically adjust emotional classification in different situations, capture emotional fluctuations in real time, and provide accurate public opinion prediction and emotional guidance strategies.
Smart Images

Figure CN120372202A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of social media sentiment analysis, and particularly to a social media sentiment analysis method and system driven by deep learning. Background Art
[0002] In recent years, the popularity of social media platforms has made a vast amount of user-generated content (UGC) an important data source, covering users' emotional expressions towards various topics, events, and products. Such content includes text, pictures, videos, and other multimedia forms. With the continuous growth of social media data, how to extract useful emotional information from this huge amount of data has become an important research direction in the field of sentiment analysis.
[0003] Sentiment analysis, especially sentiment analysis in social media, often involves processing a large amount of unstructured data. Traditional sentiment analysis methods mostly rely on simple rules or dictionaries, using sentiment words and sentiment scores for sentiment classification. However, the diversity and richness of social media content make these methods often appear inadequate when faced with complex emotional expressions. In particular, social media content usually contains a large amount of noise, contextual information (such as holidays, popular events, etc.), and dynamic features of emotional changes, which make sentiment analysis more complex.
[0004] With the development of deep learning technology, especially the application of algorithms such as long short-term memory network (LSTM), convolutional neural network (CNN), and graph neural network (GNN), the field of sentiment analysis has been significantly improved. These algorithms can process the temporal sequence, context relationship, and structured data in social media data, improving the accuracy and robustness of sentiment analysis. However, the existing technologies usually ignore the dynamic adjustment effect of contextual information (such as popular events, time information, etc.) on emotions, and the influence of the emotional propagation path and user interaction relationship on emotional fluctuations in social media is less incorporated into the analysis model. Summary of the Invention
[0005] The purpose of this part is to outline some aspects of the embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this part, as well as in the abstract and title of the specification of this application, to avoid obscuring the purpose of this part, the abstract, and the title. However, such simplifications or omissions cannot be used to limit the scope of the present invention.
[0006] In view of the problems existing in the above-mentioned prior art, the present invention is proposed.
[0007] To solve the above technical problems, the present invention provides the following technical solution: A social media sentiment analysis method driven by deep learning, the method comprising the following steps:
[0008] Step 1: Scrape users' posts, comments, pictures, videos, and emoji information from social media platforms; clean, denoise, tokenize, and standardize this data;
[0009] Step 2: Analyze the time, hashtags, and popular events in the data, and use natural language processing techniques to extract the situational information S i , e.g., if an event becomes popular on social media, automatically label the content as belonging to this specific situation;
[0010] Step 3: Based on a deep learning-based sentiment classification model, classify the sentiment of the text in social media content. On this basis, the model will combine the situational adjustment factor C adj to adjust the sentiment classification result, making the sentiment classification more in line with the specific situation, such as being more inclined to positive emotions during holidays;
[0011] Step 4: Construct a sentiment change prediction mechanism, that is, after determining the intensity of the user's emotional propagation over time, combine the sentiment classification and the propagation intensity to predict the intensity of future emotional fluctuations.
[0012] As a preferred solution of the deep learning-driven social media sentiment analysis method described in the present invention, wherein: define the social media content X that occurs at time t t triggering the conditional probability of the situational information S i as P(S i |X t ), and calculate the normalized situational adjustment factor C adj ; its calculation formula is:
[0013]
[0014] where β represents a constant that adjusts the influence of the situational information.
[0015] As a preferred solution of the deep learning-driven social media sentiment analysis method described in the present invention, wherein: the deep learning-based sentiment classification model means using a deep learning model to classify the sentiment of each piece of social media content, obtaining the sentiment label E of each piece of content raw = f(X text ); f(·) represents the sentiment classification model, and X text is the input social media text feature;
[0016] Introduce the situational adjustment factor C adj into the sentiment classification model to adjust the result of the basic sentiment classification. (The introduction of the situational information enables the sentiment classification to not only consider the text content but also dynamically adjust the sentiment label to adapt to the current situation (e.g., holidays may be more inclined to positive emotions)):
[0017]
[0018] Among them, γ represents the sensitivity constant for scenario adjustment; δ represents the non-linear adjustment factor for sentiment classification; θ represents the time decay constant, and |t1 - t0| represents the time difference between the current time and the reference time; E adj represents the finally adjusted sentiment classification result, i.e., the sentiment value, E adj ∈[-1, 1], -1 represents negative sentiment, 1 represents positive sentiment, and 0 represents neutral sentiment.
[0019] As a preferred solution of the method for social media sentiment analysis driven by deep learning according to the present invention, wherein: the sentiment change prediction mechanism specifically includes:
[0020] First, based on the user relationships in the social media platform, using graph neural network technology, calculate the propagation intensity σ i (t) of sentiment spreading from one user to other users;
[0021] Then, combining the calculation results of sentiment classification and the propagation intensity σ i (t), use time series prediction methods to predict the change trend ΔE(t) of sentiment in the social media in the future for a period of time.
[0022] As a preferred solution of the method for social media sentiment analysis driven by deep learning according to the present invention, wherein: the calculation formula of the propagation intensity σ i (t) is:
[0023]
[0024] Among them, W p (i, j) represents the propagation weight between node i and node j, and E adj (j) represents the adjusted sentiment value of node j.
[0025] As a preferred solution of the method for social media sentiment analysis driven by deep learning according to the present invention, wherein: the calculation formula of the change trend ΔE(t) of sentiment is:
[0026]
[0027] Among them, E adj (i) represents the adjusted sentiment value of node i, ΔE(t) represents the change trend of sentiment in the social media platform in the future for a period of time, ΔE(t) ∈[-1, 1], -1 represents that the sentiment fluctuates negatively, 1 represents that the sentiment fluctuates positively, and 0 represents that there is no fluctuation in the sentiment change.
[0028] As a preferred solution of the social media sentiment analysis method driven by deep learning according to the present invention, wherein: set a sentiment propagation intensity threshold, if the calculation result of the propagation intensity σ i (t) is greater than or equal to this threshold, it means that the influence of the sentiment value on this user will be strengthened, resulting in an increase in the sentiment value it subsequently spreads, and keep this calculation result;
[0029] If the calculation result of the propagation intensity σ i (t) is lower than this threshold, then the sentiment propagation effect will weaken, then the propagation intensity will be reduced by the coefficient α, and the updated propagation intensity is: σ i (t)·α.
[0030] A system applied to the above-mentioned social media sentiment analysis method driven by deep learning, the system includes: a data acquisition and preprocessing module.
[0031] The present invention also discloses a computer device, including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-mentioned social media sentiment analysis method driven by deep learning.
[0032] The present invention also discloses a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the above-mentioned social media sentiment analysis method driven by deep learning.
[0033] The beneficial effects of the present invention:
[0034] 1. By introducing context information (such as time features, popular events, topic tags, etc.), the present invention can dynamically adjust the sentiment classification results and accurately reflect the sentiment expressions in different contexts. For example, during holidays, the sentiment classification model can be more inclined to positive emotions, and during the outbreak of popular events, the sentiment fluctuations can also be captured in real time;
[0035] 2. The present invention combines the graph neural network (GNN) technology, considers the interaction relationship and sentiment propagation path between users in the social media platform, effectively captures the sentiment propagation mode, and avoids the influence of the traditional method ignoring the propagation of social relationships on sentiment changes. Through the interaction graph between users, the intensity and scope of sentiment propagation between different users can be predicted, providing data support for the prediction of sentiment fluctuations.
[0036] 3. By combining the sentiment classification results and propagation path analysis, the present invention can predict the sentiment fluctuation trend in social media in the future for a period of time. This fusion scheme based on deep learning and graph neural network not only improves the accuracy of sentiment analysis, but also can provide more accurate public opinion prediction and sentiment guidance strategies for enterprises, social media platforms, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:
[0038] Figure 1 FIG. is a schematic diagram of the overall structure of the social media sentiment analysis method and system driven by deep learning proposed by the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0039] In order to make the above objects, features and advantages of the present invention more obvious and understandable, the following will make a detailed description of the specific embodiments of the present invention in conjunction with the drawings of the specification.
[0040] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0041] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure or characteristic that can be included in at least one implementation manner of the present invention. The "in one embodiment" that appears in different places in this specification does not all refer to the same embodiment, nor is it a separate or alternative embodiment that excludes other embodiments.
[0042] Referring to Figure 1 , for an embodiment of the present invention, a social media sentiment analysis method and system driven by deep learning are provided. This method includes:
[0043] Step 1: Crawl the user's posts, comments, pictures, videos, and emoji information from the social media platform; clean, denoise, tokenize, and standardize this data.
[0044] Step 2: Analyze the time, topic tags, and popular events in the data, and use natural language processing technology to extract the context information S i , for example: if an event is popular on the social media, the content is automatically marked as belonging to this specific context.
[0045] Specifically,: define the social media content X that occurs at time t t triggering the conditional probability of the context information S i as P(S i |X t), the normalized situation adjustment factor C is calculated adj ; Its calculation formula is:
[0046]
[0047] Among them, β represents a constant that adjusts the influence of situation information.
[0048] Step 3: Based on the deep learning-based sentiment classification model, perform sentiment classification on the text in social media content. On this basis, the model will combine the situation adjustment factor C adj to adjust the sentiment classification result, making the sentiment classification more in line with the specific situation, such as being more inclined to positive emotions during holidays.
[0049] Specifically, the deep learning-based sentiment classification model means using a deep learning model to perform sentiment classification on each piece of social media content, obtaining the sentiment label E of each piece of content raw = f(X text ); f(·) represents the sentiment classification model, and X text is the input social media text feature;
[0050] Introduce the situation adjustment factor C adj into the sentiment classification model to adjust the result of the basic sentiment classification. The introduction of situation information enables sentiment classification to not only consider the text content but also dynamically adjust the sentiment label to adapt to the current situation (such as holidays may be more inclined to positive emotions:
[0051]
[0052] Among them, γ represents the sensitivity constant of situation adjustment; δ represents the non-linear adjustment factor of sentiment classification; θ represents the time decay constant, and |t1 - t0| represents the time difference between the current time and the reference time; E adj represents the finally adjusted sentiment classification result, that is, the sentiment value, and E adj ∈[-1, 1], -1 represents negative sentiment, 1 represents positive sentiment, and 0 represents neutral sentiment.
[0053] Step 4: Build a sentiment change prediction mechanism, that is, after determining the intensity of sentiment propagation of users over time, combine sentiment classification and propagation intensity to predict the intensity of future sentiment fluctuations.
[0054] Specifically, the sentiment change prediction mechanism specifically includes:
[0055] First, based on the user relationships in the social media platform, use graph neural network technology (the nodes of the social network represent users, and the edges represent the interactions between users) to calculate the propagation intensity σ of sentiment from one user to other users i (t);
[0056] Propagation intensity σ i (t) is calculated as follows:
[0057]
[0058] Among them, W p (i, j) represents the propagation weight between node i and node j, and E adj (j) represents the adjusted sentiment value of node j, and W p (i, j) can be determined by the interaction intensity in the social network (such as comment, like, repost frequency, etc.). The larger the value, the greater the propagation intensity.
[0059] Set the sentiment propagation intensity threshold. If the calculation result of the propagation intensity σ i (t) is greater than or equal to this threshold, it means that the influence of the sentiment value on this user will be strengthened, resulting in an increase in the sentiment value of its subsequent propagation, and keep this calculation result; if the calculation result of the propagation intensity σ i (t) is lower than this threshold, the sentiment propagation effect will be weakened, then the propagation intensity will be reduced by the coefficient α, and the updated propagation intensity is: σ i (t)·α.
[0060] Then, combining sentiment classification and the calculation result of the propagation intensity σ i (t), use the time series prediction method to predict the change trend ΔE(t) of sentiment in the social media in the next period of time.
[0061] The calculation formula for the change trend ΔE(t) of sentiment is:
[0062]
[0063] Among them, E adj (i) represents the adjusted sentiment value of node i, ΔE(t) represents the change trend of sentiment in the social media platform in the next period of time, ΔE(t) ∈ [-1, 1], -1 indicates that the sentiment fluctuates negatively, 1 indicates that the sentiment fluctuates positively, and 0 indicates that there is no fluctuation in the sentiment change.
[0064] For example, if the sentiment propagation on the social media platform occurs between two users, user i posts a positive sentiment content about holiday promotions, and user j sees and reposts this content. The sentiment adjustment value E adj (i) of user i is positive, and its propagation intensity σ i(t) is also affected by holiday time periods, and the sentiment value of user j towards the activity content is also positive, and the propagation intensity in the propagation path is relatively strong. Then the sentiment fluctuation prediction ΔE(t) is positive, indicating that the sentiment will fluctuate positively. This also shows that the sentiment of holiday promotion activities will be more positive, and the user mood on the social media platform tends to be optimistic.
[0065] In summary, by introducing context information (such as time features, popular events, topic tags, etc.), the present invention can dynamically adjust the sentiment classification results and accurately reflect the sentiment expressions in different contexts. For example, during holidays, the sentiment classification model tends to be more positive, and during the outbreak of popular events, the sentiment fluctuations can also be captured in real time. Combining with the graph neural network (GNN) technology, considering the interaction relationship and sentiment propagation path among users in the social media platform, the propagation mode of sentiment can be effectively captured, avoiding the influence of ignoring the social relationship propagation on sentiment changes in traditional methods. Through the interaction graph among users, the intensity and scope of sentiment propagation among different users can be predicted, providing data support for the prediction of sentiment fluctuations. Combining the sentiment classification results and propagation path analysis, the present invention can predict the sentiment fluctuation trend in the social media in the future for a period of time. This fusion scheme based on deep learning and graph neural network not only improves the accuracy of sentiment analysis, but also can provide more accurate public opinion prediction and sentiment guidance strategies for enterprises, social media platforms, etc.
[0066] This embodiment also provides an analysis system applied to the above-mentioned social media sentiment analysis method driven by deep learning. The system includes:
[0067] A data collection and preprocessing module, responsible for scraping user posts, comments, pictures, videos, and emoji data from the social media platform, cleaning, denoising, deduplicating, and standardizing the collected data to ensure the data quality, and then formatting and annotating the data to convert the original data into a format that can be processed by the deep learning model. A context feature extraction module, based on natural language processing technology, analyzes the time information, topic tags, popular events, etc. in the social media content to extract context features;
[0068] A sentiment classification and context adjustment module, using a deep learning model to perform sentiment classification on social media texts, outputting the basic classification results of sentiment, introducing the extracted context information into the sentiment classification model to obtain the new sentiment classification results, i.e., sentiment values. A sentiment propagation analysis module, based on the user relationship of the social media platform, uses a graph neural network to model the sentiment propagation path and calculate the propagation intensity of sentiment from one user to other users; and a sentiment fluctuation prediction module, based on the sentiment propagation path analysis results, uses a time series model to predict the sentiment fluctuation trend in the social media in the future for a period of time.
[0069] This embodiment also provides a computer device, which is applicable to the case of a social media sentiment analysis method driven by deep learning, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the social media sentiment analysis method driven by deep learning as proposed in the above embodiment.
[0070] This computer device may be a terminal, and this computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of this computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device may be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.
[0071] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the social media sentiment analysis method driven by deep learning as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (abbreviated as SRAM), electrically erasable programmable read-only memory (abbreviated as EEPROM), erasable programmable read-only memory (abbreviated as EPROM), programmable read-only memory (abbreviated as PROM), read-only memory (abbreviated as ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc.
[0072] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for social media sentiment analysis driven by deep learning, characterized in that, The method includes the following steps: Scraping users' posts, comments, pictures, videos, and emoji information from social media platforms; cleaning, denoising, tokenizing, and normalizing this data; Analyze the time, topic tags, and popular events in the data, and use natural language processing technology to extract the situational information S i , for example, if an event is popular on social media, automatically label the content as belonging to this specific situation; A sentiment classification model based on deep learning is used to classify the sentiment of the text in social media content. On this basis, the model will adjust the sentiment classification result by combining the context adjustment factor C adj to make the sentiment classification more in line with a specific context, such as being more positive during holidays; Constructing an emotional change prediction mechanism, that is, after determining the emotional propagation intensity of the user over time, combining emotional classification and propagation intensity to predict the intensity of future emotional fluctuations.
2. The method for social media sentiment analysis driven by deep learning according to claim 1, characterized in that: Define the social media content X that occurs at time t t Trigger the situational information S i The conditional probability is P(S i |X t ), and the normalized situation adjustment factor C is calculated adj ; Its calculation formula is: Among them, β represents a constant that regulates the influence of situational information.
3. The method for social media sentiment analysis driven by deep learning according to claim 2, characterized in that: The deep learning-based sentiment classification model means using a deep learning model to classify the sentiment of each piece of social media content and obtaining the sentiment label E of each piece of content raw = f(X text ); f(·) represents the sentiment classification model, and X text is the input social media text feature; Introduce the situation adjustment factor C adj into the sentiment classification model to adjust the results of the basic sentiment classification: Among them, γ represents the sensitivity constant for situation adjustment; δ represents the non-linear adjustment factor for emotion classification; θ represents the time decay constant, and |t1 - t0| represents the time difference between the current time and the reference time; E adj represents the finally adjusted emotion classification result, that is, the emotion value, E adj ∈[-1, 1], -1 represents negative emotion, 1 represents positive emotion, and 0 represents neutral emotion.
4. The method for social media sentiment analysis driven by deep learning according to claim 3, characterized in that: The emotional change prediction mechanism specifically includes: First, based on the user relationships in the social media platform, using graph neural network technology, calculate the propagation intensity σ of the sentiment spreading from one user to other users i (t); Then, combined with the sentiment classification and the calculation result of the propagation intensity σ i (t), use the time series prediction method to predict the changing trend ΔE(t) of the sentiment in social media within a period of time in the future.
5. The method for social media sentiment analysis driven by deep learning according to claim 4, characterized in that: The propagation intensity σ i (t) is calculated by the formula: Among them, W p (i, j) represents the propagation weight between node i and node j, E adj (j) represents the adjusted sentiment value of node j.
6. The method for social media sentiment analysis driven by deep learning according to claim 5, characterized in that: The calculation formula for the change trend ΔE(t) of emotion is: Among them, E adj (i) represents the adjusted sentiment value of node i, and ΔE(t) represents the changing trend of sentiment on the social media platform in a future period of time. ΔE(t) ∈ [-1, 1], where -1 indicates a negative sentiment fluctuation, 1 indicates a positive sentiment fluctuation, and 0 indicates no sentiment change fluctuation.
7. The method for social media sentiment analysis driven by deep learning according to claim 6, characterized in that: Set the threshold for the emotional propagation intensity. If the calculated result of the propagation intensity σ i (t) is greater than or equal to this threshold, it means that the influence of the emotional value on this user will be strengthened, resulting in an increase in the emotional value of its subsequent propagation, and keep this calculated result; If the calculation result of the propagation intensity σ i (t) is lower than this threshold value, the emotional propagation effect will be weakened, the propagation intensity will be reduced by the coefficient α, and the updated propagation intensity is: σ i (t) · α.
8. The analysis system of the deep learning-driven social media sentiment analysis method according to claim 7, characterized in that: The system includes: A data collection and preprocessing module, responsible for scraping users' posts, comments, pictures, videos, and emoji data from social media platforms, cleaning, denoising, deduplicating, and normalizing the collected data to ensure the quality of the data, and then performing data formatting and data annotation to convert the original data into a format that can be processed by a deep learning model; A situational feature extraction module, based on natural language processing technology, analyzes time information, topic tags, popular events, etc. in social media content to extract situational features; An emotional classification and situational adjustment module, using a deep learning model to perform emotional classification on social media text, outputting the basic classification result of emotion, introducing the extracted situational information into the emotional classification model to obtain a new emotional classification result, that is, an emotional value; An emotional propagation analysis module, based on the user relationships on the social media platform, uses a graph neural network to model the emotional propagation path and calculates the propagation intensity of emotion from one user to other users; And an emotional fluctuation prediction module, based on the analysis result of the emotional propagation path, uses a time series model to predict the fluctuation trend of social media emotion in a future period of time.
9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the deep learning-driven social media emotion analysis method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the deep learning-driven social media emotion analysis method according to any one of claims 1 to 7.