A method for constructing an effective disaster information detection model on social media
By using CRFTM to merge and enrich short texts and integrating SGAN for fine-tuning, the method addresses the limitations of BERT in detecting disaster information on social media, reducing costs and enhancing accuracy.
Patent Information
- Application Number
- CN202210267297.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-03-18
AI Technical Summary
Existing methods for detecting effective disaster information on social media face challenges due to high training costs and limited detection accuracy, primarily because of the short text length, sparse information, and high noise in social media posts, which are not effectively addressed by the BERT model.
A method involving a conditional random field regularized topic model (CRFTM) is used to merge short texts into pseudo documents with longer lengths, extracting topic information through word vectors and knowledge, followed by training the BERT model with this enriched topic information, and incorporating semi-supervised generative adversarial networks (SGAN) for fine-tuning.
This approach reduces training costs and significantly improves the detection accuracy and performance of the model by enriching the semantics of short texts, allowing for more effective identification of disaster-related information.
Smart Images

Figure CN114818724B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of natural language processing, and in particular to a method for constructing a social media disaster effective information detection model. Background Art
[0002] When experiencing emergencies such as epidemics and floods, users often post various information on social media platforms such as Twitter and Weibo to seek help or share event updates. Some of this information contains content that is helpful for emergency rescue or emergency response, such as suspected cases, trapped people, emergency requests, and facility failures. This is called effective disaster information. This effective disaster information is an important source of emergency information that helps emergency response organizations conduct rescue activities, respond to public opinion, and gain situational awareness.
[0003] At present, data collection technology for obtaining a large amount of information in real time from social media websites is very mature. However, identifying effective information in it faces a serious information overload problem, that is, this information contains a large amount of false, redundant or irrelevant text content. Therefore, detecting effective disaster information that can provide support for emergency intelligent decision-making analysis from massive social media content is of great significance for improving the situational awareness and emergency response capabilities of emergency response organizations to emergencies.
[0004] The task of detecting effective disaster information on social media is to classify the short text content posted on social media into two categories: effective disaster information and invalid disaster information. In recent years, the Bidirectional Encoder Representations from Transformers (BERT) model, as a commonly used pre-trained language model, has made great progress in natural language processing tasks such as text classification and event detection, and has also been used in the task of detecting effective disaster information on social media.
[0005] However, short texts on social media have the characteristics of short text length, sparse information, non-standard terminology or high noise, which leads to poor detection performance of effective disaster information based on the BERT model. Not only is the training cost high, but the detection accuracy after it is put into use is also limited. Summary of the invention
[0006] The present application provides a method for constructing a social media disaster effective information detection model, which is used to extract the topic information of short texts through a conditional random field regularized topic model (CRFTM), and then integrate the topic information to train the BERT model for the effectiveness of disaster detection. This not only helps to reduce the training cost, but also improves the detection accuracy of the model, and the detection performance of the model is significantly improved.
[0007] In a first aspect, the present application provides a method for constructing a social media disaster effective information detection model, the method comprising:
[0008] Obtaining user posting information on the target social media platform, where the user posting data is the behavioral information posted by users on the target social media platform in response to a specific disaster event;
[0009] CRFTM is used to extract topic information from user-posted information. During the extraction process, CRFTM merges short texts in user-posted information into pseudo documents with longer text lengths, and then extracts topic information from pseudo documents by combining word vectors and word-related knowledge.
[0010] Using topic information as training data, the BERT model is trained to identify effective disaster information in the input data. Effective disaster information refers to information that is helpful for responding to specific disaster events.
[0011] In conjunction with the first aspect of the present application, in a first possible implementation of the first aspect of the present application, during the extraction process, CRFTM is specifically used to:
[0012] The distance between different short texts is measured by the minimum average distance based on word vectors, and semantically related words are found between different short texts. When the probability of semantically related words being assigned to the same topic label is higher, a clustering algorithm is used to aggregate different short texts into pseudo documents with longer text length.
[0013] Sample a topic distribution θ~Dir(α) for the entire corpus, and sample a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula:
[0014]
[0015] Among them, x di represents the context-related words of the i-th word, x drepresents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme di It can be calculated by the following formula:
[0016]
[0017] in, Indicates when the word w di The number of times the word is assigned to topic k when it is excluded from topic k or pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated as follows:
[0018]
[0019]
[0020] Among them, K represents the number of topics.
[0021] In combination with the first aspect of the present application, in a second possible implementation of the first aspect of the present application, the training process of the BERT model includes the following contents:
[0022] Let T = {t 1 ,t 2 ,...,t j ,...,t n} represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector, and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e 1 ,e 2 ,...,e j ,...,e n} replaces the character set T as the input of the model;
[0023] Through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h 1 ,h 2 ,...,h j ,...,h n}, [CLS] is added as the first character in the character sequence, and its hidden state h c Used as the output vector representation of the BERT model:
[0024]
[0025] Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts:
[0026]
[0027] Among them, p(w|d) represents the number of times w appears in d. The previous fusion method is used to transform the topic information R w And the output h of the BERT model c To perform the fusion:
[0028]
[0029] in, Represents the concatenation operator.
[0030] In combination with the first aspect of the present application, in a third possible implementation of the first aspect of the present application, during the fine-tuning stage of the training process of the BERT model, a semi-supervised generative adversarial network SGAN is used to implement semi-supervised learning to improve the detection performance of the model;
[0031] In SGAN, the discriminator module divides the data into (c+1) categories. The real data is classified into one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified into the new generated class, denoted as (c+1).
[0032] G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class, p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D Defined as:
[0033] L D =L supervised +L unsupervised ,
[0034] Loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised :
[0035]
[0036] Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, L unsupervised represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data into real data;
[0037] The data generated by the generator module G is consistent with the probability distribution p of the real data D The sampled data is as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G is defined as:
[0038]
[0039] Among them, f(x) represents the activation function, L unsupervised Represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. SGAN also needs to consider the error L caused by the discriminator module D classifying the generated data as real data. generated :
[0040] L generated =E x ~p G (x)log[1-p m (y=c+1|x)],
[0041] The final loss function of the generator module D is L G =L fm +L generated .
[0042] In a second aspect, the present application provides a device for constructing a social media disaster effective information detection model, the device comprising:
[0043] An acquisition unit is used to acquire user posted information on a target social media platform, where the user posted data is behavior information posted by users on the target social media platform in response to a specific disaster event;
[0044] The extraction unit is used to extract the topic information in the information released by the user through CRFTM. During the extraction process, CRFTM merges the short texts in the information released by the user into pseudo documents with longer text length, and then extracts the topic information from the pseudo documents by combining word vectors and word-related knowledge;
[0045] The training unit is used to train the BERT model to identify effective disaster information in the input data using the topic information as training data. Effective disaster information refers to information that is helpful for responding to specific disaster events.
[0046] In conjunction with the second aspect of the present application, in a first possible implementation of the second aspect of the present application, during the extraction process, CRFTM is specifically used for:
[0047] The distance between different short texts is measured by the minimum average distance based on word vectors, and semantically related words are found between different short texts. When the probability of semantically related words being assigned to the same topic label is higher, a clustering algorithm is used to aggregate different short texts into pseudo documents with longer text length.
[0048] Sample a topic distribution θ~Dir(α) for the entire corpus, and sample a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula:
[0049]
[0050] Among them, x di represents the context-related words of the i-th word, x d represents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme of di It can be calculated by the following formula:
[0051]
[0052] in, Indicates when the word w di The number of times the word is assigned to topic k when it is excluded from topic k or pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated as follows:
[0053]
[0054]
[0055] Among them, K represents the number of topics.
[0056] In conjunction with the second aspect of the present application, in a second possible implementation of the second aspect of the present application, the training process of the BERT model includes the following contents:
[0057] Let T = {t 1 ,t 2 ,...,t j ,...,t n} represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector, and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e 1 ,e 2 ,...,e j ,...,e n} replaces the character set T as the input of the model;
[0058] Through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h 1 ,h 2 ,...,h j ,...,h n}, [CLS] is added as the first character in the character sequence, and its hidden state h c Used as the output vector representation of the BERT model:
[0059]
[0060] Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts:
[0061]
[0062] Among them, p(w|d) represents the number of times w appears in d. The previous fusion method is used to transform the topic information R w And the output h of the BERT model c To perform the fusion:
[0063]
[0064] in, Represents the concatenation operator.
[0065] In combination with the second aspect of the present application, in a third possible implementation of the second aspect of the present application, during the fine-tuning stage of the BERT model training process, semi-supervised learning is implemented using a semi-supervised generative adversarial network SGAN to improve the detection performance of the model;
[0066] In SGAN, the discriminator module divides the data into (c+1) categories. The real data is classified into one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified into the new generated class, denoted as (c+1).
[0067] G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class, p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D Defined as:
[0068] L D =L supervised +L unsupervised ,
[0069] Loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised :
[0070]
[0071] Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, L unsupervised represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data into real data;
[0072] The data generated by the generator module G is consistent with the probability distribution p of the real data D The sampled data is as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G is defined as:
[0073]
[0074] Among them, f(x) represents the activation function, L unsupervisedRepresents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. SGAN also needs to consider the error L caused by the discriminator module D classifying the generated data as real data. generated :
[0075] L generated =E x ~p G (x)log[1-p m (y=c+1|x)],
[0076] The final loss function of the generator module D is L G =L fm +L generated .
[0077] In a third aspect, the present application provides a processing device, including a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method provided in the first aspect of the present application or any possible implementation method of the first aspect of the present application is executed.
[0078] In a fourth aspect, the present application provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the method provided by the first aspect of the present application or any possible implementation of the first aspect of the present application.
[0079] From the above content, it can be concluded that the present application has the following beneficial effects:
[0080] With respect to the detection of disaster effectiveness of information on social media platforms, this application uses CRFTM to extract topic information from information posted by users on the platform before training a disaster effectiveness detection model through BERT. In the specific extraction process, CRFTM merges the short texts in the information posted by users into pseudo documents with longer text length, and then extracts the topic information from the pseudo documents through the combination of word vectors and word-related knowledge. The topic information extracted in this way has strong consistency. When the disaster effectiveness detection model is trained by combining the topic information with BERT, the semantics of the short text can be greatly enriched. This not only helps to reduce the training cost, but also improves the detection accuracy of the model, and the detection performance of the model is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0082] Figure 1 A flowchart of a method for constructing an effective information detection model for disasters on social media in this application;
[0083] Figure 2 A schematic diagram of a training framework for training the BERT model for this application;
[0084] Figure 3 A schematic diagram of the training framework structure of the detection model of this application;
[0085] Figure 4 A schematic diagram for comparing the detection performance of the detection model of the present application and the benchmark model;
[0086] Figure 5 A schematic diagram of a structure of a device for constructing a social media disaster effective information detection model for this application;
[0087] Figure 6 A schematic diagram of the structure of the processing equipment of this application. DETAILED DESCRIPTION
[0088] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0089] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved.
[0090] The division of modules in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between modules can be electrical or other similar forms, which are not limited in this application. In addition, the modules or submodules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in multiple circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the present application.
[0091] Before introducing the construction method of the social media disaster effective information detection model provided by this application, the background content involved in this application is first introduced.
[0092] The method, device and computer-readable storage medium for constructing a social media disaster effective information detection model provided in the present application can be applied to a processing device to extract the topic information of a short text through CRFTM, and then integrate the topic information to train the BERT model for the effectiveness of disaster detection, which not only helps to reduce the training cost, but also improves the detection accuracy of the model, and the detection performance of the model is significantly improved.
[0093] The method for constructing a social media disaster effective information detection model mentioned in this application can be executed by a device for constructing a social media disaster effective information detection model, or a server, physical host, or user equipment (UE) and other different types of processing devices that integrate the device for constructing a social media disaster effective information detection model. Among them, the device for constructing a social media disaster effective information detection model can be implemented in hardware or software, and the UE can be a terminal device such as a smart phone, tablet computer, laptop computer, desktop computer, or personal digital assistant (PDA), and the processing device can be set in the form of a device cluster.
[0094] Next, we will introduce the construction method of the social media disaster effective information detection model provided by this application.
[0095] First, see Figure 1 , Figure 1 A flow chart of a method for constructing a social media disaster effective information detection model of the present application is shown. The method for constructing a social media disaster effective information detection model provided by the present application may specifically include the following steps S101 to S103:
[0096] Step S101, obtaining user posting information on a target social media platform, where the user posting data is behavioral information posted by users on the target social media platform in response to a specific disaster event;
[0097] It can be understood that the social media platform involved in this application can be any type of social daily platform, on which users can express their own ideas in the form of text, sound, picture or video. Of course, if it involves sound, picture or video, considering that this application is processed from the perspective of text, it can also involve extracting the corresponding text from the content of the sound, picture or video. The extraction technology involved is usually existing technology, and this application will not be specifically introduced here. Of course, in practical applications, this application can also introduce self-created extraction technology to extract the corresponding text content from the content of sound, picture or video to form a processable text.
[0098] For example, social media platforms can be different types of platforms such as Weibo and Tik Tok. Users can publish new information (including forwarding information) in the form of their own updates, or they can publish relevant information in the comment section of other information to express their own ideas.
[0099] At the same time, the disaster effectiveness detection involved in this application is to screen out information from the information posted by users that is helpful for responding to specific disaster events. Therefore, in the process of obtaining initial information, it is first obtained based on specific disaster events.
[0100] On the platform, the behavioral information posted by users regarding specific disaster events generally contains keywords of the specific disaster events directly in its text content, such as "epidemic", "flood" and other disaster event-specific words. Alternatively, there may be related homophones of the keywords of specific disaster events, related misspellings of words, such as "qz (diagnosed)", "separated pears", etc. Alternatively, more obscure pronouns may be used to refer to specific disaster events. These words related to specific disaster events can be summarized in a preset manner to provide users with information on their behavioral information regarding specific disaster events.
[0101] Step S102, extracting the topic information in the user-posted information through CRFTM. During the extraction process, CRFTM merges the short texts in the user-posted information into pseudo documents with longer text lengths, and then extracts the topic information from the pseudo documents through the combination of word vectors and word-related knowledge;
[0102] After obtaining user-published information related to a specific disaster event, the subject information specially configured in this application can be extracted and processed to provide good data support for the subsequent detection model of disaster effectiveness information.
[0103] Among them, the extraction and processing of the subject information is to process the topics related to specific disaster events in the process of preparing sample data, so that the text content related to specific disaster events can be accurately locked and tracked based on the topic, and it can be determined whether it is valid disaster information or invalid disaster information.
[0104] CRFTM, or conditional random field regularized topic model, can be understood as a model for finding the conditional probability distribution of another set of output random variables under a given set of input random variables. Its characteristic is that it assumes that the output random variables constitute a Markov random field. Conditional random fields can be used for different prediction problems. For natural language processing, it is mainly linear conditional random fields. At this time, the problem becomes a discriminant model for predicting the output sequence from the input sequence, in the form of a log-linear model. The learning method is maximum likelihood estimation or regularized maximum likelihood estimation. Conditional random fields are similar to hidden Markov fields, corresponding to three basic problems: probability calculation problem, learning problem and prediction problem.
[0105] In the process of extracting topic information using CRFTM, the present application can also specifically configure corresponding topic information extraction strategies, that is, merge the short texts in the information posted by users into pseudo documents with longer text length, and then extract the topic information from the pseudo documents through the combination of word vectors and word-related knowledge.
[0106] It is important to understand that topic models, as a common information extraction method, have been widely used in natural language processing tasks such as sentiment analysis and event detection. Traditional topic models infer topics based on word co-occurrence information in documents. However, due to the sparse characteristics of short text features of user information on social media platforms, it is difficult to provide sufficient word co-occurrence information for topic modeling.
[0107] In order to alleviate the problem of feature sparsity, this application first merges semantically related short texts into longer pseudo-documents during the use of CRFTM, and then combines word vectors with word-related knowledge to enhance the consistency of extracted topics, so that the extraction of topic information can be obtained with significantly improved accuracy and practicality, which can greatly enrich the semantics of short texts.
[0108] Step S103, using the topic information as training data, training the BERT model to identify effective disaster information in the input data, where effective disaster information refers to information that is helpful for responding to specific disaster events.
[0109] After obtaining high-precision topic information related to specific disaster events through CFRTM, the BERT model can be put into training. In this way, in the entire model training framework, the topic information of short texts and the BERT model are integrated. Since the short text semantics are enriched and the problem of sparse short text information is alleviated, text features suitable for the task of detecting effective disaster information on social media are extracted (represented by more robust short texts and extended short text semantic features). Therefore, the model has significantly improved detection accuracy for effective disaster information in input data both in the training process and in actual use. Therefore, the training time required to train the model's detection accuracy to the preset accuracy requirements is significantly shortened, and the trained model can complete the detection of effective disaster information in the input data with faster detection efficiency and higher detection accuracy.
[0110] from Figure 1It can be seen from the illustrated embodiment that, for the detection of disaster effectiveness of information on social media platforms, the present application uses CRFTM to extract topic information from information posted by users on the platform before training a disaster effectiveness detection model through BERT. In the specific extraction process, CRFTM merges the short texts in the information posted by users into pseudo documents with longer text length, and then extracts the topic information from the pseudo documents through the combination of word vectors and word-related knowledge. The topic information extracted in this way has strong consistency. When the disaster effectiveness detection model is trained by combining the topic information with BERT, the semantics of the short text can be greatly enriched. This not only helps to reduce the training cost, but also improves the detection accuracy of the model, and the detection performance of the model is significantly improved.
[0111] Furthermore, this application also provides a more specific implementation plan for CRFTM's extraction and processing of topic information.
[0112] Specifically, during the extraction process, CRFTM can be used to:
[0113] The distance between different short texts is measured by the minimum average distance based on word vectors, and semantically related words are found between different short texts (distance measurement method). In the case where semantically related words have a higher probability of being assigned to the same topic label, a clustering algorithm is then used to aggregate different short texts into pseudo documents with longer text lengths.
[0114] Next, sample a topic distribution θ~Dir(α) for the entire corpus and a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula:
[0115]
[0116] Among them, x di represents the context-related words of the i-th word, x d represents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme di It can be calculated by the following formula:
[0117]
[0118] in, Indicates when the word wdi The number of times the word is assigned to topic k when it is excluded from topic k or pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated as follows:
[0119]
[0120]
[0121] Among them, K represents the number of topics.
[0122] In addition, as another practical implementation, when the topic information extracted based on CFRTM is incorporated into the training of the BERT model, refer to Figure 2 A schematic diagram of a training framework for training a BERT model in the present application is shown. The training process of the BERT model may further include the following contents:
[0123] Let T = {t 1 ,t 2 ,...,t j ,...,t n} represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector, and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain the position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e 1 ,e 2 ,...,e j ,...,e n} replaces the character set T as the input of the model;
[0124] Then, through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h 1 ,h 2 ,...,h j ,...,h n}, [CLS] is added as the first character in the character sequence, and its hidden state h c Used as the output vector representation of the BERT model:
[0125]
[0126] Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts:
[0127]
[0128] Among them, p(w|d) represents the number of times w appears in d. The previous fusion method is used to transform the topic information R w And the output h of the BERT model c To perform the fusion:
[0129]
[0130] in, Represents the concatenation operator.
[0131] In addition, during the training process of the model, as another practical implementation method, the BERT model can also use SGAN to implement semi-supervised learning during the fine-tuning stage of the training process, using a large amount of unlabeled data to improve the model's training process to improve the model's detection performance.
[0132] For details, please refer to Figure 3 A framework diagram of the training framework structure of the detection model of the present application (with adversarial training of SGAN added) is shown.
[0133] In SGAN, the discriminator module divides the data into (c+1) categories, the real data is classified as one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified as a new generated class, denoted as (c+1).
[0134] G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class (c+1), p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D It can be defined as:
[0135] L D =L supervised +L unsupervised (8) Loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised :
[0136]
[0137] Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, Lunsupervised represents the cumulative loss of classifying the unlabeled real data into the new generated class (c+1) and classifying the generated data into the real data;
[0138] The data generated by the generator module G is consistent with the probability distribution p of the real data D The sampled data is as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G can be defined as:
[0139]
[0140] Among them, f(x) represents the activation function, L unsupervised Represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. SGAN also needs to consider the error L caused by the discriminator module D classifying the generated data as real data. generated :
[0141] L generated =E x ~p G (x)log[1-p m (y=c+1|x)],
[0142] The final loss function of the generator module D is L G =L fm +L generated (11)
[0143] It is understandable that although SGAN is usually used in the field of computer vision, this application can use it to expand the model's training framework to improve the performance of social media disaster effective information detection. In this application, SGAN and the detection model are combined with each other in the fine-tuning stage. This training method adjusts the fine-tuning process of the detection model by adding an SGAN layer containing a generator and a discriminator, thereby improving the detection performance of the model.
[0144] Furthermore, to facilitate understanding of the above content, the present application may also be illustrated with the aid of a set of examples shown below.
[0145] Considering the comparison of detection performance of different detection models, the benchmark models include Convolutional Neural Networks (CNN), Bi-directional Long Short Term Memory (BiLSTM), BERT and ALBERT models.
[0146] This application uses the evaluation indicators of effective information detection of disasters in social media, including precision, recall and F1 value, to analyze the experimental results.
[0147] Taking the Twitter platform as an example, this application collected and annotated 15,935 short texts on the Twitter platform, of which 7,983 were effective disaster information and 158,341 were unannotated short texts. The data set was randomly divided into training set, validation set and test set in a ratio of 7:2:1.
[0148] For the detection model of this application, 1000 Gibbs samplings were run and the Dirichlet prior parameters were set to: α = 50 / K, β = 0.01, and the number of topics was set to 100.
[0149] For CNN and BiLSTM, this application uses 300-dimensional open source GloVe word vectors, which will construct a vector matrix to convert the words of the input short text into corresponding word vector representations.
[0150] For BERT and ALBERT, this application uses the pre-trained 12-layer BERT-base and albert-base-v2 structures.
[0151] This application uses Gelu as the activation function, uses the Adam optimizer, sets the learning rate to 5e-5, and the Dropout probability to 0.2.
[0152] The experimental results are as follows Figure 4 As shown in the schematic diagram of a comparison of the detection performance of the detection model of the present application and the benchmark model, the detection model trained by the present application ( Figure 4 The TABERT (referred to as TABERT in this paper) outperforms the four baseline models in all three evaluation indicators, thus verifying the advanced nature of the model training framework of this application.
[0153] The above is an introduction to the method for constructing a social media disaster effective information detection model provided by this application. In order to facilitate better implementation of the method for constructing a social media disaster effective information detection model provided by this application, this application also provides a device for constructing a social media disaster effective information detection model from the perspective of functional modules.
[0154] See also Figure 5 , Figure 5This is a schematic diagram of a structure of a device for constructing a social media disaster effective information detection model in this application. In this application, the device 500 for constructing a social media disaster effective information detection model may specifically include the following structure:
[0155] An acquisition unit 501 is used to acquire user published information on a target social media platform, where the user published data is behavior information published by users on the target social media platform in response to a specific disaster event;
[0156] The extraction unit 502 is used to extract the topic information in the information released by the user through CRFTM. During the extraction process, CRFTM merges the short texts in the information released by the user into pseudo documents with longer text length, and then extracts the topic information from the pseudo documents through the combination of word vectors and word-related knowledge;
[0157] The training unit 503 is used to train the BERT model to identify effective disaster information in the input data using the topic information as training data. Effective disaster information refers to information that is helpful for responding to specific disaster events.
[0158] In an exemplary implementation, during the extraction process, CRFTM is specifically used to:
[0159] The distance between different short texts is measured by the minimum average distance based on word vectors, and semantically related words are found between different short texts. When the probability of semantically related words being assigned to the same topic label is higher, a clustering algorithm is used to aggregate different short texts into pseudo documents with longer text length.
[0160] Sample a topic distribution θ~Dir(α) for the entire corpus, and sample a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula:
[0161]
[0162] Among them, x di represents the context-related words of the i-th word, x d represents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme of di It can be calculated by the following formula:
[0163]
[0164] in, Indicates when the word w di The number of times the word is assigned to topic k when it is excluded from topic k or pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated as follows:
[0165]
[0166]
[0167] Among them, K represents the number of topics.
[0168] In another exemplary implementation, the training process of the BERT model includes the following:
[0169] Let T = {t 1 ,t 2 ,...,t j ,...,t n} represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector, and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain the position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e 1 ,e 2 ,...,e j ,...,e n} replaces the character set T as the input of the model;
[0170] Through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h 1 ,h 2 ,...,h j ,...,h n}, [CLS] is added as the first character in the character sequence, and its hidden state h c Used as the output vector representation of the BERT model:
[0171]
[0172] Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts:
[0173]
[0174] Among them, p(w|d) represents the number of times w appears in d. The previous fusion method is used to transform the topic information R w And the output h of the BERT model c To perform the fusion:
[0175]
[0176] in, Represents the concatenation operator.
[0177] In another exemplary implementation, during the fine-tuning phase of the training process, the BERT model uses a semi-supervised generative adversarial network (SGAN) to implement semi-supervised learning to improve the detection performance of the model.
[0178] In SGAN, the discriminator module divides the data into (c+1) categories, the real data is classified as one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified as a new generated class, denoted as (c+1).
[0179] G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class, p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D Defined as:
[0180] L D =L supervised +L unsupervised ,
[0181] Loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised :
[0182]
[0183] Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, L unsupervised represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data into real data;
[0184] The data generated by the generator module G is consistent with the probability distribution p of the real data DThe sampled data is as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G is defined as:
[0185]
[0186] Among them, f(x) represents the activation function, L unsupervised Represents the cumulative loss of classifying unlabeled real data into new generated classes and classifying generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. SGAN also needs to consider the error L caused by the discriminator module D classifying the generated data as real data. generated :
[0187] L generated =E x ~p G (x)log[1-p m (y=c+1|x)],
[0188] The final loss function of the generator module D is L G =L fm +L generated .
[0189] This application also provides a processing device from the perspective of hardware structure, see Figure 6 , Figure 6 601, a memory 602, and an input / output device 603. The processor 601 is used to execute the computer program stored in the memory 602 to implement the following Figure 1 The steps of the method for constructing a social media disaster effective information detection model in the corresponding embodiment; or, the processor 601 is used to execute the computer program stored in the memory 602 to implement the following Figure 5 Corresponding to the functions of each unit in the embodiment, the memory 602 is used to store the processor 601 executing the above Figure 1 The computer program required for the method of constructing a social media disaster effective information detection model in the corresponding embodiment.
[0190] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 602, and executed by the processor 601 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the computer device.
[0191] The processing device may include, but is not limited to, a processor 601, a memory 602, and an input / output device 603. Those skilled in the art will appreciate that the illustration is merely an example of a processing device and does not constitute a limitation on the processing device, and may include more or fewer components than shown in the illustration, or a combination of certain components, or different components. For example, the processing device may also include a network access device, a bus, etc., and the processor 601, the memory 602, the input / output device 603, etc. are connected via a bus.
[0192] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the processing device, and uses various interfaces and lines to connect various parts of the entire device.
[0193] The memory 602 can be used to store computer programs and / or modules. The processor 601 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 602 and calling the data stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc.; the data storage area can store data created according to the use of the processing device, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0194] When the processor 601 is used to execute the computer program stored in the memory 602, the following functions can be implemented:
[0195] Obtaining user posting information on the target social media platform, where the user posting data is the behavioral information posted by users on the target social media platform in response to a specific disaster event;
[0196] CRFTM is used to extract topic information from user-posted information. During the extraction process, CRFTM merges short texts in user-posted information into pseudo documents with longer text lengths, and then extracts topic information from pseudo documents by combining word vectors and word-related knowledge.
[0197] Using topic information as training data, the BERT model is trained to identify effective disaster information in the input data. Effective disaster information refers to information that is helpful for responding to specific disaster events.
[0198] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the construction device, processing device and corresponding units of the above-described social media disaster effective information detection model can refer to the following. Figure 1 The description of the construction method of the social media disaster effective information detection model in the corresponding embodiment will not be repeated here.
[0199] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0200] To this end, the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the present application as follows: Figure 1 The steps of the method for constructing a social media disaster effective information detection model in the corresponding embodiment, the specific operations can be referred to as follows Figure 1 The description of the construction method of the social media disaster effective information detection model in the corresponding embodiment will not be repeated here.
[0201] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0202] Due to the instructions stored in the computer-readable storage medium, the present application can be executed. Figure 1 The steps of the method for constructing a social media disaster effective information detection model in the corresponding embodiment, therefore, the present application can be implemented as follows Figure 1 The beneficial effects that can be achieved by the method for constructing a social media disaster effective information detection model in the corresponding embodiment are detailed in the previous description and will not be repeated here.
[0203] The above is a detailed introduction to the construction method, device, processing equipment and computer-readable storage medium of the social media disaster effective information detection model provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for constructing a social media disaster effective information detection model, characterized in that: The method comprises: Acquire user posting information on a target social media platform, wherein the user posting data is behavior information posted by users on the target social media platform in response to a specific disaster event; The topic information in the user-posted information is extracted by a conditional random field regularized subject model CRFTM. During the extraction process, the CRFTM merges the short texts in the user-posted information into pseudo documents with longer text lengths, and then extracts the topic information from the pseudo documents by combining word vectors and word-related knowledge; Using the subject information as training data, training a bidirectional encoder representation BERT model from a transformer to identify effective disaster information in the input data, wherein the effective disaster information refers to information that is helpful for responding to the specific disaster event; During the extraction process, the CRFTM is specifically used to: The distances between different short texts are measured by using the minimum average distance based on word vectors, and semantically related words are found between the different short texts. When the probability that the semantically related words are assigned to the same topic label is higher, the different short texts are aggregated into the pseudo document with a longer text length by using a clustering algorithm. Sample a topic distribution θ~Dir(α) for the entire corpus, and sample a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula: Among them, x di represents the context-related words of the i-th word, x d represents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In the CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme of di It can be calculated by the following formula: in, Indicates when the word w di The number of times the word is assigned to topic k when it is excluded from the topic k or the pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated by the following formulas: Among them, K represents the number of topics; The training process of the BERT model includes the following: Let T = {t1, t2, ..., t j ,...,t n } represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e1, e2, ..., e j ,...,e n } replaces the character set T as the input of the model; Through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h1,h2,...,h j ,...,h n }, [CLS] is added as the first character in the character sequence, and its hidden state h c The output vector representation used as the BERT model: Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts: Among them, p(w|d) represents the number of times w appears in d. The topic information R is transformed into w and the output h of the BERT model c To perform the fusion: in, Represents the concatenation operator.
2. The method according to claim 1, characterized in that During the fine-tuning phase of the training process, the BERT model uses a semi-supervised generative adversarial network (SGAN) to implement semi-supervised learning to improve the detection performance of the model. In the SGAN, the discriminator module divides the data into (c+1) categories, the real data is classified into one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified into a new generated class, denoted as (c+1). G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class, p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D Defined as: L D =L supervised +L unsupervised , The loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised : Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, L unsupervised represents the cumulative loss of classifying the unlabeled real data into the new generated class and classifying the generated data into the real data; The data generated by the generator module G is consistent with the probability distribution p of the real data D The sampled data are as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, the SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G is defined as: Among them, f(x) represents the activation function, L unsupervised represents the cumulative loss of classifying unlabeled real data into the new generated class and classifying the generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. The SGAN also needs to consider the error L generated by the discriminator module D classifying the generated data as real data. generated : L generated =E x ~p G (x)log[1-p m (y=c+1∣x)], The final loss function of the generator module D is L G =L fm +L generated .
3. A device for constructing a social media disaster effective information detection model, characterized in that: The device comprises: An acquisition unit is used to acquire user published information on a target social media platform, wherein the user published data is behavior information published by users on the target social media platform in response to a specific disaster event; An extraction unit, used for extracting the topic information in the information posted by the user through a conditional random field regularized subject model CRFTM. During the extraction process, the CRFTM merges the short texts in the information posted by the user into a pseudo document with a longer text length, and then extracts the topic information from the pseudo document through a combination of word vectors and word-related knowledge; A training unit, used to train a bidirectional encoder representation BERT model from a transformer to identify effective disaster information in input data using the subject information as training data, wherein the effective disaster information refers to information that is helpful for responding to the specific disaster event; During the extraction process, the CRFTM is specifically used to: The distances between different short texts are measured by using the minimum average distance based on word vectors, and semantically related words are found between the different short texts. When the probability that the semantically related words are assigned to the same topic label is higher, the different short texts are aggregated into the pseudo document with a longer text length by using a clustering algorithm. Sample a topic distribution θ~Dir(α) for the entire corpus, and sample a word distribution φ for each topic k k ~Dir(β), α and β are Dirichlet prior hyperparameters, for each pseudo document d, each word is sampled The topic assignment z for each word d It can be calculated by the following formula: Among them, x di represents the context-related words of the i-th word, x d represents the set of context-related words, Ψ represents the potential energy function considering the influence of semantic relevance, N d represents the number of words in d. In the CRFTM, the collapsed Gibbs sampling method is used to infer the posterior distribution of topic tags. The word x in the pseudo document d di Theme of di It can be calculated by the following formula: in, Indicates when the word w di The number of times the word is assigned to topic k when it is excluded from the topic k or the pseudo document d. V represents the dimension of the vocabulary. The topic distribution θ of the document and the distribution φ of the topic word can be calculated by the following formulas: Among them, K represents the number of topics; The training process of the BERT model includes the following: Let T = {t1, t2, ..., t j ,...,t n } represents the short text input, where n represents the length of the short text, t j represents the jth character in a short text. Each character will be represented as a character vector, a position vector and a segment vector. The character vector is used to represent different characters, the position vector is used to obtain position information, and the segment vector is used to distinguish different sentences. After the vectorization process, E = {e1, e2, ..., e j ,...,e n } replaces the character set T as the input of the model; Through the self-attention and multi-head attention mechanisms, the BERT model maps E into a series of hidden representations H = {h1,h2,...,h j ,...,h n }, [CLS] is added as the first character in the character sequence, and its hidden state h c The output vector representation used as the BERT model: Among them, d BERT Represents the size of the output layer dimension in the BERT model. For the topic information R w , using the word sum representation to infer the topic features p(z|d) of short texts: Among them, p(w|d) represents the number of times w appears in d. The topic information R is transformed into w and the output h of the BERT model c To perform the fusion: in, Represents the concatenation operator.
4. The device according to claim 3, characterized in that During the fine-tuning phase of the training process, the BERT model uses a semi-supervised generative adversarial network (SGAN) to implement semi-supervised learning to improve the detection performance of the model. In the SGAN, the discriminator module divides the data into (c+1) categories, the real data is classified into one of the target categories, denoted as (1,...,c), and the data generated by the generator is classified into a new generated class, denoted as (c+1). G represents the generator module, D represents the discriminator module, and p G is the generator probability distribution, p D is the true data probability distribution, p m (y=c+1|x) represents the probability that data x belongs to the new generated class, p m (y∈(1,...,c)|x) represents the probability that x belongs to the real data associated with the original category. To train a semi-supervised c-class classifier, the loss function L of D is D Defined as: L D =L supervised +L unsupervised , The loss function L D Decomposed into supervised loss function L supervised and the unsupervised loss function L unsupervised : Among them, L supervised represents the cumulative loss of classifying actual data into the wrong category of target c, L unsupervised represents the cumulative loss of classifying the unlabeled real data into the new generated class and classifying the generated data into the real data; The data generated by the generator module G is consistent with the probability distribution p of the real data D The sampled data are as similar as possible. The training goal of the generator module G is to learn the expected value of the intermediate layer features of the discriminator module. By training the discriminator module D, the SGAN captures the features that can best distinguish the real data from the data generated by G. The feature matching loss function of the generator module G is defined as: Among them, f(x) represents the activation function, L unsupervised represents the cumulative loss of classifying unlabeled real data into the new generated class and classifying the generated data as real data. When the sample data generated by the generator module G is input into the discriminator module D, their feature representation is very similar to the real data. The SGAN also needs to consider the error L generated by the discriminator module D classifying the generated data as real data. generated : L generated =E x ~p G (x)log[1-p m (y=c+1∣x)], The final loss function of the generator module D is L G =L fm +L generated .
5. A processing device, characterized in that: The method comprises a processor and a memory, wherein a computer program is stored in the memory, and when the processor calls the computer program in the memory, the method according to claim 1 or 2 is executed.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the method according to claim 1 or 2.
