Method for processing disaster-related social media information and related device
Patent Information
- Application Number
- CN202410592339.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-13
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2044-05-13
AI Technical Summary
[0004]然而,目前仍缺乏一种有效的方法,可以对灾害相关社交媒体信息进行更细粒度的分类
[0010]综上所述,可以看出,本发明提供的实施例中,可以构建与社交媒体短文本对应的完形填空式提示模板,该提示模板中包含一标记,并根据词汇表构建标签词汇集合,之后根据完形填空式提示模板预测标记所对应的位置生成标签词语集合中每个标签词的概率,并对目标标签词语集合中每个标签词的概率进行聚合,以得到可行动信息类别所对应的聚合函数;根据目标可行动信息类别所对应的聚合函数确定社交媒体短文本所对应的可行动信息类别。由此,通过利用词向量技术自动构建标签映射器,从而消除了对人工设计或外部知识库的依赖,可以从社交媒体信息中识别出不同类别的可行动信息(如疏散、救援、医疗支援等),有助于应急响应指挥部门迅速响应救灾工作,提高救灾效率。
Smart Images

Figure CN118332096B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of social media, and more particularly to a method and related equipment for processing disaster-related social media information. Background Technology
[0002] Modern social media is not only a platform for users to communicate and share their surroundings, but it also plays a crucial role in disseminating information related to major disasters. For example, during disasters such as fires, earthquakes, and disease outbreaks, affected people typically share information about the situation on social media, including the extent of infrastructure damage, casualties, and seek emergency assistance. Real-time analysis of this information and extraction of actionable data is essential for emergency response command centers to provide timely and effective assistance to affected populations. However, manually extracting actionable information from the vast amount of disaster-related social media data is an extremely time-consuming and labor-intensive task.
[0003] Existing AI-based classification methods typically simplify the task of extracting information from disaster-related social media into a binary classification problem. This means that short texts are categorized into two types—disaster-related and non-disaster-related—simply based on whether they contain disaster-related information.
[0004] However, there is still a lack of effective methods for more granular classification of disaster-related social media information. Summary of the Invention
[0005] This invention provides a method and apparatus for processing disaster-related social media information, which can identify different categories of actionable information from social media information.
[0006] The first aspect of this invention provides a method for processing disaster-related social media information, the method comprising: Retrieve N short texts from social media, where N is an integer greater than or equal to 1; Construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; Based on a pre-defined vocabulary, construct a set of tag words corresponding to each of the multiple actionable information categories; Based on the target cloze prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target marker. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of the multiple actionable information categories. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the target actionable information category; The actionable information category corresponding to the target social media short text is determined based on the aggregation function corresponding to the target actionable information category.
[0007] A second aspect of the present invention provides an apparatus for processing disaster-related social media information, comprising: The acquisition module is used to acquire N short texts from social media, where N is an integer greater than or equal to 1; The first construction module is used to construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; The second construction module is used to construct a set of tag words corresponding to each of the multiple actionable information categories based on a preset vocabulary. The generation module is used to predict the probability of generating each tag word in the target tag word set based on the target cloze prompt template corresponding to the position of the target mark. The target tag word set is the tag word set corresponding to the target actionable information category. The target actionable information category is any one of the multiple actionable information categories. The aggregation module is used to aggregate the probability of each tag word in the target tag word set to obtain the aggregation function corresponding to the target actionable information category; The determination module is used to determine the actionable information category corresponding to the target social media short text based on the aggregation function corresponding to the target actionable information category.
[0008] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the processor is configured to execute a computer management program stored in the memory to implement the steps of the method for processing disaster-related social media information as described in the first aspect above.
[0009] A fourth aspect of the present invention provides a computer-readable storage medium having a computer management program stored thereon, wherein the computer management program, when executed by a processor, implements the steps of the method for processing disaster-related social media information as described in the first aspect above.
[0010] In summary, it can be seen that the embodiments provided by this invention can construct a cloze-style prompt template corresponding to short social media texts. This prompt template includes a marker and constructs a tag vocabulary set based on a vocabulary list. Then, based on the cloze-style prompt template, the probability of each tag word in the tag word set is generated according to the position corresponding to the marker. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the actionable information category. The actionable information category corresponding to the short social media text is determined based on the aggregation function corresponding to the target actionable information category. Thus, by automatically constructing a tag mapper using word vector technology, the dependence on manual design or external knowledge bases is eliminated. Different categories of actionable information (such as evacuation, rescue, medical support, etc.) can be identified from social media information, which helps emergency response command departments to respond quickly to disaster relief work and improve disaster relief efficiency. Attached Figure Description
[0011] Figure 1 A schematic diagram of an embodiment of the method for processing disaster-related social media information provided by the present invention; Figure 2 A schematic diagram of another embodiment of the method for processing disaster-related social media information provided in this invention; Figure 3 A schematic diagram of another embodiment of the method for processing disaster-related social media information provided in this invention; Figure 4 A schematic diagram of another embodiment of the method for processing disaster-related social media information provided in this invention; Figure 5 A schematic diagram of the experimental results provided in an embodiment of the present invention; Figure 6 Another schematic diagram illustrating the experimental results provided in this embodiment of the invention; Figure 7 A virtual structural diagram of a disaster-related social media information processing device provided in an embodiment of the present invention; Figure 8 A schematic diagram of the hardware structure of a disaster-related social media information processing device provided in an embodiment of the present invention; Figure 9 A schematic diagram illustrating an embodiment of an electronic device provided by an embodiment of the present invention; Figure 10 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in this invention. Detailed Implementation
[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0013] In the following description, specific embodiments of the invention will be illustrated with reference to steps and symbols performed by one or more computers, unless otherwise stated. Therefore, these steps and operations will be referred to several times as being performed by a computer, and computer execution as referred to herein includes operations by a computer processing unit representing electronic signals of data in a structured format. This operation transforms the data or maintains it at a location in the computer's memory system, which can be reconfigured or otherwise alter the operation of the computer in a manner well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the invention described above are not intended to be limiting, and those skilled in the art will understand that many of the steps and operations described below can also be implemented in hardware.
[0014] The principles of this invention are applied using many other general-purpose or purpose-specific computing, communication environments, or configurations. Examples of well-known computing systems, environments, and configurations suitable for use with this invention include (but are not limited to) handheld phones, personal computers, servers, multiprocessor systems, microcomputer-based systems, mainframe computers, and distributed computing environments, including any of the aforementioned systems or devices.
[0015] The terms "first," "second," and "third," etc., used in this invention are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0016] In recent years, pre-trained language models have achieved remarkable success in various natural language processing tasks. Fine-tuning and cue learning are currently the two main methods for applying pre-trained language models to downstream tasks. Fine-tuning methods involve tweaking labeled data for a specific task; however, given the scarcity of labeled data, these methods are too costly and impractical for certain tasks. In contrast, cue learning reduces the need for large amounts of labeled data by transforming the downstream task into text generation or cloze tests, making it more suitable for zero-shot and few-shot scenarios. In cue learning, the process of mapping predicted words to specific categories—the label mapper—leads to significant performance changes in the model.
[0017] However, these methods cannot scale to new categories after deploying pre-trained language models. Furthermore, posts on social media platforms are often constrained by word limits, low information density, and non-standard language, which limit the amount of semantic information they provide, thus hindering pre-trained language models from accurately understanding the task objective.
[0018] To address the aforementioned key technical challenges, the KAIEM model proposed in this invention, based on the traditional tag-word mapper architecture, further utilizes word vector technology to automatically construct a tag-word mapper. The KAIEM (Knowledge-injected Actionable Information Extraction Model) is used to extract actionable information from short texts of disaster-related social media in zero-shot and few-shot scenarios. This mechanism requires no additional text corpus for fine-tuning and can identify actionable information from disaster-related social media in zero-shot environments, making it more suitable for low-resource applications. (See attached image) Figure 1 As shown, the model mainly consists of two stages: In the first stage, KAIEM retrieves a set of tag words that are most similar to each category label name in the word vector space; in the second stage, the model predicts the word generation probability at the [MASK] position and matches it with the tag word set of each category label, thus aggregating the probability of the corresponding category label and outputting the final category label. Compared with traditional methods, the KAIEM model breaks through the traditional binary classification framework by introducing more granular actionable tags, achieving fine-grained classification of disaster-related social media short text information. In addition, the KAIEM model uses word vector technology to automatically construct a tag mapper and incorporates conceptual knowledge obtained through knowledge injection into the prompt template, thereby enriching the semantics of the short text and further improving the model's performance in zero-shot and few-shot scenarios.
[0019] The following describes the processing method of disaster-related social media information from the perspective of the processing device for disaster-related social media information. The processing device for disaster-related social media information can be a server or a service unit within a server, and there is no specific limitation.
[0020] Please see Figure 2 , Figure 2 A flowchart illustrating a method for processing disaster-related social media information provided in an embodiment of the present invention includes: 201. Obtain N short texts from social media.
[0021] In this embodiment, the disaster-related social media information processing device can acquire N short social media texts, where N is an integer greater than or equal to 1. The specific method of acquiring N short social media texts is not limited here. For example, N short social media texts can be acquired by a pre-written scraping program.
[0022] 202. Construct a target cloze-style prompt template corresponding to the target social short media text.
[0023] In this embodiment, the disaster-related social media information processing device can arbitrarily select one short social media text from N short social media texts as the target short social media text, and construct a target cloze test prompt template corresponding to the target short social media text. The target cloze test prompt template includes the target marker corresponding to the target short social media text. That is, for any input short social media text... Masked Language Modeling (MLM) application prompt template The social media short text Convert it into a cloze test-style sentence. For example, KAIEM will provide the prompt template " "Targeted social media posts" Combined, the following target cloze test prompt template is generated: ; in, This is a cloze test prompt template. For short texts targeting social media, Mark the target.
[0024] It should be noted that, in the embodiments provided by the present invention, after determining the target cloze test template, the disaster-related social media information processing device can annotate specific entities of the target social media short text based on conceptual knowledge to obtain the concept tags corresponding to the specific entities; and determine an improved prompt template based on the concept tags and the target cloze test prompt template.
[0025] In this embodiment, conceptual knowledge from the pre-trained language model can be further mined and applied, and this knowledge can be used without any fine-tuning. Specifically, the KAIEM model mainly utilizes conceptual knowledge of the "is-A" relationship type. For example, in the previous example, if the pre-trained language model contains knowledge information such as "Fauci is a doctor," then this type of knowledge information will help the model more accurately identify the actionable category labels of social media short texts.
[0026] Knowledge exploration is an effective means of evaluating the conceptual knowledge stored in a pre-trained language model. It tests whether the model can accurately answer questions or fill in information gaps by extracting clues or questions about the context of the text from external knowledge bases or other resources.
[0027] like Figure 3 As shown, for entities containing specific entities Target social media short text It can be derived from the ability to describe a specific entity Concept tag set Predicting concept tags Prompt Template Used in [MASK k Location prediction for specific entities The concept label, this prompt template, is defined using the following formula: ; This invention integrates knowledge into a target-oriented cloze-style prompt template, thereby enriching the contextual information of the target social media short text. For example... Figure 4 As shown, the KAIEM model injects knowledge into the target cloze-style prompt template, integrating the conceptual knowledge of entities into the target cloze-style prompt template to obtain an improved prompt template, thereby enhancing the semantic representation of short texts. In contrast, manually created prompt templates often ignore other knowledge related to short texts. Taking the target social media short text "Fauci said: everyone needs to #StayHome" as an example, the KAIEM model first uses the conceptual knowledge "doctor" to annotate the entity "Fauci". KAIEM then constructs a knowledge-injected prompt template based on this conceptual knowledge. This yields an improved suggestion template, which helps the model to understand the background knowledge and relevant context of the entity "Fauci" more deeply. This improved suggestion template can be represented by the following formula: ; in, This is an improved prompt template. For short texts targeting social media, Mark the target. For a specific entity, For concept tags.
[0028] 203. Based on the preset vocabulary, construct a set of tag words corresponding to each actionable information category in multiple actionable information categories.
[0029] In this embodiment, the disaster-related social media information processing device can construct a set of tag words corresponding to each of the multiple actionable information categories based on a preset vocabulary. For each actionable information category, KAIEM uses the entire vocabulary... The search query finds the word vectors that are closest to the category label names corresponding to each category of actionable information. The word, making and Each represents a word And target actionable information categories The word vectors in this invention are obtained by using the nearest neighbor search algorithm to find words in the vocabulary that are related to the nearest neighbor search algorithm. Find the closest words and select these words as... A collection of tag words Specifically, the actionable category of the target can be determined using the following formula. : ; in, Actionable information categories for targets The corresponding set of tag words, A search algorithm to retrieve the top n most similar words. This is a function for calculating the cosine similarity between two word vectors. Any word in the vocabulary list Word vectors, for Word vectors, For the vocabulary; in, .
[0030] It should be noted that step 202 can construct a cloze-style prompt template, and step 203 can determine the set of tag words. However, there is no restriction on the order of execution between these two steps. Step 203 can be executed first, or step 202 can be executed first, or they can be executed simultaneously. There is no specific restriction.
[0031] 204. Based on the target cloze test prompt template, predict the probability of generating each tag word in the target tag word set corresponding to the position of the target marker.
[0032] In this embodiment, after determining the target cloze prompt template, the disaster-related social media information processing device can predict the probability of generating each tag word in the target tag word set based on the target mark's corresponding position according to the target cloze prompt template. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of multiple actionable information categories.
[0033] It should be noted that KAIEM uses a target cloze test prompt template that includes the [MASK] marker. As a cue for each short text input on social media, a pre-trained language model is used to perform a masked language modeling task to predict the word at the [MASK] position. Unlike traditional cue-based learning methods, the proposed model does not directly use the probability of category label names for prediction. Instead, it predicts the actionable information category of the short text on social media by aggregating label words that are similar to the actionable information category name. Notably, only the words closest to the category label name are used. Each word influences the prediction of the category label, and the influence of each word is calculated using a weighted average.
[0034] Specifically, for the target cloze test prompt template KAIEM first predicts the probability of generating each tag word at the [MASK] position. Then, the predicted probabilities of all tags are aggregated to calculate... Category tags The probability of.
[0035] It should be noted that after generating the improved prompt template, the disaster-related social media information processing device can replace the target cloze prompt template with the improved prompt template when determining the probability of each tag word in the tag word set.
[0036] 205. Aggregate the probability of each tag word in the target tag word set to obtain the aggregation function corresponding to the target actionable information category.
[0037] In this embodiment, after determining the set of tags corresponding to each actionable information category, the disaster-related social media information processing device can aggregate the predicted probabilities of individual tags to obtain an aggregation function of the probability of a single tag being a tag for its corresponding category. The aggregation function can be expressed by the following formula: in, Actionable information categories for targets With tag words The weights between them The set of tags and words corresponding to the actionable information categories of the target; in, .
[0038] 206. Determine the actionable information category corresponding to the target social media short text based on the aggregation function corresponding to the target actionable information category.
[0039] In this embodiment, after determining the aggregation function for each of the multiple actionable information categories, the disaster-related social media information processing device can determine the actionable information category corresponding to the target social media short text based on the aggregation function. Specifically, The actionable information category corresponding to the target social media short text is determined by the following formula: ; in, The actionable information category corresponding to the target social media short text. This is a set of actionable information categories.
[0040] The baseline models used in this invention include BERT, BERT-CNN, WARP, NSP-BERT, and KPT models. This invention uses commonly used evaluation metrics for disaster-related social media information processing, including accuracy, recall, and F1 score, and conducts comparative experiments in both few-shot and zero-shot experimental settings. This invention collects a large number of short social media texts from social media platforms and labels 7983 of these texts with actionable information types. In the few-shot experimental setting, this invention uses the AdamW optimizer to fine-tune the KAIEM model, using only 5 labeled data points per category, and the model's learning rate is set to 2e-5. In the zero-shot experimental setting, the actionable information type of the input short text is directly predicted based on a knowledge-injected prompt template. The value was set to 10, and FastText word vectors were used to retrieve the tag words. Experimental results are attached. Figure 5 Appendix Figure 6 As shown, the F1 score of the method proposed in this invention is better than that of the five benchmark models, thus proving the advancement of this invention.
[0041] In summary, it can be seen that the embodiments provided by this invention can construct a cloze-style prompt template corresponding to short social media texts. This prompt template includes a marker and constructs a tag vocabulary set based on a vocabulary list. Then, based on the cloze-style prompt template, the probability of each tag word in the tag word set is generated according to the position corresponding to the marker. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the actionable information category. The actionable information category corresponding to the short social media text is determined based on the aggregation function corresponding to the target actionable information category. Thus, by automatically constructing a tag mapper using word vector technology, the dependence on manual design or external knowledge bases is eliminated. In addition, the KAIEM model integrates conceptual knowledge into the prompt template, thereby expanding the semantics of disaster-related short social media texts and further improving the accuracy of actionable information extraction.
[0042] The embodiments of the present invention have been described above in terms of the method for processing disaster-related social media information. The embodiments of the present invention will now be described below in terms of the apparatus for processing disaster-related social media information.
[0043] Please see Figure 7 A virtual structural diagram of a disaster-related social media information processing device 700 is shown in this embodiment of the invention. The disaster-related social media information processing device 700 includes: The acquisition module 701 is used to acquire N short texts from social media, where N is an integer greater than or equal to 1; The first construction module 702 is used to construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; The second construction module 703 is used to construct a set of tag words corresponding to each of the multiple actionable information categories based on a preset vocabulary. The generation module 704 is used to predict the probability of generating each tag word in the target tag word set based on the target cloze prompt template to predict the position corresponding to the target mark. The target tag word set is the tag word set corresponding to the target actionable information category. The target actionable information category is any one of the multiple actionable information categories. The aggregation module 705 is used to aggregate the probability of each tag word in the target tag word set to obtain the aggregation function corresponding to the target actionable information category; The determination module 706 is used to determine the actionable information category corresponding to the target social media short text based on the aggregation function corresponding to the target actionable information category.
[0044] In one possible design, the first building module 702 is specifically used for: ; in, This is the target cloze test prompt template. For the target social media short text, The target is marked.
[0045] In one possible design, the first building module 702 is further configured to: Based on conceptual knowledge, specific entities of the target social media short text are annotated to obtain the conceptual tags corresponding to the specific entities; Based on the concept tags and the target cloze test prompt template, an improved prompt template is determined; The generation module is also used for: Based on the improved prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target tag.
[0046] In one possible design, the first construction module 702 determines the improved prompt template based on the concept tag and the target cloze-style prompt template, including: The improved prompt template is determined using the following formula: ; in, This is the improved prompt template. For the target social media short text, The target is marked. For the specific entity, The concept is labeled as described.
[0047] In one possible design, the second building module 703 is specifically used for: The set of tag words corresponding to each of the multiple actionable information categories is constructed using the following formula: ; in, For the target actionable information category The corresponding set of tag words, A search algorithm to retrieve the top n most similar words. This is a function for calculating the cosine similarity between two word vectors. For any word in the vocabulary list Word vectors, for Word vectors, For the vocabulary; in , .
[0048] In one possible design, the aggregation module 705 is specifically used for: The aggregation function corresponding to the target actionable information category is determined by the following formula: in, For the target actionable information category With tag words The weights between them The set of tag words corresponding to the target's actionable information category; in, .
[0049] In one possible design, the determining module 706 is specifically used for: The actionable information category corresponding to the target social media short text is determined by the following formula:
[0050] in, The actionable information category corresponding to the target social media short text. This is the set of all actionable information categories.
[0051] above Figure 7 The disaster-related social media information processing apparatus in this embodiment of the invention has been described from the perspective of modular functional entities. The following is a detailed description of the disaster-related social media information processing apparatus in this embodiment of the invention from the perspective of hardware processing. Please refer to [link / reference]. Figure 8 A schematic diagram of an embodiment of the disaster-related social media information processing device 800 of the present invention is shown. The disaster-related social media information processing device 800 includes: Input device 801, output device 802, processor 803, and memory 804 (where the number of processors 803 can be one or more). Figure 8 (Taking a processor 803 as an example). In some embodiments of the present invention, the input device 801, the output device 802, the processor 803, and the memory 804 may be connected via a communication bus or other means, wherein... Figure 8 Take the China-Israel communication bus connection as an example.
[0052] Specifically, by calling the operation instructions stored in memory 804, processor 803 performs the following steps: Retrieve N short texts from social media, where N is an integer greater than or equal to 1; Construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; Based on a pre-defined vocabulary, construct a set of tag words corresponding to each of the multiple actionable information categories; Based on the target cloze prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target marker. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of the multiple actionable information categories. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the target actionable information category; The actionable information category corresponding to the target social media short text is determined based on the aggregation function corresponding to the target actionable information category.
[0053] By calling the operation instructions stored in memory 804, processor 803 is also used to execute... Figure 2 Any of the methods in the corresponding embodiments.
[0054] Please see Figure 9 , Figure 9 A schematic diagram of an embodiment of the electronic device provided in this invention.
[0055] like Figure 9 As shown, this embodiment of the invention provides an electronic device, including a memory 910, a processor 920, and a computer program 911 stored in the memory 910 and executable on the processor 920. When the processor 920 executes the computer program 911, it performs the following steps: Retrieve N short texts from social media, where N is an integer greater than or equal to 1; Construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; Based on a pre-defined vocabulary, construct a set of tag words corresponding to each of the multiple actionable information categories; Based on the target cloze prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target marker. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of the multiple actionable information categories. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the target actionable information category; The actionable information category corresponding to the target social media short text is determined based on the aggregation function corresponding to the target actionable information category.
[0056] In practical implementation, when the processor 920 executes the computer program 911, it can achieve... Figure 2 Any of the corresponding implementation methods in the embodiments.
[0057] Since the electronic device described in this embodiment is the device used to implement the disaster-related social media information processing device in this embodiment of the invention, those skilled in the art can understand the specific implementation method and various variations of the electronic device in this embodiment based on the method described in this embodiment of the invention. Therefore, how the electronic device implements the method in this embodiment of the invention will not be described in detail here. Any device used by those skilled in the art to implement the method in this embodiment of the invention is within the scope of protection of this invention.
[0058] Please see Figure 10 , Figure 10 This is a schematic diagram of an embodiment of a computer-readable storage medium provided in this invention.
[0059] like Figure 10 As shown, this embodiment of the invention also provides a computer-readable storage medium 1000, on which a computer program 1011 is stored. When the computer program 1011 is executed by a processor, it performs the following steps: Retrieve N short texts from social media, where N is an integer greater than or equal to 1; Construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; Based on a pre-defined vocabulary, construct a set of tag words corresponding to each of the multiple actionable information categories; Based on the target cloze prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target marker. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of the multiple actionable information categories. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the target actionable information category; The actionable information category corresponding to the target social media short text is determined based on the aggregation function corresponding to the target actionable information category.
[0060] In the specific implementation process, the computer program 1011 is executed by the processor to achieve... Figure 2 Any of the corresponding implementation methods in the embodiments.
[0061] It should be noted that the descriptions of each embodiment in the above embodiments have different focuses. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0062] This invention also provides a computer program product comprising computer software instructions that, when executed on a processing device, cause the processing device to perform actions such as... Figure 2 The process in the corresponding embodiment.
[0063] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated.
[0064] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0065] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing disaster-related social media information, characterized in that, The method includes: Retrieve N short texts from social media, where N is an integer greater than or equal to 1; Construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; Based on a pre-defined vocabulary, construct a set of tag words corresponding to each of the multiple actionable information categories; Based on the target cloze prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target marker. The target tag word set is the tag word set corresponding to the target actionable information category, and the target actionable information category is any one of the multiple actionable information categories. The probabilities of each tag word in the target tag word set are aggregated to obtain the aggregation function corresponding to the target actionable information category; The actionable information category corresponding to the target social media short text is determined based on the aggregation function corresponding to the target actionable information category; The step of constructing a set of tag words corresponding to each of the multiple actionable information categories based on a preset vocabulary includes: The set of tag words corresponding to each of the multiple actionable information categories is constructed using the following formula: ; in, For the target actionable information category The corresponding set of tag words, A search algorithm to retrieve the top n most similar words. This is a function for calculating the cosine similarity between two word vectors. For any word in the vocabulary list Word vectors, for Word vectors, For the vocabulary; in, ; The aggregation function for obtaining the aggregation function corresponding to the target actionable information category by aggregating the probability of each tag word in the target tag word set includes: The aggregation function corresponding to the target actionable information category is determined by the following formula: in, For the target actionable information category With tag words The weights between them The set of tag words corresponding to the target's actionable information category; in, ; The step of determining the actionable information category corresponding to the target social media short text based on the aggregation function corresponding to the target actionable information category includes: The actionable information category corresponding to the target social media short text is determined by the following formula: in, The actionable information category corresponding to the target social media short text. This is the set of all actionable information categories.
2. The method according to claim 1, characterized in that, The constructed target cloze test prompt template corresponding to the target social media short text includes: ; in, This is the target cloze test prompt template. For the target social media short text, The target is marked.
3. The method according to claim 2, characterized in that, The method further includes: Based on conceptual knowledge, specific entities of the target social media short text are annotated to obtain the conceptual tags corresponding to the specific entities; Based on the concept tags and the target cloze test prompt template, an improved prompt template is determined; The probability of generating each tag word in the target tag word set based on the position corresponding to the target marker according to the cloze-style prompt template includes: Based on the improved prompt template, predict the probability of generating each tag word in the target tag word set at the position corresponding to the target tag.
4. The method according to claim 3, characterized in that, The step of determining the improved prompt template based on the concept tags and the target cloze-style prompt template includes: The improved prompt template is determined using the following formula: ; in, This is the improved prompt template. For the target social media short text, The target is marked. For the specific entity, The concept is labeled as described.
5. A device for processing disaster-related social media information, used in the method for processing disaster-related social media information as described in any one of claims 1-4, characterized in that, include: The acquisition module is used to acquire N short texts from social media, where N is an integer greater than or equal to 1; The first construction module is used to construct a target cloze test prompt template corresponding to the target social media short text, wherein the target social media short text is any one of the N social media short texts, and the target cloze test prompt template includes the target tag corresponding to the target social media short text; The second construction module is used to construct a set of tag words corresponding to each of the multiple actionable information categories based on a preset vocabulary. The generation module is used to predict the probability of generating each tag word in the target tag word set based on the target cloze prompt template corresponding to the position of the target mark. The target tag word set is the tag word set corresponding to the target actionable information category. The target actionable information category is any one of the multiple actionable information categories. The aggregation module is used to aggregate the probability of each tag word in the target tag word set to obtain the aggregation function corresponding to the target actionable information category; The determination module is used to determine the actionable information category corresponding to the target social media short text based on the aggregation function corresponding to the target actionable information category.
6. An electronic device, characterized in that, include: The memory and the processor, wherein the processor, when executing a computer management program stored in the memory, implements the steps of the method for processing disaster-related social media information as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer management program, which, when executed by a processor, implements the steps of the method for processing disaster-related social media information as described in any one of claims 1 to 4.