Text source detection method and system based on hierarchical semantic trajectory and reverse diffusion

By constructing a hierarchical semantic trajectory and a reverse diffusion model, the limitations of existing AIGC detection methods are overcome, achieving efficient and robust detection of AI-generated text, which is applicable to fields such as academic integrity and information verification.

CN120910265APending Publication Date: 2025-11-07CIJIAN (SHANGHAI) INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511012981.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing AIGC detection methods rely on static features, which are prone to failure, have poor universality, and lack robustness, making it difficult to effectively distinguish between human writing and AI-generated text.

Method used

By constructing hierarchical semantic trajectories of text, using a denoising diffusion model for reverse diffusion verification, extracting and classifying multi-scale anomaly features, including hierarchical semantic trajectory construction, diffusion model training, anomaly scoring and feature vector construction, and combining gradient boosting decision trees for text source classification.

Benefits of technology

It achieves efficient and robust detection of AI-generated text, eliminates dependence on model iteration, has good generalization ability and non-intrusiveness, and can accurately distinguish between human and AI-generated text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910265A_ABST
    Figure CN120910265A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of natural language processing and artificial intelligence detection, and discloses a text source detection method and system based on a hierarchical semantic trajectory and reverse diffusion, and the method comprises the following steps: 1, constructing the hierarchical semantic trajectory of a text, segmenting an input text into a paragraph sequence, and further segmenting each paragraph into a sentence sequence; the sentences are converted into vectors through a pre-training language model encoder. According to the method, the text source detection is realized by constructing the hierarchical semantic trajectory and combining the reverse diffusion verification. Static characteristic limitation is broken through, dynamic process evaluation is conducted, and model iteration interference is resisted; microscopic and macroscopic semantic dynamics are captured in a layered manner, and the structure is comprehensively described; the deviation degree is quantified through a diffusion model reverse network, which is scientific and accurate; the cross-scale consistency feature improves the detection distinction degree; only human writing distribution is learned, the generalization ability is high, and independent deployment can be achieved; and the interpretability of the abnormal trajectory and the multi-dimensional features is enhanced, so that manual auditing is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of natural language processing and artificial intelligence detection, and more particularly to a text source detection method and system based on hierarchical semantic trajectory and reverse diffusion. BACKGROUND

[0002] With the rapid development of large language models (LLMs), the generated text is increasingly similar to human writing in grammar, style, and content, which poses a serious challenge to academic integrity, information verification, and content attribution. Existing AIGC detection methods have the following limitations:

[0003] Dependence on static features: Traditional methods focus on static features of text products (such as word statistics, syntactic structure, perplexity, etc.), which are easily invalidated with model iteration and fine-tuning;

[0004] Poor universality: Some methods (such as watermarking technology) require modification of the architecture or training process of the generation model, which is highly invasive and has limited scope of application;

[0005] Insufficient robustness: Detection methods based on specific model output distribution (such as zero-shot classification) have weak generalization ability for unseen generation models.

[0006] Therefore, the present application proposes a text source detection method and system based on hierarchical semantic trajectory and reverse diffusion to solve the above problems. SUMMARY

[0007] In order to overcome the above-mentioned defects of the prior art, the present application provides a text source detection method and system based on hierarchical semantic trajectory and reverse diffusion to solve the problems existing in the background art.

[0008] The present application provides the following technical solution: a text source detection method based on hierarchical semantic trajectory and reverse diffusion, comprising the following steps:

[0009] Step 1: Constructing the hierarchical semantic trajectory of the text, dividing the input text into a sequence of paragraphs, and further dividing each paragraph into a sequence of sentences; converting the sentences into vectors through a pre-trained language model encoder to construct L1-level (intra-paragraph) semantic trajectory matrices and L2-level (inter-paragraph) semantic trajectory matrices;

[0010] Step 2: Training a scale-specific denoising diffusion model based on the L1-level and L2-level semantic trajectories in the human writing corpus, training L1-level and L2-level denoising diffusion models, respectively, the denoising diffusion model including a forward noise process and a reverse denoising network;

[0011] Step 3: Calculate the multi-scale anomaly score, for the hierarchical semantic trajectory of the text to be detected, use the trained L1 and L2 denoising diffusion model to calculate the anomaly score at multiple time steps, and obtain the L1 and L2 anomaly score trajectories;

[0012] Step 4: Construct a feature vector, extract intra-scale features from the L1 and L2 anomaly score trajectories, and calculate cross-scale consistency features, and concatenate the intra-scale features and cross-scale consistency features into a final feature vector;

[0013] Step 5: Text source classification, input the final feature vector into a pre-trained classifier, and output the probability of the text being AI-generated.

[0014] By converting the text into a multi-scale semantic trajectory and combining the reverse diffusion verification, the paradigm conversion from static feature analysis to generation process likelihood evaluation is realized, and the dependence on surface features that are easily invalidated with model iteration is eliminated; the combination of hierarchical modeling and cross-scale analysis comprehensively captures the structural features of the text at the micro and macro levels, significantly improving the robustness and accuracy of the detection, and effectively distinguishing between human and AI-generated text.

[0015] As a further scheme of the present application: the process of constructing the L1 level semantic trajectory matrix in step 1 includes: for each paragraph, the sentences contained therein are converted into sentence vectors by a pre-trained language model encoder, and stacked in sentence order to form the L1 level semantic trajectory matrix of the paragraph; the process of constructing the L2 level semantic trajectory matrix includes: aggregating all sentence vectors within each paragraph to obtain a paragraph semantic vector, and stacking the paragraph semantic vectors in order to form the L2 level semantic trajectory matrix.

[0016] By constructing the semantic trajectory in layers, the L1 level trajectory accurately captures the local semantic flow between sentences within a paragraph, and the L2 level trajectory effectively reflects the macro logical evolution between paragraphs, realizing fine representation of the text structure at different granularities, providing a structured data foundation for subsequent multi-scale anomaly evaluation, and improving the ability to capture the inherent structural features of the text.

[0017] As a further scheme of the present application: the aggregation uses average pooling, and the calculation formula of the paragraph semantic vector is:

[0018]

[0019] wherein, is the semantic vector of the jth paragraph, N j is the number of sentences in the jth paragraph, is a pre-trained language model encoder, (u j,i ) is the i-th sentence of the j-th paragraph.

[0020] The paragraph vector aggregation is performed by using average pooling, so that the semantic information of all sentences in the paragraph can be comprehensively integrated to generate a stable and representative paragraph-level semantic vector, the deviation influence of a single sentence on the overall semantic of the paragraph is avoided, and the L2-level trajectory accurately reflects the macro structure of the document, so as to provide a reliable basis for the inter-paragraph logical consistency evaluation.

[0021] As a further scheme of the present application: in step 2, the forward noise process is a Markov chain, the semantic trajectory is converted into standard Gaussian noise through T time steps, and the transition kernel at any time step t is:

[0022]

[0023] wherein, beta t is a preset variance scheduling table parameter, and I is a unit matrix; the training target of the reverse denoising network is to minimize the loss function, and the loss function of the L1-level model is: wherein, is the L1-level semantic trajectory, q humax-para is the semantic trajectory distribution of the human writing paragraph, and epsilon is noise, alpha s = 1-beta s , is the L1-level reverse denoising network.

[0024] Through the Markov chain forward diffusion process and the loss function optimization, the reverse denoising network can learn the standard manifold of the human writing semantic trajectory, the diffusion model is innovatively converted into an implicit scoring function, a rigorous probability framework is provided for quantifying the deviation degree of the text from the human writing mode, and the scientificity and stability of the abnormal score are ensured.

[0025] As a further scheme of the present application: in step 3, the calculation formula of the abnormal score is:

[0026]

[0027] wherein, X0 is the semantic trajectory, d is the vector dimension, epsilon model is the trained reverse denoising network, is the cumulative coefficient.

[0028] The expectation is calculated by Monte Carlo sampling and dimension normalization, so that the abnormal score can stably quantify the deviation degree of the to-be-detected text at different time steps, and the influence of the vector dimension on the score is eliminated; combined with the trained denoising network, the standard trajectory of human writing and the abnormal trajectory of AI generation can be accurately distinguished, and the sensitivity of detection is improved.

[0029] As a further scheme of the present application: the intra-scale features in step 4 include: the L1-level features are the mean, variance and maximum abnormal score of the paragraph; the L2-level features are the mean, variance, peak value and area under the curve of the L2-level abnormal score trajectory.

[0030] By extracting multi-dimensional intra-scale statistical features, the abnormal distribution characteristics of the text at the micro (intra-paragraph) and macro (inter-paragraph) levels are comprehensively described, which not only reflects the overall abnormal level, but also captures local extreme cases and dynamic trends, providing rich discriminative information for subsequent classification and enhancing the representation ability of the features.

[0031] As a further scheme of the present application: the cross-scale consistency features in step 4 include the Pearson correlation coefficient of L2 semantic speed and L1 paragraph quality, and the calculation formula is:

[0032]

[0033] Wherein, L2 semantic speed, L1 paragraph quality, paragraph abnormal score mean, δ is a positive number for ensuring numerical stability, and P is the total number of paragraphs.

[0034] By quantifying the correlation between L2-level macro semantic jumps and L1-level micro paragraph quality, the cognitive coordination of "macro logical conversion requires micro argumentation support" in human writing is captured, while AI generated text often lacks such cross-scale consistency; this feature provides a key basis for distinguishing between human and AI generated text, significantly improving the specificity of the detection.

[0035] As a further scheme of the present application: a text source detection system based on hierarchical semantic trajectory and reverse diffusion is proposed, which includes:

[0036] Hierarchical semantic trajectory construction module: used for segmenting the input text into paragraphs and sentences, and generating L1-level and L2-level semantic trajectories through a pre-trained language model encoder;

[0037] Diffusion model training module: used for training L1-level and L2-level denoising diffusion models based on human writing corpus, wherein the denoising diffusion model includes a forward noise process and a reverse denoising network;

[0038] Abnormal score module: used for verifying the reverse diffusion of the hierarchical semantic trajectory of the detection text by using the trained diffusion model, and calculating the L1-level and L2-level abnormal score trajectories;

[0039] Feature vector construction module: used for extracting intra-scale features from the abnormal score trajectory and calculating cross-scale consistency features, and splicing the intra-scale features and cross-scale consistency features into a final feature vector;

[0040] Classification module: used for inputting the final feature vector into a pre-trained classifier, and outputting the probability of the text being AI-generated.

[0041] The modular design realizes the full-process automation of hierarchical semantic trajectory construction, diffusion model training, anomaly scoring, feature construction and classification, and the collaborative work of each module can efficiently complete the text source detection; the system does not need to rely on the internal parameters of the generation model, and can realize detection only through the text content, has non-invasiveness and wide applicability, and can be deployed as an independent tool in various scenes.

[0042] As a further scheme of the application, the hierarchical semantic trajectory construction module comprises:

[0043] A text segmentation unit is used to segment the input text into a paragraph sequence and a sentence sequence within the paragraph according to the hierarchy;

[0044] An encoding unit adopts a pre-trained language model as an encoder to convert the sentence into a high-dimensional semantic vector;

[0045] A trajectory generation unit stacks the sentence vectors of the same paragraph in order to form an L1-level semantic trajectory matrix, and stacks the paragraph semantic vectors in order to form an L2-level semantic trajectory matrix.

[0046] Through the detailed unit division, the accurate conversion from the original text to the hierarchical semantic trajectory is realized; the text segmentation unit ensures the accuracy of the hierarchical structure, the encoding unit generates a high-dimensional vector by using the powerful semantic representation ability of the pre-trained model, and the trajectory generation unit retains the time sequence characteristics of the semantics by ordered stacking, thereby providing a high-quality structured input for subsequent analysis.

[0047] As a further scheme of the application, the classification module adopts a gradient boosting decision tree as a classifier.

[0048] The gradient boosting decision tree can effectively process heterogeneous feature vectors, capture the nonlinear relationship between features, and efficiently fuse the intra-scale features and cross-scale consistent features; compared with other classifiers, it performs better in the small sample and multi-dimensional feature scenarios, can improve the accuracy and generalization ability of the final classification, and ensures the reliability of the detection result.

[0049] Technical effects and advantages of the application:

[0050] The application converts one-dimensional text sequence into high-dimensional dynamic representation containing cross-scale structural information by constructing hierarchical semantic trajectories (L1 intra-paragraph semantic trajectory and L2 inter-paragraph semantic trajectory) of the text, and then verifies the reverse diffusion by using the denoising diffusion model trained for different scales, quantifies the deviation degree of the text semantic trajectory from the human writing specification distribution, and realizes the text source detection by extracting the intra-scale features and cross-scale consistency features, thereby realizing the following technical effects and advantages:

[0051] (1) Break through the limitations of traditional dependence on static features of text (such as word statistics and syntactic structure), and turn to the evaluation of the dynamic rationality of the text generation process. By verifying the likelihood of the text under the human writing specification distribution, the dependence on surface features that are easily invalidated with model iteration is eliminated, and the detection result has stronger anti-interference ability for the iteration and fine-tuning of large language models.

[0052] (2) Capture the micro-dynamics of local semantic flow at the L1 level (intra-paragraph) and the macro-dynamics of the evolution of the logical structure of the chapter at the L2 level (inter-paragraph), provide a basis for the evaluation of structural compliance of different granularities, and more comprehensively depict the internal structural features of the text compared to single-scale analysis.

[0053] (3) Use the reverse denoising network of the diffusion model as an implicit scoring function of the human writing semantic trajectory specification manifold, quantify the deviation degree of the text trajectory from the human writing mode through the denoising residual error, and provide a rigorous probability framework for abnormal scoring, making the evaluation result more scientific and accurate.

[0054] (4) Innovatively propose cross-scale consistency features (such as the Pearson correlation coefficient of L2 semantic speed and L1 paragraph quality), quantify the coupling relationship between macro-semantic conversion and micro-argument quality, and capture the cognitive coordination of "macro-jump needs micro-support" in human writing that AI generated text is difficult to simulate, thereby improving the discrimination of the detection.

[0055] (5) Train the diffusion model based only on human writing corpus, learn the "human writing" positive class distribution, and effectively identify any text (whether from known or unknown AI models) that deviates from this distribution, having good zero-sample or few-sample generalization ability; and without modifying the generation model architecture or training process, it can be widely deployed as an independent third-party tool in various text source detection scenarios.

[0056] (6) The L1 and L2 level abnormal score trajectories can locate the paragraphs or logical transitions with weak structure in the text, and the cross-scale consistency features provide multi-dimensional quantitative basis for the detection result, making it easier for manual review and error analysis compared to "black box" models, and improving the credibility of the detection result. BRIEF DESCRIPTION OF DRAWINGS

[0057] The application will be further described below with reference to the drawings.

[0058] Figure 1 is a method flowchart of the text source detection method based on hierarchical semantic trajectory and reverse diffusion of the application;

[0059] Figure 2 is a system block diagram of the text source detection system based on hierarchical semantic trajectory and reverse diffusion of the application;

[0060] Figure 3 is a construction flowchart of the hierarchical semantic trajectory of the text source detection method based on hierarchical semantic trajectory and reverse diffusion of the application. DETAILED DESCRIPTION

[0061] The technical solutions of the application will be described in detail below with reference to the drawings and specific embodiments. The embodiments are only used to explain the application and do not limit the protection scope of the application.

[0062] Please refer to Figure 1 The implementation process of the text source detection method based on hierarchical semantic trajectory and reverse diffusion is as follows:

[0063] Step 1: Construction of hierarchical semantic trajectory This step aims to convert the input text from a one-dimensional symbol sequence into a semantic trajectory matrix at L1 level (intra-paragraph) and L2 level (inter-paragraph). The specific implementation is as follows:

[0064] (1) Data preprocessing and hierarchical segmentation: The input manuscript D is an academic paper (about 2000 words), which is segmented by rules based on punctuation symbols and paragraph markers to obtain an ordered sequence D = {p1, p2, …, p6} of P = 6 paragraphs. Each paragraph is further segmented into sentences, wherein p1 contains 4 sentences (N1 = 4), p2 contains 3 sentences (N2 = 3), and the remaining paragraphs contain 3-5 sentences, forming a sentence sequence

[0065] (2) Semantic encoding: A pre-trained language model encoder (specifically T5-Encoder, hidden layer dimension d = 1024) is used to map each sentence u j,i into a 1024-dimensional vector

[0066] (3) L1 level semantic trajectory construction: For the jth paragraph, the sentence vectors are stacked in order to form the L1 level trajectory For example, the trajectory matrix of p1 is a 4 × 1024 matrix:

[0067]

[0068] (4) L2 level semantic trajectory construction: For each paragraph pj The sentence vectors are average-pooled to compute the paragraph semantic vector

[0069]

[0070] The 6 paragraph semantic vectors are stacked in order to form the L2-level trajectory matrix

[0071]

[0072] Step 2: Training scale-specific denoising diffusion model This step trains the denoising diffusion model for L1 and L2-level trajectories, respectively. The specific parameters and procedures are as follows:

[0073] (1) Training data: Use the human writing corpus (containing 100,000 papers and essays in the C4 corpus), extract L1-level intra-paragraph trajectories (a total of 500,000 paragraphs) and L2-level inter-paragraph trajectories (a total of 10,000 complete documents) as training samples.

[0074] (2) Forward diffusion process: Set the time step T = 1000, and the variance schedule Use a linear increasing strategy (β1 = 0.0001, β 1000 = 0.02), which satisfies α = 1 - β t , The transition kernel at any time step t is:

[0075]

[0076] (3) Reverse denoising network training:

[0077] L1-level model Use the U-Net architecture (input dimension N j × 1024, output dimension N j × 1024), and the training objective is to minimize the loss function: Where the expectation is based on the human paragraph trajectory distribution q human-para , noise ∈ ~ N(0, I), and time step t ~ U(1, 1000).

[0078] L2-level model Use the same U-Net architecture (input dimension P × 1024), and the loss function form is consistent with the L1 level, and the training data is the L2-level trajectory q human-doc of the human document.

[0079] ​Training configuration: Adam optimizer (learning rate 5e-4), batch size 32, 100 epochs, distributed training on 8 GPUs.

[0080] Step 3: Calculation of multi-scale anomaly score for hierarchical trajectory of text to be detected, using the trained model to calculate anomaly score, as follows:

[0081] (1) Verification time step selection: Select K = 8 time steps {t1, t2, …, t8} = {1, 10, 50, 100, 200, 500, 800, 1000} (logarithmic scale distribution).

[0082] (2) L1 level anomaly score: For each paragraph Call Calculate anomaly score by M = 10 Monte Carlo sampling (∈ ~ N(0, I)):

[0083] Form the anomaly trajectory of each paragraph:

[0084]

[0085] (3) L2 level anomaly score: For Call Calculate anomaly score, form

[0086] Step 4: Construction of feature vector

[0087] (1) Intra-scale features:

[0088] L1 level feature F1 calculates the mean of each paragraph anomaly trajectory Variance Again, the statistics of the 6 paragraphs are statistically analyzed: the mean of all paragraph means Variance The maximum paragraph mean is 0.71, which constitutes F (1) = [0.28, 0.06, 0.71].

[0089] L2 level feature F (2) : Calculate the mean of L2 anomaly trajectory 0.35, variance 0.09, peak value \(0.82\) (located at t = 500), area under the curve 4.2, which constitutes F (2) = [0.35, 0.09, 0.82, 4.2].

[0090] (2) Cross-scale consistency features:

[0091] Calculate L2 semantic speed: The sequence [0.61, 0.92, 0.58, 0.73, 0.45] is obtained.

[0092] Calculate the L1 paragraph quality: The sequence \([3.57, 2.94, 1.85, 2.63, 4.17, 2.22] is obtained.

[0093] Calculate the Pearson correlation coefficient:

[0094] (3) Final feature vector:

[0095] F final = Concat(F (1) , F (2) , ρ coherence ) = [0.28, 0.06, 0.71, 0.35, 0.09, 0.82, 4.2, 0.31]

[0096] Step 5: Final classification based on features

[0097] Using the XGBoost classifier, the training set contains 50,000 human texts and 50,000 AI-generated texts (from GPT-4, Claude, etc. models), each sample corresponds to F final and label (human = 0, AI = 1). The classifier outputs the AI generation probability Φ(D) = 0.9 of the text to be detected, and determines it as AI generation.

[0098] Please refer to Figure 2 , the system includes the following modules, the hardware configuration and software implementation of each module are as follows:

[0099] Hierarchical semantic trajectory construction module:

[0100] Text segmentation unit: implemented based on Python's spaCy library, segmented by rule engine, output structured data.

[0101] Encoding unit: deploy T5-Encoder model (parameter quantity 11B), accelerate inference through TensorRT, single sentence encoding time <10ms.

[0102] Trajectory generation unit: use NumPy matrix operation to generate L1 and L2 level trajectory matrix, stored as.float32 format.

[0103] Diffusion model training module: based on PyTorch framework, supports multi-GPU distributed training, model weight is stored as.pt format, single model file size is about 2GB.

[0104] Anomaly scoring module: CUDA-accelerated Monte Carlo sampling and matrix operations are used, and the time consumption of anomaly scoring of a single text is less than 500 ms.

[0105] Feature vector construction module: SciPy library is called to calculate statistics and correlation coefficients, and a fixed-dimension feature vector (8 dimensions in this embodiment) is output.

[0106] Classification module: XGBoost model (tree number 200) is deployed, the inference time consumption is less than 10 ms, and batch processing is supported (50 texts per second).

[0107] In the present application, the segmentation granularity of the hierarchical semantic trajectory (such as the paragraph division threshold and the sentence segmentation rule), the parameter setting of the denoising diffusion model (such as the value of the time step T, the adjustment range of the variance schedule table β t ), the time step selection of the anomaly scoring (such as the size and distribution of the K value), and the model parameters of the classifier (such as the tree depth and the iteration number of XGBoost) are all adjustable parameterized settings. Those skilled in the art can adapt to the actual scene by modifying the relevant parameters (such as the selection of the encoder and the dimension combination of the feature vector) according to the type of the text to be detected (such as academic papers, news reports, and essays), the length of the text (such as short social media content or long documents), and the like. Such adjustments are all within the protection scope of the present application.

[0108] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for text source detection based on hierarchical semantic trajectory and reverse diffusion, characterized in that: The method comprises the following steps: Step 1: constructing a hierarchical semantic trajectory of the text, segmenting the input text into a sequence of paragraphs, and further segmenting each paragraph into a sequence of sentences; converting the sentences into vectors through a pre-trained language model encoder to construct an L1-level (intra-paragraph) semantic trajectory matrix and an L2-level (inter-paragraph) semantic trajectory matrix; Step 2: training a scale-specific denoising diffusion model, training L1-level and L2-level denoising diffusion models based on the L1-level and L2-level semantic trajectories in the human writing corpus, wherein the denoising diffusion model comprises a forward noise process and a reverse denoising network; Step 3: calculating a multi-scale anomaly score, for the hierarchical semantic trajectory of the text to be detected, using the trained L1-level and L2-level denoising diffusion models to calculate an anomaly score at multiple time steps to obtain L1-level and L2-level anomaly score trajectories; Step 4: constructing a feature vector, extracting intra-scale features from the L1-level and L2-level anomaly score trajectories, and calculating cross-scale consistency features, and concatenating the intra-scale features and cross-scale consistency features into a final feature vector; Step 5: text source classification, inputting the final feature vector into a pre-trained classifier to output a probability that the text is AI-generated.

2. The text provenance detection method based on hierarchical semantic trajectory and reverse diffusion according to claim 1, characterized in that: The process of constructing the L1-level semantic trajectory matrix in step 1 comprises: for each paragraph, converting the sentences contained therein into sentence vectors through a pre-trained language model encoder, and stacking the sentence vectors in the order of the sentences to form the L1-level semantic trajectory matrix of the paragraph; the process of constructing the L2-level semantic trajectory matrix comprises: aggregating all sentence vectors in each paragraph to obtain a paragraph semantic vector, and stacking the paragraph semantic vectors in the order of the paragraphs to form the L2-level semantic trajectory matrix.

3. The text provenance detection method based on hierarchical semantic trajectory and reverse diffusion according to claim 2, characterized in that: The aggregation adopts average pooling, and the calculation formula of the paragraph semantic vector is: wherein, is a semantic vector for the jth passage, N j is the number of sentences for the jth passage, is a pre-trained language model encoder, (u j,i is the ith sentence of the jth passage.

4. The text provenance detection method based on hierarchical semantic trajectory and reverse diffusion according to claim 1, characterized in that: In step 2, the forward noise process is a Markov chain, which converts the semantic trajectory into standard Gaussian noise through T time steps, and the transition kernel at any time step t is: wherein β t is a preset variance scheduling table parameter, and I is a unit matrix; a training target of the reverse denoising network is to minimize a loss function, and the loss function of the L1-level model is: wherein, is an L1-level semantic trajectory, q human-para is a semantic trajectory distribution of a human writing paragraph, ∈ is noise, α s = 1-β s , is an L1-level reverse denoising network.

5. The text provenance detection method based on hierarchical semantic trajectory and reverse diffusion according to claim 1, characterized in that: In step 3, the calculation formula of the anomaly score is: Wherein, X0 is semantic trajectory, d is vector dimension, ∈ model is the trained reverse denoising network, is the cumulative coefficient.

6. The text provenance detection method based on hierarchical semantic trajectory and reverse diffusion according to claim 1, characterized in that: In step 4, the intra-scale features include: the L1-level features are the mean, variance and maximum anomaly score of the paragraph anomaly score; and the L2-level features are the mean, variance, peak value and area under the curve of the L2-level anomaly score trajectory.

7. The layered semantic trajectory and reverse diffusion based text source detection method of claim 1, wherein: In step 4, the cross-scale consistency features include the Pearson correlation coefficient of the L2 semantic speed and the L1 paragraph quality, and the calculation formula is: wherein, is the L2 semantic velocity, is the L1 paragraph quality, is the paragraph anomaly score mean, δ is a positive number for numerical stability, and P is the total number of paragraphs.

8. A system for text provenance detection based on hierarchical semantic trajectories and reverse diffusion, characterized in that, It comprises: A hierarchical semantic trajectory construction module for segmenting the input text into paragraphs and sentences, and generating L1-level and L2-level semantic trajectories through a pre-trained language model encoder; A diffusion model training module for training L1-level and L2-level denoising diffusion models based on a human writing corpus, wherein the denoising diffusion model comprises a forward noise process and a reverse denoising network; An anomaly scoring module for verifying the hierarchical semantic trajectory of the detected text by using the trained diffusion model to obtain L1-level and L2-level anomaly score trajectories; A feature vector construction module for extracting intra-scale features from the anomaly score trajectories and calculating cross-scale consistency features, and concatenating the intra-scale features and cross-scale consistency features into a final feature vector; A classification module for inputting the final feature vector into a pre-trained classifier to output a probability that the text is AI-generated.

9. The layered semantic trajectory and reverse diffusion based text provenance detection system of claim 8, wherein: The hierarchical semantic trajectory construction module comprises: a text segmentation unit, configured to segment input text into a paragraph sequence and a sentence sequence in a paragraph according to a hierarchy; an encoding unit, configured to convert the sentence into a high-dimensional semantic vector by using a pre-trained language model as an encoder; a trajectory generation unit, configured to sequentially stack sentence vectors of the same paragraph to form an L1-level semantic trajectory matrix, and sequentially stack paragraph semantic vectors to form an L2-level semantic trajectory matrix.

10. The layered semantic trajectory and reverse diffusion based text provenance detection system of claim 8, wherein: The classification module adopts a gradient boosting decision tree as a classifier.