Recognition method, model training method and device and electronic equipment
By extracting local grammatical features and long-distance logical features from academic texts and using a target recognition model for classification, the problem of low accuracy in recognizing AI-generated content in existing technologies is solved, with a significant improvement in recognition performance, especially in academic texts.
Patent Information
- Application Number
- CN202511309369.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-12
- Publication Date
- 2025-10-17
AI Technical Summary
In existing technologies, the accuracy of recognizing AI-generated content is low, especially in academic texts.
The target recognition model is used to extract local syntactic features and long-distance logical features of the content to be recognized, and the pre-trained model is used for classification to recognize artificial intelligence-generated content.
It improved the accuracy of the model in recognizing AI-generated content, especially in academic texts where the recognition performance was significantly enhanced.
Smart Images

Figure CN120804323A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular, the present application relates to a recognition method, a model training method, a device and an electronic device. BACKGROUND
[0002] In the rapid development of artificial intelligence, artificial intelligence generated content (AIGC) as a disruptive technology, is widely used in work and life. Among them, text generation is one of the most common applications of AIGC, mainly applied in writing, dialogue, key information summary and case analysis, etc.
[0003] How to identify whether there is artificial intelligence generated content in the object (such as a paper or an article) becomes a very important thing at present. Although it can be automatically identified with the help of artificial intelligence technology.
[0004] However, academic texts have their own particularity, and simply increasing the amount of data corpus has limited effect on improving model performance. Therefore, the current accuracy of identifying AIGC using artificial intelligence is still low. SUMMARY
[0005] The embodiments of the present application provide a method for identifying artificial intelligence generated content, to solve the problem of low accuracy of model in identifying artificial intelligence generated content in the prior art.
[0006] Correspondingly, the embodiments of the present application also provide a model training method, an artificial intelligence generated content recognition device, a model training device, an electronic device, a storage medium and a computer program product, to ensure the implementation and application of the above method. In order to solve the above problem, the embodiments of the present application disclose a method for identifying artificial intelligence generated content, the method comprising: obtaining the content to be identified; inputting the content to be identified into a target recognition model, extracting text features of the content to be identified through the target recognition model, and obtaining a classification result based on the text features; wherein the target recognition model is used to output: a classification result indicating whether there is artificial intelligence generated content in the model input; the text features include at least one of: local syntax features representing the syntax situation in a single sentence, and long distance logical features representing the logical relationship between multiple sentences; determining whether there is artificial intelligence generated content in the content to be identified based on the classification result.
[0007] The embodiments of the present application also disclose a model training method, the method comprising: obtain training data; input the training data into a target recognition model to be trained, extract text features of the training data by the target recognition model, and obtain a classification result based on the text features; wherein the text features include at least one of local syntax features representing syntax conditions in a single sentence and long-distance logical features representing logical relationships between multiple sentences; based on the classification result, iteratively optimize the target recognition model.
[0008] The embodiment of the application further discloses a device for identifying AI-generated content, which comprises: a first obtaining module configured to obtain content to be identified; a model identification module configured to input the content to be identified into a target recognition model, extract text features of the content to be identified by the target recognition model, and obtain a classification result based on the text features; wherein the target recognition model is configured to output a classification result indicating whether AI-generated content exists in the model input; and the text features include at least one of local syntax features representing syntax conditions in a single sentence and long-distance logical features representing logical relationships between multiple sentences; a determining module configured to determine whether AI-generated content exists in the content to be identified based on the classification result.
[0009] The embodiment of the application further discloses a model training device, which comprises: a second obtaining module configured to obtain training data; a training module configured to input the training data into a target recognition model to be trained, extract text features of the training data by the target recognition model, and obtain a classification result based on the text features; wherein the text features include at least one of local syntax features representing syntax conditions in a single sentence and long-distance logical features representing logical relationships between multiple sentences; an iteration module configured to iteratively optimize the target recognition model based on the classification result.
[0010] The embodiment of the application further discloses an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements one or more methods described in the embodiments of the application when executing the program.
[0011] The embodiment of the application further discloses a computer-readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement one or more methods described in the embodiments of the application.
[0012] The embodiment of the present application also discloses a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the embodiments of the present application.
[0013] The technical scheme provided by the embodiment of the present application has the beneficial effects that: In the embodiment of the present application, the to-be-identified content to be identified is input into the target identification model. Since the target identification model is used to output a classification result indicating whether there is artificial intelligence generated content in the model input, the classification result can be obtained through the processing of the target identification model. Further, based on the classification result, it can be determined whether there is artificial intelligence generated content in the to-be-identified content. Since the text features extracted by the target identification model in the process of processing the to-be-identified content contain local syntax features and / or long-distance logical features. And the local syntax features can represent the syntax situation in a single sentence, and there is a big difference between the artificial intelligence generated content and the artificial original content in this feature. The long-distance logical features can represent the logical relationship between multiple sentences, and there is also a big difference between the artificial intelligence generated content and the artificial original content in this feature. Therefore, the classification result obtained by the target identification model based on such text features will be more accurate. Thus, the accuracy of the model in identifying artificial intelligence generated content is improved.
[0014] Additional aspects and advantages of the embodiments of the present application will be in part apparent and in part pointed out hereinafter. BRIEF DESCRIPTION OF DRAWINGS
[0015] The above and / or additional aspects and advantages of the present application will become apparent and be readily appreciated from the following description, including the accompanying drawings, wherein: Figure 1 Flowchart of the process of constructing an AIGC detection model based on machine learning; Figure 2 Flowchart of the process of constructing an AIGC detection model based on deep learning; Figure 3 Flowchart of the artificial intelligence generated content identification method provided by the embodiment of the present application; Figure 4 Flowchart of the model training method provided by the embodiment of the present application; Figure 5 Comprehensive diagram of the artificial intelligence generated content identification method and the model training method provided by the embodiment of the present application; Figure 6 Structural diagram of the artificial intelligence generated content identification device provided by the embodiment of the present application; Figure 7A structural schematic diagram of a model training device provided by an embodiment of the present application is shown in the figure. Figure 8 A structural schematic diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION
[0016] Embodiments of the present application will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions of the technical solutions of the embodiments of the present application, and do not limit the technical solutions of the embodiments of the present application.
[0017] Those skilled in the art can understand that the singular forms "a", "an" and "the" used herein include plural forms unless specifically stated otherwise. It should be further understood that the terms "comprise" and "include" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technology. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can mean that the element and the other element are connected through an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The term "a plurality of" means two or more, and in view of this, "a plurality of" can also be understood as "at least two" in the embodiments of the present application. The term "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, the character " / ", if not specially stated, generally means that the associated objects before and after it are in an "or" relationship.
[0018] To make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be described in further detail below in conjunction with the accompanying drawings.
[0019] AIGC can generally refer to a technical method based on artificial intelligence such as generative adversarial network and large pre-training model, which generates relevant content with appropriate generalization ability through learning and identification of existing data. For example, by inputting keywords, descriptions and other content, a model using AIGC technology can generate articles, images, audio and other content that match them.
[0020] AIGC, while facilitating people's life and work, also brings some drawbacks due to its improper use. For example, the phenomenon of using AIGC to generate academic articles has a significant impact on the transparency and integrity of academic research. Large Language Models (LLMs) that use AIGC are prone to errors and misleading information by learning natural language processing patterns from a large amount of online text data. Furthermore, if these information is considered as reliable research results, it will inevitably affect the scientific research environment. Here, the large language model can refer to a deep learning model trained using a large amount of text data, enabling the large language model to generate natural language text or understand the meaning of language text.
[0021] Currently, there are three main detection methods for identifying AIGC: zero-shot detection, machine learning-based detection, and deep learning-based detection. Among them, zero-shot detection is a technology that can achieve target detection without relying on specific labeled training data (such as artificially labeled "machine-generated / human-written" text samples). Zero-shot detection method, due to its advantage of not needing to train for specific models or fields, can directly utilize the model's own characteristics to achieve detection, becoming an important direction to address this challenge. Machine learning is a technology that enables computers to automatically learn from data through algorithms and models, and make predictions or decisions. For example, as shown in Figure 1 , after collecting the corpus, the text in it is sequentially processed by S101 word segmentation, S102 vectorization, and S103 feature engineering. The resulting data is machine learned using machine learning algorithms such as logistic regression, decision tree, support vector machine (SVM), random forest, K-means, XGBoost (eXtreme Gradient Boosting), and the classification results are obtained. The model is evaluated for performance in S104, and if the performance meets the requirements, the model is considered the optimal model. Deep learning (Deep Learning) can refer to machine learning based on deep neural network models and methods. Deep learning discovers distributed feature representations of data by combining low-level features to form more abstract high-level representation attributes or features. For example, as shown in Figure 2 , after collecting the corpus, the text in it is sequentially processed by S201 data processing, S202 model pre-training, and a pre-trained model pool is obtained. Then, a model from the pre-trained model pool is selected for S203 deep learning. Finally, the classification results are used as model output, and the optimizer is optimized in S204 to obtain the optimal model, i.e., the optimizer continuously optimizes the model based on the classification results and loss function to obtain the optimal result.
[0022] In the prior art, open source large language models are mostly used for AIGC recognition of text, but the recognition effect is low. For example, using HelloSimpleAI tool for AIGC. The tool directly uses an open source large language model for AIGC recognition, relying on general corpus training. The recognition accuracy of these models is mostly around 70%.
[0023] The present inventors have found that although the BERT (Bidirectional Encoder Representations from Transformers) model has certain advantages in AIGC recognition of general domain text, it is not stable in the recognition of academic field-specific terminology and sentence patterns. The RoBERTa (Robustly optimized BERT approach) model relies on general corpus training, and the recognition accuracy of high-frequency professional term combinations and complex sentence structures in the academic field decreases. The academic training samples account for a small proportion of the training data of the HelloSimpleAI tool, and cannot cover the specific expression habits of multiple disciplines such as science and engineering, humanities and social sciences. In summary, the present inventors believe that academic text usually has a large amount of data, a large text length, and involves special expressions (such as infrequently used sentence patterns and infrequently used words in daily life). It is precisely because of these reasons that the existing model has a low accuracy in recognizing AIGC. Therefore, the present inventors propose a method for recognizing AI-generated content, which inputs the content to be recognized into a target recognition model. Since the target recognition model is used to output a classification result indicating whether the model input contains AI-generated content, the classification result can be obtained through the processing of the target recognition model. Further, based on the classification result, it can be determined whether the content to be recognized contains AI-generated content. Since the target recognition model extracts text features containing local syntax features and / or long-distance logical features during processing of the content to be recognized. And the local syntax features can represent the syntax in a single sentence, and there is a large difference between AI-generated content and human original content in this feature. Long-distance logical features can represent the logical relationship between multiple sentences, and there is also a large difference between AI-generated content and human original content in this feature. Therefore, the classification result obtained by the target recognition model based on such text features will be more accurate. Thus, the accuracy of the model in recognizing AI-generated content is improved.
[0024] Embodiments of the present application provide a method for identifying AI-generated content. Optionally, the embodiments of the present application can be applied to electronic devices, such as notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Personal Computers), PMPs (Portable Multimedia Players), mobile terminals of in-vehicle terminals (such as in-vehicle navigation terminals), and the like, as well as devices such as digital TVs and desktop computers. Subsequently, the embodiments of the present application will be described with reference to electronic devices as an execution subject, however, this does not constitute a limitation on the embodiments of the present application.
[0025] As shown in Figure 3 The method for identifying AI-generated content can include the following steps: In step S301, the content to be identified is obtained.
[0026] In this step, the content to be identified can be the identification object of the method for identifying AI-generated content or the text content of the identification object. The present application does not limit the manner of obtaining the content to be identified. In some embodiments, the text input by the user can be received, and the text input by the user is determined as the content to be identified. For example, an input box can be displayed, and the user can input any content in the input box. After the user clicks the confirmation control, the data input in the input box is determined as the content to be identified.
[0027] In some embodiments, the file uploaded by the user can be received, and the file or the content of the file is determined as the content to be identified. For example, the user uploads a certain paper, and after the uploading is completed, the paper is determined as the content to be identified. Optionally, when the file uploaded by the user contains non-text data, the file can be processed to convert the non-text data therein into text data, and the processed file is determined as the content to be identified.
[0028] In some embodiments, the content to be identified can be the text content of academic texts, such as but not limited to university graduation theses, research article, academic website or journal submission manuscripts, compositions, novels, etc. It can also be the text content of non-academic texts, which is not limited here.
[0029] In some embodiments, the content to be identified can include at least one of Chinese, English, German, Japanese, Korean, and other languages. For example, the content to be identified can be all edited in Chinese, all edited in English, or even mixed edited in Chinese and English.
[0030] In some embodiments, after obtaining the content to be identified, the content to be identified can also be data cleaned to remove redundant data therefrom, and then subsequent steps are performed on the content to be identified after the removal of the redundant data. For example, after obtaining the content to be identified, content that cannot be identified by the target identification model described below or special symbols, graphs, etc. that have no actual meaning can be removed as redundant data.
[0031] In step S302, the content to be identified is input into the target identification model, text features of the content to be identified are extracted by the target identification model, and a classification result is obtained based on the text features. In this step, the target identification model is used to output a classification result indicating whether there is artificial intelligence generated content in the model input. The target identification model can be pre-trained and can output a classification result based on the input content. The classification result can indicate whether the input content contains AIGC. The training process of the target identification model is not described in detail here and can be referred to the embodiments of the model training method described below. Whether or not the content contains AIGC can also be understood as whether or not the content is generated using AIGC technology.
[0032] It is worth noting that in the process of the target identification model processing the content to be identified, the extracted text features include at least one of local grammatical features representing the grammatical situation in a single sentence and long-distance logical features representing the logical relationship between multiple sentences.
[0033] The local grammatical features can also be referred to as local grammatical pattern features. The grammatical situation in a single sentence represented by the local grammatical features includes but is not limited to grammatical errors. It can be understood that the content generated by artificial intelligence has "rigidity" or patterned traces at the microscopic level. That is, there are subtle, local grammatical errors or unnatural phenomena. For example: misuse or omission of articles (a / an / the) or prepositions (in / on / at), and errors in high-frequency but easily overlooked fixed collocations. When these local grammatical errors or unnatural phenomena are used as the basis for model classification, the accuracy of model recognition will be greatly improved. Therefore, the local grammatical features can be extracted as a component of the text features for subsequent model classification.
[0034] Similarly, in the content generated by artificial intelligence, if a paragraph contains more sentences, the logic of the sentences before and after may have problems. For example, the logic problem of the cause and effect inversion sentence in Chinese, the problem of theme wandering, and the like. However, humans can handle complex logical relationships in such cases. Therefore, when using long-distance logical features that can represent the logical relationship between multiple sentences as the basis for model classification, the accuracy of model recognition will be greatly improved. Therefore, the embodiment can extract long-distance logical features as a component of text features for subsequent model classification.
[0035] In some embodiments, at least one of the local syntax features and the long-distance logical features can be selected as the text features according to different needs. For example, to avoid the model structure of the target recognition model being too complex, only one of the local syntax features and the long-distance logical features can be selected as the text features. For another example, to improve the accuracy of the final result, the local syntax features and the long-distance logical features can be selected together as the text features.
[0036] In some embodiments, the text features can further include at least one of a Token corresponding to the content to be recognized, and a keyword or a key sentence focused in the content to be recognized.
[0037] Regarding the Token, for English, a token can be a word, and for Chinese, a token can be a Chinese character.
[0038] S303, based on the classification result, determining whether the artificial intelligence generated content exists in the content to be recognized.
[0039] In this step, the classification result output by the target recognition model can represent whether the artificial intelligence generated content exists in the content to be recognized. Therefore, based on the classification result, it can be known whether the artificial intelligence generated content exists in the content to be recognized in S301.
[0040] In some embodiments, the classification result can be a probability value. The larger the probability value, the more likely it is that the artificial intelligence generated content exists in the content to be recognized. Conversely, the smaller the probability value, the less likely it is that the artificial intelligence generated content exists in the content to be recognized. This step can directly output the probability value. Alternatively, a threshold value can be set in advance, and then the threshold value is used for binary classification. When the probability value exceeds the threshold value, it is determined or output that the artificial intelligence generated content exists in the content to be recognized. When the probability value does not exceed the threshold value, it is determined or output that the artificial intelligence generated content does not exist in the content to be recognized. The threshold value may, for example, be 60%, 80%, but is not limited thereto.
[0041] In some embodiments, in a case where the classification result indicates that there is AI-generated content in the content to be recognized, the target recognition model is further configured to output: indication information indicating an AI platform used by the content to be recognized. The AI platform can be an existing platform providing AIGC services.
[0042] In some embodiments, after determining whether there is AI-generated content in the content to be recognized, corresponding prompt information can be output to inform the user of the recognition result. For example, a label indicating that there is AI-generated content can be directly displayed on the display screen of the electronic device, or the AIGC part in the content to be recognized can be specially displayed (e.g., highlighted, displayed with a special background color, etc.).
[0043] In the embodiments of the present application, the content to be recognized is input into the target recognition model. Since the target recognition model is configured to output a classification result indicating whether there is AI-generated content in the model input, the classification result can be obtained through the processing of the target recognition model. Furthermore, based on the classification result, it can be determined whether there is AI-generated content in the content to be recognized. Since the target recognition model extracts text features containing local syntax features and / or long-distance logical features during processing of the content to be recognized. The local syntax features can represent the syntax in a single sentence, and there is a large difference between AI-generated content and human original content in this feature. The long-distance logical features can represent the logical relationship between multiple sentences, and there is also a large difference between AI-generated content and human original content in this feature. Therefore, the classification result obtained by the target recognition model based on such text features will be more accurate. Thus, the accuracy of the model in recognizing AI-generated content is improved.
[0044] In some embodiments of the present application, the target recognition model includes a first feature extraction module and a second feature extraction module; the text features of the content to be recognized are extracted through the target recognition model, including: The first feature extraction module processes the content to be recognized to generate local syntax features; The second feature extraction module processes the content to be recognized to generate long-distance logical features.
[0045] It should be noted that the local syntax feature and the long-distance logical feature are the features embodied by the to-be-identified content in two different angles or dimensions. There is usually no direct connection between the two features. If a feature extraction module is used to extract both features, not only is the training process complex and the training cycle long, but the feature extraction module is usually very complex and its performance is usually not very good. Therefore, when local syntax features and long-distance logical features need to be extracted, two independent feature extraction modules can be used to extract local syntax features and long-distance logical features, respectively.
[0046] It can be understood that the convolutional neural network (CNN) is good at extracting local features, especially spatial features. Therefore, in some embodiments, the first feature extraction module can adopt the network structure of the CNN. For example, the to-be-identified content can be first converted into a word embedding or subword embedding sequence. Then the first feature extraction module performs convolution, nonlinear activation and pooling operations, thereby outputting a fixed-dimensional vector representing the local syntax feature of the text. Optionally, a plurality of convolution kernels of different widths (for example, 3-5 characters / words) can be configured to perform sliding convolution operations on the text sequence.
[0047] Of course, the network structure of the first feature extraction module is not limited to CNN, but can also be a recurrent neural network (RNN), a deep learning model (BERT, GPT) centered on the Transformer neural network, etc.
[0048] The bidirectional long short-term memory network (BiLSTM) is good at capturing long-distance time sequence dependencies, and can effectively associate the "cause" and "effect" parts across a long distance to determine whether the logic is reasonable and coherent. Therefore, in some embodiments, the second feature extraction module can adopt the network structure of the BiLSTM. For example, the to-be-identified content can be first converted into a word embedding or subword embedding sequence. Then the second feature extraction module processes the entire input sequence in order (forward LSTM) and in reverse order (backward LSTM), respectively. By fusing the hidden states of the forward and backward, the second feature extraction module outputs a feature vector containing rich context information and global semantic relationships. This channel effectively compensates for the shortcomings of CNN in handling long-range dependencies and can detect the breaks or contradictions in the macro logical structure of the AIGC text.
[0049] Of course, the network structure of the second feature extraction module is not limited to BiLSTM, and can also be a temporal convolutional network (TCN), a temporal fusion transformer (TFT) network, a Transformer-XL network, etc.
[0050] It can be understood that if only one of the first feature extraction module and the second feature extraction module is used alone, there will be certain limitations. Therefore, in the embodiment, the target recognition model uses the first feature extraction module and the second feature extraction module at the same time, and the first feature extraction module and the second feature extraction module have different network structures. This double-channel parallel structure avoids the limitations of a single network structure, while retaining the unique advantages of the two network structures. It can also better preserve the original feature information and reduce information loss.
[0051] In some embodiments, after obtaining the text features, the features can be spliced or weighted and fused to obtain a comprehensive text feature representation, which is then used as the basis for downstream classification. For example, the local syntax features and the long-distance logical features are spliced or weighted and fused to obtain a comprehensive text feature representation. Then, the classification result is obtained based on the comprehensive text feature representation.
[0052] In the embodiments of the present application, the target recognition model uses different feature extraction modules to extract local syntax features and long-distance logical features. Not only can the training process complexity be reduced and the training cycle be shortened, but also the structure complexity of the feature extraction module can be reduced and the performance of the module can be improved compared to using a single feature extraction module.
[0053] In some embodiments of the present application, the target recognition model includes a first classification module and a second classification module constructed using different neural networks, and the classification result is obtained based on the text features, including: The text features are processed by the first classification module to obtain a first classification result; The text features are processed by the second classification module to obtain a second classification result; The comprehensive classification result is obtained according to the first classification result and the second classification result.
[0054] It should be noted that the case where the classification module of the target recognition model uses mutually independent first and second classification modules is similar to the case where the feature extraction module of the target recognition model uses mutually independent first and second feature extraction modules in the above embodiments. The difference lies in that the classification module implements classification based on text features, while the feature extraction module extracts features based on the content to be recognized. The similarities are not repeated here.
[0055] The first classification module and the second classification module have different performances or focuses due to the different neural networks used. Finally, the two classification results formed each have advantages. In the embodiments of the present application, the two classification results are considered simultaneously, and a comprehensive classification result with stronger stability is obtained on this basis, and the comprehensive classification result is taken as the final classification result of the model. The first classification result and the second classification result are similar to the classification results in the above embodiments, and can be a probability value, which is not repeated here. As for the comprehensive classification result, it can be a weighted average of the first classification result and the second classification result, but is not limited thereto.
[0056] In some embodiments, the target recognition model can further include a larger number of classification modules, which are not listed one by one here. The case is similar to the case where the target recognition model includes the first classification module and the second classification module.
[0057] In the embodiments of the present application, the target recognition model uses different classification modules for processing respectively, and two classification results can be obtained. Then, the final comprehensive classification result is obtained by comprehensively considering the two classification results. It can be avoided that a serious deviation of a certain classification result directly leads to the unreliability of the final result, thereby improving the stability of the output result of the target recognition model.
[0058] In some embodiments of the present application, the classification result accuracy of the first classification module for long text is higher than that of the second classification module; and / or The classification result accuracy of the second classification module for non-long text is higher than that of the first classification module.
[0059] It should be noted that the long text can be a text with a large number of characters. For example, a text with more than one thousand characters, a text with more than eight hundred characters, but not limited thereto. In some embodiments, a certain character threshold can be set in advance, and a text with more characters than the character threshold is regarded as a long text. Similarly, the non-long text can be a text other than the long text. For example, a text with more than one thousand characters is a long text, and then a text with less than one thousand characters is a non-long text. In some embodiments, the non-long text includes a short text and a medium text, wherein the number of characters in the short text is less than the number of characters in the medium text.
[0060] It can be understood that different neural networks can process texts of different lengths. Moreover, for any neural network, when the length of a certain text exceeds the length of the text that the neural network can process, or the length of a certain text is much lower than the length of the text that the neural network can process, the classification result obtained by using the neural network to process the text is usually not ideal. That is, each neural network has a text length that it is good at processing, that is, the accuracy of the classification result obtained when processing the text length is higher.
[0061] Therefore, considering that academic texts are usually long, the classification accuracy of the first classification module for long texts is higher than that of the second classification module. With the advantage of the first classification module in processing long texts, the accuracy of the final classification result of the target recognition model is improved. In some embodiments, the network structure of the first classification module can include a LongDocument Transformer (Longformer) network. The Longformer network can process long texts and can process texts with up to 4096 tokens. Moreover, the Longformer network has a sliding window attention mechanism and global attention, which can significantly reduce the computational complexity of traditional Transformer models when processing long sequences (from O(n squared) to O(n)). In some embodiments, the text features and / or Token sequences corresponding to the content to be recognized are input into the first classification module, and the first classification module can provide global perspectives and structural information that the second classification module cannot obtain. The extended context window of the first classification module can better capture the semantic association and logical structure across paragraphs and chapters, identify problems such as loose overall structure, theme drift, or inconsistency before and after in long text generation by AIGC, and solve the pain points of traditional models that cannot analyze complete long texts due to input length limitations. Of course, the network structure of the first classification module is not limited to the Longformer network, and other network structures that can process texts containing thousands of tokens can also be used.
[0062] Similarly, considering that some articles are short in length, the classification result accuracy of the second classification module for non-long text is higher than that of the first classification module. With the advantage of the second classification module in processing non-long text, the accuracy of the final classification result of the target recognition model is improved. In some embodiments, the network structure of the second classification module can include a (Robustly optimized BERT approach, RoBERTa) network. RoBERTa is a series of optimizations based on the BERT network, using more training data to enable the model to focus more on language modeling. RoBERTa is more robust and more fully pre-trained on a large amount of unlabeled text (such as removing the next sentence prediction target, larger batch, more data), with strong semantic understanding ability and efficient context representation ability. In the AIGC task, it can efficiently capture semantic anomalies: excellent judgment of the fluency and rationality of the overall text semantics, and can quickly identify semantic gaps, contradictions, or content that does not conform to common sense. In particular, it is efficient for short / Chinese text classification, which usually processes short / Chinese text containing less than 512 Token. Of course, the network structure of the second classification module is not limited to the RoBERTa network, but can also be other network structures that can process text containing shorter Token. For example, a traditional Transformer network, but not limited to this.
[0063] In some embodiments, the classification result accuracy of the first classification module and the second classification module for different language texts is different. For example, the classification result accuracy of the first classification module for Chinese text is higher than that of the second classification module; and / or The classification result accuracy of the second classification module for non-Chinese text is higher than that of the first classification module.
[0064] In the embodiments of the present application, it can be ensured that the classification result accuracy of the first classification module for long text is higher than that of the second classification module; and the classification result accuracy of the second classification module for non-long text is higher than that of the first classification module. In this way, the first classification module is good at processing long text, and the second classification module is good at processing non-long text, forming a complementary advantage. Thus, it can adapt to the diversity requirements of the AIGC text detection task.
[0065] In some embodiments of the present application, according to the first classification result and the second classification result, a comprehensive classification result is obtained, including: fusing the first classification result and the second classification result according to an integration strategy to obtain a comprehensive classification result; wherein the integration strategy includes any one of a weighted average strategy, a voting strategy, and a meta-classifier strategy.
[0066] It should be noted that the weighted average strategy can be a strategy for solving the weighted average. For example, the first classification result and the second classification result are fused according to the weighted average strategy to obtain a comprehensive classification result, including: solving the weighted average of the first classification result and the second classification result, and taking the obtained weighted average as the comprehensive classification result.
[0067] The voting strategy can be a vote for different expected results, and the output with the highest number of votes is selected. For example, the first classification result and the second classification result are fused according to the voting strategy to obtain a comprehensive classification result, including: determining the number of votes for each expected result based on the first classification result and the second classification result, and determining the expected result with the most votes as the comprehensive classification result. For example, the expected results include: no AIGC and AIGC exists. If both classification results vote for AIGC (both indicate AIGC), then the comprehensive classification result is: AIGC exists.
[0068] The meta-classifier strategy can be a strategy for classifying by using a multi-meta classifier. The process of obtaining a comprehensive classification result according to the meta-classifier strategy is similar to the process of obtaining a comprehensive classification result according to other strategies, and will not be described here.
[0069] In the embodiments of the present application, any one of the weighted average strategy, the voting strategy and the meta-classifier strategy can be used as an integration strategy for fusing two classification results.
[0070] In some embodiments of the present application, the content to be recognized is obtained, including: Obtaining text to be recognized; Splitting the text to be recognized into a plurality of split texts according to a target sequence length m; wherein the value of the target sequence length m is positively correlated with the number of characters of the text to be recognized; Determining the split texts as the content to be recognized.
[0071] It should be noted that when the target recognition model processes the input text, if the text is too long, the text will be split into text segments of a predetermined length, and then the text segments will be processed in turn. The text segment can be a text block indicated by run. Run refers to the text block detected by the model each time, which can be large or small and will affect the detection result of the model. Generally, the model will limit the upper limit of run (for example, it cannot exceed a certain number of characters, otherwise the part exceeding the limit will not be involved in training). In the embodiments of the present application, the text segments are split according to the target sequence length m, and the obtained split texts are the text segments.
[0072] In some embodiments, the target sequence length m is less than or equal to 512. For example, for an input academic text to be detected, the content thereof is first automatically segmented. An adaptive dynamic segmentation strategy is adopted: if the number of characters in a single segment is less than 150, the segment is automatically merged into the next segment; if the number of characters exceeds 1000, the segment is split into two segments; if the number of characters exceeds 1500, the segment is split into three segments, and so on.
[0073] In some embodiments, any adjacent split text in the plurality of split texts is separated by a punctuation mark in the text to be recognized. The punctuation mark can be any punctuation mark. In this way, the semantic integrity of each split text can be ensured as much as possible. For example, in the above example, if the number of characters exceeds 1000, the segment is split into two segments. The split needs to be performed at the punctuation mark, and the number of characters in each split text after the split can be about 500 characters. Optionally, the punctuation mark is a punctuation mark indicating the end of a sentence, such as a period, a question mark, an exclamation mark, and the like. Thus, the semantic integrity can be further ensured. The problem of decreased detection accuracy caused by context fragmentation is effectively reduced, and this is particularly suitable for Chinese long sentence structures with complex corpora.
[0074] In some embodiments, before the text to be recognized is split, the text to be recognized can be subjected to data cleaning to remove non-controversial special symbols (such as figures and tables) therein.
[0075] In some embodiments, a user input can be received, and the target sequence length m is adjusted in response to the user input to achieve dynamic adjustment of the target sequence length m. For example, in a business scenario requiring a smaller m, the user can input a smaller value in advance to adjust m to the smaller value. Then, the method for generating content by artificial intelligence provided in the above embodiments is executed.
[0076] In some embodiments, after the content to be recognized is received, the target sequence length m can be dynamically adjusted based on the data amount of the content to be recognized.
[0077] In the embodiments of the present application, the lengths of the split texts can be as balanced as possible, and the lengths of the split texts can be reasonably controlled.
[0078] In some embodiments of the present application, after the content to be recognized is obtained, the method further includes: In a case where the number of characters in the content to be recognized exceeds a character threshold, a prompt information is displayed, and the prompt information is used to prompt that the input content is too long.
[0079] It should be noted that the character threshold is a relatively large value set in advance. For example, the character threshold can be 300,000 words, but is not limited thereto.
[0080] The characters of the to-be-recognized content include the length of the to-be-recognized content, the number of characters, and the like. In some embodiments, the embodiments of the present application can limit the length of the to-be-recognized content. If the length of the to-be-recognized content is too large, the processing time of the target recognition model will become uncontrollable, for example, will become very long, thereby seriously affecting the user experience. At this time, a prompt information can be displayed to inform the user to reduce the length of the to-be-recognized content, thereby avoiding affecting the user experience. The prompt information can be a re-input or an input content too long information, or an audio and video of the same semantic content.
[0081] In some embodiments, the target recognition model can be prohibited from working while the prompt information is displayed, and the target recognition model continues to work after the content input by the user is below the character threshold.
[0082] In the embodiments of the present application, the decrease in user experience caused by the large data volume of the to-be-recognized content can be reduced.
[0083] In some embodiments of the present application, the classification result is a prediction probability value; and based on the classification result, it is determined whether the to-be-recognized content contains artificial intelligence generated content, including: In a case where the prediction probability value is in a first probability interval, a first label representing high similarity is added to the to-be-recognized content; in a case where the prediction probability value is in a second probability interval, a second label representing general similarity is added to the to-be-recognized content; and in a case where the prediction probability value is in a third probability interval, a third label representing dissimilarity is added to the to-be-recognized content. Among them, there is no overlapping interval between any two of the first probability interval, the second probability interval and the third probability interval.
[0084] It should be noted that the values of the first probability interval are all greater than the values of the second probability interval, and the values of the second probability interval are all greater than the values of the third probability interval. The specific division of the three probability intervals is not limited by the application. As long as the three satisfy the above relationship, it is acceptable. For example, the first probability interval is (90%, 100%], the second probability interval is [50%, 90%], and the third probability interval is [0, 50%].
[0085] In some embodiments, more probability intervals can also be divided, for example, four, five, or even more, and there is no overlapping interval between any two of the probability intervals. Moreover, each probability interval corresponds to a label, so that the prediction probability value is in which probability interval, only the corresponding label needs to be added, and more levels of output are achieved.
[0086] In some embodiments, there is no overlapping interval between any two of the first probability interval, the second probability interval, and the third probability interval. If the predicted probability value is in the overlapping interval, a target label corresponding to the probability interval containing the overlapping interval can be added to the to-be-identified content. For example, there are multiple probability intervals containing the overlapping interval, and one can be randomly selected, and the label corresponding thereto is taken as the target label.
[0087] In the embodiments of the present application, the output of the suspicious degree judgment can be graded, thereby providing the user with more detailed and more valuable judgment basis.
[0088] Based on the same principle as the method provided by the above-mentioned embodiments of the present application, according to another aspect of the present application, a model training method is provided, as shown in Figure 4 The method comprises: In step S401, training data is obtained.
[0089] In step S402, the training data is input into a target recognition model to be trained, text features of the training data are extracted through the target recognition model, and a classification result is obtained based on the text features. The text features include at least one of local syntax features representing the syntax situation in a single sentence and long-distance logical features representing the logical relationship between multiple sentences.
[0090] In step S403, the target recognition model is iteratively optimized based on the classification result.
[0091] It should be noted that the training data includes data required for training the target recognition model. The content of the training data is related to the training task. For example, the training task is to identify AIGC from the model input or to identify whether AIGC exists in the model input. Then, the training data includes human original data and AI text as positive and negative samples, respectively, for training of the target recognition model.
[0092] In some embodiments, the human original data in the training data includes artificially constructed text. For example, human original paper data. The AI text in the training data includes text generated by AIGC technology. For example, a paper generated by AIGC technology. In some embodiments, a "human-AI large model question and answer comparison corpus set" can also be collected from the network while dividing specific fields. The human corpus therein is taken as the human original data in the training data, and the AI large model generated corpus therein is taken as the AI text in the training data.
[0093] It can be understood that the processing process of the model for the model input is the same in the inference phase and the training phase. Therefore, the implementation process of the training phase S402 is the same as the implementation process of the above-mentioned inference phase S302, and the specific circumstances are described in relation to the above-mentioned S302, which will not be repeated here.
[0094] Based on the classification result, when iteratively optimizing the target recognition model, the classification result can be compared with the true result, and then the model loss can be calculated by using the loss function. Then, the model loss is used for back propagation to update the model parameters, so that the model parameters are iteratively optimized and the model performance is improved in the model training process.
[0095] In the embodiments of the present application, in the process of training the target recognition model, when the target recognition model processes the model input, the extracted text features contain local syntax features and / or long-distance logical features. Moreover, the local syntax features can represent the syntax situation in a single sentence, and there is a big difference between the artificial intelligence generated content and the human original content in this feature. The long-distance logical features can represent the logical relationship between multiple sentences, and there is also a big difference between the artificial intelligence generated content and the human original content in this feature. Therefore, the classification result obtained by the target recognition model based on such text features will be more accurate. Thus, the accuracy of the model in identifying artificial intelligence generated content is improved.
[0096] In some embodiments of the present application, obtaining training data comprises: obtaining artificial corpus created by human, extracting key information of the artificial corpus, the key information including: title, research field, keyword, and indication in the abstract information; generating artificial intelligence corpus according to the key information by the artificial intelligence model; using the artificial corpus and the artificial intelligence corpus as training data.
[0097] It should be noted that the artificial corpus includes but is not limited to the artificial original data in the above embodiments. For example, the real paper created by human. The artificial intelligence corpus includes but is not limited to the AI corpus in the above embodiments.
[0098] In some embodiments, when generating the AI corpus, a corpus with similar content to the artificial corpus can be generated. The prompt project can be generated based on the key information in the artificial corpus, and the corresponding AI corpus can be generated according to the prompt project. For example, a certain artificial corpus is a batch of titles "history of development of artificial intelligence", then the prompt project can be generated: please write a paper with the title "history of development of artificial intelligence". Similarly, the key information can also be at least one of the research field, keyword, and abstract information of the artificial corpus, which will not be listed one by one here.
[0099] The artificial intelligence model can be a large model using AIGC technology. For example, at least one of the existing Xinghuo large model, Wenxin Yiyang, and deepseek. In some embodiments, while labeling whether it is artificially created or AIGC, the large model used can also be labeled. After the model is trained, based on the output result of the target recognition model, it can not only be determined whether the model input exists AIGC, but also when AIGC exists, it can be determined which large model is used for the model input.
[0100] In the embodiments of the present application, the AI corpus can be generated based on the key information of the artificial corpus, so that the positive and negative samples are consistent in form and content as much as possible, thereby improving the efficiency of model training.
[0101] In some embodiments of the present application, the training data includes academic corpus and non-academic corpus. The academic corpus includes academic-related corpus, including but not limited to college graduation thesis, journal submission, scientific research report, etc. The non-academic corpus includes non-academic corpus unrelated to academics.
[0102] In some embodiments, the academic corpus includes academic artificial corpus and academic AI corpus. The non-academic corpus includes non-academic artificial corpus and non-academic AI corpus.
[0103] In some embodiments, the academic corpus includes at least two language edited corpora. For example, the academic corpus includes academic Chinese corpus and academic English corpus. Similarly, the non-academic corpus includes at least two language edited corpora. For example, the non-academic corpus includes non-academic Chinese corpus and non-academic English corpus.
[0104] In the embodiments of the present application, the characteristics of academic corpus and non-academic corpus can be targeted, and the method of feature extraction for different categories of data can also be trained respectively, enhancing the ability of the algorithm to capture and distinguish subtle differences in syntax and syntax features, and improving the accuracy of the final recognition result.
[0105] In some embodiments of the present application, obtaining training data further includes: The artificial intelligence model performs text polishing operations on the artificial corpus to generate artificial intelligence corpus. The text polishing operation includes at least one of word order adjustment and synonym replacement.
[0106] It should be noted that when the large model polishes the artificial original data, usually only the word order is adjusted and the synonym is replaced. Therefore, the polishing result is very close to the text before polishing. At this time, it is usually very difficult to identify the polishing result. For example, in a test, the identification accuracy of the HelloSimpleAI tool is significantly reduced when identifying the polishing result of the artificial original data. In order to enable the target identification model to cope with this situation, the embodiment will use the polished data as training data to improve the sensitivity of the target identification model to polishing operations.
[0107] In some embodiments, the text polishing operation further includes changing the sentence pattern. For example, changing the active sentence to the passive sentence, and changing the passive sentence to the active sentence. The text polishing operation further includes adding mood words for modification.
[0108] In the embodiments of the present application, the polished data will be used as training data, which can improve the sensitivity of the target identification model to polishing operations, so that the target identification model can cope with more use scenarios.
[0109] In some embodiments of the present application, the artificial intelligence corpus is generated by an artificial intelligence model according to the key information, including: The artificial intelligence corpus is generated by the artificial intelligence model according to the key information every target time length.
[0110] It should be noted that the artificial intelligence model will be updated regularly or irregularly, and as it is continuously updated, the corpus generated by it is more and more close to the artificial original data. In order to ensure that the performance of the target identification model remains in a good state, the embodiment will regularly or irregularly supplement the training of the target identification model. For example, the target identification model is supplemented and trained once by the artificial intelligence corpus obtained this time every time the artificial intelligence corpus is obtained.
[0111] In some embodiments, the artificial intelligence corpus can be generated once after receiving the notification that the artificial intelligence model is updated.
[0112] In the embodiments of the present application, the artificial intelligence corpus can be updated regularly, so as to supplement the training of the target identification model regularly or irregularly, so that the performance of the target identification model remains in a good state.
[0113] In some embodiments of the present application, the target identification model includes a first feature extraction module and a second feature extraction module. The text features of the training data are extracted by the target identification model, including: The local syntax features are generated by processing the training data through the first feature extraction module. The second feature extraction module is used for processing the training data to generate long-distance logical features.
[0114] It should be noted that the processing of the model input is the same in the inference stage and the training stage. Therefore, the content of the first feature extraction module and the second feature extraction module in the training stage can be referred to the related description of the first feature extraction module and the second feature extraction module in the inference stage embodiment described above, which will not be repeated here.
[0115] In some embodiments of the present application, the target recognition model includes a first classification module and a second classification module constructed by different neural networks, and the classification result is obtained based on the text features, including: The first classification module is used for processing the text features to obtain a first classification result; The second classification module is used for processing the text features to obtain a second classification result; According to the first classification result and the second classification result, a comprehensive classification result is obtained.
[0116] It should be noted that the processing of the model input is the same in the inference stage and the training stage. Therefore, the content of the first classification module and the second classification module in the training stage can be referred to the related description of the first classification module and the second classification module in the inference stage embodiment described above, which will not be repeated here.
[0117] In some embodiments of the present application, the classification result accuracy of the first classification module for long text is higher than that of the second classification module; and / or The classification result accuracy of the second classification module for non-long text is higher than that of the first classification module.
[0118] It should be noted that the processing of the model input is the same in the inference stage and the training stage. Therefore, the content of the first classification module and the second classification module in the training stage can be referred to the related description of the first classification module and the second classification module in the inference stage embodiment described above, which will not be repeated here.
[0119] In some embodiments of the present application, according to the first classification result and the second classification result, a comprehensive classification result is obtained, including: The first classification result and the second classification result are fused according to an integration strategy to obtain a comprehensive classification result; The integration strategy includes any one of a weighted average strategy, a voting strategy, and a meta-classifier strategy.
[0120] It should be noted that the model has the same processing process for model input in the inference stage and the training stage. Therefore, the process of obtaining a comprehensive classification result in the training stage can refer to the related description of the process of obtaining a comprehensive classification result in the inference stage embodiment described above, which will not be repeated here.
[0121] In some embodiments of the present application, before the training data is input into the target recognition model to be trained, the method further comprises: According to the target sequence length m, each sample in the training data is split into a plurality of split texts; wherein the value of the target sequence length m is positively correlated with the number of characters of the sample; The split text is input into the target recognition model as a sample of the training data.
[0122] In some embodiments of the present application, any adjacent split text in the plurality of split texts is separated by a punctuation mark in the text to be recognized.
[0123] For ease of understanding, the artificial intelligence generated content recognition method and model training method provided by the present application are exemplarily described below. As shown in Figure 5 First, the academic text is collected. For example, real academic text can be extracted from public papers and databases, and basic preprocessing (including format conversion, removal of chart symbols, etc.) is performed, which is used as a contrast sample source for subsequent artificial corpus construction and AI corpus generation.
[0124] S501, extract the key information of the academic text to obtain the paper title, research field and other contents. For example, structured information such as paper title, research field, keywords, abstract paragraph can be automatically extracted from the academic text as the input basis of the prompt engineering.
[0125] S502, generate AI text by means of AI model. For example, a plurality of mainstream AIGC large models (such as deepseek, Wenxin Yanyan, Tongyi Qianwen, Xinghuo, etc.) can be called to generate AI text combined with prompt engineering and original academic content structure. By covering the output styles of multiple AI models, the diversity and adversarialness of AIGC corpus can be enhanced.
[0126] S503, respectively, the AI text and academic text are cleaned to obtain AIGC corpus and artificial corpus. The AIGC corpus and the artificial corpus are used as positive and negative samples for model training, and the classification model is trained. For example, the training samples can be labeled or labeled. The most basic label can be: ai and human, two choices, the former represents AI creation data, and the latter represents artificial original data. In addition, according to different training data, there can also be a label of data source, for example, paper and news, two choices, the former represents academic papers, and the latter represents news; On this basis, there can also be a composite label, such as ai_paper, human_news and the like.
[0127] S504, in the training process of the classification model, the effect is evaluated, and the prompt engineering for improving the AIGC corpus is obtained. The prompt engineering is input into the AI model to update the AIGC corpus.
[0128] S505, the new AI text is obtained by polishing the artificial corpus through the AI model, and the classification model is supplemented by using the new AI text.
[0129] It should be noted that in the process of model training and supplementary training combined with artificial corpus, AIGC corpus and new AI text, the model performance is continuously iterated and optimized through result feedback.
[0130] S506, after obtaining the trained classification model, when a new academic text is input, it is preferred to be cleaned and merged to obtain multiple text segments. For example, through paragraph cleaning, sentence merging and semantic segmentation, the structural consistency and expression integrity before inputting into the classification model can be ensured.
[0131] S507, after the text segment is input into the classification model, the classification model will output the result, and the user can judge whether there is AIGC in the new academic text or whether there is content generated by using AIGC technology through the output result.
[0132] It should be noted that the classification model can adopt the architecture of "double-channel feature extraction + double-mixed model classification".
[0133] For example, for the double-channel feature extraction part, the CNN+BiLSTM double-channel deep learning structure of convolutional neural network-bidirectional long short-term memory network (CNN-BiLSTM-Attention) with fusion attention mechanism can be used to extract text features. Combined with local syntax pattern extraction and long distance dependence modeling.
[0134] Based on the constructed CNN+BiLSTM dual-channel feature extraction part, local syntax features (such as misuse of articles, abnormal collocation) and long-distance dependency relationships (such as cause-effect inversion, theme drift) can be captured simultaneously. In the vector modeling process, sentence vector normalization processing and context window comparison mechanisms can also be introduced to enhance the ability to identify the potential generation strategies of AIGC text.
[0135] For example, for the dual hybrid model classification part, RoBERTa and Longformer dual hybrid models are used for AIGC content classification, and an adversarial sample training mechanism is introduced to improve the robustness of text polishing operations, outputting a hierarchical suspicious judgment result (high similarity, general similarity, and dissimilarity), significantly enhancing the explainability and actual review adaptability of the system.
[0136] RoBERTa and Longformer dual hybrid models are used for AIGC content classification, combined with soft classification thresholds and multi-scale detection results, to segment and judge the text and output three suspicious level labels: high similarity, general similarity, and dissimilarity. This hierarchical standard supports rapid screening and manual review for editors, and has good explainability and operability.
[0137] The final detection result is output as a detection report through a visual method, including the suspicious probability of each text segment, the scoring weight of the corresponding model, and possible semantic anomaly annotations.
[0138] In some embodiments, user feedback can be embedded into the training process to iteratively fine-tune model parameters and improve the detection capabilities of subsequent version models in specific fields (such as medicine, law, education, etc.).
[0139] Based on the same principles as the artificial intelligence generated content recognition method provided by the embodiments of the present application, the embodiments of the present application also provide an artificial intelligence generated content recognition device, as shown in Figure 6 The device includes: A first acquisition module 601 is configured to acquire the content to be identified. A model recognition module 602 is configured to input the content to be identified into a target recognition model, extract text features of the content to be identified through the target recognition model, and obtain a classification result based on the text features. The target recognition model is configured to output a classification result indicating whether the model input contains artificial intelligence generated content. The text features include at least one of local syntax features representing the syntax of a single sentence and long-distance logical features representing the logical relationship between multiple sentences. A determination module 603 is configured to determine whether the content to be identified contains artificial intelligence generated content based on the classification result.
[0140] The artificial intelligence generated content identification device provided in the embodiment of the application can realize Figure 3 The various processes realized in the method embodiment are not repeated here to avoid repetition.
[0141] Optionally, the target identification model includes a first feature extraction module and a second feature extraction module; the model identification module 602 includes: A first identification unit configured to process the content to be identified by the first feature extraction module to generate local syntax features; A second identification unit configured to process the content to be identified by the second feature extraction module to generate long-distance logical features.
[0142] Optionally, the target identification model includes a first classification module and a second classification module constructed using different neural networks; the model identification module 602 includes: A first classification unit configured to process the text features by the first classification module to obtain a first classification result; A second classification unit configured to process the text features by the second classification module to obtain a second classification result; A comprehensive processing unit configured to obtain a comprehensive classification result according to the first classification result and the second classification result.
[0143] Optionally, the classification result accuracy of the first classification module for long text is higher than that of the second classification module; and / or The classification result accuracy of the second classification module for non-long text is higher than that of the first classification module.
[0144] Optionally, the comprehensive processing unit is specifically configured to fuse the first classification result and the second classification result according to an integration strategy to obtain the comprehensive classification result; and the integration strategy includes any one of a weighted average strategy, a voting strategy, and a meta-classifier strategy.
[0145] Optionally, the first acquisition module 601 includes: A first acquisition unit configured to acquire the text to be identified; A splitting unit configured to split the text to be identified into a plurality of split texts according to a target sequence length m; and the value of the target sequence length m is positively correlated with the number of characters of the text to be identified; A determination unit configured to determine the split texts as the content to be identified.
[0146] Optionally, any adjacent split texts in the plurality of split texts are separated by punctuation marks in the text to be identified.
[0147] Optionally, the device further includes: The prompt module is used to display a prompt message when the number of characters in the content to be recognized exceeds the character threshold. The prompt message is used to indicate that the input content is too long.
[0148] Optionally, the classification result is a predicted probability value; The determination module 603 is specifically configured to: When the predicted probability value is within the first probability interval, adding a first label representing a high similarity to the content to be identified; When the predicted probability value is within the second probability interval, adding a second label representing general similarity to the content to be identified; When the predicted probability value is within the third probability interval, adding a third label representing dissimilarity to the content to be identified; There is no overlapping interval between any two of the first probability interval, the second probability interval, and the third probability interval.
[0149] The device for identifying artificial intelligence-generated content in the embodiment of the present application can execute the method for identifying artificial intelligence-generated content provided in the embodiment of the present application. The implementation principles are similar. The actions performed by each module and unit in the device for identifying artificial intelligence-generated content in each embodiment of the present application correspond to the steps in the method for identifying artificial intelligence-generated content in each embodiment of the present application. For the detailed functional description of each module of the device for identifying artificial intelligence-generated content, please refer to the description of the corresponding method for identifying artificial intelligence-generated content shown in the previous text, and will not be repeated here.
[0150] Based on the same principle as the model training method provided in the embodiment of the present application, the embodiment of the present application also provides a model training device, such as Figure 7 As shown, the device includes: The second acquisition module 701 is used to acquire training data; A training module 702 is configured to input training data into a target recognition model to be trained, extract text features of the training data through the target recognition model, and obtain classification results based on the text features; The text features include at least one of: a local grammatical feature representing a grammatical situation in a single sentence, and a long-distance logical feature representing a logical relationship between multiple sentences; The iteration module 703 is used to iteratively optimize the target recognition model based on the classification result.
[0151] The model training device provided in the embodiment of the present application can achieve Figure 4 To avoid repetition, the various processes implemented in the method embodiment will not be described again here.
[0152] Optionally, the second acquisition module 701 is specifically configured to: acquire an artificial corpus of human creation, extract key information of the artificial corpus, the key information including: a title, a research field, keywords, and an indication in abstract information; generate an artificial intelligence corpus according to the key information by an artificial intelligence model; use the artificial corpus and the artificial intelligence corpus as training data.
[0153] Optionally, the second acquisition module 701 is further configured to: perform a text polishing operation on the artificial corpus by the artificial intelligence model to generate the artificial intelligence corpus; wherein the text polishing operation includes at least one of: word order adjustment, and synonym replacement.
[0154] Optionally, the second acquisition module 701 is specifically configured to generate the artificial intelligence corpus according to the key information by the artificial intelligence model every target time length.
[0155] Optionally, the training data includes academic corpus and non-academic corpus.
[0156] Optionally, the target recognition model includes a first feature extraction module and a second feature extraction module. The training module 702 is specifically configured to: process the training data by the first feature extraction module to generate local syntax features; process the training data by the second feature extraction module to generate long-distance logical features.
[0157] Optionally, the target recognition model includes a first classification module and a second classification module constructed by different neural networks, and the training module 702 is specifically configured to: process the text features by the first classification module to obtain a first classification result; process the text features by the second classification module to obtain a second classification result; obtain a comprehensive classification result according to the first classification result and the second classification result.
[0158] Optionally, the classification result accuracy of the first classification module for long text is higher than that of the second classification module; and / or the classification result accuracy of the second classification module for non-long text is higher than that of the first classification module.
[0159] Optionally, the training module 702 is specifically configured to fuse the first classification result and the second classification result according to an integration strategy to obtain the comprehensive classification result; wherein the integration strategy includes any one of: a weighted average strategy, a voting strategy, and a meta-classifier strategy.
[0160] The model training apparatus in the embodiments of the present application can execute the model training method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module and unit in the model training apparatus in the embodiments of the present application correspond to the steps in the model training method in the embodiments of the present application. For the detailed functions of each module of the model training apparatus, refer to the description of the corresponding model training method in the foregoing, which will not be repeated here.
[0161] Based on the same principle as the method shown in the embodiments of the present application, the embodiments of the present application also provide an electronic device, which can include but is not limited to: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the identification method of the artificial intelligence generated content or the model training method shown in any optional embodiment of the present application by calling the computer program. Compared with the prior art, the identification method of the artificial intelligence generated content provided by the present application inputs the to-be-identified content into the target identification model. Since the target identification model is used to output a classification result indicating whether there is artificial intelligence generated content in the model input, the classification result can be obtained through the processing of the target identification model. Further, based on the classification result, it can be determined whether there is artificial intelligence generated content in the to-be-identified content. Since the text features extracted by the target identification model during processing of the to-be-identified content include local syntax features and / or long-distance logical features. And the local syntax features can represent the syntax situation in a single sentence, and there is a big difference between the artificial intelligence generated content and the artificial original content in this feature. The long-distance logical features can represent the logical relationship between multiple sentences, and there is also a big difference between the artificial intelligence generated content and the artificial original content in this feature. Therefore, the classification result obtained by the target identification model based on such text features will be more accurate. Thus, the accuracy of the model in identifying artificial intelligence generated content is improved.
[0162] The model training method provided by the present application, in the process of training the target identification model, since the text features extracted by the target identification model when processing the model input include local syntax features and / or long-distance logical features. And the local syntax features can represent the syntax situation in a single sentence, and there is a big difference between the artificial intelligence generated content and the artificial original content in this feature. The long-distance logical features can represent the logical relationship between multiple sentences, and there is also a big difference between the artificial intelligence generated content and the artificial original content in this feature. Therefore, the classification result obtained by the target identification model based on such text features will be more accurate. Thus, the accuracy of the model in identifying artificial intelligence generated content is improved.
[0163] In one optional embodiment, an electronic device is also provided, as shown in Figure 8 Figure 8 The electronic device 8000 shown includes a processor 8001 and a memory 8003. The processor 8001 and the memory 8003 are connected, for example, via a bus 8002. Optionally, the electronic device 8000 can also include a transceiver 8004, which can be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that the transceiver 8004 is not limited to one in actual application, and the structure of the electronic device 8000 does not constitute a limitation on the embodiments of the present application.
[0164] The processor 8001 can be a CPU (Central Processing Unit, central processor), a general-purpose processor, a DSP (Digital Signal Processor, data signal processor), an ASIC (Application Specific Integrated Circuit, application specific integrated circuit), an FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logical blocks, modules and circuits described in combination with the disclosure. The processor 8001 can also be a combination of computing functions, such as one or more microprocessor combinations, combinations of DSP and microprocessor, etc.
[0165] The bus 8002 can include a channel for transmitting information between the above-mentioned components. The bus 8002 can be a PCI (Peripheral Component Interconnect, peripheral component interconnect) bus or an EISA (Extended Industry Standard Architecture, extended industry standard architecture) bus, etc. The bus 8002 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the middle, but it does not mean that there is only one bus or only one type of bus.
[0166] The memory 8003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions; a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions; an EEPROM (Electrically Erasable Programmable Read-Only Memory), a CD-ROM (Compact Disc Read-Only Memory) or other optical disc storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing computer instructions and capable of being read by a computer, without limitation.
[0167] The memory 8003 is used to store a computer program for implementing the embodiments of the present application, and is controlled by the processor 8001 to perform. The processor 8001 is used to execute the computer program stored in the memory 8003 to implement the steps shown in the foregoing method embodiments.
[0168] The electronic device includes, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal Digital Assistant), a PAD (Tablet Personal Computer), a PMP (Portable Multimedia Player), a car terminal (for example, a car navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. Figure 8 The electronic device shown is merely an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.
[0169] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the steps and corresponding content of the foregoing method embodiments.
[0170] The embodiments of the present application also provide a computer program product, and the computer program product includes a computer program. The computer program is executed by a processor to implement the steps and corresponding content of the foregoing method embodiments.
[0171] The terms "first", "second", "third", "fourth", "1", "2", and the like (if any) in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described.
[0172] It should be understood that although each operation step in the flowchart of the embodiments of the present application is indicated by an arrow, the implementation order of the steps is not limited to the order indicated by the arrow. Unless explicitly stated herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders as required. In addition, part or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on the actual implementation scenario. Part or all of the sub-steps or stages can be executed at the same time, and each of the sub-steps or stages can also be executed at different times. In the scenario where the execution times are different, the execution order of the sub-steps or stages can be flexibly configured as required, and the embodiments of the present application do not limit this.
[0173] The above is only an optional implementation of some implementation scenarios of the present application. It should be pointed out that, for ordinary skilled persons in the technical field, other similar implementation means based on the technical idea of the present application without departing from the technical concept of the present application also belong to the protection scope of the embodiments of the present application.
Claims
1. A method for identifying artificial intelligence generated content, characterized in that: The method comprises: Obtain the content to be identified; Inputting the content to be identified into a target recognition model, extracting text features of the content to be identified through the target recognition model, and obtaining a classification result based on the text features; The target recognition model is used to output: a classification result indicating whether there is AI-generated content in the model input; The text features include: at least one of: a local grammatical feature representing a grammatical situation in a single sentence, and a long-distance logical feature representing a logical relationship between multiple sentences; Based on the classification result, determine whether there is artificial intelligence generated content in the content to be identified.
2. The method for identifying artificial intelligence-generated content according to claim 1, wherein: The target recognition model includes a first feature extraction module and a second feature extraction module; Extracting text features of the content to be identified by the target recognition model includes: Processing the content to be recognized by the first feature extraction module to generate the local grammatical features; The content to be identified is processed by the second feature extraction module to generate the long-distance logical feature.
3. The method for identifying artificial intelligence-generated content according to claim 1, wherein: The target recognition model includes a first classification module and a second classification module constructed using different neural networks, and the classification result obtained based on the text features includes: Processing the text features by the first classification module to obtain a first classification result; Processing the text features by the second classification module to obtain a second classification result; According to the first classification result and the second classification result, a comprehensive classification result is obtained.
4. The method for identifying artificial intelligence-generated content according to claim 3, wherein: The first classification module has a higher classification accuracy for long texts than the second classification module; and / or The second classification module has a higher classification accuracy for non-long texts than the first classification module.
5. The method for identifying artificial intelligence-generated content according to claim 3 or 4, characterized in that: According to the first classification results and the second classification results, the comprehensive classification results are obtained, including: The first classification result and the second classification result are integrated according to the integration strategy to obtain a comprehensive classification result; The integration strategy includes any one of a weighted average strategy, a voting strategy and a meta-classifier strategy.
6. The method for identifying artificial intelligence-generated content according to claim 1, wherein: The obtaining of the content to be identified includes: Get the text to be recognized; Splitting the text to be recognized into multiple split texts according to a target sequence length m; wherein the value of the target sequence length m is positively correlated with the number of characters in the text to be recognized; The split text is determined as the content to be identified.
7. The method for identifying artificial intelligence generated content according to claim 6, wherein: Any adjacent split texts among the multiple split texts are separated by punctuation marks in the text to be recognized.
8. The method for identifying artificial intelligence generated content according to claim 1, wherein: After obtaining the content to be identified, the method further includes: When the number of characters in the content to be recognized exceeds a character threshold, a prompt message is displayed, where the prompt message is used to prompt that the input content is too long.
9. The method for identifying artificial intelligence generated content according to claim 1, wherein: The classification result is a predicted probability value; Determining whether there is AI-generated content in the content to be identified based on the classification result includes: When the predicted probability value is within a first probability interval, adding a first label representing high similarity to the content to be identified; When the predicted probability value is within a second probability interval, adding a second label representing general similarity to the content to be identified; When the predicted probability value is within a third probability interval, adding a third label representing dissimilarity to the content to be identified; There is no overlapping interval between any two of the first probability interval, the second probability interval and the third probability interval.
10. A model training method, characterized in that: The method comprises: Get training data; Inputting the training data into the target recognition model to be trained, extracting text features of the training data through the target recognition model, and obtaining a classification result based on the text features; The text features include at least one of: a local grammatical feature representing a grammatical situation in a single sentence, and a long-distance logical feature representing a logical relationship between multiple sentences; Based on the classification result, the target recognition model is iteratively optimized.
11. The model training method according to claim 10, characterized in that: The acquiring of training data comprises: Get artificial language materials created by humans, Extracting key information of the artificial corpus, wherein the key information includes: title, research field, keywords, and an indication in the abstract information; Generate artificial intelligence corpus based on the key information through an artificial intelligence model; The artificial corpus and the artificial intelligence corpus are used as training data.
12. The model training method according to claim 11, characterized in that: The acquiring of training data further comprises: The artificial corpus is subjected to a text polishing operation through an artificial intelligence model to generate artificial intelligence corpus; wherein the text polishing operation includes: at least one of word reordering and synonym replacement.
13. The model training method according to claim 11, characterized in that: The generating of artificial intelligence corpus according to the key information by using an artificial intelligence model includes: The artificial intelligence corpus is generated once every target time period based on the key information through the artificial intelligence model.
14. The model training method according to claim 10, characterized in that: The training data includes academic corpus and non-academic corpus.
15. The model training method according to any one of claims 10 to 14, characterized in that: The target recognition model includes a first feature extraction module and a second feature extraction module; Extracting text features of the training data using the object recognition model includes: Processing the training data by the first feature extraction module to generate the local grammatical features; The training data is processed by the second feature extraction module to generate the long-distance logical feature.
16. The model training method according to any one of claims 10 to 14, characterized in that: The target recognition model includes a first classification module and a second classification module constructed using different neural networks, and the classification result obtained based on the text features includes: Processing the text features by the first classification module to obtain a first classification result; Processing the text features by the second classification module to obtain a second classification result; According to the first classification result and the second classification result, a comprehensive classification result is obtained.
17. The model training method according to claim 16, characterized in that: The first classification module has a higher classification accuracy for long texts than the second classification module; and / or The second classification module has a higher classification accuracy for non-long texts than the first classification module.
18. The model training method according to claim 16, characterized in that: According to the first classification results and the second classification results, the comprehensive classification results are obtained, including: The first classification result and the second classification result are integrated according to the integration strategy to obtain a comprehensive classification result; The integration strategy includes any one of a weighted average strategy, a voting strategy and a meta-classifier strategy.
19. A device for identifying artificial intelligence generated content, characterized in that: The device comprises: A first acquisition module is used to acquire content to be identified; A model recognition module is used to input the content to be recognized into a target recognition model, extract text features of the content to be recognized through the target recognition model, and obtain a classification result based on the text features; The target recognition model is used to output: a classification result indicating whether there is AI-generated content in the model input; The text features include: at least one of: a local grammatical feature representing a grammatical situation in a single sentence, and a long-distance logical feature representing a logical relationship between multiple sentences; A determination module is used to determine whether there is artificial intelligence generated content in the content to be identified based on the classification result.
20. A model training device, characterized in that: The device comprises: A second acquisition module is used to acquire training data; A training module, configured to input the training data into a target recognition model to be trained, extract text features of the training data through the target recognition model, and obtain a classification result based on the text features; The text features include at least one of: a local grammatical feature representing a grammatical situation in a single sentence, and a long-distance logical feature representing a logical relationship between multiple sentences; An iterative module is used to iteratively optimize the target recognition model based on the classification result.
21. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for recognizing artificial intelligence-generated content described in any one of claims 1 to 9 or the model training method described in any one of claims 10 to 18 is implemented.
22. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for identifying artificial intelligence-generated content described in any one of claims 1 to 9 or the model training method described in any one of claims 10 to 18.
23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the method for identifying artificial intelligence-generated content described in any one of claims 1 to 9 or the model training method described in any one of claims 10 to 18.
Citation Information
Patent Citations
Method and device for identifying phishing website
CN102279875A
Intention recognition method, electronic equipment and storage medium
CN116628202A
Text prediction method and device, equipment and storage medium
CN116975199A
Document generation method and device based on artificial intelligence
CN117992601A
Detection method for paper generated by artificial intelligence and related device
CN120218085A