Data annotation method based on large model

The proposed data annotation method leverages a pre-trained large model for automated data annotation, addressing label imbalance and accuracy issues, resulting in improved efficiency and reduced costs by integrating continuous monitoring and feedback mechanisms.

CN119622342APending Publication Date: 2025-03-14IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411786750.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

Current data annotation methods face issues of label imbalance, inaccurate labels, and image label errors due to limited expertise among annotators, leading to low quality and efficiency, along with increased costs.

Method used

A data annotation method utilizing a pre-trained large model for automated data annotation, which includes data preprocessing, model training, interface encapsulation, and continuous monitoring to ensure high-quality and efficient annotation with reduced human intervention.

Benefits of technology

The method significantly enhances annotation efficiency and accuracy, reduces costs by minimizing human error and time, and ensures consistent and reliable data through continuous monitoring and feedback loops.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119622342A_ABST
    Figure CN119622342A_ABST
Patent Text Reader

Abstract

The invention discloses a data annotation method based on a large model. The data annotation method comprises the following specific steps: acquiring data and preprocessing the data to obtain input data; performing model training based on the arbitrary-degree large model and the input data to obtain a pre-trained arbitrary-degree large model; performing interface packaging on the pre-trained random degree large model; performing fine tuning on the packaged pre-training arbitrary-degree large model to obtain a target arbitrary-degree large model; acquiring to-be-labeled data, inputting the to-be-labeled data into the target arbitrary-degree large model for labeling, and outputting to obtain labeled data; and monitoring, feeding back and recording the fine tuning process of the pre-trained arbitrary-degree large model and the labeling process of the target arbitrary-degree large model to obtain historical fine tuning data, historical data to be labeled and historical labeling data. According to the method, the problems of label imbalance, label inaccuracy and image label error are solved, the labeling quality and efficiency are improved, and the labeling cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data annotation, and in particular to a data annotation method based on a large model. Background Art

[0002] With the advent of the big data era, people are increasingly aware of the importance of data in the field of natural language processing. High-quality and large amounts of data play a vital role in the training and application of large models.

[0003] Current data labeling solutions usually randomly assign the data to be labeled to labelers. Since most labelers can only accurately label questions in a few limited fields, they face problems such as imbalance between data and corresponding labels, inaccurate labels, and incorrect image labels, resulting in low labeling quality and efficiency of labeled data. At the same time, manual participation increases labeling costs. Summary of the invention

[0004] In order to solve the existing technical problems, the present invention provides a data labeling method based on a large model to solve the problems of label imbalance, inaccurate labeling and image label errors, improve the labeling quality and efficiency, and reduce the labeling cost.

[0005] The technical solution adopted by the present invention is:

[0006] A data annotation method based on a large model includes the following specific steps:

[0007] S1, acquiring data and preprocessing the data to obtain input data;

[0008] S2, performing model training based on the Renduda model and input data to obtain a pre-trained Renduda model;

[0009] S3, encapsulating the pre-trained large-scale model into an interface, wherein the interface accepts a labeling request, returns a labeling result and a confidence level of the labeling result;

[0010] S4, fine-tuning the encapsulated pre-trained arbitrary large model to obtain the target arbitrary large model;

[0011] S5, obtaining the data to be annotated, and inputting it into the target large-scale model for annotation, and outputting the annotated data;

[0012] S6. Monitor and feedback the fine-tuning process of the pre-trained large-scale model and the labeling process of the target large-scale model, and record the fine-tuning historical data, the historical data to be labeled, and the historical data to be labeled, and collect the operation log of the target large-scale model to obtain the operation log historical data.

[0013] Furthermore, the data preprocessing in step S1 specifically includes:

[0014] S11. Clean the acquired data in batches:

[0015] Use the Pandas library in Python to identify and remove noise, correct data errors and fill in missing values;

[0016] S12. Format and structure the cleaned data:

[0017] Write a script to convert the cleaned data into CSV format;

[0018] The cleaned data is structured to fit the dimensions and type of the input layer of any large model;

[0019] S13. Store the formatted and structured data in batches and build indexes:

[0020] Use Spark in Python to store formatted and structured data in batches into a database management system and build indexes;

[0021] S14. Enhance, expand and protect the stored data:

[0022] Use the image processing library Open CV to rotate, scale and crop the stored data;

[0023] Use the NLTK natural language processing library to perform synonym replacement and sentence reorganization on the stored data;

[0024] Use the AES algorithm to encrypt data to ensure the security of data transmission and storage;

[0025] Desensitize sensitive information in the data to achieve reliable protection of sensitive privacy data;

[0026] S15. Integrate the enhanced, expanded and protected data:

[0027] Input data into the training system through the data import function of the training system;

[0028] Use the data version control tool DVC to track data changes and ensure the consistency and reproducibility of data and model training process.

[0029] Furthermore, the step S2 specifically includes:

[0030] S21. Data loading and preprocessing:

[0031] Use PyTorch's Data Loader library to batch load input data, and perform normalization, standardization, and encoding conversion preprocessing on the loaded input data;

[0032] S22, constructing a Renduda model, wherein the Renduda model is a zANN neural network framework based on a Transformer-like framework;

[0033] S23, Optimizer settings:

[0034] Define the loss function and use the Adam optimizer to set the learning rate and related hyperparameters;

[0035] S24, model regularization and batch normalization processing:

[0036] Add Dropout and L1 / L2 regularization layers to any large model to prevent overfitting;

[0037] Batch Normalization is used to speed up the training process of large models and improve their stability.

[0038] S25, model distributed training and mixed precision training:

[0039] Use PyTorch’s Distributed Data Parallel to perform distributed training on any large model and distribute training tasks across multiple GPUs;

[0040] Use NVIDIA's APEX to train large models with mixed precision, reducing memory usage and speeding up training;

[0041] S26. Model monitoring:

[0042] During the model training process, the callback function is used to monitor it, including EarlyStopping and Learning Rate Scheduler, and the loss rate and accuracy rate during the training and verification process are recorded;

[0043] S27. Model evaluation and tuning:

[0044] Evaluate model performance on an independent validation set, use confusion matrix and ROC curve indicators to analyze the model's predictive ability, and adjust the model structure or hyperparameters based on feedback to obtain an optimized model.

[0045] S28. Model saving and deployment:

[0046] After the training is completed, use PyTorch's torch.save to save the model, and deploy the saved trained model as needed to obtain a pre-trained large-scale model.

[0047] Furthermore, the step S3 specifically includes:

[0048] S31. Model packaging and interface development:

[0049] Integrate the pre-trained large-scale model into the Torch Serve framework and deploy the encapsulated model;

[0050] Use the Fast API web framework to develop a REST API interface to ensure that the interface can receive data annotation requests and interact with the model;

[0051] S32. Testing and deployment of interface services:

[0052] Perform unit and integration testing on the API in the development environment to ensure its functional correctness;

[0053] Use Docker containers and deploy them on servers to ensure service accessibility and stability;

[0054] S33, request processing and model reasoning:

[0055] Request processing logic, which parses and preprocesses the received annotation requests and inputs them into the pre-trained model for inference;

[0056] The model inference results and confidence are returned to the user through the API;

[0057] Use asynchronous processing or message queue Kafka to manage high concurrent requests;

[0058] S34. Performance monitoring and optimization:

[0059] Use the monitoring tool Grafana to monitor the performance indicators of the API, including response time, system load, and memory utilization;

[0060] Optimize service performance based on monitoring results by adding resources, optimizing algorithms, or using model quantization techniques;

[0061] S35. Feedback and model iteration:

[0062] Establish a user feedback mechanism to collect users’ satisfaction and specific opinions on the annotation results;

[0063] Iteratively optimize the model based on feedback, including retraining, fine-tuning, or updating the model structure;

[0064] The CI / CD process is used to automate the iteration and deployment process of the model to obtain a packaged pre-trained large-scale model.

[0065] Furthermore, the step S4 specifically includes:

[0066] S41. Data preparation and enhancement:

[0067] Collect task-specific labeled data, including inaccurate cases;

[0068] Clean, segment, and encode the data, and apply data enhancement techniques to enrich the data set;

[0069] S42. Select fine-tuning strategy:

[0070] Determine the fine-tuning strategy, including full fine-tuning or parameter efficient fine-tuning (PEFT); specifically, Prefix Tuning, Prompt Tuning, and Adapter Tuning;

[0071] S43. Set fine-tuning parameters:

[0072] Set hyperparameters, including learning rate, training rounds (epochs), and batch size (batch size);

[0073] S44, fine-tuning model training:

[0074] Load the pre-trained model and weights, and make necessary structural adjustments to the model according to task requirements;

[0075] Perform fine-tuning training using loss functions and optimizers, including forward propagation, loss calculation, backpropagation, and weight updates;

[0076] S45. Model evaluation and optimization:

[0077] Use accuracy and F1 score metrics to evaluate model performance on the validation set;

[0078] Adjust fine-tuning strategies and hyperparameters based on evaluation results to optimize model performance;

[0079] S46. Model deployment and application:

[0080] Update the fine-tuned model to the encapsulated pre-trained large-scale model and provide an interface for the system to call;

[0081] The performance of the model in actual use is monitored and necessary iterative optimization is performed based on the feedback to obtain the target large-scale model.

[0082] Furthermore, the step S5 specifically includes:

[0083] S51, receiving data:

[0084] Through the front-end interface, users upload or input the data to be labeled;

[0085] Use the API interface to receive the data to be annotated;

[0086] The front-end interface is built with JavaScript and uses frameworks such as React to enhance interactivity;

[0087] S52. Data preprocessing:

[0088] In the backend service, the data to be annotated is cleaned and formatted to meet the input requirements of the large model, including text cleaning, encoding conversion, and word segmentation, and ensuring that the data format is consistent with the model's expectations;

[0089] S53, calling service interface:

[0090] Develop backend logic to call the packaged AnyDu model service interface, build HTTP requests, send user data to the API and receive the model's response;

[0091] Use Python's requests library and HTTP client tools to make API calls;

[0092] S54. Result processing and feedback:

[0093] Process the annotation results and confidence levels output by any large model, convert them into a user-understandable format, and merge, sort, or visualize the results to obtain the annotation data;

[0094] Return the annotation data directly to the caller through the API interface;

[0095] S55, Service deployment and maintenance:

[0096] Deploy the entire annotation service to a server or cloud platform to ensure its stable operation and scalability;

[0097] Deploy using Docker containerization technology and Kubernetes orchestration tools;

[0098] Implement logging and monitoring to track service status and user behavior and respond quickly to issues that arise.

[0099] Furthermore, the step S6 specifically includes:

[0100] S61, Real-time monitoring:

[0101] Use monitoring tools to track the performance indicators of the Rendu model service, including the history of data to be annotated, the history of annotation, the operation log, and resource usage, and ensure that the system records and stores the history data to be annotated, the history data of annotation, and the history data of operation log for analysis;

[0102] S62. Log management and anomaly detection:

[0103] Collect the historical data of the operation log of any large model;

[0104] Use the ELK Stack log analysis tool to perform real-time analysis of historical operation log data. When an abnormal pattern is detected, relevant personnel are automatically notified to quickly discover and respond to abnormal situations while implementing an automated anomaly detection mechanism.

[0105] S63. Performance evaluation and feedback collection:

[0106] Regularly evaluate the performance indicators of any large model, including accuracy and recall indicators;

[0107] Collect feedback about model performance through user feedback and system monitoring data to provide a basis for model optimization;

[0108] S64. Fine-tuning history and analysis:

[0109] Record the detailed information of each fine-tuning of the Rendu model, that is, the fine-tuning history data, including fine-tuning parameters, data sets, training cycles and performance changes, analyze the fine-tuning history, and identify the trend of model performance improvement or decline;

[0110] S65, model iteration and training optimization:

[0111] Based on monitoring data and user feedback, the model training process is continuously iterated to optimize hyperparameters and improve the accuracy and pertinence of the model.

[0112] Compared with the prior art, the present invention has the following beneficial effects:

[0113] 1) The data annotation method based on the Renduda model uses the semantic understanding and generation capabilities of the Renduda model in an automated way to quickly generate high-quality annotated data and significantly improve the annotation efficiency;

[0114] 2) The large model has strong language understanding capabilities after pre-training, and can more accurately perform operations such as data classification, box drawing, annotation and labeling, thereby ensuring the accuracy and consistency of the labeled data;

[0115] 3) Reduce manual intervention. The annotation method based on large models can significantly reduce labor costs. At the same time, the automated annotation process can also reduce time costs and management costs.

[0116] 4) Reduce label imbalance, label inaccuracy, and image label errors through algorithm optimization and intelligent correction;

[0117] 5) Continuous monitoring and evaluation to ensure the reliability and validity of the labeled data generated by large models, and to identify and correct biases and errors. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments:

[0119] Figure 1 It is a flow chart of a data annotation method based on a large model of the present invention. DETAILED DESCRIPTION

[0120] Example

[0121] The specific details of the Renduda model mentioned in this embodiment are as follows:

[0122] (1) Any large model

[0123] The "Rendu Big Model" is a large language model independently developed by Language Network (Wuhan) Information Technology Co., Ltd. with zero open source dependencies. The "Rendu Big Model" R&D team recoded and developed the Transformer-like neural network framework zANN, and optimized the network structure to maintain more efficient parallel computing capabilities. The "Rendu Big Model" is based on a parameter scale of 11 billion, and can quickly analyze, understand and generate large-scale text data in a relatively low computing power environment. It also has good knowledge understanding reasoning, mathematics, programming guidance and intelligent agent interaction capabilities, and has demonstrated excellent intelligence in various fields.

[0124] At the same time, based on multi-level learning and fusion training, the "Rendu Big Model" also has cross-modal understanding capabilities. It can effectively combine the semantic understanding of multimodal data such as text, voice, images and videos, and realize cross-modal reasoning and knowledge transfer. This enables Rendu to not only understand user natural language in conversational interactions, but also understand and parse multi-modal content, providing richer understanding and generation capabilities.

[0125] The “RenDu Da Model” has passed the inspection of China Academy of Information and Communications Technology, report number: 24V01K000255-001.

[0126] (2) zANN architecture

[0127] The zANN framework is a deep learning neural network framework independently developed by Yuwang Network (Wuhan) Information Technology Co., Ltd.

[0128] like Figure 1 As shown, a data annotation method based on a large model includes the following specific steps:

[0129] S1, acquiring data and preprocessing the data to obtain input data;

[0130] Specifically, the data preprocessing includes:

[0131] S11. Clean the acquired data in batches:

[0132] Use the Pandas library in Python to identify and remove noise, correct data errors and fill in missing values;

[0133] S12. Format and structure the cleaned data:

[0134] Write a script to convert the cleaned data into CSV format;

[0135] The cleaned data is structured to fit the dimensions and type of the input layer of any large model;

[0136] S13. Store the formatted and structured data in batches and build indexes:

[0137] Use Spark in Python to store formatted and structured data in batches into a database management system and build indexes;

[0138] S14. Enhance, expand and protect the stored data:

[0139] Use the image processing library Open CV to rotate, scale and crop the stored data;

[0140] Use the NLTK natural language processing library to perform synonym replacement and sentence reorganization on the stored data;

[0141] Use the AES algorithm to encrypt data to ensure the security of data transmission and storage;

[0142] Desensitize sensitive information in the data to achieve reliable protection of sensitive privacy data;

[0143] S15. Integrate the enhanced, expanded and protected data:

[0144] Input data into the training system through the data import function of the training system;

[0145] Use the data version control tool DVC to track data changes and ensure the consistency and reproducibility of data and model training process.

[0146] S2. Model training is performed based on the Renduda model and input data to obtain a pre-trained Renduda model, specifically including:

[0147] S21. Data loading and preprocessing:

[0148] Use PyTorch's DataLoader data loading library to batch load input data, and perform normalization, standardization, and encoding conversion preprocessing on the loaded input data;

[0149] S22, constructing a Renduda model, wherein the Renduda model is a zANN neural network framework based on a Transformer-like framework;

[0150] S23, Optimizer settings:

[0151] Define the loss function and use the Adam optimizer to set the learning rate and related hyperparameters;

[0152] S24, model regularization and batch normalization processing:

[0153] Add Dropout and L1 / L2 regularization layers to any large model to prevent overfitting;

[0154] Batch Normalization is used to speed up the training process of large models and improve their stability.

[0155] S25, model distributed training and mixed precision training:

[0156] Use PyTorch’s Distributed Data Parallel to perform distributed training on any large model and distribute training tasks across multiple GPUs;

[0157] Use NVIDIA's APEX to train large models with mixed precision, reducing memory usage and speeding up training;

[0158] S26. Model monitoring:

[0159] During the model training process, the callback function is used to monitor it, including EarlyStopping and Learning Rate Scheduler, and the loss rate and accuracy rate during the training and verification process are recorded;

[0160] S27. Model evaluation and tuning:

[0161] Evaluate model performance on an independent validation set, use confusion matrix and ROC curve indicators to analyze the model's predictive ability, and adjust the model structure or hyperparameters based on feedback to obtain an optimized model.

[0162] S28. Model saving and deployment:

[0163] After the training is completed, use PyTorch's torch.save to save the model, and deploy the saved trained model as needed to obtain a pre-trained large-scale model.

[0164] S3. Encapsulate the pre-trained large-scale model into an interface, wherein the interface accepts a labeling request, returns a labeling result and a confidence level of the labeling result, specifically including:

[0165] S31. Model packaging and interface development:

[0166] Integrate the pre-trained large-scale model into the Torch Serve framework and deploy the encapsulated model;

[0167] Use the Fast API web framework to develop a REST API interface to ensure that the interface can receive data annotation requests and interact with the model;

[0168] S32. Testing and deployment of interface services:

[0169] Perform unit and integration testing on the API in the development environment to ensure its functional correctness;

[0170] Use Docker containers and deploy them on servers to ensure service accessibility and stability;

[0171] S33, request processing and model reasoning:

[0172] Request processing logic, which parses and preprocesses the received annotation requests and inputs them into the pre-trained model for inference;

[0173] The model inference results and confidence are returned to the user through the API;

[0174] Use asynchronous processing or message queue Kafka to manage high concurrent requests;

[0175] S34. Performance monitoring and optimization:

[0176] Use the monitoring tool Grafana to monitor the performance indicators of the API, including response time, system load, and memory utilization;

[0177] Optimize service performance based on monitoring results by adding resources, optimizing algorithms, or using model quantization techniques;

[0178] S35. Feedback and model iteration:

[0179] Establish a user feedback mechanism to collect users’ satisfaction and specific opinions on the annotation results;

[0180] Iteratively optimize the model based on feedback, including retraining, fine-tuning, or updating the model structure;

[0181] The CI / CD process is used to automate the iteration and deployment process of the model to obtain a packaged pre-trained large-scale model.

[0182] S4. Fine-tune the encapsulated pre-trained arbitrary large model to obtain the target arbitrary large model, specifically including:

[0183] S41. Data preparation and enhancement:

[0184] Collect task-specific labeled data, including inaccurate cases;

[0185] Clean, segment, and encode the data, and apply data enhancement techniques to enrich the data set;

[0186] S42. Select fine-tuning strategy:

[0187] Determine the fine-tuning strategy, including full fine-tuning or parameter efficient fine-tuning (PEFT); specifically, Prefix Tuning, Prompt Tuning, and Adapter Tuning;

[0188] S43. Set fine-tuning parameters:

[0189] Set hyperparameters, including learning rate, training rounds (epochs), and batch size (batch size);

[0190] S44, fine-tuning model training:

[0191] Load the pre-trained model and weights, and make necessary structural adjustments to the model according to task requirements;

[0192] Perform fine-tuning training using loss functions and optimizers, including forward propagation, loss calculation, backpropagation, and weight updates;

[0193] S45. Model evaluation and optimization:

[0194] Use accuracy and F1 score metrics to evaluate model performance on the validation set;

[0195] Adjust fine-tuning strategies and hyperparameters based on evaluation results to optimize model performance;

[0196] S46. Model deployment and application:

[0197] Update the fine-tuned model to the encapsulated pre-trained large-scale model and provide an interface for the system to call;

[0198] The performance of the model in actual use is monitored and necessary iterative optimization is performed based on the feedback to obtain the target large-scale model.

[0199] S5. Obtain the data to be annotated, input it into the target large-scale model for annotation, and output the annotated data, specifically including:

[0200] S51, receiving data:

[0201] Through the front-end interface, users upload or input the data to be labeled;

[0202] Use the API interface to receive the data to be annotated;

[0203] The front-end interface is built with JavaScript and uses frameworks such as React to enhance interactivity;

[0204] S52. Data preprocessing:

[0205] In the backend service, the data to be annotated is cleaned and formatted to meet the input requirements of the large model, including text cleaning, encoding conversion, and word segmentation, and ensuring that the data format is consistent with the model's expectations;

[0206] S53, calling service interface:

[0207] Develop backend logic to call the packaged AnyDu model service interface, build HTTP requests, send user data to the API and receive the model's response;

[0208] Use Python's requests library and HTTP client tools to make API calls;

[0209] S54. Result processing and feedback:

[0210] Process the annotation results and confidence levels output by any large model, convert them into a user-understandable format, and merge, sort, or visualize the results to obtain the annotation data;

[0211] Return the annotation data directly to the caller through the API interface;

[0212] S55, Service deployment and maintenance:

[0213] Deploy the entire annotation service to a server or cloud platform to ensure its stable operation and scalability;

[0214] Deploy using Docker containerization technology and Kubernetes orchestration tools;

[0215] Implement logging and monitoring to track service status and user behavior and respond quickly to issues that arise.

[0216] S6. Monitor and feedback the fine-tuning process of the pre-trained large-scale model and the labeling process of the target large-scale model, and record the fine-tuning historical data, the historical data to be labeled, and the labeled historical data, and collect the operation log of the target large-scale model to obtain the operation log historical data, specifically including:

[0217] S61, Real-time monitoring:

[0218] Use monitoring tools to track the performance indicators of the Rendu model service, including the history of data to be annotated, the history of annotation, the operation log, and resource usage, and ensure that the system records and stores the history data to be annotated, the history data of annotation, and the history data of operation log for analysis;

[0219] S62. Log management and anomaly detection:

[0220] Collect the historical data of the operation log of any large model;

[0221] Use the ELK Stack log analysis tool to perform real-time analysis of historical operation log data. When an abnormal pattern is detected, relevant personnel are automatically notified to quickly discover and respond to abnormal situations while implementing an automated anomaly detection mechanism.

[0222] S63. Performance evaluation and feedback collection:

[0223] Regularly evaluate the performance indicators of any large model, including accuracy and recall indicators;

[0224] Collect feedback about model performance through user feedback and system monitoring data to provide a basis for model optimization;

[0225] S64. Fine-tuning history and analysis:

[0226] Record the detailed information of each fine-tuning of the Rendu model, that is, the fine-tuning history data, including fine-tuning parameters, data sets, training cycles and performance changes, analyze the fine-tuning history, and identify the trend of model performance improvement or decline;

[0227] S65, model iteration and training optimization:

[0228] Based on monitoring data and user feedback, the model training process is continuously iterated to optimize hyperparameters and improve the accuracy and pertinence of the model.

[0229] The core stage of the present invention is the large model training process. First, the cleaned and preprocessed input data is input into the Rendu large model. The input data includes rich features and accurate labels, which provide a basis for the model to learn. Then, through optimization techniques such as back propagation algorithm and gradient descent, the internal parameters of the model are continuously adjusted to minimize the difference between the predicted output and the true label. Regularization, batch normalization and other techniques are used in the training process to prevent overfitting and improve the generalization ability of the model. In addition, in order to make full use of computing resources, strategies such as distributed training and mixed precision training are used to accelerate the training of large models. During the training process, the model performance is monitored, including the decline of the loss function and the performance on the validation set, to ensure that the model not only performs well on the training data, but also can make accurate predictions on unseen data. Through the large model training process, a large model that can handle complex tasks and has a high generalization ability can be trained, that is, a pre-trained Rendu large model.

[0230] The embodiments described above are merely descriptions of preferred implementation modes of the present invention and are not intended to limit the scope of the present invention. Without departing from the principles and essence of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the scope of protection determined by the claims of the present invention.

Claims

1. A data annotation method based on a large model, characterized in that: The specific steps include: S1, acquiring data and preprocessing the data to obtain input data; S2, performing model training based on the Renduda model and input data to obtain a pre-trained Renduda model; S3, encapsulating the pre-trained large-scale model into an interface, wherein the interface accepts a labeling request, returns a labeling result and a confidence level of the labeling result; S4, fine-tuning the encapsulated pre-trained arbitrary large model to obtain the target arbitrary large model; S5, obtaining the data to be annotated, and inputting it into the target large-scale model for annotation, and outputting the annotated data; S6. Monitor and feedback the fine-tuning process of the pre-trained large-scale model and the labeling process of the target large-scale model, and record the fine-tuning historical data, the historical data to be labeled, and the historical data to be labeled, and collect the operation log of the target large-scale model to obtain the operation log historical data.

2. A data annotation method based on a large model according to claim 1, characterized in that: The data preprocessing in step S1 specifically includes: S11. Clean the acquired data in batches: Use the Pandas library in Python to identify and remove noise, correct data errors and fill in missing values; S12. Format and structure the cleaned data: Write a script to convert the cleaned data into CSV format; The cleaned data is structured to fit the dimensions and type of the input layer of any large model; S13. Store the formatted and structured data in batches and build indexes: Use Spark in Python to store formatted and structured data in batches into a database management system and build indexes; S14. Enhance, expand and protect the stored data: Use the image processing library Open CV to rotate, scale and crop the stored data; Use the NLTK natural language processing library to perform synonym replacement and sentence reorganization on the stored data; Use the AES algorithm to encrypt data to ensure the security of data transmission and storage; Desensitize sensitive information in the data to achieve reliable protection of sensitive privacy data; S15. Integrate the enhanced, expanded and protected data: Input data into the training system through the data import function of the training system; Use the data version control tool DVC to track data changes and ensure the consistency and reproducibility of data and model training process.

3. The data annotation method based on a large model according to claim 1 is characterized in that: The step S2 specifically includes: S21. Data loading and preprocessing: Use PyTorch's Data Loader library to batch load input data, and perform normalization, standardization, and encoding conversion preprocessing on the loaded input data; S22, constructing a Renduda model, wherein the Renduda model is a zANN neural network framework based on a Transformer-like framework; S23, Optimizer settings: Define the loss function and use the Adam optimizer to set the learning rate and related hyperparameters; S24, model regularization and batch normalization processing: Add Dropout and L1 / L2 regularization layers to any large model to prevent overfitting; Batch Normalization is used to speed up the training process of large models and improve their stability. S25, model distributed training and mixed precision training: Use PyTorch’s Distributed Data Parallel to perform distributed training on any large model and distribute training tasks across multiple GPUs; Use NVIDIA's APEX to train large models with mixed precision, reducing memory usage and speeding up training; S26. Model monitoring: During the model training process, the callback function is used to monitor it, including EarlyStopping and Learning Rate Scheduler, and the loss rate and accuracy rate during the training and verification process are recorded; S27. Model evaluation and tuning: Evaluate model performance on an independent validation set, use confusion matrix and ROC curve indicators to analyze the model's predictive ability, and adjust the model structure or hyperparameters based on feedback to obtain an optimized model. S28. Model saving and deployment: After the training is completed, use PyTorch's torch.save to save the model, and deploy the saved trained model as needed to obtain a pre-trained large-scale model.

4. The data annotation method based on a large model according to claim 1 is characterized in that: The step S3 specifically includes: S31. Model packaging and interface development: Integrate the pre-trained large-scale model into the Torch Serve framework and deploy the encapsulated model; Use the Fast API web framework to develop a REST API interface to ensure that the interface can receive data annotation requests and interact with the model; S32. Testing and deployment of interface services: Perform unit and integration testing on the API in the development environment to ensure its functional correctness; Use Docker containers and deploy them on servers to ensure service accessibility and stability; S33, request processing and model reasoning: Request processing logic, which parses and preprocesses the received annotation requests and inputs them into the pre-trained model for inference; The model inference results and confidence are returned to the user through the API; Use asynchronous processing or message queue Kafka to manage high concurrent requests; S34. Performance monitoring and optimization: Use the monitoring tool Grafana to monitor the performance indicators of the API, including response time, system load, and memory utilization; Optimize service performance based on monitoring results by adding resources, optimizing algorithms, or using model quantization techniques; S35. Feedback and model iteration: Establish a user feedback mechanism to collect users’ satisfaction and specific opinions on the annotation results; Iteratively optimize the model based on feedback, including retraining, fine-tuning, or updating the model structure; The CI / CD process is used to automate the iteration and deployment process of the model to obtain a packaged pre-trained large-scale model.

5. The data annotation method based on a large model according to claim 1 is characterized in that: The step S4 specifically includes: S41. Data preparation and enhancement: Collect task-specific labeled data, including inaccurate cases; Clean, segment, and encode the data, and apply data enhancement techniques to enrich the data set; S42. Select fine-tuning strategy: Determine the fine-tuning strategy, including full fine-tuning or parameter efficient fine-tuning (PEFT); specifically, Prefix Tuning, Prompt Tuning, and Adapter Tuning; S43. Set fine-tuning parameters: Set hyperparameters, including learning rate, training rounds (epochs), and batch size (batch size); S44, fine-tuning model training: Load the pre-trained model and weights, and make necessary structural adjustments to the model according to task requirements; Perform fine-tuning training using loss functions and optimizers, including forward propagation, loss calculation, backpropagation, and weight updates; S45. Model evaluation and optimization: Use accuracy and F1 score metrics to evaluate model performance on the validation set; Adjust fine-tuning strategies and hyperparameters based on evaluation results to optimize model performance; S46. Model deployment and application: Update the fine-tuned model to the encapsulated pre-trained large-scale model and provide an interface for the system to call; The performance of the model in actual use is monitored and necessary iterative optimization is performed based on the feedback to obtain the target large-scale model.

6. The data annotation method based on a large model according to claim 1, characterized in that: The step S5 specifically includes: S51, receiving data: Through the front-end interface, users upload or input the data to be labeled; Use the API interface to receive the data to be annotated; The front-end interface is built with JavaScript and uses frameworks such as React to enhance interactivity; S52. Data preprocessing: In the backend service, the data to be annotated is cleaned and formatted to meet the input requirements of the large model, including text cleaning, encoding conversion, and word segmentation, and ensuring that the data format is consistent with the model's expectations; S53, calling service interface: Develop backend logic to call the packaged AnyDu model service interface, build HTTP requests, send user data to the API and receive the model's response; Use Python's requests library and HTTP client tools to make API calls; S54. Result processing and feedback: Process the annotation results and confidence levels output by any large model, convert them into a user-understandable format, and merge, sort, or visualize the results to obtain the annotation data; Return the annotation data directly to the caller through the API interface; S55, Service deployment and maintenance: Deploy the entire annotation service to a server or cloud platform to ensure its stable operation and scalability; Deploy using Docker containerization technology and Kubernetes orchestration tools; Implement logging and monitoring to track service status and user behavior and respond quickly to issues that arise.

7. The data annotation method based on a large model according to claim 1 is characterized in that: The step S6 specifically includes: S61, Real-time monitoring: Use monitoring tools to track the performance indicators of the Rendu model service, including the history of data to be annotated, the history of annotation, the operation log, and resource usage, and ensure that the system records and stores the history data to be annotated, the history data of annotation, and the history data of operation log for analysis; S62. Log management and anomaly detection: Collect the historical data of the operation log of any large model; Use the ELK Stack log analysis tool to perform real-time analysis of historical operation log data. When an abnormal pattern is detected, relevant personnel are automatically notified to quickly discover and respond to abnormal situations while implementing an automated anomaly detection mechanism. S63. Performance evaluation and feedback collection: Regularly evaluate the performance indicators of any large model, including accuracy and recall indicators; Collect feedback about model performance through user feedback and system monitoring data to provide a basis for model optimization; S64. Fine-tuning history and analysis: Record the detailed information of each fine-tuning of the Rendu model, that is, the fine-tuning history data, including fine-tuning parameters, data sets, training cycles and performance changes, analyze the fine-tuning history, and identify the trend of model performance improvement or decline; S65, model iteration and training optimization: Based on monitoring data and user feedback, the model training process is continuously iterated to optimize hyperparameters and improve the accuracy and pertinence of the model.

Citation Information

Cited By

  • Method and device for implementing artificial intelligence industrial quality inspection data labeling agent

    CN121053483A

  • Multi-modal data labeling method and system based on large model pre-labeling

    CN121456489A