A social media-based drug network public opinion analysis system

CN116705347BActive Publication Date: 2026-11-03ZHEJIANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202211600578.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-13
Publication Date
2026-11-03
Estimated Expiration
2042-12-13

AI Technical Summary

Technical Problem

Existing technologies fail to systematically and comprehensively analyze drug-related information on social media, lack thematic and sentiment analysis of drug reviews, and fail to effectively utilize social media information for drug sentiment tracking and ADR/DDI monitoring.

Method used

A drug-related online sentiment analysis system based on social media is constructed, including modules for social media data acquisition, entity recognition, drug information distribution analysis, drug entity sentiment analysis, and co-occurrence network construction. Natural language processing and machine learning technologies are used to analyze the frequency of drug discussions, sentiment tendencies, and co-occurrence networks.

Benefits of technology

It enables comprehensive analysis of drug information on social media, provides timely tracking of drug hot topics and unique knowledge of ADR/DDI, supports drug sentiment monitoring and public health policy formulation, improves the breadth and depth of ADR/DDI information, and provides new drug vector representation parameters.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116705347B_ABST
    Figure CN116705347B_ABST
Patent Text Reader

Abstract

The application provides a social media-based drug network public opinion analysis system, which comprises a social media data acquisition module, an entity recognition module, a drug information distribution analysis module, a drug entity sentiment analysis module, a co-occurrence network construction module and an integration and application module; medical related texts are collected, a social media drug related corpus is constructed, drug discussion frequency time variation analysis is performed, drug theme content analysis is performed to extract the main content of drug related discussions, sentiment tendency analysis is performed, various proportion charts and change charts are drawn, the co-occurrence degree between entities is calculated and the correlation degree is visualized and presented in the form of a node network chart. The application collects drug related discussion information and can be intuitively and visually presented, which helps to comprehensively understand drug related problems of social public concern, so that timely and accurate countermeasures can be taken to prevent, reduce and eliminate the negative influence caused by sudden drug monitoring public opinion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical and health information technology, and specifically relates to a drug network public opinion analysis system based on social media. Background Technology

[0002] The widespread use of social media is one of the most revolutionary global phenomena since 2000. The communication of a large number of Internet users on social media has generated a large amount of user-generated content (UGC). This corpus is rich in content and has clear characteristics of timeliness, relevance and interactivity. It includes some patients' comments on drugs. However, there is currently a lack of specific and clear mining and analysis processes for this information.

[0003] Meanwhile, taking adverse drug reactions (ADRs) as an example, due to patients' ignorance, embarrassment, and lack of awareness regarding these symptoms, they tend to post on social media about their medication experiences or seek help rather than seeking assistance from professional institutions or doctors. Currently, most ADR and DDI (Drug-Drug Interaction) monitoring still relies on analyzing reports submitted by physicians to regulatory agencies and mining databases of these reports. However, clinical monitoring suffers from problems such as insufficient reporting, an excessive number of known ADR reports, incomplete data, duplicate reports, and failure to specify causal relationships. In-depth exploration and analysis of drug discussions on social media can compensate for the information gaps in traditional centralized ADR monitoring, thereby helping us to build a more comprehensive understanding of drugs and make their use more rational.

[0004] Therefore, it is of great significance to strengthen public opinion response to drug safety, promptly identify hot and sensitive topics in drug discussions, verify and guide the authenticity of online public opinion, and mine potential drug-disease-symptom correlations from massive amounts of information. It is also crucial to discover unique knowledge, insights, and patterns about ADRs and DDIs that cannot be obtained from other official databases, take effective intervention measures, and conduct scientific research.

[0005] In related studies, such as Carbonell et al. This study investigated drugs mentioned in 99,485 tweets over a three-week period, using time-series analysis to examine changes in drug co-occurrence pairs and assess their correspondence with known drug interactions (DDIs). Ultimately, many novel drug interactions were discovered. (Hamed et al.) A novel network mining algorithm was developed to measure the associations between drugs within the same tweet, as well as the associations between drugs and hashtags (#Hashtags), and then construct an association network between drugs. However, most current research is limited to associations between drugs and does not extend to related diseases and symptoms. Furthermore, it lacks topic analysis, sentiment analysis, and other public opinion-related analyses of drug review corpora, fails to consider the close correlation between social media drug information and public opinion, and lacks comprehensiveness and a complete and systematic analytical framework.

[0006] At the same time, existing related technical solutions also have some limitations: such as the "Active Monitoring Method and System for Adverse Drug Reactions" with authorization publication number CN109346145B. Although textual information such as instruction manuals is used, the data sources for monitoring patient data using text monitoring rules are still limited to Hospital Information Systems (HIS) and Electronic Medical Records (EMR), and do not include social media systems. Similarly, in the patent application CN111966917B, titled "An Event Detection and Summarization Method Based on a Pre-trained Language Model," key events in trending topics are detected only on social media platforms, without focusing on specific fields such as healthcare. Another example is the patent application CN113158073A, entitled "A Method for Automatically Discovering Adverse Drug Reactions from Social Media". The patent application, CN113901207A, entitled "A Method for Detecting Adverse Drug Reactions Based on Data Augmentation and Semi-Supervised Learning," is cited. And the publication number CN109844733A, titled "Knowledge Discovery Based on Social Media and Biomedical Literature Regarding Adverse Drug Events". [7] All these approaches focus on the discovery of adverse drug reactions, neglecting the importance of social media information for public opinion tracking and control. In conclusion, currently no technical solution can systematically and comprehensively analyze drug-related information on social media.

[0007] There is a great need for a drug-related online public opinion analysis system that can comprehensively and rationally utilize social media big data to mine potential drug information, track drug-related hot topics in a timely manner, facilitate public health personnel to monitor drug-related public opinion, and prevent the occurrence of drug-related malicious incidents.

[0008] References:

[0009] Summary of the Invention

[0010] In view of the above, the purpose of this invention is to use text data mining and analysis of social media platforms to construct a drug network public opinion analysis system based on social media, comprehensively and systematically analyze drug information data on social media, help track public health hot news and related policy formulation, and provide effective guidance for tasks such as adverse drug reactions and drug repositioning, and provide new drug vector representation parameters.

[0011] The objective of this invention is achieved through the following technical solution: a drug network public opinion analysis system based on social media, comprising: a social media data acquisition module, an entity recognition module, a drug information distribution analysis module, a drug entity sentiment analysis module, a co-occurrence network construction module, and an integration and application module;

[0012] Social Media Data Acquisition Module: This module collects medical-related discussions on social media, retains the necessary features of the corpus, obtains medical-related text, preprocesses the acquired medical-related text, and uses the preprocessed medical-related text as the system's original corpus.

[0013] Entity recognition module: Uses a named entity recognition system to identify drug-related entities in the system's original corpus, and uses social media texts containing the corresponding drug-related entities to construct a social media drug-related corpus;

[0014] Drug Information Distribution Analysis Module: Utilizes a social media drug-related corpus to analyze drug information distribution: Performs frequency and time variation analysis of drug discussions to investigate drug treatment trends on social media and plots frequency variation line graphs. After plotting the frequency variation line graphs, performs drug topic content analysis to extract the main content of drug-related discussions, determines the number of topics, and plots the topic proportion distribution of different drugs.

[0015] Drug Entity Sentiment Analysis Module: This module uses a sentiment analysis model to analyze the sentiment tendencies of drug-related discussions on social media corpora, analyzes the public's sentiment tendencies and changes in drug discussions, and generates sentiment tendency proportion charts and sentiment tendency change charts.

[0016] Co-occurrence network construction module: Utilizes a named entity recognition system to extract disease-related and symptom-related entities from a social media drug-related corpus, obtaining a social media medical-related corpus; calculates the co-occurrence degree and visual association degree among entities in the social media medical-related corpus and presents them in the form of a node network graph;

[0017] Integration and Application Module: This module provides an intuitive display of the results from each module and integrates and encapsulates them into an API for export and use.

[0018] Furthermore, the collection methods employed in the social media data acquisition module include: using the APIs of social media platforms, web crawlers, and open-source databases.

[0019] Furthermore, the required features of the corpus in the social media data acquisition module include: social media account username, ID, posted content, time, and geographical location.

[0020] Furthermore, the text preprocessing operation of the social media data acquisition module includes: converting all medical-related content on social media to lowercase, removing emojis, punctuation marks, and URLs, removing @user content, performing word segmentation, removing words with a length of less than 2, and then performing part-of-speech tagging and removing stop words to obtain a medical-related corpus on social media.

[0021] Furthermore, the named entity recognition system in the entity recognition module is a Roberta-based named entity recognition system. The input is medical-related corpus from social media, and the output is a new feature added after the features of the aforementioned social media corpus and named "extracted_entity". The "start_index" and "end_index" indicate the position where the entity appears. The entity recognition types of the Roberta-based named entity recognition system include personal names, place names, organization names, symptoms, drugs, vaccines, and diseases.

[0022] Furthermore, in the drug discussion frequency time change analysis of the drug information distribution analysis module, the number of times each drug entity is mentioned per week, F, is defined for each drug entity. W The calculation is as follows:

[0023]

[0024] in, This represents the number of times each drug entity is mentioned on day i of each week. The weekly mention frequency F of each drug entity is defined as:

[0025]

[0026] in To determine the frequency of mentions of the drug in week n, the above frequency statistics were performed using a list of drug keywords. After merging drugs by name, brand name, abbreviation, etc., the drugs with higher frequency of occurrence were counted and classified according to the WHO's ATC drug classification system. For drugs with multiple classifications, the most representative and widely used classification was selected. A line graph of the frequency change of each drug was plotted based on F to track changes in public attention.

[0027] Furthermore, in the analysis of drug discussion topics within the drug information distribution analysis module, the implicit Dirichlet distribution topic model is used to extract the main content of drug-related discussions. The formula is as follows:

[0028]

[0029] Where z is the topic calculated by the model. Drug-related text documents obtained from social media The text contains drug information on social media, where n is the drug text document. The total number of text messages within the app represents the number of messages a user posts about the drug on social media. Let α and β be the topics calculated using the model for the nth piece of information. Let be the probability distribution of text topics within each text document d; k is the number of social media text topics, determined by the following metrics:

[0030]

[0031]

[0032] Where n is the drug text document The total number of text messages in n, where p(w) represents the probability of the text. i V represents the size of the i-th message, i.e., the number of words; V is a set of words describing the topic obtained from the Latent Dirichlet Distribution Topic Model. It represents any two words in the group. This represents a smoothing factor that guarantees the score returns a real number; it is commonly used. ;in Calculate the words and Documents The quantity, similarly, D( )Calculation includes The number of documents;

[0033] Select the smallest value of P(D) and the largest value of P(D). The corresponding number of topics k is used to summarize the content of the corresponding topics, and the trained model is applied to specific corpus texts of different drugs. Observe how the thematic distribution focuses of different drugs differ, and use this information to draw the thematic proportion distribution map of different drugs;

[0034] Furthermore, in the drug discussion sentiment analysis of the drug entity sentiment analysis module, a sentiment analysis model based on Roberta is used for sentiment analysis. The social media drug-related corpus is used as input, and the output is the sentiment tendency of the drug entity. The sentiment tendency includes positive, negative and neutral. A sentiment tendency ratio chart and a sentiment tendency change chart are drawn according to the sentiment tendency of the drug entity in different time periods.

[0035] Furthermore, in the co-occurrence network construction module, the co-occurrence degree calculation process is as follows: For each pair of drug-related entities, the cosine similarity is calculated, which is the index for evaluating their correlation; firstly, an association matrix is ​​constructed, and the association matrix W is defined as follows:

[0036]

[0037] Wherein, each column of the correlation matrix W ( The vector representation of each text in the corpus consists of k texts, and each line ( ) indicates whether the corresponding entity appears in the text. There are e entities in total, r i =[y i,1 ,y i,2 ,y i,3 ,…,y i,k ] is the sparse vector representation of the corpus text of the corresponding i-th entity, where each element is a binary label for whether the entity appears, 1 if it appears, and 0 otherwise;

[0038] The formula for calculating cosine similarity is as follows:

[0039] , represents the sparse vector representation of the text containing the i-th and j-th entities in the corpus.

[0040] Furthermore, in the co-occurrence network construction module, the software used to visualize the degree of association is Gephi. The input information is two related entities and the cosine similarity between them. The output is a co-occurrence network graph, where the degree of association is reflected in the thickness of the edges. The thicker the edges, the greater the association between the two entities. The co-occurrence network graphs constructed in the co-occurrence network construction module include drug-drug co-occurrence network graphs, drug-disease co-occurrence network graphs, and drug-symptom co-occurrence network graphs.

[0041] The beneficial effects of this invention are:

[0042] 1. This invention, based on massive amounts of data from social media, combines natural language processing, statistical analysis, machine learning, and other methods to collect drug-related discussion information. This helps drug regulatory authorities and other relevant departments to fully understand drug-related issues of public concern, thereby enabling them to promptly collect accurate response measures to prevent, reduce, and eliminate the negative impact of sudden drug regulatory public opinion incidents.

[0043] 2. This invention utilizes an entity recognition system based on natural language processing to avoid the poor accuracy of corpus caused by keyword matching, thus ensuring accuracy while being more robust.

[0044] 3. Social media has great potential to supplement ADR and DDI information. Therefore, by utilizing information on potential drug side effects posted by patients on social media, unique knowledge, insights and patterns about ADR and DDI that cannot be obtained from other official databases can be discovered, effectively supplementing the breadth and depth of ADR and DDI information discovery.

[0045] 4. This invention utilizes medical-related entity corpora from social media to construct a relevant co-occurrence network, providing a comprehensive and intuitive visualization of the associations between various drugs, diseases, and symptoms. This facilitates the vector encoding of drugs in subsequent models that predict drug-drug relationship types, provides new drug vector representation parameters, and provides a basis for improving and promoting adverse drug reaction monitoring and drug repositioning.

[0046] 5. This invention has good applicability and can be used for outbreaks of major public health events such as influenza and epidemics, as well as for analyzing the epidemic trends of diseases and finding potential usable drugs. Attached Figure Description

[0047] Figure 1 This is a system structure block diagram of the present invention;

[0048] Figure 2 This is the text preprocessing step of the social media data acquisition module constructed in this invention;

[0049] Figure 3 This is a frequency-time variation line graph of the drug information distribution analysis module constructed in this invention on the dataset;

[0050] Figure 4 This is a bar chart showing the proportion of thematic models in the dataset for the drug information distribution analysis module constructed in this invention;

[0051] Figure 5 This is a bar chart showing the distribution of the proportion of sentiment tendencies of the drug entity sentiment analysis module constructed in this invention on the dataset;

[0052] Figure 6This is a line graph showing the change in the proportion of sentiment tendencies of the drug entity sentiment analysis module constructed in this invention on the dataset;

[0053] Figure 7 This is a drug-drug co-occurrence network graph on the dataset constructed using the co-occurrence network building module of this invention;

[0054] Figure 8 This is a drug-disease co-occurrence network graph on the dataset constructed using the co-occurrence network building module of this invention;

[0055] Figure 9 This is a drug-symptom co-occurrence network diagram on a dataset, based on the co-occurrence network construction module built in this invention. Detailed Implementation

[0056] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0057] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0058] like Figure 1 As shown, the present invention provides a drug network public opinion analysis system based on social media, which includes: a social media data acquisition module, an entity recognition module, a drug information distribution analysis module, a drug entity sentiment analysis module, a co-occurrence network construction module, and an integration and application module;

[0059] Social media data acquisition module: used to collect medical-related discussions on social media, retain the features required for the corpus, obtain medical-related text, preprocess the acquired medical-related text, and use the preprocessed medical-related text as the system's original corpus; drug-related entities include drug, disease, and symptom entities;

[0060] The required features for the corpus in the social media data acquisition module include: social media account username, ID, posted content, time, and geographic location.

[0061] The data collection methods employed in the social media data acquisition module include: using social media platform APIs, web scraping, and open-source databases. Mainstream social networks have opened their data platforms to some extent, providing API interfaces for data access. By calling the API interface functions of social media, background information, social information, posted information, and interaction information of social media users can be obtained. Information from online social media is mainly transmitted via HTTP, and the acquisition method is to send HTTP requests. In addition to the basic API interfaces provided by the open platform, social networks also encapsulate SDKs in different languages, mainly Java, PHP, Javascript, and Flash. Different development languages ​​can be selected depending on the data from the social media platform. Since downloading large amounts of data at once can easily lead to account bans, IP bans, and data redundancy, the number of requests and the amount of data transmitted should be minimized to improve the system's analysis efficiency.

[0062] This study adopted a time-segmented data acquisition method, defining the total amount of medical-related social media text acquired as D:

[0063]

[0064] in This represents the social media healthcare-related data acquired in month m;

[0065] Using months as the time unit, determine the start and end time nodes of the required text, obtain the social media data segment index file corresponding to the time period through the social media API interface; determine the download address based on the media data segment index file; and download the corresponding media data segment according to the download address.

[0066] Entity recognition module: Uses a named entity recognition system to identify drug-related entities in the system's original corpus, and uses social media texts containing the corresponding drug-related entities to construct a social media drug-related corpus;

[0067] Drug Information Distribution Analysis Module: Utilizes a social media drug-related corpus to analyze drug information distribution: Performs frequency and time variation analysis of drug discussions to investigate drug treatment trends on social media and plots frequency variation line graphs. After plotting the frequency variation line graphs, performs drug topic content analysis to extract the main content of drug-related discussions, determines the number of topics, and plots the topic proportion distribution of different drugs.

[0068] Drug Entity Sentiment Analysis Module: This module uses a sentiment analysis model to analyze the sentiment tendencies of drug-related discussions on social media corpora, analyzes the public's sentiment tendencies and changes in drug discussions, and generates sentiment tendency proportion charts and sentiment tendency change charts.

[0069] Co-occurrence network construction module: Utilizes a named entity recognition system to extract disease-related and symptom-related entities from a social media drug-related corpus, obtaining a social media medical-related corpus; calculates the co-occurrence degree and visual association degree among entities in the social media medical-related corpus and presents them in the form of a node network graph;

[0070] Integration and Application Module: This module provides an intuitive display of the results from each module and integrates and encapsulates them into an API for export and use.

[0071] Furthermore, the text preprocessing operation of the social media data acquisition module includes: converting all medical-related content on social media to lowercase, removing emojis, punctuation marks, and URLs, removing @user content, performing word segmentation, removing words with a length of less than 2, and then performing part-of-speech tagging and removing stop words to obtain a medical-related corpus on social media.

[0072] Furthermore, the named entity recognition system in the entity recognition module is a Roberta-based named entity recognition system. The input is social media medical-related corpus, and the output is a new feature added after the features of the aforementioned social media corpus and named "extracted_entity". The "start_index" and "end_index" indicate the position where the entity appears. The entity recognition types of the Roberta-based named entity recognition system include person names (PER), place names (LOC), organization names (ORG), symptoms (SYM), drugs (DRU), vaccines (VAC), and diseases (DIS).

[0073] Furthermore, in the drug discussion frequency time change analysis of the drug information distribution analysis module, the number of times each drug entity is mentioned per week, F, is defined for each drug entity. W The calculation is as follows:

[0074]

[0075] in, This represents the number of times each drug entity is mentioned on day i of each week. The weekly mention frequency F of each drug entity is defined as:

[0076]

[0077] in To determine the frequency of mentions of the drug in week n, the above frequency statistics were performed using a list of drug keywords. After merging drugs by name, brand name, abbreviation, etc., the drugs with higher frequency of occurrence were counted and classified according to the WHO's ATC (Anatomical Therapeutic Chemical Classification System). For drugs with multiple classifications, the most representative and widely used classification was selected. A line graph of the frequency change of each drug was plotted based on F to track changes in public attention.

[0078] Furthermore, in the analysis of drug discussion topics within the drug information distribution analysis module, the implicit Dirichlet distribution topic model is used to extract the main content of drug-related discussions. The formula is as follows:

[0079]

[0080] Where z is the topic calculated by the model. Drug-related text documents obtained from social media The text contains drug information on social media, where n is the drug text document. The total number of text messages within the app represents the number of messages a user posts about the drug on social media. The topic is calculated using the model for the nth piece of information. α and β are the hyperparameters of the model. In this embodiment, α = 50 / k and β = 0.1 are defined empirically. Let be the probability distribution of text topics within each text document d; k is the number of social media text topics, determined by the following metrics:

[0081]

[0082]

[0083] Where n is the drug text document The total number of text messages in n, where p(w) represents the probability of the text. i V represents the size of the i-th message, i.e., the number of words; V is a set of words describing the topic obtained from the Latent Dirichlet Distribution Topic Model. It represents any two words in the group. This represents a smoothing factor that guarantees the score returns a real number; it is commonly used. ;in Calculate the words and Documents The quantity, similarly, D( )Calculation includes The number of documents;

[0084] Select the smallest value of P(D) and the largest value of P(D). The corresponding number of topics k is used to summarize the content of the corresponding topics, and the trained model is applied to specific corpus texts of different drugs. Observe how the thematic distribution focuses of different drugs differ, and use this information to draw the thematic proportion distribution map of different drugs;

[0085] Furthermore, in the drug discussion sentiment analysis of the drug entity sentiment analysis module, a sentiment analysis model based on Roberta is used for sentiment analysis. A social media drug-related corpus is used as input, and term frequency inverse document frequency (TF-IDF) is used to generate a vector representation of the input corpus d. The output is the sentiment tendency of the drug entity, which includes: positive, negative, and neutral. Sentiment tendency ratio and sentiment tendency change are plotted according to the sentiment tendency of the drug entity in different time periods.

[0086] Furthermore, in the co-occurrence network construction module, the co-occurrence degree calculation process is as follows: For each pair of drug-related entities, the cosine similarity is calculated, which is the index for evaluating their correlation; firstly, an association matrix is ​​constructed, and the association matrix W is defined as follows:

[0087]

[0088] Wherein, each column of the correlation matrix W ( The vector representation of each text in the corpus consists of k texts, and each line ( ) indicates whether the corresponding entity appears in the text. There are e entities in total, r i =[y i,1 ,y i,2 ,y i,3 ,…,y i,k ] is the sparse vector representation of the corpus text of the corresponding i-th entity, where each element is a binary label for whether the entity appears, 1 if it appears, and 0 otherwise;

[0089] The formula for calculating cosine similarity is as follows:

[0090] , represents the sparse vector representation of the text containing the i-th and j-th entities in the corpus.

[0091] Furthermore, in the co-occurrence network construction module, the software used to visualize the degree of association is Gephi. The input information is two related entities and the cosine similarity between them. The output is a co-occurrence network graph, where the degree of association is reflected in the thickness of the edges. The thicker the edges, the greater the association between the two entities. The co-occurrence network graphs constructed in the co-occurrence network construction module include drug-drug co-occurrence network graphs, drug-disease co-occurrence network graphs, and drug-symptom co-occurrence network graphs.

[0092] Figure 1 This is a system structure block diagram of the present invention.

[0093] Figure 2 This is a text preprocessing step in the social media data acquisition module constructed in this invention. All medical-related content on social media is lowercase; emojis, punctuation marks, URLs, and @user content are removed; word segmentation is performed; words shorter than 2 characters are removed; then part-of-speech tagging and stop word removal are performed to obtain a medical-related corpus on social media.

[0094] Figure 3 This is an application of the drug information distribution analysis module constructed in this invention on a dataset (frequency-time variation line graph); for the five most discussed drugs (ivermectin, hydroxychloroquine, vitamin D, remdesivir, and zinc), frequency statistics were performed to draw a line graph, and the corresponding major social events have been marked. It can be seen from the graph that the discussion of remdesivir is mainly related to the FDA.

[0095] Figure 4 This is an application of the drug information distribution analysis module constructed in this invention on a dataset (topic model proportion distribution bar chart). The topic proportion distribution chart of 10 topics (information credibility, government policy, clinical trial evidence, drug approval and treatment status, COVID-19 related testing, drug efficacy and safety, self and public protection, daily nutritional supplement intake, public response to the virus and persistent symptoms) on the top five most discussed drugs (ivermectin, hydroxychloroquine, vitamin D, remdesivir, and zinc) can explore the focus of discussion on different drugs. As can be seen from the figure, the focus of discussion on ivermectin is on drug approval and treatment status, while the focus of discussion on zinc is on drug efficacy and safety.

[0096] Figure 5 This invention demonstrates the application of the drug entity sentiment analysis module on a dataset (a bar chart showing the distribution of sentiment tendencies). It can explore the distribution of public sentiment towards drugs. The chart shows that the public has more positive emotions and less negative emotions towards drugs popular during the COVID-19 pandemic.

[0097] Figure 6This is an application of the drug entity sentiment analysis module constructed in this invention on the r dataset (line graph of sentiment tendency ratio change), showing the change of the proportion of negative sentiment towards the top five most discussed drugs over time. Remdesivir and ivermectin saw an increase in the proportion of negative sentiment in the later period due to the influence of major social events.

[0098] Figure 7 This invention describes the application of the co-occurrence network construction module on a dataset (drug-drug co-occurrence network). Nodes represent different drugs, and the darker the color of a node, the more associated the drug is with other drugs. For example, in the figure, quinine is associated with more drugs than warfarin. The thicker the edge, the greater the degree of association between the two. For example, drug A is most associated with drug B, followed by adderol and ketamine, and then alprazolam.

[0099] Figure 8 This invention describes the application of the co-occurrence network construction module on a dataset (drug-disease co-occurrence network). Nodes represent different drugs and diseases. The darker the node color, the more the drug (or disease) is associated with other diseases (or drugs). The thicker the edge, the greater the degree of association between the two. For example, the association between vitamin D and arthritis is greater than the association between vitamin D and coronary heart disease.

[0100] Figure 9 This invention describes the application of the co-occurrence network construction module on a dataset (drug-symptom co-occurrence network). Nodes represent different drugs and symptoms. The darker the node color, the more the drug (or symptom) is associated with other symptoms (or drugs). The thicker the edge, the greater the degree of association between the two. For example, the association between ivermectin and muscle tremors is greater than the association between ivermectin and cough.

[0101] The above description is merely a preferred embodiment of one or more embodiments of this specification and is not intended to limit the scope of one or more embodiments of this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of one or more embodiments of this specification should be included within the protection scope of one or more embodiments of this specification.

Claims

1. A drug-related online public opinion analysis system based on social media, characterized in that, The system includes: a social media data acquisition module, an entity recognition module, a drug information distribution analysis module, a drug entity sentiment analysis module, a co-occurrence network construction module, and an integration and application module; Social Media Data Acquisition Module: This module collects medical-related discussions on social media, retains the necessary features of the corpus, obtains medical-related text, preprocesses the acquired medical-related text, and uses the preprocessed medical-related text as the system's original corpus. Entity Recognition Module: This module uses a named entity recognition system to identify drug-related entities in the original system corpus. It then constructs a social media drug-related corpus using social media text containing these entities. The named entity recognition system in this module is a Roberta-based system. The input is medical-related social media corpus, and the output is a new feature added after the aforementioned social media corpus features, named "extracted_entity," with "start_index" and "end_index" indicating the entity's location. The entity recognition types of the Roberta-based system include personal names, place names, organization names, symptoms, drugs, vaccine-related information, and diseases. Drug Information Distribution Analysis Module: This module utilizes a social media drug-related corpus to analyze drug information distribution. It analyzes the temporal changes in drug discussion frequency to investigate drug treatment trends on social media and plots frequency change line graphs. Following the frequency change line graphs, it performs drug topic content analysis to extract the main content of drug-related discussions, determines the number of topics, and plots the topic proportion distribution for different drugs. In the drug discussion topic content analysis within the drug information distribution analysis module, the implicit Dirichlet distribution topic model is used to extract the main content of drug-related discussions. The formula is as follows: Where z is the topic calculated by the model. Drug-related text documents obtained from social media The text contains drug information on social media, where n is the drug text document. The total number of text messages within the app represents the number of messages a user posts about the drug on social media. Let α and β be the topics calculated using the model for the nth piece of information. Let be the probability distribution of text topics within each text document d; k is the number of social media text topics, determined by the following metrics: Where n is the drug text document The total number of text messages in n, where p(w) represents the probability of the text. i V represents the size of the i-th message, i.e., the number of words; V is a set of words describing the topic obtained from the Latent Dirichlet Distribution Topic Model. It represents any two words in the group. This represents a smoothing factor that guarantees the score returns a real number; it is commonly used. ;in Calculate the words and Documents The quantity, similarly, D( )Calculation includes The number of documents; Select the smallest value of P(D) and the largest value of P(D). The corresponding number of topics k is used to summarize the content of the corresponding topics, and the trained model is applied to specific corpus texts of different drugs. Observe how the thematic distribution focuses of different drugs differ, and use this information to draw the thematic proportion distribution map of different drugs; Drug Entity Sentiment Analysis Module: This module uses a sentiment analysis model to analyze the sentiment tendencies of drug-related discussions on social media corpora, analyzes the public's sentiment tendencies and changes in drug discussions, and generates sentiment tendency proportion charts and sentiment tendency change charts. Co-occurrence network construction module: This module uses a named entity recognition system to extract disease-related and symptom-related entities from a social media drug-related corpus, resulting in a social media medical-related corpus. It calculates the co-occurrence degree and visual association degree among entities in the social media medical-related corpus and presents them in the form of a node network graph. The co-occurrence degree calculation process in the co-occurrence network construction module is as follows: For each pair of drug-related entities, the cosine similarity is calculated, which is the index for evaluating their correlation. First, an association matrix W is constructed, defined as follows: Wherein, each column of the correlation matrix W ( The vector representation of each text in the corpus consists of k texts, and each line ( ) indicates whether the corresponding entity appears in the text. There are e entities in total, r i =[y i,1 ,y i,2 ,y i,3 ,…,y i,k ] is the sparse vector representation of the corpus text of the corresponding i-th entity, where each element is a binary label for whether the entity appears, 1 if it appears, and 0 otherwise; The formula for calculating cosine similarity is as follows: , For the sparse vector representations of the text containing the i-th and j-th entities; Integration and Application Module: This module provides an intuitive display of the results from each module and integrates and encapsulates them into an API for export and use.

2. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, The data collection methods employed in the social media data acquisition module include: using the APIs of social media platforms, web crawlers, and open-source databases.

3. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, The required features for the corpus in the social media data acquisition module include: social media account username, ID, posted content, time, and geographic location.

4. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, The text preprocessing operations of the social media data acquisition module include: converting all medical-related content on social media to lowercase, removing emojis, punctuation marks, and URLs, removing @user content, performing word segmentation, removing words shorter than 2, and then performing part-of-speech tagging and stop word removal to obtain a medical-related corpus on social media.

5. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, In the drug discussion frequency time change analysis of the drug information distribution analysis module, the number of times each drug entity is mentioned per week is defined as F for each drug entity. W The calculation is as follows: in, This represents the number of times each drug entity is mentioned on day i of each week. The weekly mention frequency F of each drug entity is defined as: in To determine the frequency of mentions of the drug in week n, the above frequency statistics were performed using a list of drug keywords. After merging the drug name, brand name, and abbreviation of the same drug, the top five most frequently mentioned drugs and their frequencies were counted, and they were classified according to the WHO's ATC drug classification system. For drugs with multiple classifications, the most representative and widely used classification was selected. A line graph of the frequency change of each drug was plotted based on F to track changes in public attention.

6. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, In the drug discussion sentiment analysis module of the drug entity sentiment analysis, a sentiment analysis model based on Roberta is used for sentiment analysis. The social media drug-related corpus is used as input, and the output is the sentiment tendency of the drug entity. The sentiment tendency includes positive, negative and neutral. Sentiment tendency ratio chart and sentiment tendency change chart are drawn according to the sentiment tendency of the drug entity in different time periods.

7. The drug-related online public opinion analysis system based on social media according to claim 1, characterized in that, In the co-occurrence network construction module, Gephi is used to visualize the degree of association. The input information consists of two related entities and their cosine similarity. The output is a co-occurrence network graph, where the degree of association is reflected in the thickness of the edges. The thicker the edges, the greater the association between the two entities. The co-occurrence network graphs constructed in the co-occurrence network construction module include drug-drug co-occurrence network graphs, drug-disease co-occurrence network graphs, and drug-symptom co-occurrence network graphs.

Citation Information

Patent Citations

  • An active monitoring method and system for adverse drug reactions

    CN109346145B

  • Knowledge discovery from social media and biomedical literature for adverse drug events

    CN109844733A

  • An event detection and summarization method based on a pre-trained language model

    CN111966917B

  • Method for automatically exploring adverse drug reaction from social media

    CN113158073A

  • Adverse drug reaction detection method based on data enhancement and semi-supervised learning

    CN113901207A