Text data intelligent labeling system based on large language model

By constructing a method to represent the gravitational field and dynamically generate anti-gravity anchor point samples, the problem of temporal drift in annotation results in large language model text annotation is solved, thereby improving annotation efficiency and accuracy.

CN123178628APending Publication Date: 2026-11-27SHAANXI TAODING IND GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611453032.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Traditional large language model text annotation methods suffer from time-series drift in annotation results during long-batch continuous annotation. Fixed anchor points cannot adapt to real-time drift changes, and manual sampling can only detect these changes afterward without online correction, resulting in low annotation efficiency.

Method used

A text data intelligent annotation system based on a large language model is adopted, including a representation construction unit, a drift monitoring unit, an anchor point generation unit, and a chaos reset unit. By constructing a representation gravitational field, monitoring the label distribution shift in real time, dynamically generating anti-gravity anchor point samples and inserting them into the annotation sequence, and resetting the context window in the chaotic drift state, real-time correction of label drift is achieved.

Benefits of technology

It significantly improves the efficiency of text data annotation for large language models. By correcting label distribution offset in real time, it reduces erroneous annotation of low-frequency categories and improves the accuracy and efficiency of annotation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178628A_ABST
    Figure CN123178628A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data labeling, and discloses a text data intelligent labeling system based on a large language model, comprising a representation construction unit, a drift monitoring unit, an anchor generation unit and a chaotic reset unit; the data set is divided into multiple batches for sequential labeling by the drift monitoring unit, the labeling distribution of each label category is counted in real time and compared with the representation gravity field theory distribution, the label distribution deviation direction and deviation amount are obtained, the phenomenon of low-frequency category adsorption caused by the contraction of model attention to high-frequency categories is discovered in time, the defect that fixed anchors cannot adapt to drift changes is overcome, and further, the anchor generation unit dynamically generates anti-gravity anchor samples of low-frequency categories in the high-frequency category gravity field boundary region according to the deviation direction and deviation amount, and inserts the anti-gravity anchor samples into subsequent sequences, and the labeling results of the anti-gravity anchor samples are disturbed by the large language model to weaken the abnormal adsorption force of high-frequency categories.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data annotation technology, and in particular to an intelligent text data annotation system based on a large language model. Background Technology

[0002] With the rapid development of natural language processing (NLP) technology, large language models (MLMs), with their powerful semantic understanding and context learning capabilities, have been widely applied to automatic text annotation tasks. Compared with traditional manual annotation methods, using MLMs for text annotation can significantly improve annotation efficiency, reduce labor costs, and flexibly adapt to various annotation scenarios such as text classification, entity recognition, sentiment analysis, and intent recognition. In practical engineering applications, to adapt to the context window length limitations of MLMs while considering overall processing efficiency, the text dataset to be annotated is usually divided into multiple appropriately sized annotation batches. These batches are then input into the MLM in sequence to complete the annotation. Simultaneously, leveraging the model's context learning capabilities, a small number of annotated examples within the same batch guide the model to output annotation results that conform to a pre-defined labeling system. This achieves intelligent, batch, and standardized annotation processing of large-scale text data, providing high-quality annotated data support for the training and optimization of downstream NLP models.

[0003] However, traditional large language model text annotation methods suffer from temporal drift in annotation results during long batches of continuous annotation. As the batch progresses, the model's attention distribution gradually shrinks towards high-frequency label categories, causing low-frequency category samples to be attracted by high-frequency categories and incorrectly labeled. At the same time, existing methods usually use fixed anchor point back-injection or manual sampling to deal with this problem, but fixed anchor points cannot adapt to real-time drift changes, and manual sampling can only detect it after the fact and cannot correct it online, which greatly reduces the efficiency of text data annotation.

[0004] To address the aforementioned technical deficiencies, a solution is proposed. Summary of the Invention

[0005] The purpose of this invention is to address the problem of temporal drift in annotation results during long-batch continuous annotation of traditional large language model text annotation methods. In addition, existing methods usually use fixed anchor point back-annotation or manual sampling to deal with this problem. However, fixed anchor points cannot adapt to real-time drift changes, and manual sampling can only detect changes after the fact and cannot correct them online, which greatly reduces the efficiency of text data annotation.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: a text data intelligent annotation system based on a large language model, including a representation construction unit, a drift monitoring unit, an anchor point generation unit, and a chaos reset unit; The representation building unit is used to obtain the text dataset to be labeled and the preset label system. Each sample in the text dataset to be labeled is input into the large language model, and the semantic representation vector of each sample is extracted from the middle layer of the large language model. According to the semantic representation distribution of each label category in the preset label system, the center of mass and radius of gravity of each label category in the representation space are calculated, and the representation gravitational field between categories is constructed. The drift monitoring unit is used to divide the text dataset to be labeled into multiple labeling batches, input each sample into the large language model for labeling in batch order, and count the label distribution of each label category in each labeling batch in real time. The label distribution of the current batch is compared with the theoretical distribution of each category in the gravitational field to obtain the label distribution shift direction and shift amount of the current batch. The anchor point generation unit is used to determine the boundary region of the high-frequency category gravitational field in the representation space according to the offset direction and offset amount of the label distribution. Within the boundary region, it dynamically generates anti-gravity anchor point samples with the real label as the low-frequency category. The anti-gravity anchor point samples are inserted into the subsequent labeling sequence of the current labeling batch. The large language model is used to generate reverse gravity perturbation in the representation space based on the labeling results of the anti-gravity anchor point samples. The chaos reset unit is used to calculate the Lyapunov index of the annotation system based on the changes in the annotation distribution of multiple consecutive batches during the annotation process. When the Lyapunov index exceeds the preset chaos threshold, it is determined that the annotation system has entered a chaotic drift state, triggering the context window reset of the large language model, clearing the accumulated attention shift state, and continuing the annotation of subsequent batches.

[0007] Furthermore, the process by which the representation construction unit extracts the semantic representation vectors of each sample in the intermediate layer of the model is as follows: S11. Perform word segmentation on each sample in the text dataset to be labeled, add position encoding and segment encoding to each word, and add special markers at the beginning and end of the sequence to obtain the word embedding sequence of each sample. S12. Input the word embedding sequence into the large language model, and use the output of the second-highest hidden layer of the large language model as the intermediate semantic representation of each sample. S13. Perform mean pooling on the word vectors between the first and last special tags in the intermediate layer semantic representation, and perform layer normalization on the pooling results to obtain the initial semantic representation vectors of each sample. S14. Perform principal component analysis to reduce the dimensionality of the initial semantic representation vectors of all samples, and map the semantic representation vectors of each sample to a representation space of a unified dimension to obtain a set of semantic representation vectors used to construct the representation of the gravitational field.

[0008] Furthermore, the process by which the representation building unit calculates the center of mass and gravitational radius of each label category in the representation space is as follows: S21. Assign pseudo-labels to each sample according to the preset labeling system, and classify samples with the same pseudo-labels into the same label category; S22. For each label category, calculate the mean vector of the semantic representation vectors of all samples under that category, and use the mean vector as the mass center of that label category. S23. For each label category, with the mass center of that category as the center of the sphere, calculate the Euclidean distance from each sample in that category to the mass center to obtain the distance distribution of that category; S24. Take the upper quartile of the distance distribution as the gravitational radius of the label category. At the same time, construct the gravitational field between categories based on the mass center and gravitational radius of each label category. The probability of a sample being mislabeled to a certain category is inversely proportional to the distance of the sample from the mass center of that category and directly proportional to the gravitational radius of that category.

[0009] Furthermore, the process by which the drift monitoring unit statistically analyzes the label distribution of each label category in each labeling batch in real time is as follows: S31. For each annotation batch, count the number of samples of each label category output by the large language model in that batch, calculate the proportion of each label category in that batch, and obtain the actual annotation distribution of that batch. S32. Based on the gravitational radius and the distance between the centers of mass of each tag category in the gravitational field, calculate the theoretical label distribution of each tag category under the condition of no drift. S33. Subtract the proportion of the corresponding category in the actual annotation distribution from the proportion in the theoretical annotation distribution to obtain the offset component of each label category; S34. Combine the offset components of all label categories into an offset vector. The direction of the offset vector is the offset direction of the label distribution, and the magnitude of the offset vector is the offset amount.

[0010] Furthermore, the process by which the anchor point generation unit dynamically generates anti-gravity anchor point samples with low-frequency real labels within the boundary region is as follows: S41. Based on the label distribution offset direction, identify the high-frequency category with the largest offset and the low-frequency category with the most severe adsorption; S42. In the characterization space, the boundary region of the gravitational field of the high-frequency category is determined with the mass center of the high-frequency category as the center and the gravitational radius of the high-frequency category as the radius. S43. Within the boundary region, a synthetic text sample with semantic representation located in the region and real label of low frequency category is generated by the Transformer decoder. The Transformer decoder serves as the computational carrier for generating anti-gravity anchors, uses the synthetic text sample as anti-gravity anchor sample, labels each anti-gravity anchor sample with a real label, and records its position coordinates in the representation space.

[0011] Furthermore, the process by which the anchor point generation unit generates reverse gravitational perturbations in the representation space using the annotation results of the anti-gravity anchor point samples from the large language model is as follows: S51. Insert the anti-gravity anchor point sample into the subsequent annotation sequence of the current annotation batch, so that the large language model annotates the anti-gravity anchor point sample before annotating the subsequent samples. S52. When the large language model outputs the correct low-frequency category label for the anti-gravity anchor point sample, the labeling result corresponds to the vector pointing from the high-frequency category boundary region to the mass center of the low-frequency category in the representation space. The vector is used as the anti-gravity perturbation vector. The effective gravitational radius of the high-frequency category in the gravitational field is updated according to the anti-gravity perturbation vector, so that the adsorption force of the high-frequency category on subsequent samples is reduced. S53. When the large language model does not output the correct low-frequency category label for the anti-gravity anchor sample, the anti-gravity anchor sample is determined to be invalid. The position of the invalid anchor in the representation space is recorded. Based on the invalid position, the anchor generation area is shrunk towards the low-frequency category mass center. The anti-gravity anchor sample is regenerated and inserted into the label sequence. At the same time, the number of anchor insertions is increased until the anti-gravity anchor sample is correctly labeled. S54. Repeatedly insert anti-gravity anchor point samples until the label distribution offset of the current batch falls back to the preset offset range.

[0012] Furthermore, the process by which the chaotic reset unit calculates the Lyapunov exponent of the annotation system based on the changes in the annotation distribution of multiple consecutive batches is as follows: S61. Take the label distribution vectors of N consecutive label batches to form a time series. Select two adjacent label distribution vectors in the time series as initial trajectory points and calculate the initial distance between the two initial trajectory points. S62. Proceeding along the time series, calculate the evolution distance between the two trajectory points in subsequent batches. Based on the rate of change of the logarithm of the ratio of the evolution distance to the initial distance as the batch progresses, calculate the Lyapunov exponent of the annotation system. S63. When the Lyapunov exponent is positive and exceeds the preset chaos threshold, it indicates that the labeling system is sensitive to the initial conditions and small disturbances will be amplified, and the labeling system is judged to have entered a chaotic drift state. S64. When the Lyapunov exponent does not exceed the preset chaos threshold, it is determined that the labeling system has not entered the chaotic drift state, and the labeling continues to be executed in batch order, and the label distribution offset is continuously corrected through the anchor point generation unit.

[0013] Furthermore, the process by which the chaotic reset unit triggers the context window reset of the large language model is as follows: S71. When the labeling system is determined to enter a chaotic drift state, save the labeling results of the current batch of labeled samples, and clear the historical dialogue and labeled sample records in the context window of the large language model, and clear the accumulated attention shift state. S72. Use the reset context window to annotate the next batch of samples, and insert a preset number of anti-gravity anchor point samples into the first batch of annotations after the reset to stabilize the annotation system state. Then merge the annotation results before and after the reset to obtain the complete text data annotation results.

[0014] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are: This intelligent text annotation system based on a large language model extracts intermediate-layer semantic representation vectors from samples in the text dataset by using a representation construction unit. Based on the semantic representation distribution of each label category, it calculates the center of mass and radius of gravity to construct a representational gravitational field, creating gravitational regions with clear boundaries for each category. This provides a geometric reference for drift monitoring and anchor point generation. Furthermore, a drift monitoring unit divides the dataset into multiple batches for sequential annotation, statistically analyzing the label distribution of each category and comparing it with the theoretical distribution of the representational gravitational field. This yields the label distribution shift direction and magnitude, allowing for timely detection of the phenomenon where model attention shrinks towards high-frequency categories, leading to the absorption of low-frequency categories. This overcomes the limitation of fixed anchor points in adapting to drift changes. Further, an anchor point generation unit... The system dynamically generates anti-gravity anchor samples for low-frequency categories in the gravitational field boundary region of high-frequency categories based on the offset direction and amount, and inserts them into subsequent sequences. It uses a large language model to generate reverse gravity perturbation on the annotation results of the anti-gravity anchor samples to weaken the abnormal attraction of high-frequency categories. It also corrects the annotation distribution through an adaptive regeneration mechanism of failed anchors, so that the label distribution offset falls back to the preset offset range, realizing real-time correction of annotation drift rather than post-event detection. In addition, the system calculates the Lyapunov exponent based on the changes in the annotation distribution of multiple consecutive batches through a chaos reset unit. When the exponent exceeds the preset chaos threshold, the system is determined to have entered a chaotic drift state and the context window is reset to clear the accumulated attention offset. This enables rapid recovery when the system is severely drifting, significantly improving the annotation efficiency of text data in the large language model. Attached Figure Description

[0015] Figure 1 A schematic diagram of the system flow of the present invention is shown; Figure 2 A schematic diagram of the annotation status analysis process of the present invention is shown. Detailed Implementation

[0016] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0017] Example: like Figures 1-2 As shown, the intelligent text data annotation system based on the large language model first obtains the text dataset to be annotated and the preset label system through the representation construction unit. Then, each sample in the text dataset to be annotated is input into the large language model, and the semantic representation vector of each sample is extracted from the middle layer of the large language model. According to the semantic representation distribution of each label category in the preset label system, the center of mass and radius of gravity of each label category in the representation space are calculated, and the representation gravitational field between categories is constructed. The process of extracting the semantic representation vectors of each sample in the intermediate layer of the model from the representation building unit is as follows: S11. Perform word segmentation on each sample in the text dataset to be labeled. The word segmentation method is sub-word segmentation. Each text sample is split into a sequence of word units. For out-of-vocabulary words, they are further split into smaller sub-word units to cover open vocabulary. Add position encoding and segment encoding to each word unit. Position encoding is used to identify the sequential position of word unit in the sequence. The segment encoding is used to distinguish different sentence segments in the same sample. The two are added to the word embedding to form the model input. Add special markers at the beginning and end of the sequence. The special marker at the beginning of the sequence is used to gather the semantic information of the whole sentence. The special marker at the end of the sequence is used to identify the end boundary of the sentence to obtain the word embedding sequence of each sample. S12. Input the word embedding sequence into the large language model, and use the output of the second-to-top hidden layer of the large language model as the intermediate semantic representation of each sample. It should be noted that the large language model uses the BERT network model as the computational carrier for semantic representation extraction. The reason for choosing the output of the second-to-top hidden layer is that the top hidden layer is adjacent to the output projection layer, and its representation is greatly affected by the pre-training target, and the geometric boundaries between categories are not clear enough. On the other hand, the second-to-top hidden layer has completed multi-layer semantic aggregation, which can reflect sentence-level semantic information, and is not affected by the task-specific modulation of the output projection layer. The representation distribution is relatively smooth, the similar samples are tightly clustered, and the boundaries of the dissimilar samples are clear, which is conducive to the stable calculation of the mass center and gravitational radius in the later stage. S13. Perform mean pooling on the word vectors between the first and last special tags in the intermediate semantic representation, and perform layer normalization on the pooling result. Layer normalization means subtracting the mean of the vector from each dimension of the pooled vector and dividing by the standard deviation, so that the distribution of each dimension is uniformly zero mean and unit variance, eliminating the difference in representation scale between different samples, and obtaining the initial semantic representation vector of each sample. S14. Perform principal component analysis to reduce the dimensionality of the initial semantic representation vectors of all samples. Principal component analysis dimensionality reduction refers to calculating the eigenvalues ​​and eigenvectors of the covariance matrix of the matrix formed by all initial semantic representation vectors, selecting the top few eigenvectors with the largest variance contribution as the projection basis, projecting the high-dimensional initial representation onto the low-dimensional subspace, and mapping the semantic representation vectors of each sample to a representation space of the same dimension, thereby obtaining a set of semantic representation vectors used to construct the representation of the gravitational field.

[0018] The process by which the characterization building block calculates the center of mass and radius of gravity of each label category in the characterization space is as follows: S21. Assign pseudo-labels to each sample according to the preset label system. Pseudo-label assignment means inputting the name text of each label category into the big language model to extract semantic representation, calculating the cosine similarity between the semantic representation of each sample and the representation of each label name, taking the label category with the highest similarity as the pseudo-label of the sample, and classifying samples with the same pseudo-label into the same label category. S22. For each label category, calculate the mean vector of the semantic representation vectors of all samples in that category. The mean vector is the vector obtained by summing the semantic representation vectors of all samples in that category along each dimension and dividing by the total number of samples in that category. The vector is located at the geometric center of all samples in that category in the representation space. The mean vector is used as the mass center of that label category. S23. For each label category, with the mass center of that category as the center of the sphere, calculate the Euclidean distance from each sample in that category to the mass center to obtain the distance distribution of that category; S24. Take the upper quartile of the distance distribution as the gravitational radius of the label category (where the upper quartile refers to the value at the 75th percentile after sorting the distance distribution from smallest to largest). At the same time, construct a gravitational field representing the categories based on the mass center and gravitational radius of each label category. The probability of a sample being mislabeled to a certain category is inversely proportional to the distance of the sample to the mass center of that category and directly proportional to the gravitational radius of that category. It should be noted that inversely proportional means that the closer the sample is to the mass center of a certain category, the higher the probability of being attracted by the gravitational field of that category and mislabeled. Directly proportional means that the larger the gravitational radius of a certain category, the wider the coverage of its gravitational field and the stronger its attraction to samples in the boundary area.

[0019] Then, the text dataset to be labeled is divided into multiple labeling batches by the drift monitoring unit. Each sample is input into the large language model for labeling in the order of the batches. The labeling distribution of each label category in each labeling batch is statistically analyzed in real time. The labeling distribution of the current batch is compared with the theoretical distribution of each category in the gravitational field to obtain the label distribution offset direction and offset amount of the current batch. The process by which the drift monitoring unit statistically analyzes the label distribution of each label category in each label batch in real time is as follows: S31. For each annotation batch, count the number of samples of each label category output by the large language model in that batch, calculate the proportion of each label category in that batch, and obtain the actual annotation distribution of that batch. S32. Based on the gravitational radius and the distance between the centers of mass of each tag category in the gravitational field, calculate the theoretical label distribution of each tag category under drift-free conditions. It should be noted that the specific steps for calculating the theoretical label distribution of each tag category under drift-free conditions are as follows: Step 1: Calculate the distance from the sample to the mass center of each category. For each sample in the representation space, calculate the Euclidean distance from the sample to the mass center of each labeled category. The mass center is the geometric center of each category in the representation space. The distance from the sample to the mass center of different categories reflects the semantic proximity of the sample to each category; while the spacing between the mass centers reflects the semantic distinguishability between categories. The larger the spacing, the easier it is to distinguish between categories; the smaller the spacing, the more the gravitational fields overlap between categories, and the more difficult it is to distinguish them.

[0020] Step 2: Calculate the gravitational strength of the sample being attracted by each category. Based on the fundamental relationships characterizing the gravitational field, calculate the gravitational strength of each label category for each sample. The gravitational strength of a category to a sample is directly proportional to the gravitational radius of that category and inversely proportional to the distance from the sample to the center of mass of that category. That is, the gravitational strength equals the gravitational radius of the category divided by the sum of the distance and the gravitational radius. The larger the gravitational radius, the wider the adsorption range of that category in the characterization space, and the stronger the attraction to the sample; the farther the distance, the weaker the attraction.

[0021] Step 3: Determine the theoretical label category for each sample. For each sample, compare the strength of the attraction it receives from each label category, and take the category with the strongest attraction as the theoretical label category for that sample under drift-free conditions. This step simulates the ideal state where, without temporal drift interference, the large language model makes labeling decisions purely based on the geometric relationship between the sample semantics and the category center. In this case, high-frequency categories will not abnormally expand their attraction range due to batch progression.

[0022] Step 4: Obtain the theoretical label distribution. Count the number of samples assigned to each label category, divide the number of samples in each category by the total number of samples, and obtain the theoretical label distribution of each label category under the no-drift condition, i.e., the theoretical proportion of each category; S33. Subtract the proportion of the corresponding category in the actual annotation distribution from the proportion in the theoretical annotation distribution to obtain the offset component of each label category; S34. Combine the offset components of all label categories into an offset vector. The direction of the offset vector is the offset direction of the label distribution, and the magnitude of the offset vector is the offset amount.

[0023] Subsequently, the anchor point generation unit determines the boundary region of the high-frequency category gravitational field in the representation space based on the label distribution offset direction and offset amount. Within the boundary region, anti-gravity anchor point samples with real labels of low-frequency categories are dynamically generated. The anti-gravity anchor point samples are inserted into the subsequent labeling sequence of the current labeling batch. The labeling results of the anti-gravity anchor point samples by the large language model generate reverse gravity perturbation in the representation space to counteract the adsorption trend of high-frequency categories on low-frequency category samples. The process by which the anchor point generation unit dynamically generates anti-gravity anchor point samples with low-frequency real labels within the boundary region is as follows: S41. Based on the offset direction of the label distribution, identify the high-frequency category with the largest offset and the low-frequency category with the most severe adsorption. The high-frequency category refers to the label category with a positive offset component and the largest absolute value, that is, the category whose actual labeling ratio is significantly higher than the theoretical distribution. The low-frequency category refers to the label category with a negative offset component and the largest absolute value, that is, the category whose actual labeling ratio is significantly lower than the theoretical distribution. S42. In the characterization space, the boundary region of the gravitational field of the high-frequency category is determined with the mass center of the high-frequency category as the center and the gravitational radius of the high-frequency category as the radius. S43. Within the boundary region, a synthetic text sample with semantic representation located in the region and real label of low frequency category is generated by the Transformer decoder. The Transformer decoder serves as the computational carrier for generating anti-gravity anchors, uses the synthetic text sample as anti-gravity anchor sample, labels each anti-gravity anchor sample with a real label, and records its position coordinates in the representation space. The position coordinates are the semantic representation vector of the anchor sample after being extracted and dimensionality reduced by the large language model. This is used to verify whether the anchor is indeed located in the boundary region and to calculate the anti-gravity perturbation vector.

[0024] The process by which the anchor point generation unit generates reverse gravity perturbations in the representation space using the annotation results of the anti-gravity anchor point samples from the large language model is as follows: S51. Insert the anti-gravity anchor point sample into the subsequent annotation sequence of the current annotation batch, so that the large language model annotates the anti-gravity anchor point sample before annotating the subsequent samples. S52. When the large language model outputs the correct low-frequency category label for the anti-gravity anchor point sample, the labeling result corresponds to the vector pointing from the high-frequency category boundary region to the mass center of the low-frequency category in the representation space. The vector is used as the anti-gravity perturbation vector. The effective gravitational radius of the high-frequency category in the gravitational field is updated according to the anti-gravity perturbation vector (the update method is to multiply the gravitational radius of the high-frequency category by an attenuation coefficient less than 1. The attenuation coefficient is positively correlated with the magnitude of the anti-gravity perturbation vector, that is, the closer the anchor point is to the center of the high-frequency category and the correct labeling is, the greater the attenuation magnitude). This reduces the attraction of the high-frequency category to subsequent samples. S53. When the large language model fails to output the correct low-frequency category label for the anti-gravity anchor sample, the anti-gravity anchor sample is deemed invalid. The position of the invalid anchor in the representation space is recorded. Based on the invalid position, the anchor generation region is shrunk towards the low-frequency category mass center (shrinkage means simultaneously shifting the inner and outer radii of the boundary region towards the low-frequency category mass center, making the new generation region closer to the low-frequency category and farther from the high-frequency category center, reducing the probability of the anchor being swallowed by the high-frequency category). The anti-gravity anchor sample is regenerated and inserted into the label sequence. At the same time, the number of anchor insertions is increased until the anti-gravity anchor sample is correctly labeled. S54. Repeatedly insert anti-gravity anchor point samples until the label distribution offset of the current batch falls back to the preset offset range.

[0025] Finally, during the annotation process, the Lyapunov index of the annotation system is calculated based on the changes in the annotation distribution of multiple consecutive batches through the chaos reset unit. When the Lyapunov index exceeds the preset chaos threshold, the annotation system is determined to have entered a chaotic drift state, triggering the context window reset of the large language model, clearing the accumulated attention shift state, and continuing the annotation of subsequent batches. The process by which the chaotic reset unit calculates the Lyapunov exponent of the annotation system based on the changes in the annotation distribution of multiple consecutive batches is as follows: S61. Take the label distribution vectors of N consecutive label batches to form a time series (the label distribution vector is a vector formed by arranging the proportion of each label category in each batch in a fixed order, and its dimension is equal to the total number of label categories. The time series is arranged in the order of batches). N is an integer greater than or equal to 3. Select two adjacent label distribution vectors in the time series as initial trajectory points and calculate the initial distance between the two initial trajectory points. The initial distance is the Euclidean distance between the label distribution vectors of two adjacent batches, which reflects the degree of separation between two neighboring states of the system at the initial time. S62. Calculate the evolutionary distance between two trajectory points in subsequent batches as the time series progresses (evolutionary distance refers to the Euclidean distance between two initial trajectory points after they have each progressed along their respective evolutionary paths in the time series to the same subsequent batch). Based on the rate of change of the logarithm of the ratio of the evolutionary distance to the initial distance with batch progression, calculate the Lyapunov exponent of the annotation system. It should be noted that the Lyapunov exponent of the annotation system is calculated using the following formula. : ,in, Let N be the Lyapunov index of the annotation system, and N be the number of consecutively selected annotation batches. This is the initial distance between the distribution vectors of two adjacent batches. The evolution distance between two trajectory points when they advance along the time series to the t-th batch is quantified by taking the logarithm of the ratio of the evolution distance of each batch to the initial distance, summing the results, and then averaging them. S63. When the Lyapunov exponent is positive and exceeds the preset chaos threshold, it indicates that the labeling system is sensitive to the initial conditions and small disturbances will be amplified, and the labeling system is judged to have entered a chaotic drift state. S64. When the Lyapunov exponent does not exceed the preset chaos threshold, it is determined that the labeling system has not entered the chaotic drift state, and the labeling continues to be executed in batch order, and the label distribution offset is continuously corrected through the anchor point generation unit.

[0026] The process by which the chaotic reset unit triggers the context window reset of the large language model is as follows: S71. When the labeling system is determined to enter a chaotic drift state, save the labeling results of the current batch of labeled samples, and clear the historical dialogue and labeled sample records in the context window of the large language model, and clear the accumulated attention shift state. S72. Use the reset context window to annotate the next batch of samples, and insert a preset number of anti-gravity anchor point samples into the first batch of annotations after the reset to stabilize the annotation system state. Then merge the annotation results before and after the reset to obtain the complete text data annotation results.

[0027] This invention uses a representation construction unit to input samples from the text dataset to be labeled into a large language model to extract intermediate layer semantic representation vectors. Based on the semantic representation distribution of each label category, it calculates the mass center and gravitational radius to construct a representational gravitational field, enabling each category to form a gravitational region with clear boundaries, providing a geometric reference for drift monitoring and anchor point generation. Furthermore, a drift monitoring unit divides the dataset into multiple batches for sequential labeling, statistically analyzing the label distribution of each category in real time and comparing it with the theoretical distribution of the representational gravitational field to obtain the label distribution shift direction and amount. This allows for timely detection of the phenomenon where model attention shrinks towards high-frequency categories, causing low-frequency categories to be absorbed, overcoming the limitation of fixed anchor points in adapting to drift changes. Further, an anchor point generation unit, based on the shift direction and... The offset dynamically generates low-frequency category anti-gravity anchor samples in the high-frequency category gravitational field boundary region and inserts them into the subsequent sequence. The large language model generates reverse gravity perturbation on the annotation results of the anti-gravity anchor samples to weaken the abnormal attraction of high-frequency categories. The label distribution is corrected through an adaptive regeneration mechanism of failed anchors, so that the label distribution offset falls back to the preset offset range, realizing real-time correction of label drift rather than post-event detection. In addition, the Lyapunov exponent is calculated by the chaos reset unit based on the label distribution changes of multiple consecutive batches. When the exponent exceeds the preset chaos threshold, the system is determined to have entered a chaotic drift state and the context window is reset to clear the accumulated attention offset. This enables rapid recovery when the system is severely drifting, significantly improving the annotation efficiency of large language model text data.

[0028] The size of the interval and threshold is set to facilitate comparison. The size of the threshold depends on the amount of sample data and the number of bases set by those skilled in the art for each set of sample data; as long as it does not affect the ratio between the parameter and the quantized value.

[0029] The above formulas are all dimensionless calculations. The formulas are derived from software simulations based on a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation. The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A text data intelligent annotation system based on a large language model, characterized in that, It includes a characterization construction unit, a drift monitoring unit, an anchor point generation unit, and a chaos reset unit; The representation building unit is used to obtain the text dataset to be labeled and the preset label system. Each sample in the text dataset to be labeled is input into the large language model, and the semantic representation vector of each sample is extracted from the middle layer of the large language model. According to the semantic representation distribution of each label category in the preset label system, the center of mass and radius of gravity of each label category in the representation space are calculated, and the representation gravitational field between categories is constructed. The drift monitoring unit is used to divide the text dataset to be labeled into multiple labeling batches, input each sample into the large language model for labeling in batch order, and count the label distribution of each label category in each labeling batch in real time. The label distribution of the current batch is compared with the theoretical distribution of each category in the gravitational field to obtain the label distribution shift direction and shift amount of the current batch. The anchor point generation unit is used to determine the boundary region of the high-frequency category gravitational field in the representation space according to the offset direction and offset amount of the label distribution. Within the boundary region, it dynamically generates anti-gravity anchor point samples with the real label as the low-frequency category. The anti-gravity anchor point samples are inserted into the subsequent labeling sequence of the current labeling batch. The large language model is used to generate reverse gravity perturbation in the representation space based on the labeling results of the anti-gravity anchor point samples. The chaos reset unit is used to calculate the Lyapunov index of the annotation system based on the changes in the annotation distribution of multiple consecutive batches during the annotation process. When the Lyapunov index exceeds the preset chaos threshold, it is determined that the annotation system has entered a chaotic drift state, triggering the context window reset of the large language model, clearing the accumulated attention shift state, and continuing the annotation of subsequent batches.

2. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the representation construction unit extracts the semantic representation vector of each sample in the intermediate layer of the model is as follows: S11. Perform word segmentation on each sample in the text dataset to be labeled, add position encoding and segment encoding to each word, and add special markers at the beginning and end of the sequence to obtain the word embedding sequence of each sample. S12. Input the word embedding sequence into the large language model, and use the output of the second-highest hidden layer of the large language model as the intermediate semantic representation of each sample. S13. Perform mean pooling on the word vectors between the first and last special tags in the intermediate layer semantic representation, and perform layer normalization on the pooling results to obtain the initial semantic representation vectors of each sample. S14. Perform principal component analysis to reduce the dimensionality of the initial semantic representation vectors of all samples, and map the semantic representation vectors of each sample to a representation space of a unified dimension to obtain a set of semantic representation vectors used to construct the representation of the gravitational field.

3. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the characterization construction unit calculates the center of mass and gravitational radius of each label category in the characterization space is as follows: S21. Assign pseudo-labels to each sample according to the preset labeling system, and classify samples with the same pseudo-labels into the same label category; S22. For each label category, calculate the mean vector of the semantic representation vectors of all samples under that category, and use the mean vector as the mass center of that label category. S23. For each label category, with the mass center of that category as the center of the sphere, calculate the Euclidean distance from each sample in that category to the mass center to obtain the distance distribution of that category; S24. Take the upper quartile of the distance distribution as the gravitational radius of the label category. At the same time, construct the gravitational field between categories based on the mass center and gravitational radius of each label category. The probability of a sample being mislabeled to a certain category is inversely proportional to the distance of the sample from the mass center of that category and directly proportional to the gravitational radius of that category.

4. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the drift monitoring unit statistically analyzes the label distribution of each label category in each labeling batch in real time is as follows: S31. For each annotation batch, count the number of samples of each label category output by the large language model in that batch, calculate the proportion of each label category in that batch, and obtain the actual annotation distribution of that batch. S32. Based on the gravitational radius and the distance between the centers of mass of each tag category in the gravitational field, calculate the theoretical label distribution of each tag category under the condition of no drift. S33. Subtract the proportion of the corresponding category in the actual annotation distribution from the proportion in the theoretical annotation distribution to obtain the offset component of each label category; S34. Combine the offset components of all label categories into an offset vector. The direction of the offset vector is the offset direction of the label distribution, and the magnitude of the offset vector is the offset amount.

5. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the anchor point generation unit dynamically generates anti-gravity anchor point samples with low-frequency real labels within the boundary region is as follows: S41. Based on the label distribution offset direction, identify the high-frequency category with the largest offset and the low-frequency category with the most severe adsorption; S42. In the characterization space, the boundary region of the gravitational field of the high-frequency category is determined with the mass center of the high-frequency category as the center and the gravitational radius of the high-frequency category as the radius. S43. Within the boundary region, a synthetic text sample with semantic representation located in the region and real label of low frequency category is generated by the Transformer decoder. The Transformer decoder serves as the computational carrier for generating anti-gravity anchors, uses the synthetic text sample as anti-gravity anchor sample, labels each anti-gravity anchor sample with a real label, and records its position coordinates in the representation space.

6. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the anchor point generation unit generates reverse gravity perturbations in the representation space using the annotation results of the anti-gravity anchor point samples from the large language model is as follows: S51. Insert the anti-gravity anchor point sample into the subsequent annotation sequence of the current annotation batch, so that the large language model annotates the anti-gravity anchor point sample before annotating the subsequent samples. S52. When the large language model outputs the correct low-frequency category label for the anti-gravity anchor point sample, the labeling result corresponds to the vector pointing from the high-frequency category boundary region to the mass center of the low-frequency category in the representation space. The vector is used as the anti-gravity perturbation vector. The effective gravitational radius of the high-frequency category in the gravitational field is updated according to the anti-gravity perturbation vector, so that the adsorption force of the high-frequency category on subsequent samples is reduced. S53. When the large language model does not output the correct low-frequency category label for the anti-gravity anchor sample, the anti-gravity anchor sample is determined to be invalid. The position of the invalid anchor in the representation space is recorded. Based on the invalid position, the anchor generation area is shrunk towards the low-frequency category mass center. The anti-gravity anchor sample is regenerated and inserted into the label sequence. At the same time, the number of anchor insertions is increased until the anti-gravity anchor sample is correctly labeled. S54. Repeatedly insert anti-gravity anchor point samples until the label distribution offset of the current batch falls back to the preset offset range.

7. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the chaotic reset unit calculates the Lyapunov exponent of the annotation system based on the changes in the annotation distribution of multiple consecutive batches is as follows: S61. Take the label distribution vectors of N consecutive label batches to form a time series. Select two adjacent label distribution vectors in the time series as initial trajectory points and calculate the initial distance between the two initial trajectory points. S62. Proceeding along the time series, calculate the evolution distance between the two trajectory points in subsequent batches. Based on the rate of change of the logarithm of the ratio of the evolution distance to the initial distance as the batch progresses, calculate the Lyapunov exponent of the annotation system. S63. When the Lyapunov exponent is positive and exceeds the preset chaos threshold, it indicates that the labeling system is sensitive to the initial conditions and small disturbances will be amplified, and the labeling system is judged to have entered a chaotic drift state. S64. When the Lyapunov exponent does not exceed the preset chaos threshold, it is determined that the labeling system has not entered the chaotic drift state, and the labeling continues to be executed in batch order, and the label distribution offset is continuously corrected through the anchor point generation unit.

8. The intelligent text data annotation system based on a large language model according to claim 1, characterized in that, The process by which the chaotic reset unit triggers the context window reset of the large language model is as follows: S71. When the labeling system is determined to enter a chaotic drift state, save the labeling results of the current batch of labeled samples, and clear the historical dialogue and labeled sample records in the context window of the large language model, and clear the accumulated attention shift state. S72. Use the reset context window to annotate the next batch of samples, and insert a preset number of anti-gravity anchor point samples into the first batch of annotations after the reset to stabilize the annotation system state. Then merge the annotation results before and after the reset to obtain the complete text data annotation results.