Artificial intelligence content detection method and device, electronic equipment and storage medium

By querying feature similarity and perplexity data from external data sources, the problem of the inability to identify low-quality AI-generated content in existing technologies has been solved, enabling effective management and quality improvement of forum platform content.

CN116881728BActive Publication Date: 2026-05-01SHANGHAI SHIZHUANG INFORMATION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SHIZHUANG INFORMATION TECHNOLOGY CO LTD
Filing Date
2023-06-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing risk control and governance methods are unable to effectively identify and manage low-quality content created using artificial intelligence, such as the theft of others' content, leading to a decline in the quality of content on forum platforms.

Method used

By obtaining the query results of the text to be detected in the target external data source, and using feature similarity data and perplexity data, it is determined whether the text to be detected is low-quality AI-generated content. This includes text feature extraction, perplexity calculation and similarity analysis, and setting similarity and perplexity thresholds to determine whether the content is AI-generated content.

Benefits of technology

It has achieved effective risk control management of low-quality AI-generated content, improving the quality and authenticity of content on the forum platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116881728B_ABST
    Figure CN116881728B_ABST
Patent Text Reader

Abstract

The application provides an artificial intelligence content detection method and device, electronic equipment and storage medium. The method comprises the following steps: obtaining a query result of a to-be-detected text in a target external data source; the target external data source is used for connecting a target external database; text feature extraction is performed on the to-be-detected text and the query result respectively to obtain a to-be-detected text vector and a query result vector; text perplexity data is obtained according to the to-be-detected text vector; feature similarity data is obtained according to the to-be-detected text vector and the query result vector; an artificial intelligence content detection result is obtained based on the feature similarity data and the text perplexity data; the artificial intelligence content detection result is used for representing whether the to-be-detected text is artificial intelligence created content. Based on the characteristics of the artificial intelligence created content, the relationship between the reverse reasoning perplexity and the artificial intelligence created content is inferred, and the feature similarity data and the perplexity data are used to determine whether the text is low-quality artificial intelligence created content.
Need to check novelty before this filing date? Find Prior Art

Description

Artificial intelligence content detection methods, devices, electronic equipment and storage media Technical Field

[0001] This application relates to the field of data processing technology, and more specifically, to an artificial intelligence content detection method, apparatus, electronic device, and storage medium. Background Technology

[0002] With the development of internet technology, the internet has been widely used in various industries, becoming an indispensable tool in people's work and life. However, this has also brought some hidden dangers, such as the potential presence of non-compliant content on various websites and forums. Current risk control methods can only identify or detect illegal content such as pornography, terrorism, and political content. They cannot effectively control other low-quality content, such as content created using artificial intelligence or content stolen from others. Summary of the Invention

[0003] The purpose of this invention is to provide an artificial intelligence content detection method, apparatus, electronic device, and storage medium. This method utilizes the text to be detected to scan and detect data from a target external data source, obtaining query results. By calculating the feature similarity data between the content to be detected and the query results, as well as the perplexity data of the text to be detected, the method uses the feature similarity data and perplexity data to determine whether the text to be detected is low-quality AI-generated content, thereby achieving risk control and management of AI-generated content.

[0004] In a first aspect, embodiments of this application provide an artificial intelligence content detection method, comprising: obtaining query results of the text to be detected in a target external data source; the target external data source is used to connect to a target external database; extracting text features from the text to be detected and the query results respectively to obtain a text vector to be detected and a query result vector; obtaining text perplexity data based on the text vector to be detected; obtaining feature similarity data based on the text vector to be detected and the query result vector; obtaining an artificial intelligence content detection result based on the feature similarity data and the text perplexity data; the artificial intelligence content detection result is used to characterize whether the text to be detected is content created by artificial intelligence.

[0005] In the above implementation process, the text to be detected is queried in the target external data source to obtain query results. Based on the characteristics of AI-generated content, the relationship between perplexity and AI-generated content is inferred in reverse. By using the feature similarity data between the text to be detected and the query results, as well as the perplexity data of the text to be detected, it is possible to determine whether the text to be detected is low-quality AI-generated content, effectively conduct AI-generated content risk control management, and improve the quality of content on the forum platform.

[0006] Optionally, in this embodiment, the text vector to be detected includes a sequence of text words; obtaining text perplexity data based on the text vector to be detected includes: obtaining the probability of the text to be detected based on the sequence of text words using a perplexity algorithm; and performing a geometric average on the probability of the text to be detected based on the number of text word sequences to obtain text perplexity data.

[0007] In the above implementation process, the probability of the text to be detected is obtained based on the text word sequence, and the probability of the text to be detected is geometrically averaged to reduce the impact of the number of sentence text word sequences on the calculation results, thereby obtaining more accurate text perplexity data and improving the accuracy of judging whether the text to be detected is low-quality AI-generated content based on the text perplexity data.

[0008] Optionally, in this embodiment, the perplexity algorithm includes a word sequence frequency algorithm or a topic algorithm; the probability of the text to be detected is obtained based on the text word sequence using the perplexity algorithm, including: obtaining the text word sequence probability corresponding to each text word sequence using the word sequence frequency algorithm or the topic algorithm; and summing the probabilities of each text word sequence to obtain the probability of the text to be detected.

[0009] In the above implementation process, the probability of each text word sequence is calculated by the occurrence probability of each text word sequence in the text to be detected, or the topic of the text to be detected, so as to obtain the probability of the text to be detected and thus obtain more accurate text perplexity data.

[0010] Optionally, in this embodiment of the application, obtaining the query results of the text to be detected in the target external data source includes: obtaining the business scenario of the text to be detected; determining the target external data source corresponding to the text to be detected in the external data source according to the business scenario of the text to be detected; and scanning and querying the text to be detected in the target external data source based on preset query parameters to obtain the query results.

[0011] In the above implementation process, the target external data source to be scanned is determined according to the pre-configured business scenario, and the data scanning is more accurate to obtain query results that are more similar to the text to be detected. There is no need to scan all external sites, reducing computing power and improving task execution efficiency while ensuring the accuracy of query results.

[0012] Optionally, in this embodiment of the application, obtaining the AI ​​content detection result based on feature similarity data and text perplexity data includes: determining whether the similarity data meets a first preset condition based on the similarity data and a preset similarity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and a preset perplexity threshold; if the similarity data meets the first preset condition and / or the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

[0013] In the above implementation process, based on the preset similarity threshold and perplexity threshold, it is determined whether the similarity data and text perplexity data meet the corresponding preset conditions, thereby improving the accuracy of the AI ​​content detection results.

[0014] Optionally, in this embodiment, the perplexity threshold includes a first perplexity threshold and a second perplexity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and the preset perplexity threshold includes: if the text perplexity data is not greater than the first perplexity threshold, then the text perplexity data meets the second preset condition; if the text perplexity data is greater than the first perplexity threshold and less than the second perplexity threshold, then determining whether the text perplexity data meets the second preset condition based on similarity data; if the text perplexity data is not less than the second perplexity threshold, then the text perplexity data does not meet the second preset condition.

[0015] In the above implementation process, the perplexity threshold includes a first perplexity threshold and a second perplexity threshold. By setting two perplexity thresholds and using similarity data for secondary judgment, the AI ​​content detection results obtained through perplexity data are made more accurate.

[0016] Optionally, in this embodiment of the application, before obtaining the query results of the text to be detected in the target external data source, the method further includes: performing text filtering processing on the text to be detected to filter out the non-text parts in the text to be detected and obtaining filtered text; performing word segmentation on the filtered text to obtain text segmentation results; performing stemming standardization and part-of-speech standardization on the text segmentation results to obtain standardized text; obtaining the query results of the text to be detected in the target external data source includes: obtaining the query results of standardized text in the target external data source.

[0017] In the above implementation process, the text to be detected and the query results are first subjected to text semantic analysis, and then filtered, segmented, cleaned and standardized. Finally, feature processing is performed to realize the representation of the language structure using the semantic structure of sentences.

[0018] Secondly, embodiments of this application also provide an artificial intelligence content detection device, comprising: a query module for obtaining query results of the text to be detected in a target external data source; the target external data source is used to connect to a target external database; a feature extraction module for extracting text features from the text to be detected and the query results respectively, to obtain a text vector to be detected and a query result vector; a perplexity module for obtaining text perplexity data based on the text vector to be detected; a similarity module for obtaining feature similarity data based on the text vector to be detected and the query result vector; and a detection module for obtaining an artificial intelligence content detection result based on the feature similarity data and the text perplexity data; the artificial intelligence content detection result is used to characterize whether the text to be detected is content created by artificial intelligence.

[0019] Thirdly, embodiments of this application also provide an electronic device, including: a processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the method described above.

[0020] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the methods described above.

[0021] This application utilizes the AI-generated content detection method, apparatus, electronic device, and storage medium provided. The method queries the text to be detected against a target external data source to obtain query results. Based on the characteristics of AI-generated content, it reverse-engineers the relationship between perplexity and AI-generated content. By using the feature similarity data between the text to be detected and the query results, as well as the perplexity data of the text to be detected, it determines whether the text to be detected is low-quality AI-generated content. This effectively manages the risk of AI-generated content creation and improves the quality of content on forum platforms. Attached Figure Description

[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 is a flowchart illustrating an artificial intelligence content detection method provided in an embodiment of this application;

[0024] Figure 2 is a flowchart illustrating the standardized text provided in an embodiment of this application.

[0025] Figure 3 is a schematic diagram of the machine production process provided in an embodiment of this application;

[0026] Figure 4 is a schematic diagram of the artificial intelligence content detection system provided in an embodiment of this application;

[0027] Figure 5 is a schematic diagram of the page configuration provided in an embodiment of this application;

[0028] Figure 6 is a schematic diagram of the structure of the artificial intelligence content detection device provided in the embodiment of this application;

[0029] Figure 7 is a schematic diagram of the structure of the electronic device provided in the embodiment of this application. Detailed Implementation

[0030] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this application.

[0032] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.

[0033] With the development of network communication technology, people can easily express their comments on current hot topics through various social media platforms. To prevent illegal individuals from spreading harmful content, some risk control and management measures are taken. Current risk control and management measures usually target or detect illegal content such as pornography, terrorism, and political content.

[0034] In some application scenarios, users are required to express their genuine opinions or write articles. However, some users may publish plagiarized content or AIGC (AI-generated content). This can lead to issues such as the theft of others' intellectual property or the publication of excessive low-quality AIGC content, which is detrimental to the healthy development of the platform. Therefore, for user comments in this scenario, it is necessary not only to detect illegal content but also to further detect whether the content is plagiarized or AIGC.

[0035] However, existing technologies do not have effective prevention and control methods for the above situation. This application provides an artificial intelligence content detection method, device, electronic device and storage medium, which uses feature similarity data and perplexity data of the text to be detected to determine whether it is plagiarized content or AIGC content, so as to achieve effective risk control and management of low-quality content.

[0036] Please refer to Figure 1 for a flowchart illustrating an AI content detection method provided in this application embodiment. The AI ​​content detection method provided in this application embodiment can be applied to electronic devices, which may include a terminal and a server; specifically, the terminal may be a smartphone, tablet computer, computer, personal digital assistant (PDA), etc.; the server may be an application server or a web server. The AI ​​content detection method may include:

[0037] Step S110: Obtain the query results of the text to be detected in the target external data source; the target external data source is used to connect to the target external database.

[0038] Step S120: Extract text features from the text to be detected and the query results respectively to obtain the vector of the text to be detected and the vector of the query results.

[0039] Step S130: Obtain text perplexity data based on the text vector to be detected.

[0040] Step S140: Obtain feature similarity data based on the text vector to be detected and the query result vector.

[0041] Step S150: Based on feature similarity data and text perplexity data, obtain AI content detection results; AI content detection results are used to characterize whether the text to be detected is AI-generated content.

[0042] In step S110, the text to be detected is the text that needs to undergo AI content detection, such as user comments on a community dynamics platform. To ensure that user comments on the community dynamics platform objectively reflect the attributes of the commented-on object and the user's true feelings, so that other users can obtain authentic information from the comment section, AI content detection is required for user comments. This helps prevent user comments from being copied content from other platforms or generated by AI models, thereby improving the authenticity of the comment section and the quality of the comment content.

[0043] The text to be detected can be obtained by using offline tasks based on big data to periodically pull data from the upstream data warehouse, or by using API interface protocols to transmit data through the microservice interface layer.

[0044] The target external data source is determined from external data sources. One piece of text to be detected can correspond to one or more target external data sources. External data sources are used to connect to external databases, and correspondingly, target external data sources are used to connect to target external databases. Specifically, external data sources may include the name and location of the database server, the name of the database driver, and information required to log in to the database. Based on this information, a connection can be made to the corresponding database, data can be requested from that database, and operations such as querying the data can be performed. For example, external data sources can be Google, Baidu, Xiaohongshu, and Wikipedia, etc.

[0045] As one implementation method, the correspondence between the text to be detected and the target external data source can be determined by pre-configuring association rules. The association rules include determining the target external data source based on the topic of the text to be detected or determining the target external data source based on the business scenario of the text to be detected.

[0046] After determining the target external data source corresponding to the text to be detected, a scan query is performed on the target external database in the target external data source based on the text to be detected to obtain the query results.

[0047] In step S120, after obtaining the text to be detected and its corresponding query results, semantic analysis and text feature extraction are performed on the text to be detected and the query results, respectively, to obtain the vector of the text to be detected and the vector of the query results. The purpose of feature extraction is to reduce the number of words to be processed as much as possible without damaging the core information of the text, thereby reducing the dimensionality of the vector space and simplifying the calculation. The extracted text features should be able to identify the text content and have the ability to distinguish the target text from other texts. The feature determination process mainly involves calculating the score value of each feature according to a preset feature evaluation function, then sorting these features according to the score value, and selecting several features with the highest score values ​​as the features corresponding to the text to be detected or the query results.

[0048] Feature extraction methods can include text feature vectorization based on the Bag of Words (BoW) model, text feature extraction based on TF-IDF (term frequency-inverse document frequency), or feature extraction based on the word vector feature extraction model word2vec.

[0049] In step S130, text perplexity data is used to measure the quality of a probability distribution or probabilistic model's prediction of a sample, and is often used as an indicator to evaluate the quality of a natural language model. The task of a natural language model is to predict the probability of a sentence appearing in a language. The following explains natural language models: Natural Language Models (NLMs) are statistical language models. Given the first k words of a sentence, predicting the (k+1)th word is equivalent to calculating the probability p(xk+1|x1,x2,...,xk) of the (k+1)th word appearing. In deep networks such as BERT, the current word can be predicted based on the context before and after it, similar to completing a cloze test.

[0050] The basic idea behind evaluating language models using perplexity is that after a natural language model is trained, a test set is input into it. Since the sentences in the test set are natural language sentences, the higher the probability output by the trained model on the test set, the better. In other words, a language model that assigns higher probability values ​​to the sentences in the test set is better, as it has lower perplexity. In other words, the lower the perplexity, the higher the sentence probability, and the better the natural language model.

[0051] One way to calculate the text perplexity data of the text vector to be detected is to call the perplexity function for calculation.

[0052] In step S140, after obtaining the text vector to be detected and the query result vector, a distance similarity algorithm can be used to calculate the similarity between the text vector to be detected and the query result vector to obtain feature similarity data. The feature similarity data is used to characterize the degree of similarity between the text vector to be detected and the query result vector.

[0053] It should be noted that the execution order of steps S130 and S140 in the embodiments of this application is not limited. That is, step S130 can be executed first and then step S140 can be executed, or step S140 can be executed first and then step S130 can be executed, or steps S130 and S140 can be executed in parallel through asynchronous threads.

[0054] In step S150, the AI-generated content can be content generated by a natural language model. Based on the characteristics of content generated by a natural language model and the relationship between AI-generated content and perplexity, it can be inferred through reverse reasoning that the text perplexity data of the text to be detected can be used to determine whether the text to be detected is text content generated by a natural language model, that is, to determine whether the text to be detected is AI-generated content.

[0055] For example, due to the inherent characteristics of AI-generated language models, content created by artificial intelligence typically has a low perplexity. In simpler terms, AI-generated content has fixed grammar, consistent parts of speech, and is relatively easy to understand, resulting in a lower perplexity score. However, because different users have different writing habits and expression styles, genuine user comments or articles exhibit complexity and grammatical variations. Therefore, there may be situations where the AI ​​language model cannot recognize them. In other words, genuine content posted by users (not AI-generated content) typically has a higher perplexity score.

[0056] AI content detection results are obtained using feature similarity data and text perplexity data. Specifically, for example, similarity thresholds and perplexity thresholds can be configured separately. If, based on these thresholds, neither the feature similarity data nor the text perplexity data meets preset conditions, the AI ​​content detection result indicates that the text to be detected is AI-generated content. Alternatively, if either the feature similarity data or the text perplexity data fails to meet a preset condition, the AI ​​content detection result indicates that the text to be detected is AI-generated content. The preset conditions can be set as needed based on the similarity threshold and the perplexity threshold.

[0057] In the above implementation process, the text to be detected is queried in the target external data source to obtain query results. Based on the characteristics of AI-generated content, the relationship between perplexity and AI-generated content is inferred in reverse. By using the feature similarity data between the text to be detected and the query results, as well as the perplexity data of the text to be detected, it is possible to determine whether the text to be detected is low-quality AI-generated content, effectively conduct AI-generated content risk control management, and improve the quality of content on the forum platform.

[0058] Optionally, in this embodiment, the text vector to be detected includes a sequence of text words; obtaining text perplexity data based on the text vector to be detected includes: obtaining the probability of the text to be detected based on the sequence of text words using a perplexity algorithm; and performing a geometric average on the probability of the text to be detected based on the number of text word sequences to obtain text perplexity data.

[0059] In the specific implementation process: the text word sequence is the words and their order in each sentence of the text to be detected; the text to be detected may include multiple sentences or only one sentence; each sentence includes multiple words.

[0060] Taking a sentence as the text to be detected as an example, the probability of the text to be detected is obtained based on the word sequence. Specifically, the word sequence of the text to be detected, S, can be represented as: S = {1, w2, w3, ..., w...} n The probability of the text to be detected is:

[0061] P(S)=P(w1,w2,w3,…,w n )

[0062] =P(w1)P(w2|w1), ...P(w n |w1, w2, ..., w n-1 ).

[0063] Where S is the text word sequence, n is the number of word vectors in the text word sequence, and w n Let P(S) be the probability of a sentence consisting of the nth word vector, arranged in the order of the word vectors, i.e., the probability of the text to be detected. n |w1, w2, ..., w n-1 ) is the word vector w n The probability of a text word sequence.

[0064] After obtaining the probability of the text to be detected, the probability is geometrically averaged based on the number of words in the text sequence to obtain the text perplexity data. The calculation formula includes:

[0065]

[0066] Where PP(S) represents the text perplexity data, and n represents the number of word vectors in the text word sequence.

[0067] Taking the geometric mean of the probability of the text to be detected is equivalent to taking the nth root of the probability of the text to be detected. This can be understood as the product of the probabilities of the text to be detected as a series of probabilities of the text word sequences. Since the probability value of each text word sequence is necessarily less than 1, the longer the text to be detected, the smaller the probability will be when multiplied. Therefore, to mitigate the impact of the number of text word sequences on the calculation results, the probability of the text to be detected is taken as a geometric mean, allowing the perplexity of texts of different lengths to be compared within a certain order of magnitude.

[0068] In the above implementation process, the probability of the text to be detected is obtained based on the text word sequence, and the probability of the text to be detected is geometrically averaged to reduce the impact of the number of sentence text word sequences on the calculation results, thereby obtaining more accurate text perplexity data and improving the accuracy of judging whether the text to be detected is low-quality AI-generated content based on the text perplexity data.

[0069] Optionally, in this embodiment, the perplexity algorithm includes a word sequence frequency algorithm or a topic algorithm; the probability of the text to be detected is obtained based on the text word sequence using the perplexity algorithm, including: obtaining the text word sequence probability corresponding to each text word sequence using the word sequence frequency algorithm or the topic algorithm; and summing the probabilities of each text word sequence to obtain the probability of the text to be detected.

[0070] In the specific implementation process: perplexity algorithms can include word sequence frequency algorithms or topic algorithms. The word sequence frequency algorithm counts the frequency of text word sequences appearing in a sentence, and calculates the probability of each text word sequence based on its frequency. The topic algorithm calculates the probability of each text word sequence based on the topic distribution of the text to be detected and the distribution of text word sequences within each topic. After calculating the probability of each text word sequence, the probabilities of each text word sequence are summed to obtain the probability of the text to be detected.

[0071] In the above implementation process, the probability of each text word sequence is calculated by the occurrence probability of each text word sequence in the text to be detected, or the topic of the text to be detected, so as to obtain the probability of the text to be detected and thus obtain more accurate text perplexity data.

[0072] Optionally, in this embodiment of the application, obtaining the query results of the text to be detected in the target external data source includes: obtaining the business scenario of the text to be detected; determining the target external data source corresponding to the text to be detected in the external data source according to the business scenario of the text to be detected; and scanning and querying the text to be detected in the target external data source based on preset query parameters to obtain the query results.

[0073] In the specific implementation process: the correspondence between the text to be detected and the target external data source is determined by pre-configuring association rules. For example, the target external data source to be scanned is pre-configured for each business scenario.

[0074] For example, on the front-end configuration page provided by the terminal device, the configuration information is stored in the database by submitting a form. After obtaining the business scenario of the text to be detected, the target external data source corresponding to the business scenario is queried in the database storing the external data source configuration. The front-end page can also preset query parameters, including the number of scans and the number of data records to select. The number of scans refers to the number of times the target external data source is scanned, and the number of data records to select as the query result after each scan. After determining the target external data source and query parameters, the scanning service is invoked to execute the scan query task.

[0075] The following example describes the steps for obtaining query results. The text to be detected is "community0001"; the target external data source corresponding to the application scenario of the text to be detected is "google"; the preset query parameters are "1 scan, 3 data entries". The scanning service requests to scan the database corresponding to the target external data source, queries for content related to the text to be detected, performs 1 query, and takes the top 3 data entries as the query results.

[0076] In the above implementation process, the target external data source to be scanned is determined according to the pre-configured business scenario, and the data scanning is more accurate to obtain query results that are more similar to the text to be detected. There is no need to scan all external sites, reducing computing power and improving task execution efficiency while ensuring the accuracy of query results.

[0077] Optionally, in this embodiment of the application, obtaining the AI ​​content detection result based on feature similarity data and text perplexity data includes: determining whether the similarity data meets a first preset condition based on the similarity data and a preset similarity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and a preset perplexity threshold; if the similarity data meets the first preset condition and / or the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

[0078] In the specific implementation process: if the similarity data exceeds the preset similarity threshold, it can be determined that the similarity data meets the first preset condition; if the similarity data does not exceed the preset similarity threshold, it can be determined that the similarity data does not meet the first preset condition.

[0079] If the text perplexity data is not greater than the perplexity threshold, then the text perplexity data meets the second preset condition; if the text perplexity data is less than the perplexity threshold, then the text perplexity data does not meet the second preset condition.

[0080] Based on the above two judgment results, the AI ​​content detection result is obtained. For example, if the similarity data meets the first preset condition and the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content; or if either the similarity data or the text perplexity data meets its corresponding preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

[0081] The similarity threshold, confusion threshold, first preset condition, and second preset condition can all be set according to actual needs, and this application embodiment does not limit them.

[0082] In the above implementation process, based on the preset similarity threshold and perplexity threshold, it is determined whether the similarity data and text perplexity data meet the corresponding preset conditions, thereby improving the accuracy of the AI ​​content detection results.

[0083] Optionally, in this embodiment, the perplexity threshold includes a first perplexity threshold and a second perplexity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and the preset perplexity threshold includes: if the text perplexity data is not greater than the first perplexity threshold, then the text perplexity data meets the second preset condition; if the text perplexity data is greater than the first perplexity threshold and less than the second perplexity threshold, then determining whether the text perplexity data meets the second preset condition based on similarity data; if the text perplexity data is not less than the second perplexity threshold, then the text perplexity data does not meet the second preset condition.

[0084] In the specific implementation process: if the text perplexity data is not greater than the first perplexity threshold, that is, the text perplexity data is low, it is considered that the text to be detected is more likely to be created by artificial intelligence, and the text perplexity data meets the second preset condition.

[0085] If the text perplexity data is greater than the first perplexity threshold but less than the second perplexity threshold, then it is necessary to further determine whether the text perplexity data meets the second preset condition based on the similarity data. Specifically, for example, if the text perplexity data is greater than the first perplexity threshold but less than the second perplexity threshold, and the similarity data is not less than the similarity threshold, then the text perplexity data is determined to meet the second preset condition; if the similarity data is less than the similarity threshold, then the text perplexity data is determined not to meet the second preset condition.

[0086] If the text perplexity data is not less than the second perplexity threshold, that is, the text perplexity data is high, it is considered that the possibility of the text to be detected being created by artificial intelligence is small, and the text perplexity data does not meet the second preset condition.

[0087] In an optional embodiment, a risk control code sent by an electronic device can be received. The risk control code is used to indicate whether the text perplexity data meets a second preset condition. For example, if the risk control code is code 40001, it indicates that the text perplexity data meets the second preset condition; if the risk control code is code 40002, it indicates that further determination of whether the text perplexity data meets the second preset condition is needed based on similarity data; if the risk control code is code 40003, it indicates that the text perplexity data does not meet the second preset condition.

[0088] In an optional embodiment, the similarity threshold can be 80%, the first perplexity threshold is 50, and the second perplexity threshold is 100.

[0089] In the above implementation process, the perplexity threshold includes a first perplexity threshold and a second perplexity threshold. By setting two perplexity thresholds and using similarity data to make a second judgment on whether the perplexity meets the second preset condition, the artificial intelligence content detection results obtained through perplexity data are more accurate.

[0090] Optionally, in this embodiment of the application, before obtaining the query results of the text to be detected in the target external data source, the method further includes: performing text filtering processing on the text to be detected to filter out the non-text parts in the text to be detected and obtaining filtered text; performing word segmentation on the filtered text to obtain text segmentation results; performing stemming standardization and part-of-speech standardization on the text segmentation results to obtain standardized text; obtaining the query results of the text to be detected in the target external data source includes: obtaining the query results of standardized text in the target external data source.

[0091] Please refer to Figure 2, which shows a flowchart of the standardized text provided in an embodiment of this application.

[0092] In the specific implementation process: before using the text to be detected to query the target external data source, text semantic analysis can be performed on the text to be detected to improve the usability of the text to be detected.

[0093] Semantic analysis can include: analyzing semantic information based on natural language, understanding the meaning contained in words, phrases, sentences and paragraphs from text data, and using the semantic structure of sentences to represent the structure of language.

[0094] Lexical analysis includes two aspects: lemmatography and lexical analysis. Generally speaking, lemmatography mainly involves analyzing prefixes and suffixes of words, while lexical analysis involves controlling the entire vocabulary system, thereby enabling more accurate analysis of the characteristics of user input information and ultimately completing the search process accurately.

[0095] Syntactic analysis is the process of analyzing the vocabulary and phrases of natural language input by the user in order to identify the syntactic structure of the sentence and achieve automatic syntactic analysis.

[0096] Pragmatic analysis, compared to semantic analysis, adds the analysis of context, linguistic background, and linguistic context. It extracts additional information such as imagery and interpersonal relationships from the structure of a text, making it a more advanced form of linguistic analysis. It connects the content of sentences with details from real life, thus forming a dynamic semantic structure.

[0097] Contextual analysis primarily refers to analyzing the numerous "gaps" outside the original query text in order to more accurately interpret the language being queried. These "gaps" include general knowledge, domain-specific knowledge, and the needs of the querying user.

[0098] Semantic analysis can be implemented in various ways, such as by filtering the text to be analyzed. This text is raw data retrieved from upstream sources and may contain HTML tags, a small amount of non-text, special non-English characters, and punctuation marks. These can be removed using Python regular expressions to obtain the filtered text. The characters and special text to be filtered can be defined within the regular expressions.

[0099] The filtered text is segmented into words to obtain the word segmentation results. Segmentation methods can be based on string matching, such as forward maximum matching, reverse maximum matching, and bidirectional maximum matching algorithms. Segmentation can also be based on statistical methods.

[0100] After word segmentation, the resulting text can be cleaned, specifically by removing stop words. Stop words are words that have no actual meaning in a sentence; removing them does not affect the overall semantic understanding of the sentence. Stop words include function words, pronouns, and verbs and nouns without specific meaning.

[0101] The cleaned text segmentation results are then subjected to stemming and part-of-speech (MOS) standardization to obtain standardized text. Specifically, stemming is performed using stemming extraction: based on language rules, the stem or root of a word is extracted. Lemmatisation is performed using lexical mapping: based on dictionary mapping, a word is restored to its general form.

[0102] The query is performed on the target external data source based on standardized text to obtain query results. In an optional embodiment, the query results are...

[0103] The query results can also be filtered, segmented, stemmed, and categorized. Specifically, for example, text filtering can be performed on the query results to remove non-text portions, resulting in filtered query results; the filtered query results can be segmented into words, resulting in segmented query results; and the segmented query results can be stemmed and categorized to obtain standardized query results.

[0104] Feature extraction is performed on the text to be detected and the standardized query results to obtain the text vector and the query result vector. Similarity calculation is then performed on the text vector and the query result vector to obtain feature similarity data. Similarity calculation methods include cosine similarity and Euclidean distance.

[0105] Taking cosine similarity as an example, the cosine similarity algorithm is used to calculate the cosine value between the text vector to be detected and the query result vector. The cosine similarity algorithm is used to calculate the cosine of the angle between two vectors in a vector space as a measure of the difference between the two individuals. A cosine value close to 1 and an angle close to 0 indicates that the two vectors are more similar; a cosine value close to 0 and an angle close to 90 degrees indicates that the two vectors are less similar.

[0106] In the above implementation process, the text to be detected and the query results are first subjected to text semantic analysis, and then filtered, segmented, cleaned and standardized. Finally, feature processing is performed to realize the representation of the language structure using the semantic structure of sentences.

[0107] Please refer to Figure 3, which shows a schematic diagram of the machine production process provided in an embodiment of this application.

[0108] In one optional embodiment, the user's original content is obtained. Based on preset text extraction and text filtering rules, the original content is subjected to text extraction and filtering to extract the text to be detected. The text extraction rules can be set based on keywords, grammar, semantics, and other methods to ensure the accuracy of the extracted information. The text filtering rules can also be set based on keywords, grammar, semantics, and other methods to ensure that filtered information does not interfere with subsequent processing. The text extraction and text filtering rules can be configured on the front-end configuration page.

[0109] The extracted and filtered text to be detected is scanned against the target external data source. The site scanning service executes the scanning task according to preset scanning parameters to obtain query results. Semantic analysis is performed on the text to be detected and the query results to obtain the text vector to be detected and the query result vector. Similarity is calculated between the text vector to be detected and the query result vector to obtain similarity data. And based on the text vector to be detected, text perplexity data is obtained.

[0110] By using similarity data and text perplexity data, it is determined whether the content to be detected is machine-generated content. Machine-generated content is content created by artificial intelligence.

[0111] Please refer to Figure 4, which shows a schematic diagram of the artificial intelligence content detection system provided in an embodiment of this application.

[0112] The AI-powered content detection system comprises a content extraction unit, an external website sourcing unit, and an AIGC (AIGC Generated Content) recognition unit. The content extraction unit includes an information filtering rule configuration module, which provides information filtering services. The external website sourcing unit includes an external website information source configuration module, which provides external website scanning and file comparison services. The AIGC recognition unit includes an AIGC feature strategy configuration module, which provides AIGC recognition calculation services and risk control execution.

[0113] Please refer to Figure 5, which shows a schematic diagram of the page configuration provided in an embodiment of this application.

[0114] In the filtering rule configuration module, information extraction rules are configured for each business scenario. In the external information source configuration module, multiple external data sources (different third-party data sources) are entered; and the target external data source for each business scenario is configured. In the AIGC feature strategy configuration, different perplexity thresholds, preset requirements, and corresponding risk control return codes are configured for different business scenarios.

[0115] Please refer to Figure 6 for a schematic diagram of the structure of the artificial intelligence content detection device provided in this application embodiment; this application embodiment provides an artificial intelligence content detection device 200, including:

[0116] Query module 210 is used to obtain the query results of the text to be detected in the target external data source; the target external data source is used to connect to the target external database;

[0117] The feature extraction module 220 is used to extract text features from the text to be detected and the query result respectively, so as to obtain the vector of the text to be detected and the vector of the query result.

[0118] The perplexity module 230 is used to obtain text perplexity data based on the text vector to be detected;

[0119] The similarity module 240 is used to obtain feature similarity data based on the text vector to be detected and the query result vector;

[0120] The detection module 250 is used to obtain AI content detection results based on feature similarity data and text perplexity data; the AI ​​content detection results are used to characterize whether the text to be detected is AI-generated content.

[0121] Optionally, in this embodiment of the application, the artificial intelligence content detection device includes a text vector to be detected comprising a text word sequence; the perplexity module 230 is further configured to obtain the probability of the text to be detected based on the text word sequence using a perplexity algorithm; and to obtain text perplexity data by performing a geometric average on the probability of the text to be detected based on the number of text word sequences.

[0122] Optionally, in this embodiment of the application, the perplexity algorithm of the artificial intelligence content detection device includes a word sequence frequency algorithm or a topic algorithm; the perplexity module 230 is further used to obtain the probability of the text word sequence corresponding to each text word sequence through the word sequence frequency algorithm or the topic algorithm; and to sum the probabilities of each text word sequence to obtain the probability of the text to be detected.

[0123] Optionally, in this embodiment of the application, the AI ​​content detection device, query module 210, is further configured to obtain the business scenario of the text to be detected; determine the target external data source corresponding to the text to be detected in the external data source according to the business scenario of the text to be detected; and scan and query the text to be detected in the target external data source based on preset query parameters to obtain query results.

[0124] Optionally, in this embodiment of the application, the AI ​​content detection device, detection module 250, is specifically used to determine whether the similarity data meets a first preset condition based on the similarity data and a preset similarity threshold; and to determine whether the text perplexity data meets a second preset condition based on the text perplexity data and a preset perplexity threshold; if the similarity data meets the first preset condition and / or the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

[0125] Optionally, in this embodiment of the application, the AI ​​content detection device includes a first perplexity threshold and a second perplexity threshold; the detection module 250 is further configured to: if the text perplexity data is not greater than the first perplexity threshold, then the text perplexity data satisfies a second preset condition; if the text perplexity data is greater than the first perplexity threshold and less than the second perplexity threshold, then determine whether the text perplexity data satisfies the second preset condition based on similarity data; if the text perplexity data is not less than the second perplexity threshold, then the text perplexity data does not satisfy the second preset condition.

[0126] Optionally, in this embodiment of the application, the artificial intelligence content detection device further includes: a semantic analysis module, used to perform text filtering processing on the text to be detected, filtering out non-text parts in the text to be detected to obtain filtered text; to perform word segmentation on the filtered text to obtain word segmentation results; to perform stemming standardization and word type standardization on the word segmentation results to obtain standardized text; and to obtain query results of the text to be detected in the target external data source, including: obtaining query results of the standardized text in the target external data source.

[0127] It should be understood that this device corresponds to the above-described embodiment of the artificial intelligence content detection method and is capable of performing the various steps involved in the above-described method embodiment. The specific functions of this device can be found in the description above, and detailed descriptions are omitted here to avoid repetition. The device includes at least one software functional module that can be stored in memory or embedded in the device's operating system (OS) in the form of software or firmware.

[0128] Please refer to Figure 7, which shows a schematic diagram of the structure of an electronic device provided in an embodiment of this application. An electronic device 300 provided in this application includes a processor 310 and a memory 320. The memory 320 stores machine-readable instructions executable by the processor 310. When the machine-readable instructions are executed by the processor 310, the method described above is performed.

[0129] This application also provides a storage medium storing a computer program, which is executed by a processor to perform the above-described method.

[0130] The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0131] It should be understood that the disclosed apparatus and methods can also be implemented in other ways, given the several embodiments provided in this application. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0132] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0133] The above description is only an optional implementation of the embodiments of this application, but the protection scope of the embodiments of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the embodiments of this application should be covered within the protection scope of the embodiments of this application.

Claims

1. An artificial intelligence content detection method, characterized in that, include: Obtain the query results of the text to be detected in the target external data source; The target external data source is used to connect to the target external database; Text features are extracted from the text to be detected and the query result to obtain the text vector to be detected and the query result vector, respectively; text perplexity data is obtained based on the text vector to be detected; feature similarity data is obtained based on the text vector to be detected and the query result vector. Based on the feature similarity data and the text perplexity data, an AI content detection result is obtained; the AI ​​content detection result is used to characterize whether the text to be detected is AI-generated content. The step of obtaining an AI content detection result based on the feature similarity data and the text perplexity data includes: determining whether the similarity data meets a first preset condition based on the similarity data and a preset similarity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and a preset perplexity threshold; if the similarity data meets the first preset condition and / or the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

2. The method according to claim 1, characterized in that, The text vector to be detected includes a sequence of text words; obtaining text perplexity data based on the text vector to be detected includes: obtaining the probability of the text to be detected based on the sequence of text words using the perplexity algorithm; and performing a geometric average on the probability of the text to be detected based on the number of text words to obtain the text perplexity data.

3. The method according to claim 2, characterized in that, The perplexity algorithm includes a word sequence frequency algorithm or a topic algorithm; obtaining the probability of the text to be detected based on the text word sequence using the perplexity algorithm includes: obtaining the probability of the text word sequence corresponding to each text word sequence using the word sequence frequency algorithm or the topic algorithm; and summing the probabilities of each text word sequence to obtain the probability of the text to be detected.

4. The method according to claim 1, characterized in that, Obtaining query results for the text to be detected in a target external data source includes: obtaining the business scenario of the text to be detected; determining the target external data source corresponding to the text to be detected in the external data source based on the business scenario of the text to be detected; and scanning and querying the text to be detected in the target external data source based on preset query parameters to obtain the query results.

5. The method according to claim 1, characterized in that, The perplexity threshold includes a first perplexity threshold and a second perplexity threshold; determining whether the text perplexity data meets a second preset condition based on the text perplexity data and the preset perplexity threshold includes: if the text perplexity data is not greater than the first perplexity threshold, then the text perplexity data meets the second preset condition; if the text perplexity data is greater than the first perplexity threshold and less than the second perplexity threshold, then determine whether the text perplexity data meets the second preset condition based on the similarity data; if the text perplexity data is not less than the second perplexity threshold, then the text perplexity data does not meet the second preset condition.

6. The method according to any one of claims 1-5, characterized in that, Before obtaining the query results of the text to be detected in the target external data source, the method further includes: performing text filtering processing on the text to be detected to filter out the non-text parts of the text to be detected, and obtaining filtered text; performing word segmentation on the filtered text to obtain word segmentation results; performing stemming standardization and part-of-speech standardization on the word segmentation results to obtain standardized text; obtaining the query results of the text to be detected in the target external data source includes: obtaining the query results of the standardized text in the target external data source.

7. An artificial intelligence content detection device, characterized in that, include: The query module is used to obtain the query results of the text to be detected in the target external data source. The target external data source is used to connect to the target external database; The feature extraction module is used to extract text features from the text to be detected and the query result respectively to obtain the text vector to be detected and the query result vector; the perplexity module is used to obtain text perplexity data based on the text vector to be detected; the similarity module is used to obtain feature similarity data based on the text vector to be detected and the query result vector. The detection module is used to obtain AI content detection results based on the feature similarity data and the text perplexity data; the AI ​​content detection results are used to characterize whether the text to be detected is AI-generated content. The detection module is specifically used to determine whether the similarity data meets a first preset condition based on the similarity data and a preset similarity threshold; and to determine whether the text perplexity data meets a second preset condition based on the text perplexity data and a preset perplexity threshold. If the similarity data meets the first preset condition, and / or the text perplexity data meets the second preset condition, then the AI ​​content detection result indicates that the text to be detected is AI content.

8. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when executed by the processor, perform the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method and device for correcting the error of the text, electronic equipment and storage medium

    CN113051896A

  • Text error detection method and device, electronic equipment and storage medium

    CN113822052A