Cross-language propaganda detection methods, systems and storage media
By integrating word embeddings and part-of-speech representations of the source and target languages in cross-language advertising detection, and combining Transformer and MLP networks to optimize model parameters, the problem of low accuracy in cross-language detection is solved, achieving higher detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2022-12-05
- Publication Date
- 2026-05-26
AI Technical Summary
Existing methods for detecting cross-language propaganda have low accuracy in cross-language detection and fail to fully consider the unique characteristics of propaganda texts, especially their emotional and grammatical features.
By obtaining the word embedding representation matrix and part-of-speech representation vector of the source language and target language, concatenating them, and inputting them into a multilingual pre-trained model, the model performs cross-language fusion prediction by combining Transformer and MLP networks, and optimizes the model parameters through a loss function to fuse semantic and syntactic information.
It improves the accuracy of cross-language propaganda detection, enhances the model's learning ability and robustness across different language texts, and is suitable for multilingual propaganda detection tasks.
Smart Images

Figure CN116167385B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a cross-language advertising detection method, system, and storage medium. Background Technology
[0002] With the development of the internet and social media, "computational propaganda" has emerged as a social and technological phenomenon, making propaganda campaigns easily accessible to various small organizations and individuals. The Institute for Propaganda Analysis (IPA) defines propaganda as: the expression of opinions or actions by an individual or group aimed at influencing the opinions or behaviors of other individuals or groups regarding predetermined goals. Propaganda is widely used in commercial advertising and employs various propaganda techniques to shape and change people's opinions. Therefore, it is necessary to identify the propaganda content in our daily lives.
[0003] A major obstacle in research on propaganda content identification is the lack of standardized and public datasets. Previous work on propaganda detection has mainly focused on proposing new datasets, including document-level and fragment-level datasets. TSHP-17 and QProp are both document-level news datasets, with news articles obtained from multiple news media outlets. TSHP-17 has eight sources for its news articles, two of which are propaganda-related, labeled as propaganda, credible, prank, or satirical. QProp expands upon TSHP-17 by extending the news sources and focuses only on two categories: propaganda and non-propaganda. PTC is a more fine-grained propaganda dataset, using 18 propaganda techniques to label news fragments, making it a fragment-level dataset. The text data in the datasets listed above is all in English. In addition, there are propaganda datasets in other languages, such as Urdu and Chinese; however, these are generally monolingual propaganda datasets.
[0004] Current cross-linguistic tasks largely rely on multilingual pre-trained models, such as mBERT, XLM, and XLM-R. These pre-trained models learn universal representations for various languages through pre-training on large amounts of diverse language data, significantly improving transfer learning capabilities. In addition, some methods involve translating the source language into the target language or vice versa, turning different languages into a single language, and then training and testing the model on a single language. However, this approach introduces translation noise, leading to a decrease in model learning accuracy.
[0005] Based on the above, there are currently two main approaches to cross-language propaganda detection: one is to use multilingual pre-trained models, which are then fine-tuned for specific application scenarios; the other is to perform simple data augmentation through machine translation, using the augmented dataset to train the model. However, propaganda texts have unique characteristics, such as exaggeration and the use of emotionally charged language that easily evokes empathy. Current methods based on these approaches do not consider these unique characteristics, resulting in low accuracy in cross-language propaganda detection. Therefore, improving the accuracy of cross-language propaganda detection is a pressing technical problem that needs to be solved. Summary of the Invention
[0006] In view of this, the present invention provides a cross-language advertising detection method, system and storage medium to solve one or more problems existing in the prior art.
[0007] According to one aspect of the present invention, a cross-language propaganda detection method is disclosed, the method comprising:
[0008] Obtain the original language text to be predicted, determine the target language text based on the original language text to be predicted, and determine the first word embedding representation matrix and the second word embedding representation matrix based on the original language text to be predicted and the target language text through a multilingual pre-trained model;
[0009] Determine the first part-of-speech tag vector and the second part-of-speech tag vector based on the original language text to be predicted and the target language text;
[0010] The first word embedding representation matrix and the first part-of-speech representation vector are concatenated to obtain the first concatenation matrix. The second word embedding representation matrix and the second part-of-speech representation vector are concatenated to obtain the second concatenation matrix. Both the first concatenation matrix and the second concatenation matrix are input into the first network model to obtain the fusion representation matrix.
[0011] The fusion representation matrix is split into a first matrix and a second matrix. The first matrix and the second matrix are respectively input into the second network model to obtain the first prediction result corresponding to the original language text to be predicted and the second prediction result corresponding to the target language text.
[0012] In some embodiments of the present invention, the method further includes:
[0013] Obtain the first label information of the original language text to be predicted and the second label information of the target language text;
[0014] Based on the first prediction result, the second prediction result, the first label information, and the second label information, the loss value is calculated using a loss function.
[0015] The model parameters of the multilingual pre-trained model, the first network model, and the second network model are updated based on the loss value.
[0016] In some embodiments of the present invention, the loss function is:
[0017]
[0018]
[0019]
[0020] Where, p S Indicates the first prediction result, l S Indicates the first tag information, p represents the first loss between the first predicted result corresponding to the original language text to be predicted and the first label information. T Indicates the second prediction result, l T This indicates the second tag information. The second loss represents the difference between the second prediction result corresponding to the target language text and the second label information. For the total loss, KL(p) S ,p T ) represents p S With p T The dispersion between them, where λ represents the coefficient, λ∈(0,1).
[0021] In some embodiments of the present invention
[0022] The first and second prediction results are the prediction results for the promotional text; or
[0023] The first and second prediction results are predictions of promotional techniques.
[0024] In some embodiments of the present invention, the original language text to be predicted is a first English text, and the target language text is a first Chinese text;
[0025] Based on the original language text to be predicted and the target language text, a first word embedding representation matrix and a second word embedding representation matrix are determined through a multilingual pre-trained model, including:
[0026] Translate the first Chinese text into the second English text;
[0027] Align the first Chinese text and the first English text to form a first text pair, and align the first Chinese text and the second English text to form a second text pair;
[0028] Input the first text pair or the second text pair into the multilingual pre-trained model to obtain the first word embedding representation matrix and the second word embedding representation matrix.
[0029] In some embodiments of the present invention, determining a first part-of-speech (POS) vector and a second POS vector based on the original language text to be predicted and the target language text includes:
[0030] The English and Chinese input texts from the first text pair are respectively input into the part-of-speech tagging tool to obtain the first part-of-speech representation vector and the second part-of-speech representation vector.
[0031] In some embodiments of the present invention, the part-of-speech tagging tool is the Stanford CoreNLP tool or the jieba tool; and / or
[0032] The first network model includes a Transformer network; the second network model includes a Transformer network and an MLP network.
[0033] In some embodiments of the present invention, the multilingual pre-trained model is an mBERT model or an XLM-R model.
[0034] According to another aspect of the present invention, a cross-language propaganda detection system is also disclosed. The system includes a processor and a memory, wherein computer instructions are stored in the memory, and the processor is configured to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method as described in any of the above embodiments.
[0035] According to another aspect of the present invention, a computer-readable storage medium is also disclosed, on which a computer program is stored, which, when executed by a processor, implements the steps of the method as described in any of the above embodiments.
[0036] The cross-language propaganda detection method, system, and storage medium disclosed in this invention first obtain the word embedding representation and part-of-speech representation of text pairs. Then, the corresponding word embedding representation and part-of-speech representation are concatenated to obtain a concatenation matrix. Furthermore, the concatenation matrix is fused across languages, and finally, the prediction result is determined based on the fused matrix through a network model. This method fully considers the unique part-of-speech characteristics of propaganda texts during the prediction process, integrates the semantic and grammatical information of the text, and performs fusion learning on the source and target language text information, thereby achieving high accuracy in cross-language propaganda detection results.
[0037] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the text, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the written description, claims, and drawings.
[0038] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0039] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. The components in the drawings are not drawn to scale but are merely illustrative of the principles of the invention. For ease of illustration and description of certain parts of the invention, corresponding portions in the drawings may be enlarged, i.e., may appear larger relative to other components in an exemplary device actually manufactured according to the invention. In the drawings:
[0040] Figure 1 This is a flowchart illustrating a cross-language advertising detection method according to an embodiment of the present invention.
[0041] Figure 2 This is a schematic diagram of the architecture of a cross-language advertising detection system according to an embodiment of the present invention. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0043] It should be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0044] It should be emphasized that the term "including / comprises / has" as used herein refers to the presence of a feature, element, step, or component, but does not exclude the presence or addition of one or more other features, elements, steps, or components.
[0045] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0046] Figure 1This is a flowchart illustrating a cross-language advertising detection method according to an embodiment of the present invention, as shown below. Figure 1 As shown, the cross-language advertising detection method includes at least steps S10 to S40.
[0047] Step S10: Obtain the original language text to be predicted, determine the target language text based on the original language text to be predicted, and determine the first word embedding representation matrix and the second word embedding representation matrix based on the original language text to be predicted and the target language text through a multilingual pre-trained model.
[0048] In this step, the source language text to be predicted is the text to be detected, while the target language text is the text translated from the source language text. For example, the source language text to be predicted can be the original English text, and the target language text can be Chinese text, in which case the Chinese text is the text translated from the original English text. It should be understood that in this embodiment, setting the source language text to be predicted as the original English text and the target language text as Chinese text is merely an example; in other embodiments, the source language text to be predicted can be any type of text other than English text, and the target language text can also be any type of text other than Chinese text.
[0049] When the language of the original text to be predicted is English and the language of the target text is Chinese, the English text can be represented as S and the Chinese text as T. Then, the first word embedding matrix and the second word embedding matrix determined by the multilingual pre-trained model based on the original and target texts can be represented as X. S and X T ;X S X is the word embedding representation matrix corresponding to the English text. T This represents the word embedding representation matrix corresponding to Chinese text. Where d1 represents the word embedding dimension and l represents the text length.
[0050] In one embodiment, the original language text to be predicted is further considered as the first English text, and the target language text is considered as the first Chinese text. Then, based on the original language text to be predicted and the target language text, a first word embedding representation matrix and a second word embedding representation matrix are determined through a multilingual pre-trained model. Specifically, this may include the following steps: translating the first Chinese text into the second English text; aligning the first Chinese text and the first English text to form a first text pair, and aligning the first Chinese text and the second English text to form a second text pair; inputting the first text pair or the second text pair into the multilingual pre-trained model to obtain the first word embedding representation matrix and the second word embedding representation matrix. Since both the first and second text pairs include English input text and Chinese input text, the first word embedding representation matrix is the embedding representation matrix corresponding to the English input text, and the second word embedding representation matrix is the embedding representation matrix corresponding to the Chinese input text.
[0051] In this embodiment, the first English text is the original English text, the first Chinese text is the text translated from the original English text, and the second English text is the English translation of the first Chinese text. The first English text and the first Chinese text form a forward text pair, while the second English text and the first Chinese text form a reverse text pair. This embodiment achieves data augmentation by setting reverse text pairs, thereby facilitating model pre-training.
[0052] Step S20: Determine the first part-of-speech tag vector and the second part-of-speech tag vector based on the original language text to be predicted and the target language text.
[0053] In this step, the part-of-speech representations of the two different languages are further determined. Similar to step S10, the original language text to be predicted can be the first English text, and the target language text can be the first Chinese text. After combining the first English text and the first Chinese text into a first text pair, the first text pair is further used as input. Based on the two different languages, the English input text and the Chinese input text in the first text pair, the first part-of-speech representation vector and the second part-of-speech representation vector can be obtained.
[0054] For example, determining a first part-of-speech (POS) vector and a second POS vector based on the original language text to be predicted and the target language text includes: inputting the English input text and the Chinese input text from the first text pair into a POS tagging tool to obtain the first POS vector and the second POS vector. d1 and d2 represent the part-of-speech tagging vectors for English and Chinese, respectively; where d2 represents the dimension. In this embodiment, the type of part-of-speech tagging tool is not specifically limited, as long as it can perform part-of-speech tagging; for example, the part-of-speech tagging tool can be the Stanford CoreNLP tool or the jieba tool.
[0055] The cross-language propaganda detection method of this application fully considers the unique characteristics of the parts of speech in propaganda texts during the detection process, based on step S20. That is, propaganda techniques contain specific grammatical or semantic features. For example, "persuasive language" propaganda techniques typically use emotional nouns, while "exaggeration or belittling" techniques mostly contain comparative words and superlative words. Based on this, this application combines grammatical and semantic information in its cross-language propaganda detection method. In one embodiment, the part-of-speech tagging tool in the Stanford Corenlp software package is specifically used to extract the part-of-speech features of English and Chinese texts. This tool supports both Chinese and English, but the part-of-speech tags for Chinese and English are different; therefore, the part-of-speech tags of English and Chinese are combined as the final part-of-speech features. For example, the following table shows examples of the corresponding part-of-speech tags for Chinese and English:
[0056]
[0057]
[0058] Step S30: Concatenate the first word embedding representation matrix and the first part-of-speech representation vector to obtain a first concatenation matrix; concatenate the second word embedding representation matrix and the second part-of-speech representation vector to obtain a second concatenation matrix; input both the first concatenation matrix and the second concatenation matrix into the first network model to obtain a fusion representation matrix.
[0059] In this step, the first network model further learns cross-lingual representations, namely, concatenation based on semantic and syntactic representations, thus achieving cross-lingual fusion between languages. The first concatenation matrix and the second concatenation matrix can be obtained respectively through... and express, and Both contain syntactic and semantic information, that is... and All inputs are fed into the first network model to obtain the fusion representation matrix, which can be used through H f In one embodiment, the first network model may include a Transformer network, in which case...
[0060] Step S40: Split the fusion representation matrix into a first matrix and a second matrix, and input the first matrix and the second matrix into the second network model to obtain the first prediction result corresponding to the original language text to be predicted and the second prediction result corresponding to the target language text.
[0061] In this step, the fusion representation matrix H obtained in step S30 is... f Further splitting into the first matrix Second matrix First matrix Second matrix These represent the source and target language representations after feature fusion, respectively. In this step, the fused representation matrix is split into a first matrix and a second matrix to allow for further individual focus on each language after feature fusion. Specifically, the first matrix is based on the split representation after feature fusion. Second matrix The final prediction result is determined using a second network model. For example, the second network model includes a Transformer network and an MLP network. and When input into a Transformer network, two outputs are obtained. and and Further and The input is fed into an MLP network to obtain the first prediction result for the original language and the second prediction result for the target language.
[0062] Wherein, the first prediction result and the second prediction result are prediction results of promotional text; or the first prediction result and the second prediction result are prediction results of promotional techniques. When both the first prediction result and the second prediction result are prediction results of promotional text, the cross-language promotional detection method based on this application can predict whether the statements in the original language text are promotional statements in a cross-language promotional detection scenario; and when both the first prediction result and the second prediction result are prediction results of promotional techniques, the cross-language promotional detection method based on this application can further predict the promotional techniques applied in the promotional statements in a cross-language promotional techniques detection scenario.
[0063] In one specific embodiment, the cross-language propaganda detection method further includes the following steps: obtaining first label information of the original language text to be predicted and second label information of the target language text; calculating a loss value based on the first prediction result, the second prediction result, the first label information, and the second label information using a loss function; and updating the model parameters of the multilingual pre-trained model, the first network model, and the second network model based on the loss value. For example, the loss function is:
[0064]
[0065]
[0066]
[0067] Where, p S Indicates the first prediction result, l S Indicates the first tag information, p represents the first loss between the first predicted result corresponding to the original language text to be predicted and the first label information. T Indicates the second prediction result, l T This indicates the second tag information. The second loss represents the difference between the second prediction result corresponding to the target language text and the second label information. For the total loss, KL(p) S ,p T ) represents p S With p T The dispersion between them, where λ represents the coefficient, λ∈(0,1).
[0068] In this embodiment, the model is pre-trained by constructing a sample dataset containing multiple text pairs. Understandably, the existing PTC dataset consists of English news articles, a fragment-level dataset labeled with 18 propaganda techniques. To obtain a sentence-level sample dataset spanning different languages, the news articles are first divided into multiple sentences, each labeled as either non-propaganda or one of the 18 propaganda techniques. If a sentence contains fragments of multiple different propaganda techniques, one of the propaganda techniques is randomly selected as the sentence's propaganda technique label. Furthermore, to exclude less common propaganda techniques, labels for propaganda techniques appearing less than 100 times are removed. The sample dataset is further divided into training, validation, and test sets, and the English sentences in the validation and test sets are translated into Chinese using Google Translator, thus ensuring that the Chinese and English sentences have the same labels. To ensure the accuracy of the translated Chinese sentences, they are manually checked and errors, such as semantic and word order errors, are corrected. Based on the above method, a multilingual advertising technique detection dataset was obtained, where the training set is in English, and the validation and test sets are in English and Chinese respectively. The statistical data of the dataset are shown in the table below:
[0069]
[0070] Furthermore, the specific promotional techniques applied to the sample data in the aforementioned dataset are as follows:
[0071] Persuasive language: using words / phrases with strong emotional implications (positive or negative) to influence the audience.
[0072] Abusive or labeling: Labeling the target of an advertising campaign as someone the target audience fears, hates, dislikes, or likes or praises.
[0073] Repetition: Repeating the same message over and over again so that the audience eventually accepts it.
[0074] Exaggeration or understatement: either exaggerate something by making it bigger, better, or worse (e.g., "the best of the best," "quality guaranteed"), or make it seem less important or smaller than it actually is.
[0075] Questioning: To question the credibility of someone or something.
[0076] Fear / Bias: An attempt to gain support for an idea by instilling anxiety and / or panic in a crowd, which may be based on preconceived judgments.
[0077] Simplifying the cause: When there are multiple causes behind a problem, assume there is only one cause.
[0078] Slogan: A short and eye-catching phrase.
[0079] Authority: The statement is true only because it is supported by a valid authority / expert on the issue, without any other supporting evidence.
[0080] The black-and-white fallacy: When there are actually more possibilities, present two alternatives as the only possibility.
[0081] It should be understood that the methods for obtaining the sample datasets and the number of sample data in the sample datasets listed in the above embodiments are merely examples and do not constitute a limitation on this application. Furthermore, the specific promotional techniques applied above are also examples; in other embodiments, other promotional techniques besides those described above may be applied, as may be more or fewer promotional techniques.
[0082] The cross-language propaganda detection method described above integrates semantic and grammatical information of the text, which is more helpful in detecting propaganda texts. Furthermore, it integrates the information of the source and target language texts during the detection process, further enhancing the cross-language learning capability. Moreover, by adding a consistency loss for the prediction of the source and target language texts on the basis of the training loss, the robustness of the model is further improved, making it more adaptable to the task of detecting cross-language propaganda techniques.
[0083] Accordingly, the present invention also discloses a cross-language propaganda detection system, which includes a processor and a memory. The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method as described in any of the above embodiments.
[0084] Figure 2 This is a schematic diagram of the architecture of a cross-language advertising detection system according to an embodiment of the present invention, as shown below. Figure 2 As shown, the cross-language propaganda detection system includes at least three parts: a grammatical and semantic feature extractor, used to obtain the semantic and grammatical representations of language pairs respectively; a cross-language fusion network model, used to concatenate the semantic and grammatical representations and perform cross-language fusion between languages; and a single-language feature extractor, used to learn the single-language representation of the fused features, and stacks two layers of neural networks to make predictions to obtain the prediction results.
[0085] exist Figure 2 In this example, the multilingual pre-trained model is the mBERT model. First, the Chinese and English input texts are fed into the mBERT model to obtain the word embedding representation matrix X corresponding to the English text. S The word embedding representation matrix X corresponding to the Chinese text T Simultaneously, the Chinese and English input texts are fed into the part-of-speech tagging tool in the Stanford Corenlp package to obtain the corresponding part-of-speech vectors for the English text. Part-of-speech vectors corresponding to Chinese Understandably, in other embodiments, the multilingual pre-trained model can be an XLM-R model in addition to the mBERT model.
[0086] Furthermore, the word embedding representation matrix and the part-of-speech representation vector are concatenated to obtain the concatenated matrix. and This represents the concatenation of two matrices, m = d1 + d2; They are respectively and The stacking; thus, and Both contain syntactic and semantic information. Here, d1 represents the dimension of the word embedding representation, and d2 represents the dimension of the part-of-speech representation.
[0087] Furthermore, and The input is fed into a cross-language fusion network model to obtain a fusion feature matrix. and and respectively for Hf The first and second matrices obtained after splitting. This is the output of the fusion part, which can be further analyzed from the fusion matrix H. f Divide into the middle These represent the fused representations of the source and target language texts, respectively. Then, we refocus on the feature representations of each individual language: These are the feature representations for each language in the multilingual fusion of English and Chinese texts, respectively. Finally, two layers of neural networks are stacked... and Make predictions, such as: p S and p T These represent the prediction probability vectors corresponding to the original language text and the target language text, respectively.
[0088] To update the model parameters, the loss value can be further calculated based on the prediction results and the true labels corresponding to the source and target language texts. Specifically, the final training loss consists of two parts: task loss and consistency loss.
[0089]
[0090]
[0091]
[0092] Among them l S and l T The true labels represent the source and target language texts, and KL represents the Kullback-Leibler divergence, used to calculate the consistency loss.
[0093] The aforementioned cross-language propaganda detection system can be used to detect whether a statement is a propaganda statement, and also to detect the specific propaganda technique used in the propaganda statement. Specifically, in the scenario of detecting whether a statement is a propaganda statement, during the pre-training process, the data in the sample dataset are labeled with the specific label indicating whether it is a propaganda statement, and the prediction result is the probability that the statement belongs to a propaganda statement. Conversely, in the scenario of detecting the propaganda technique used in a propaganda statement, during the pre-training process, the data in the sample dataset are labeled with the specific label indicating the type of propaganda technique, and the prediction result is the probability that the propaganda statement belongs to any given propaganda technique.
[0094] In one specific embodiment, the sample dataset is labeled as "non-promotional" and "10 promotional techniques." Sentences labeled as "10 promotional techniques" are considered promotional statements. Data from the training set is input into the model for training, and the best-performing model is selected using the validation set. During actual testing, the original language text to be predicted is first translated. If the original text is Chinese, it is translated into English; if the original text is English, it is translated into Chinese; then, text pairs are formed. These text pairs are then input into the trained model, which can then output whether the sentence belongs to a promotional statement or a non-promotional statement.
[0095] As can be seen from the above embodiments, the cross-language propaganda detection method and system of the present invention, during the training process, uses a cross-language propaganda technique detection dataset in both Chinese and English. This dataset is a sentence-level dataset, labeled as either non-propaganda or one of ten propaganda techniques. Based on this dataset, a model can be trained to distinguish whether a sentence is propaganda-related, and a model can be further trained to distinguish which propaganda technique a propaganda sentence employs. The cross-language propaganda detection method and system of this application can be used in both English and Chinese scenarios. Furthermore, by integrating semantic and grammatical information during the detection process, it is more suitable for propaganda detection tasks. Simultaneously, by further integrating information from different language texts during the detection process, it enhances cross-language learning capabilities and improves the accuracy of cross-language propaganda detection results.
[0096] In addition, the invention also discloses a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method as described in any of the above embodiments.
[0097] Those skilled in the art will understand that the exemplary components, systems, and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software, or a combination of both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0098] It should also be noted that the exemplary embodiments mentioned in this invention describe methods or systems based on a series of steps or apparatus. However, this invention is not limited to the order of the steps described above; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0099] In this invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with or in place of features of other embodiments.
[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for detecting cross-language propaganda, characterized in that, The method includes: Obtain the original language text to be predicted, determine the target language text based on the original language text to be predicted, and determine the first word embedding representation matrix and the second word embedding representation matrix based on the original language text to be predicted and the target language text through a multilingual pre-trained model; Determine the first part-of-speech tag vector and the second part-of-speech tag vector based on the original language text to be predicted and the target language text; The first word embedding representation matrix and the first part-of-speech representation vector are concatenated to obtain the first concatenation matrix. The second word embedding representation matrix and the second part-of-speech representation vector are concatenated to obtain the second concatenation matrix. Both the first concatenation matrix and the second concatenation matrix are input into the first network model to obtain the fusion representation matrix. The fusion representation matrix is split into a first matrix and a second matrix. The first matrix and the second matrix are respectively input into the second network model to obtain the first prediction result corresponding to the original language text to be predicted and the second prediction result corresponding to the target language text. Obtain the first label information of the original language text to be predicted and the second label information of the target language text; Based on the first prediction result, the second prediction result, the first label information, and the second label information, a loss value is calculated using a loss function; wherein the loss function is: ; ; ; in, This indicates the first prediction result. Indicates the first tag information, This represents the first loss between the first predicted result corresponding to the original language text to be predicted and the first label information. This indicates the second prediction result. This indicates the second tag information. The second loss represents the difference between the second prediction result corresponding to the target language text and the second label information. For the total loss, express and The dispersion between them Represents the coefficient. ; The model parameters of the multilingual pre-trained model, the first network model, and the second network model are updated based on the loss value.
2. The cross-language propaganda detection method according to claim 1, characterized in that, The first and second prediction results are the prediction results for the promotional text; or The first and second prediction results are predictions of promotional techniques.
3. The cross-language propaganda detection method according to claim 1, characterized in that, The original language text to be predicted is the first English text, and the target language text is the first Chinese text; Based on the original language text to be predicted and the target language text, a first word embedding representation matrix and a second word embedding representation matrix are determined through a multilingual pre-trained model, including: Translate the first Chinese text into the second English text; Align the first Chinese text and the first English text to form a first text pair, and align the first Chinese text and the second English text to form a second text pair; Input the first text pair or the second text pair into the multilingual pre-trained model to obtain the first word embedding representation matrix and the second word embedding representation matrix.
4. The cross-language propaganda detection method according to claim 3, characterized in that, Determine a first part-of-speech (POS) vector and a second POS vector based on the original language text to be predicted and the target language text; including: The English and Chinese input texts from the first text pair are respectively input into the part-of-speech tagging tool to obtain the first part-of-speech representation vector and the second part-of-speech representation vector.
5. The cross-language advertising detection method according to claim 4, characterized in that, The part-of-speech tagging tool is either the Stanford CoreNLP tool or the jieba tool; and / or The first network model includes a Transformer network; The second network model includes Transformer networks and MLP networks.
6. The cross-language propaganda detection method according to any one of claims 1 to 5, characterized in that, The multilingual pre-trained model is either an mBERT model or an XLM-R model.
7. A cross-language propaganda detection system, the system comprising a processor and a memory, characterized in that, The memory stores computer instructions, and the processor executes the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method as described in any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the method as described in any one of claims 1 to 6.