Confrontation content generation method and device, equipment and storage medium

Through the big model adversarial comment technology, the views of the target text are extracted and judged, and matched with the views in the viewpoint library to generate refutation articles, solving the problems of time-consuming, labor-intensive and inconsistent views of manual judgment, and achieving efficient and accurate generation of adversarial content .

CN119248904APending Publication Date: 2025-01-03ANHUI IFLYREC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411109425.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The existing technology relies on manual judgments to combat comments, and different people have different opinions due to subjective emotions and cognitive biases, which cannot be expressed in a unified manner.

Method used

A large model is used to extract and understand the target text in the target text, and to calculate and judge similarity between the views in the viewpoint library to generate a refutation article.

Benefits of technology

It improves the efficiency and accuracy of the generation of confrontational content, unifies views and expressions, and makes refuting articles more targeted and accurate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248904A_ABST
    Figure CN119248904A_ABST
Patent Text Reader

Abstract

The invention discloses an adversarial content generation method and device, equipment and a storage medium, and the method comprises the steps: carrying out the viewpoint extraction of a target text through a large model, and obtaining a text viewpoint; retrieving viewpoints matched with the target text in a viewpoint library to obtain retrieval viewpoints; judging based on the text viewpoint and the retrieval viewpoint to obtain a judgment result; and in response to a judgment result that the text viewpoint is inconsistent with the retrieval viewpoint, outputting an adversarial article for adversariating the target text. According to the scheme, the working efficiency and the accuracy of generation of the countermeasure article can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of large model technology, and in particular to a method for generating adversarial content and its device, equipment, and storage medium. Background Art

[0002] With the development of the Internet, everyone can speak freely on the Internet. For some comments that are obviously inconsistent with mainstream opinions, it is basically necessary to rely on manual judgment and targeted confrontational speeches. However, manual methods are time-consuming and labor-intensive. In addition, different people may have different views on the same opinion due to their subjective emotions, cognitive biases and other factors, and a unified expression cannot be used for confrontational opinions. Summary of the invention

[0003] The present application at least provides a method for generating adversarial content and its apparatus, device, and storage medium, which can improve work efficiency and the accuracy of adversarial article generation.

[0004] The first aspect of the present application provides an adversarial content generation method, including: using a large model to extract opinions from a target text to obtain text opinions; retrieving opinions matching the target text in an opinion library to obtain retrieved opinions; making judgments based on the text opinions and the retrieved opinions to obtain judgment results; in response to the judgment result that the text opinions are inconsistent with the retrieved opinions, outputting an adversarial article that refutes the target text.

[0005] The method comprises: retrieving opinions matching the target text in the opinion library to obtain the retrieval opinions, including: dividing the target text to obtain a number of target sub-texts; respectively retrieving retrieval sub-opinions matching the target sub-texts in the opinion library; and selecting based on all retrieval sub-opinions to obtain the retrieval opinions.

[0006] Among them, after dividing the target text to obtain a number of target sub-texts, it includes: vectorizing each target sub-text respectively to obtain a sub-text vector corresponding to each target sub-text; retrieving retrieval sub-viewpoints matching the target sub-text in the viewpoint library respectively, including: calculating the similarity between the sub-text vector corresponding to each target sub-text and each viewpoint in the viewpoint library respectively, to obtain a similarity score between each target sub-text and each viewpoint; for each target sub-text, selecting a viewpoint in the viewpoint library whose similarity score with the target sub-text meets a first similarity requirement as the retrieval sub-viewpoint matching the target sub-text; and / or, selecting based on all retrieval sub-viewpoints to obtain a retrieval viewpoint, including: from the retrieval sub-viewpoints matching each target sub-text, selecting a retrieval sub-viewpoint whose similarity score with the corresponding target sub-text meets a second similarity requirement as the retrieval viewpoint.

[0007] Among them, the big model is used to extract opinions from the target text to obtain text opinions, including: using the big model to semantically understand the target text to obtain semantic information; based on the semantic information, the opinion of the target text is extracted to obtain semantic opinions; the semantic opinions are classified and integrated to obtain text opinions.

[0008] Among them, judging based on the text viewpoint and the retrieval viewpoint to obtain the judgment result includes: extracting keywords from the text viewpoint to obtain text keywords, and extracting keywords from the retrieval viewpoint to obtain retrieval keywords; vectorizing the text keywords to obtain text vectors, and vectorizing the retrieval keywords to obtain retrieval vectors; calculating the similarity between the text vector and the retrieval vector to obtain the target similarity; judging the text viewpoint and the retrieval viewpoint based on the target similarity to obtain the judgment result.

[0009] Among them, judging the text viewpoint and the retrieval viewpoint based on the target similarity to obtain a judgment result includes: comparing the target similarity with the similarity threshold to determine the judgment result; if the target similarity is greater than or equal to the similarity threshold, the judgment result is that the text viewpoint and the retrieval viewpoint are consistent; if the target similarity is less than the similarity threshold, the judgment result is that the text viewpoint and the retrieval viewpoint are inconsistent.

[0010] Among them, before responding to the judgment result that the text viewpoint is inconsistent with the retrieval viewpoint, and outputting an adversarial article that refutes the target text, it includes: combining the retrieval viewpoint and the judgment result to obtain prompt information; responding to the judgment result that the text viewpoint is inconsistent with the retrieval viewpoint, outputting an adversarial article that refutes the target text, including: extracting key information from the prompt information to obtain an adversarial generated argument; generating an adversarial article based on the adversarial generated argument and the article planning structure, wherein the article planning structure at least includes a title, an introduction, a main text and a conclusion.

[0011] Before retrieving the opinions matching the target text in the opinion library and obtaining the retrieved opinions, the method further includes: extracting opinions from at least one reference text using a large model to obtain a plurality of opinions, wherein the opinion library includes the plurality of opinions.

[0012] The target text is the text input by the target user, and the reference text is the article published by the organization to which the target user belongs.

[0013] The second aspect of the present application provides an adversarial content generation device, including: an opinion extraction module, which is used to use a large model to extract opinions from a target text to obtain text opinions; a retrieval module, which is used to retrieve opinions matching the target text in an opinion library to obtain retrieval opinions; a judgment module, which is used to make judgments based on text opinions and retrieval opinions to obtain judgment results; and an output module, which is used to output an adversarial article refuting the target text in response to a judgment result that the text opinion is inconsistent with the retrieval opinion.

[0014] A third aspect of the present application provides an electronic device, comprising a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the adversarial content generation method in the first aspect.

[0015] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implements the adversarial content generation method in the first aspect.

[0016] The above scheme first uses a large model to extract opinions from the target text to obtain text opinions, and then searches the opinion library based on the target text to obtain opinions that match the target text as retrieval opinions, and then judges the text opinions and the retrieval opinions to obtain a judgment result. If the judgment result is that the text opinion is inconsistent with the retrieval opinion, an adversarial article refuting the target text is output, and the opinions in the opinion library are used as a reference to unify the views of the target text, so that the text that does not conform to the opinions in the opinion library can be refuted and confronted. Compared with the existing technology, it can improve the efficiency of text opinion recognition and adversarial article generation, and at the same time it can also unify opinions and expressions, making the articles refuting the target text more targeted and accurate.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0019] Figure 1 It is a flowchart of an embodiment of the method for generating adversarial content of the present application;

[0020] Figure 2 It is a flow chart of forming an embodiment of the viewpoint library of the present application;

[0021] Figure 3 is a flowchart of another embodiment of the method for generating adversarial content of the present application;

[0022] Figure 4It is a flowchart of another embodiment of the method for generating adversarial content of the present application;

[0023] Figure 5 It is a schematic diagram of a framework of an embodiment of an adversarial content generating device of the present application;

[0024] Figure 6 It is a schematic diagram of the framework of an embodiment of the electronic device of the present application;

[0025] Figure 7 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0026] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0027] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0028] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0029] See also Figure 1 , Figure 1 This is a flow chart of an embodiment of the method for generating countermeasure content of the present application. Specifically, it may include the following steps:

[0030] Step S110: extracting opinions from the target text using the large model to obtain text opinions.

[0031] In this application, the natural language processing capabilities of the large model are mainly used to conduct targeted confrontation and rebuttal of some views on the Internet that do not conform to mainstream values. In addition, it can also confront and refute views that are not in line with the unit or department in the local area network such as internal forums or internal communities.

[0032] The large model mentioned in the present application is a large language model (LLM), which is a large language model in the prior art or a large language model trained according to an actual application environment. The target text is the text input by the target user.

[0033] In some embodiments, the text input by the target user can be first obtained in the Internet environment and used as the target text. The target text is then input into the large model, and the natural language processing technology of the large model is used to determine the meaning expressed by the target text, and then determine whether the target text is contrary to the mainstream view. Among them, the step of determining the meaning expressed by the target text using the natural language processing technology of the large model can be involved in steps S111 to S113.

[0034] Step S111: Use the large model to perform semantic understanding on the target text to obtain semantic information.

[0035] In some embodiments, before semantic understanding of the target text, the target text may be preprocessed, such as removing modal particles in the target text, to facilitate subsequent analysis of the target text. In addition, if the target text is too long, the target text may be segmented to break down the long target text into understandable words or phrases.

[0036] After that, the preprocessed target text is vectorized, and then the natural language processing technology of the large model is used to perform in-depth semantic understanding of the vectorized target text to obtain semantic information. The semantic information may include entities, relationships, events and other elements in the target text, as well as the analysis of the logical relationship between sentences.

[0037] Step S112: Based on the semantic information, extract opinions from the target text to obtain semantic opinions.

[0038] In some embodiments, after obtaining the semantic information of the target text, feature extraction can be performed on the semantic information to obtain semantic opinions. In addition, specific algorithms, such as sentiment analysis or opinion mining algorithms, can also be used to identify and extract the main opinions in the target text based on the semantic information, including the target user's views, attitudes, emotional tendencies, etc. on a certain topic or issue.

[0039] Step S113: Classify and integrate the semantic viewpoints to obtain text viewpoints.

[0040] In some embodiments, there may be many semantic viewpoints extracted. In order to more intuitively know the meaning expressed by the target text, the semantic viewpoints can be classified so as to output a clear rebuttal article position later. Among them, the classification types of semantic viewpoints can be support, opposition, neutrality, etc. After classification, if the target text also includes multiple different viewpoints, these viewpoints can be summarized and integrated into one or several viewpoints that can express the main idea of ​​the author's article, that is, text viewpoints. In addition, the text viewpoints can also be converted into text and output in the form of a clear and concise text table.

[0041] Step S120: searching the opinion library for an opinion that matches the target text to obtain a searched opinion.

[0042] Among them, the several opinions contained in the opinion library are obtained by extracting opinions from at least one reference text using a large model. The reference text can be an article published by the organization structure where the target user is located, or an article that conforms to mainstream values. Therefore, the several opinions stored in the opinion library are actually opinions recognized by the organization structure where the target user is located, or opinions that conform to mainstream values.

[0043] For details, see Figure 2 , divide the articles published by the target user's organizational structure into multiple paragraphs, input the multiple paragraphs into the large model for vectorization, and extract features from the multiple vectorized paragraphs to obtain reference text opinions. Then save the obtained reference text opinions into the vector database, thus forming the organization's opinion library.

[0044] In addition, in addition to a number of viewpoints, the viewpoint library may also include some descriptive content in the article, or examples cited in the article.

[0045] In some embodiments, to determine whether the target text conforms to the mainstream viewpoint or the viewpoint of the organizational structure, the viewpoint library may be searched for viewpoints that are close to or match the meaning expressed in the target text. Specifically, refer to steps S121 to S123.

[0046] Step S121: Divide the target text into several target sub-texts.

[0047] In some embodiments, the target text may be divided according to the length of the target text to obtain multiple target sub-texts. In addition, the paragraphs may be divided according to the meaning groups, and the specific division method is not limited here.

[0048] Step S122: Retrieve the search sub-viewpoints matching the target sub-text in the viewpoint library respectively.

[0049] The opinions in the opinion library are vector data. Therefore, in order to retrieve the search sub-opinions matching the target sub-texts in the opinion library, each target sub-text needs to be vectorized to obtain the sub-text vectors corresponding to each target sub-text, and then the sub-text vectors corresponding to each target sub-text are respectively calculated with each opinion in the opinion library to obtain the similarity scores between each target sub-text and each opinion. The similarity calculation method can be a cosine similarity calculation method, a Pearson similarity calculation method, etc., which is not specifically limited here.

[0050] Afterwards, for each target subtext, the viewpoints in the viewpoint library whose similarity scores with the target subtext meet the first similarity requirement are selected as the retrieval subviewpoints matching the target subtext. The first similarity requirement may be that the similarity score is greater than a certain threshold, such as 90, 95, 98, etc. In addition, the first similarity requirement may also be to sort all the obtained similarity scores and select the top N viewpoints with the largest similarity scores. Therefore, the first similarity requirement is not specifically limited here.

[0051] Step S123: Select based on all retrieval sub-viewpoints to obtain a retrieval viewpoint.

[0052] In some embodiments, from the retrieval sub-viewpoints matched by each target sub-text, a retrieval sub-viewpoint whose similarity score with the corresponding target sub-text meets the second similarity requirement is selected as the retrieval viewpoint. The second similarity requirement may be that the similarity score is greater than a certain threshold, such as 90, 95, 98, etc. In addition, the second similarity requirement may also be to sort all the obtained similarity scores and select the first K retrieval sub-viewpoints with the largest similarity scores. Therefore, the second similarity requirement is not specifically limited here.

[0053] In one implementation scenario, the above step S110 and step S120 may be performed in a sequential order, for example, step S110 is performed first and then step S120; or, step S120 is performed first and then step S110. In another implementation scenario, the above step S110 and step S120 may also be performed simultaneously, which may be set according to actual applications and is not limited here.

[0054] Step S130: Make a judgment based on the text viewpoint and the search viewpoint to obtain a judgment result.

[0055] In some embodiments, after obtaining the text viewpoint and the retrieval viewpoint, the text viewpoint and the retrieval viewpoint are input into the big model again, and the big model judges the text viewpoint and the retrieval viewpoint. After the big model receives the text viewpoint and the retrieval viewpoint, the natural language processing technology of the big model is used to extract keywords from the text viewpoint to obtain text keywords, and the retrieval viewpoint is extracted to obtain retrieval keywords. The extracted keywords may be verbs, nouns, adjectives, etc., which can reflect the main body or core viewpoint of the text content. Then, the embedding (mapping) capability of the big model is used to vectorize the text keywords to obtain text vectors, and the retrieval keywords are vectorized to obtain retrieval vectors. After that, the text vector and the retrieval vector are calculated for similarity to obtain the target similarity, wherein the cosine similarity calculation method can be used to obtain the target similarity. The text viewpoint and the retrieval viewpoint are judged based on the target similarity to obtain a judgment result.

[0056] Specifically, the target similarity can be compared with the similarity threshold to determine the judgment result. If the target similarity is greater than or equal to the similarity threshold, the judgment result is that the text viewpoint is consistent with the search viewpoint; if the target similarity is less than the similarity threshold, the judgment result is that the text viewpoint is inconsistent with the search viewpoint. The similarity threshold can be 85%, 90%, 95%, 98%, etc.

[0057] According to the final judgment result, if they are consistent, the content supporting the viewpoint of the target text is output; if they are inconsistent, the content refuting the viewpoint of the target text is output.

[0058] Step S140: In response to the judgment result that the text viewpoint is inconsistent with the search viewpoint, output a counter-article that refutes the target text.

[0059] In some embodiments, if the final judgment result is that the text viewpoint is inconsistent with the search viewpoint, it is necessary to combine the search viewpoint and the judgment result to obtain prompt information, and the large model generates a confrontation article through the prompt information. Among them, the prompt information template is as follows:

[0060] "As a professional XXX, I provide the following material information: [write search opinion].

[0061] Based on the above content materials, write an article that conforms to the following viewpoints: [Write in the judgment result].

[0062] The article must contain a title, the article structure must be complete, there should be no special introduction, body and conclusion in the article, and the content of the article needs to integrate the content materials provided above and should not diverge.

[0063] [Add topic detection to ensure that you do not deviate from the topic or go off topic]".

[0064] In some embodiments, the retrieved viewpoints and judgment results are assembled, and after obtaining the prompt information, the prompt information is input into the large model again. The large model first parses the prompt information, uses natural language processing technology to understand the meaning of the prompt information, and identifies the viewpoints, core content and emotional tendencies therein. For content materials, the large model needs to extract the content in the material and understand how they are associated with negative viewpoints. Then extract key information from the prompt information to obtain adversarial generated arguments, for example, extract data points, case studies or logical reasoning, and then construct one or more adversarial generated arguments based on this information to refute the viewpoints in the target text. Then, based on the adversarial generated arguments and the article planning structure, generate an adversarial article to ensure that the logic of the adversarial article is clear and easy to understand, wherein the article planning structure includes at least a title, introduction, body and conclusion. In addition, the adversarial article can be further polished to ensure correct grammar, accurate wording and fluent expression. Finally, the adversarial article is output.

[0065] In addition, if the judgment result is that the text viewpoint is consistent with the retrieval viewpoint, an article supporting the viewpoint is generated. Specifically, the retrieval viewpoint and the judgment result can be assembled, and after the prompt information is obtained, the prompt information is input into the large model again. The large model first parses the prompt information, uses natural language processing technology to understand the meaning of the prompt information, and identifies the viewpoints, core content and emotional tendencies therein. For the content material of the article, the large model needs to extract the content in the material and understand how they are related to the supporting viewpoint. Then extract key information from the prompt information to obtain supporting arguments. Then, based on the supporting arguments and the article planning structure, generate supporting articles to ensure that the supporting articles are logically clear and easy to understand. The article planning structure includes at least a title, introduction, body and conclusion. In addition, the supporting articles can be further polished to ensure correct grammar, accurate wording and fluent expression. Finally, output the supporting articles.

[0066] In a specific application scenario, in order to unify the unit's views on the same point of view, the adversarial content generation method in this application is used to refute the opinions that are not in line with the unit published by the unit's employees on the internal forum. First, obtain the target text published by the user on the internal forum, and use the large model to extract the viewpoints of the target text to obtain the text viewpoints. Then, divide the target text according to the natural paragraphs to obtain M target sub-texts, and vectorize the M target sub-texts to obtain the sub-text vectors corresponding to each target sub-text, that is, M sub-text vectors. Then, the M sub-text vectors are respectively calculated for similarity with each viewpoint in the viewpoint library to obtain the similarity score between each target sub-text and each viewpoint. For the same sub-text vector, according to the similarity score calculated with it, the viewpoint is screened, and the TOP N viewpoints with the largest similarity score are selected as the retrieval sub-viewpoints of the sub-text vector, that is, the TOP N retrieval sub-viewpoints of the target sub-text. Merge the TOP N retrieval sub-viewpoints of the M target sub-texts, and select the TOP K retrieval sub-viewpoints from the M*N retrieval sub-viewpoints as the retrieval viewpoints.

[0067] Then input the search viewpoint and the text viewpoint into the big model, calculate the similarity between the search viewpoint and the text viewpoint to obtain the target similarity. And use the target similarity to compare with the similarity threshold to determine the judgment result. If the judgment result is inconsistent, the judgment result and the search viewpoint are combined according to the prompt information template to obtain the prompt information. The prompt information is input into the big model to produce the adversarial article. And copy the adversarial article and paste it below the target text of the internal forum to reply. If the judgment result is consistent, the judgment result and the search viewpoint are combined according to the prompt information template to obtain the prompt information, and the prompt information is input into the big model to produce the supporting article.

[0068] See also Figure 4 , Figure 4 This is a flowchart of another embodiment of the method for generating adversarial content of the present application. Specifically, it may include the following steps:

[0069] Step S410: extracting opinions from the target text using the large model to obtain text opinions.

[0070] This step is the same as the above step S110 and will not be described again here.

[0071] Step S420: Calculate the similarity between the text opinion and the opinions in the opinion library to obtain an opinion similarity score.

[0072] In some embodiments, the similarity between each text opinion and the opinions in the opinion library is calculated to obtain an opinion similarity score. The similarity calculation method may be a cosine similarity calculation method, a Euclidean distance calculation method, etc., which is not specifically limited here.

[0073] For example, if there are Q opinions in the opinion library, each text opinion needs to be similar to the Q opinions, and an opinion similarity score corresponding to each opinion will also be obtained.

[0074] Step S430: Make a judgment based on the opinion similarity score and the similarity threshold to obtain a judgment result.

[0075] In some embodiments, the similarity scores obtained for each text viewpoint are sorted, and the viewpoints corresponding to the top R similarity scores are selected. Then, the top R viewpoints with all text viewpoints are classified, and the similarity scores corresponding to the viewpoints in each category are calculated and averaged to obtain the viewpoint category score. Then, the viewpoint category score is judged with the similarity threshold to obtain a judgment result.

[0076] Step S440: In response to the judgment result being less than the similarity threshold, outputting a counter-article that refutes the target text.

[0077] In some embodiments, for the target text, it may obtain multiple opinion category scores. If at least one opinion category score is less than the similarity threshold, multiple judgment results are weighted and fused. If the final weighted fusion value is less than the fusion threshold, the result of the target text being inconsistent with the official opinion is output, and the final output result is assembled with the opinion category to obtain prompt information, and then the adversarial article is generated based on the prompt information. If all opinion category scores are greater than or equal to the similarity threshold, the result of the target text being consistent with the official opinion is output, and the final output result is assembled with the opinion category to obtain prompt information, and then the supporting article is generated based on the prompt information.

[0078] In this application, large model technology is used to judge opinions and generate adversarial articles. First, the large model is used to extract opinions from the target text to obtain text opinions. Then, the target text is searched in the opinion library to obtain opinions that match the target text as retrieval opinions. Then, the text opinions and the retrieval opinions are judged to obtain the judgment result. If the judgment result is that the text opinions are inconsistent with the retrieval opinions, an adversarial article refuting the target text is output. The opinions in the opinion library are used as the standard to unify the views on the target text, so that the text that does not conform to the mainstream opinions can be refuted and confronted. Compared with the existing technology, it can improve the efficiency of text opinion recognition and adversarial article generation, and at the same time, it can unify opinions and expressions, making the articles refuting the target text more targeted and accurate.

[0079] In addition, this application introduces the articles published by the organization structure where the target user is located as the attitude of the organization structure on this issue to build a viewpoint library. And combine the large model technology and viewpoint library knowledge to judge the viewpoints that conform to the organization structure and generate confrontational articles.

[0080] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0081] See also Figure 5 , Figure 5 It is a schematic diagram of the framework of an embodiment of the adversarial content generation device of the present application. The adversarial content generation device 500 includes a viewpoint extraction module 510, a retrieval module 520, a judgment module 530 and an output module 540. The viewpoint extraction module 510 is used to extract the viewpoint of the target text using a large model to obtain the text viewpoint. The retrieval module 520 is used to retrieve the viewpoint that matches the target text in the viewpoint library to obtain the retrieved viewpoint. The judgment module 530 is used to make a judgment based on the text viewpoint and the retrieved viewpoint to obtain a judgment result. The output module 540 is used to output an adversarial article that refutes the target text in response to the judgment result that the text viewpoint is inconsistent with the retrieved viewpoint.

[0082] See also Figure 6 , Figure 6 : is a schematic diagram of a framework of an embodiment of an electronic device 60 of the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps in any of the above-mentioned adversarial content generation method embodiments. In a specific implementation scenario, the electronic device 60 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 60 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.

[0083] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps in any of the above-mentioned adversarial content generation method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0084] See also Figure 7 , Figure 7 Schematic diagram of a framework of an embodiment of a computer-readable storage medium 70 of the present application. The computer-readable storage medium 70 stores program instructions 701 that can be executed by a processor, and the program instructions 701 are used to implement the steps in any of the above-mentioned adversarial content generation method embodiments.

[0085] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.

[0086] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0087] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0088] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0089] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

Claims

1. A method for generating adversarial content, characterized in that: include: Use the big model to extract opinions from the target text and obtain the text opinions; Retrieving opinions matching the target text in the opinion library to obtain retrieved opinions; Making a judgment based on the text viewpoint and the search viewpoint to obtain a judgment result; In response to the judgment result that the text viewpoint is inconsistent with the search viewpoint, a counter-article refuting the target text is output.

2. The method according to claim 1, characterized in that The step of retrieving a viewpoint matching the target text in the viewpoint library to obtain the retrieved viewpoint includes: Dividing the target text to obtain a plurality of target sub-texts; Retrieval sub-viewpoints matching the target sub-text are respectively retrieved from the viewpoint library; and selection is performed based on all the retrieval sub-viewpoints to obtain the retrieval viewpoint.

3. The method according to claim 2, characterized in that After dividing the target text to obtain a plurality of target sub-texts, the method further comprises: Vectorizing each of the target subtexts respectively to obtain a subtext vector corresponding to each of the target subtexts; The step of respectively retrieving the search sub-viewpoints matching the target sub-text from the viewpoint library includes: Calculating the similarity between the subtext vector corresponding to each target subtext and each opinion in the opinion library to obtain a similarity score between each target subtext and each opinion; For each of the target sub-texts, selecting a viewpoint in the viewpoint library whose similarity score with the target sub-text meets a first similarity requirement as a retrieval sub-viewpoint matching the target sub-text; And / or, the selection based on all the retrieval sub-viewpoints to obtain the retrieval viewpoint includes: From the retrieval sub-viewpoints matched with the target sub-texts, the retrieval sub-viewpoint whose similarity score with the corresponding target sub-text meets the second similarity requirement is selected as the retrieval viewpoint.

4. The method according to claim 1, characterized in that: The method of extracting opinions from the target text using the large model to obtain text opinions includes: Using the large model to perform semantic understanding on the target text to obtain semantic information; Based on the semantic information, the viewpoints of the target text are extracted to obtain semantic viewpoints; and the semantic viewpoints are classified and integrated to obtain the text viewpoints.

5. The method according to claim 1, characterized in that The step of making a judgment based on the text viewpoint and the search viewpoint to obtain a judgment result includes: Performing keyword extraction on the text viewpoint to obtain text keywords, and performing keyword extraction on the search viewpoint to obtain search keywords; Vectorizing the text keywords to obtain text vectors, and vectorizing the search keywords to obtain search vectors; Calculating similarity between the text vector and the search vector to obtain a target similarity; The text viewpoint and the search viewpoint are judged based on the target similarity to obtain a judgment result.

6. The method according to claim 5, characterized in that The step of judging the text viewpoint and the search viewpoint based on the target similarity to obtain a judgment result includes: Comparing the target similarity with a similarity threshold to determine the judgment result; If the target similarity is greater than or equal to the similarity threshold, the judgment result is that the text viewpoint is consistent with the search viewpoint; if the target similarity is less than the similarity threshold, the judgment result is that the text viewpoint is inconsistent with the search viewpoint.

7. The method according to claim 1, characterized in that Before the step of outputting a counter-article refuting the target text in response to the judgment result that the text viewpoint is inconsistent with the search viewpoint, the step of: Combining the search viewpoint and the judgment result to obtain prompt information; In response to the judgment result that the text viewpoint is inconsistent with the search viewpoint, outputting a counter-article refuting the target text includes: Extract key information from the prompt information to obtain adversarial generation arguments; The adversarial article is generated based on the adversarial generation argument and the article planning structure, wherein the article planning structure at least includes a title, an introduction, a main body and a conclusion.

8. The method according to claim 1, characterized in that Before retrieving the viewpoint matching the target text in the viewpoint library to obtain the retrieved viewpoint, the method further includes: The large model is used to extract opinions from at least one reference text to obtain a plurality of opinions, wherein the opinion library includes the plurality of opinions.

9. The method according to claim 8, characterized in that The target text is the text input by the target user, and the reference text is the article published by the organization structure where the target user belongs.

10. A device for generating countermeasure content, characterized in that: include: The opinion extraction module is used to extract opinions from the target text using the large model to obtain the text opinions; A retrieval module, used to retrieve opinions matching the target text in the opinion library to obtain retrieved opinions; A judgment module, used to make a judgment based on the text viewpoint and the search viewpoint to obtain a judgment result; An output module is used to output a counter-article refuting the target text in response to the judgment result that the text viewpoint is inconsistent with the search viewpoint.

11. An electronic device, characterized in that: It comprises a memory and a processor coupled to each other, wherein the processor is used to execute program instructions stored in the memory to implement the adversarial content generation method according to any one of claims 1 to 9.

12. A computer-readable storage medium having program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the adversarial content generation method according to any one of claims 1 to 9 is implemented.