Sample processing methods, system and electronic device
By using large models to analyze and generate prompt information and generate enhanced samples based on this, the problem of insufficient performance of small models in low-resource scenarios is solved, and the generation of effective training samples and model performance is improved in small-sample scenarios.
Patent Information
- Application Number
- PCT/CN2024/124762
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-08
- Filing Date
- 2024-10-14
- Publication Date
- 2025-05-15
AI Technical Summary
In low-resource scenarios, small models cannot perform better performance due to insufficient training data. Although large models have strong task generalization capabilities, the cost of inference and deployment is high, and the usage scenarios are limited. At the same time, the training data generated through the big model may not be all useful, and there may be redundant or missing useful content, making it difficult to generate effective samples.
By obtaining the current sample set used to train the pending model, analyzing the current sample set using the big model, generating prompt information, and characterizing the rules satisfying the samples marked as exceptional states. Then, the control model generates anomaly monitoring sample that matches the prompt information, marks it, and generates enhancement samples. These enhancement samples are used to train pending models so that they can learn samples that predict errors before, avoiding training on useless samples.
It realizes the generation of effective training samples in a small sample scenario, improves the performance of the initial model in a small sample scenario, and solves the problem of difficulty in generating effective samples.
Smart Images

Figure CN2024124762_15052025_PF_FP_ABST
Abstract
Description
Sample processing method, system and electronic device
[0001] Cross-reference
[0002] This disclosure claims priority to the Chinese patent disclosure filed with the China Patent Office on November 8, 2023, with publication number 202311484591X and publication name “Sample processing method, system and electronic device”, the entire content of which is incorporated by reference into this disclosure. Technical Field
[0003] The present disclosure relates to the fields of large model technology and artificial intelligence technology, and in particular to a sample processing method, system and electronic device. Background Art
[0004] In low-resource scenarios, small models are often limited by the amount of training data, preventing them from achieving optimal performance. While large models offer strong task generalization capabilities, they are expensive to infer and deploy, limiting their use cases. In this case, the large model can be used to generate targeted training data. Specifically, the large model can be used to augment the training sample set, and the augmented data can be used to train the small model. However, not all augmented data is useful. Some redundant data may cause repetitive training for the small model, and some content that is useful for training the small model may be missing, preventing the small model from learning relevant information. Consequently, the technical challenge of generating effective samples remains.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0006] Summary of the Invention
[0007] The embodiments of the present disclosure provide a sample processing method, system, and electronic device to at least solve the technical problem of difficulty in generating valid samples.
[0008] According to one aspect of an embodiment of the present disclosure, a method for processing samples is provided. The method may include: obtaining a current sample set for training a model to be processed; analyzing the current sample set using a large model to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by samples in the current sample set that are marked as abnormal; controlling the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; and marking the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples include at least enhanced samples that match the abnormal monitoring samples.
[0009] According to another aspect of an embodiment of the present disclosure, a method for processing a sample is also provided. The method may include: responding to an inquiry message received in a dialogue interface, wherein the inquiry message is used to request enhanced processing of a current sample set, and the current sample set is used to train a model to be processed; displaying the current sample set in the dialogue interface; analyzing the current sample set using a large model, and displaying generated prompt information on the dialogue interface, wherein the prompt information is used to characterize the rules satisfied by samples in the current sample set that are marked as abnormal; displaying at least an abnormal monitoring sample that matches the prompt information on the dialogue interface, wherein the abnormal monitoring sample is generated based on the large model; displaying at least an enhanced sample generated by marking the abnormal monitoring sample on the dialogue interface, wherein the enhanced sample includes at least an enhanced sample that matches the abnormal monitoring sample; and generating, based on the enhanced sample, a reply message corresponding to the inquiry message and displaying it on the dialogue interface.
[0010] According to another aspect of the embodiments of the present disclosure, a method for processing samples is also provided. The method may include: determining a model to be processed; using a large model to analyze the current sample set of the model to be processed and generating prompt information, wherein the current sample set is used to train the model to be processed, and the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; at least controlling the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; at least marking the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples; using the enhanced samples as samples of the sample set to train the trained model to be processed and obtain a target model.
[0011] According to another aspect of an embodiment of the present disclosure, a sample processing device is also provided. The device may include: an acquisition component configured to acquire a current sample set configured to train a model to be processed; an analysis component configured to analyze the current sample set using a large model to obtain prompt information, wherein the prompt information is configured to characterize the rules satisfied by samples marked as abnormal in the current sample set; a first control component configured to control the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; and a first labeling component configured to label the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0012] According to another aspect of an embodiment of the present disclosure, a sample processing device is also provided. The device may include: a receiving component configured to respond to an inquiry message received in a dialogue interface, wherein the inquiry message is configured to request enhancement processing of a current sample set, and the current sample set is configured to train a model to be processed; a first display component configured to display the current sample set in the dialogue interface; a second display component configured to analyze the current sample set using a large model and display generated prompt information on the dialogue interface, wherein the prompt information is configured to characterize the rules satisfied by samples marked as abnormal in the current sample set; a third display component configured to display at least an abnormal monitoring sample matching the prompt information on the dialogue interface, wherein the abnormal monitoring sample is generated based on the large model; a fourth display component configured to display at least an enhanced sample generated by marking the abnormal monitoring sample on the dialogue interface, wherein the enhanced sample includes at least an enhanced sample matching the abnormal monitoring sample; and a first generating component configured to generate, based on the enhanced sample, a reply message corresponding to the inquiry message and display it on the dialogue interface.
[0013] According to another aspect of the embodiment of the present disclosure, a sample processing device is also provided. The device may include: a determination component, configured to determine a model to be processed; a generation component, configured to use a large model to analyze the current sample set of the model to be processed and generate prompt information, wherein the current sample set is set to train the model to be processed, and the prompt information is set to characterize the rules satisfied by the samples marked as abnormal in the current sample set; a second control component, configured to at least control the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; a second labeling component, configured to at least label the abnormal monitoring samples and generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples; a training component, configured to use the enhanced samples as samples of the sample set to train the trained model to be processed to obtain a target model.
[0014] According to another aspect of the embodiment of the present disclosure, a sample processing system is also provided. The system may include: a data identification end, configured to identify the current sample set of the model to be processed, wherein the current sample set is used to train the model to be processed; a data enhancement end, configured to use a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; at least control the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; at least mark the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples; a model training end, configured to use at least the enhanced samples as samples of the sample set to train the trained model to be processed to obtain a target model.
[0015] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, wherein the computer-executable instructions are executed by the processor to perform steps of a sample processing method.
[0016] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium is further provided. The computer-readable storage medium includes a stored program, wherein when the program processor runs, the device where the computer storage medium is located is controlled to execute the steps of the sample processing method.
[0017] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a computer program, and when the computer program is executed by a processor, the computer program implements any one of the above-mentioned sample processing methods.
[0018] According to another aspect of an embodiment of the present disclosure, a computer program product is provided, which includes a non-volatile computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, it implements any of the sample processing methods described above.
[0019] According to another aspect of an embodiment of the present disclosure, a computer program product is provided. When the computer program product is executed by a processor, the computer program product implements any one of the above-mentioned sample processing methods.
[0020] In the embodiment of the present disclosure, the current sample set used to train the model to be processed can be obtained first. Since the number of samples contained in the current sample set is relatively small, based on this, the samples in the current sample set can be analyzed using a large model to obtain prompt information. The prompt information is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal, that is, the rules satisfied by the samples that are incorrectly predicted by the model to be processed. Afterwards, the large model can be controlled to generate abnormal monitoring samples that match the prompt information, and the abnormal monitoring samples can be marked to generate enhanced samples. The enhanced samples at least include enhanced samples that match the abnormal monitoring samples. Since the abnormal monitoring samples meet the rules satisfied by the samples that are incorrectly predicted by the model to be processed, based on this, when the enhanced samples are used to train the model to be processed, the model to be processed can be trained in a targeted manner, so that the model to be processed learns the samples that were previously incorrectly predicted, and avoids training on useless samples. This achieves the technical effect of using a large model to generate effective training samples in a small number of sample scenarios, thereby improving the performance of the initial model in a small number of sample scenarios, thereby solving the technical problem of difficulty in generating effective samples.
[0021] It is easy to note that the above general description and the following detailed description are only for the purpose of exemplifying and explaining the present disclosure, and do not constitute a limitation of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0023] FIG1 is a schematic diagram of an application scenario of a sample processing method according to an embodiment of the present disclosure;
[0024] FIG2 is a flow chart of a sample processing method according to an embodiment of the present disclosure;
[0025] FIG3 is a flow chart of another sample processing method according to an embodiment of the present disclosure;
[0026] FIG4 is a flowchart of another sample processing method according to an embodiment of the present disclosure;
[0027] FIG5 is a schematic diagram of a sample processing system according to an embodiment of the present disclosure;
[0028] FIG6 is a schematic diagram of a sample processing and model training method according to an embodiment of the present disclosure;
[0029] FIG7 is a schematic diagram of a sample processing device according to an embodiment of the present disclosure;
[0030] FIG8 is a schematic diagram of another sample processing device according to an embodiment of the present disclosure;
[0031] FIG9 is a schematic diagram of a sample processing device according to an embodiment of the present disclosure;
[0032] FIG10 is a structural block diagram of a computer terminal according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way are interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or components is not necessarily limited to those steps or components clearly listed, but may include other steps or components that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] The technical solution provided by the present disclosure is mainly implemented using large-scale model technology. The large model here refers to a deep learning model with large-scale model parameters, which can usually contain hundreds of millions, tens of billions, hundreds of billions, trillions, or even more than ten trillion model parameters. The large model can also be called a cornerstone model / foundation model. It is pre-trained by using large-scale unlabeled corpus to produce a pre-trained model with more than 100 million parameters. This model can adapt to a wide range of downstream tasks and has good generalization capabilities, such as large-scale language models (LLMs) and multi-modal pre-training models.
[0036] It should be noted that when the large model is actually applied, the pre-trained model can be fine-tuned with a small number of samples, so that the large model can be applied to different tasks. For example, the large model can be widely used in natural language processing (NLP), computer vision, speech processing and other fields. Specifically, it can be applied to computer vision tasks such as visual question answering (VQA), image captioning (IC), and image generation. It can also be widely used in natural language processing tasks such as text-based sentiment processing, text summary generation, and machine translation. Therefore, the main application scenarios of the large model include but are not limited to digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.
[0037] According to an embodiment of the present disclosure, a method for processing a sample is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Taking into account the huge amount of model parameters of the large model and the limited computing resources of the mobile terminal, the above-mentioned sample processing method provided by the embodiment of the present disclosure can be applied to the application scenario shown in Figure 1, but is not limited thereto. Figure 1 is a schematic diagram of an application scenario of a sample processing method according to an embodiment of the present disclosure. In the application scenario shown in Figure 1, the large model is deployed in a server 10, and the server 10 can be connected to one or more client devices 20 through a local area network connection, a wide area network connection, an Internet connection, or other types of data networks. The client devices 20 here may include but are not limited to: smart phones, tablet computers, laptops, PDAs, personal computers, smart home devices, car-mounted devices, etc. The client device 20 can interact with the user through a graphical user interface to implement the call to the large model, thereby implementing the method provided by the embodiment of the present disclosure.
[0039] In an embodiment of the present disclosure, a system composed of a client device and a server can perform the following steps: the client device executes to obtain the current sample set for training the model to be processed. The server executes step S101 to determine the model to be processed; step S102, uses the large model to analyze the current sample set of the model to be processed and generates prompt information, wherein the current sample set is used to train the model to be processed, and the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; step S103, at least controls the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; step S104, at least marks the abnormal monitoring samples and generates enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples; step S105, uses the enhanced samples as samples of the sample set to train the trained model to be processed and obtain the target model. It should be noted that, if the operating resources of the client device can meet the deployment and operation conditions of the large model, the embodiment of the present disclosure can be performed in the client device.
[0040] In the above operating environment, the present disclosure provides a sample processing method as shown in Figure 2. Figure 2 is a flow chart of a sample processing method according to an embodiment of the present disclosure. As shown in Figure 2, the method may include the following steps:
[0041] Step S201: Obtain a current sample set for training the model to be processed.
[0042] In the technical solution provided in step S201 of the present disclosure, the current sample set may include a small number of initial samples for training the model to be processed, that is, the current sample set may be a small sample data set. The model to be processed may be a small model that has not been trained.
[0043] In this embodiment, a query message may be generated based on the task to be performed by the model to be processed. The query message is used to request the generation of a current sample set for training the model to be processed. The query message is multimodal information, and the type of the multimodal information includes at least one of the following: text information including character information, video frame information including frame image information, and audio information.
[0044] For example, if the task to be performed by the model to be processed is image classification, the query information can be image information. If the task to be performed by the model to be processed is text emotion recognition, the query information can be text information. After the query information is generated, the current sample set for training the model to be processed can be collected from public datasets, open data sources, or the internet based on the query information. It should be noted that the specific form of the query information is not limited here.
[0045] Optionally, after obtaining the current sample set, the samples in the current sample set can be further divided into initial correct samples and initial error samples according to the model to be processed. The initial correct samples can be samples marked as normal, which can be recorded as Dcorrect samples, and the initial error samples can be samples marked as abnormal, which can be recorded as Dwrong samples.
[0046] For example, the initial model may be a small, untrained model in its initial state, and the current sample set may be a dataset containing only a small number of samples, i.e., a small-sample dataset. The initial correct samples in the current sample set may be samples for which the initial model outputs correct execution results during model training, and the initial error samples in the current sample set may be samples for which the initial model outputs incorrect execution results during model training. The current sample set may be labeled as initial correct samples and initial error samples based on the execution results of the initial model.
[0047] Step S202: Use the large model to analyze the current sample set and obtain prompt information.
[0048] In the technical solution provided in step S202 of the present disclosure, after obtaining the current sample set, the large model can be used to analyze the current sample set to obtain prompt information. That is, the large model is used to analyze the initial error samples and initial correct samples in the current sample set to obtain prompt information, where the prompt information is used to indicate the rules satisfied by the samples marked as abnormal in the current sample set.
[0049] In this embodiment, since the current sample set is a data set containing only a small number of samples, the small model in the initial state is trained using the current sample set. Due to the limited amount of training data, the small model cannot be trained well. Based on this, the large model can be used to analyze the initial correct samples and initial error samples in the current sample set to determine the pattern of the small model's errors, thereby obtaining prompt information. Among them, the prompt information can be an intermediate output result in the large model enhancement processing process. Since the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set, that is, it can be the rules satisfied by the initial error samples, after obtaining the prompt information, the large model can enhance the current sample set based on the prompt information, thereby obtaining enhanced sample data. The enhanced sample data can be used to train the model to be processed in a targeted manner. It should be noted that the prompt information can be a prompt text or guiding information used to prompt the large model to actively learn to generate an enhanced sample data set.
[0050] For example, using the large model to analyze the initial erroneous samples in the current sample set can enable the large model to summarize the patterns of the small model's errors from the samples that the small model predicted incorrectly. Using the large model to analyze the initial correct samples in the current sample set can enable the large model to reversely search for patterns from the samples that the small model predicted correctly, which helps the large model summarize more accurate patterns and generate more accurate prompt information.
[0051] Optionally, the current sample set is analyzed using a large model, and the resulting prompt information may include, in addition to the rules satisfied by the samples in the current sample set that are marked as abnormal, the rules satisfied by the samples in the current sample set that are marked as normal, that is, the rules satisfied by the samples that are correctly predicted by the model to be processed.
[0052] Step S203: Control the large model to generate abnormal monitoring samples that match the prompt information.
[0053] In the technical solution provided in the above step S203 of the present disclosure, after obtaining the prompt information, the large model can actively learn based on the prompt information, thereby generating anomaly monitoring samples that match the prompt information, wherein the anomaly monitoring samples meet the rules met by the samples marked as abnormal states in the current sample set introduced above.
[0054] In this embodiment, the large model can actively learn based on the prompt information to generate anomaly monitoring samples. For example, as mentioned above, the prompt information can be the rules satisfied by the samples marked as abnormal in the current sample set. Therefore, the large model can generate some sample data that meets the rules based on the rules. The generated sample data is the anomaly monitoring sample.
[0055] The target correct samples and target error samples are predicted, among which the target correct samples are samples that the initial model predicted by the large model may classify correctly, and the target correct samples can be recorded as Deasy samples; the target error samples are samples that the initial model predicted by the large model may classify incorrectly, and the target error samples can be recorded as Dhard samples. Based on this, the prompt information can be displayed on the interactive interface for learning, and the target error samples for targeted training of the initial model are predicted.
[0056] Optionally, this embodiment may display the target error samples and target correct samples obtained by learning the prompt information on the interactive interface, which is not limited here.
[0057] Step S204: Mark the abnormal monitoring samples to generate enhanced samples.
[0058] In the technical solution provided in the above step S204 of the present disclosure, after the abnormal monitoring sample data is generated, the abnormal monitoring sample data can be marked to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0059] In this embodiment, after obtaining the abnormal monitoring samples, the large model can also mark the abnormal monitoring samples as target correct samples and target error samples according to the error rules of the model to be processed. Among them, the target correct samples are samples that the large model predicts the model to be processed may classify correctly, and the target correct samples can be recorded as Deasy samples; the target error samples are samples that the large model predicts the model to be processed may classify incorrectly, and the target error samples can be recorded as Dhard samples. Afterwards, the model to be processed can be trained using at least the target error samples. Among them, the target correct samples are samples that the large model predicts the model to be processed may classify correctly, and the target error samples are samples that the large model predicts the model to be processed may classify incorrectly.
[0060] For example, since the target error samples are samples that may be misclassified by the model to be processed as predicted by the large model, that is, samples that are difficult for the model to be processed, using the target error samples to train the model to be processed can enable the model to be processed to quickly make up for the current weaknesses. Based on this, at least the target error samples can be used for targeted training of the model to be processed to make up for the weaknesses of low prediction accuracy and large loss of the model to be processed, and avoid training the model to be processed on some better samples that have already been learned, thereby improving the training efficiency of the model.
[0061] Optionally, since the target correct sample is a sample that the model to be processed obtained by predicting the large model may classify correctly, that is, a sample that is simple for the model to be processed, using the target correct sample to train the model to be processed can enable the model to be processed to reversely search for patterns from the target correct sample to summarize more accurate patterns and improve the accuracy of task execution. Based on this, in this embodiment, the target error sample and the target correct sample can be used simultaneously to train the model to be processed, so that the model to be processed is trained based on the target error sample to improve the prediction accuracy and reduce the loss (for example, loss), and is also trained based on the target correct sample to reversely search for patterns from the target correct sample to summarize more accurate patterns and improve the accuracy of the model to be processed in executing tasks.
[0062] Based on steps S201 to S204 of the above embodiment, the samples in the current sample set can be analyzed by the large model to obtain prompt information, which is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal, that is, the rules satisfied by the samples that are incorrectly predicted by the to-be-processed model. Afterwards, the large model can be controlled to generate abnormal monitoring samples that match the prompt information according to the prompt information, and the abnormal monitoring samples can be marked to generate enhanced samples. The enhanced samples at least include enhanced samples that match the abnormal monitoring samples. Since the abnormal monitoring samples meet the rules satisfied by the samples that are incorrectly predicted by the to-be-processed model, based on this, when the to-be-processed model is trained using the enhanced samples, the to-be-processed model can be trained in a targeted manner, so that the to-be-processed model learns the samples that were previously incorrectly predicted, and avoids training on useless samples, thereby achieving the technical effect of using the large model to generate effective training samples in a small number of sample scenarios, thereby improving the performance of the to-be-processed model in a small number of sample scenarios, thereby solving the technical problem of difficulty in generating effective samples.
[0063] The above method of this embodiment is further introduced below.
[0064] As an optional implementation, step S202, using the large model to analyze the current sample set to obtain prompt information, includes: using the large model to analyze samples marked as abnormal and samples marked as normal in the current sample set to obtain prompt information.
[0065] In this embodiment, samples in the current sample set marked as abnormal can be correctly predicted by the model to be processed, while samples in the current sample set marked as normal can be incorrectly predicted by the model to be processed. Based on this, the large model is used to analyze the samples in the current sample set marked as abnormal and the samples marked as normal. The resulting hint information can be used to characterize the rules satisfied by the samples in the current sample set marked as abnormal, that is, the rules satisfied by the samples incorrectly predicted by the model to be processed.
[0066] For example, after obtaining the current sample set, the model to be processed can be used to execute tasks on the samples in the current sample set. Based on the execution results of the model to be processed, samples that were incorrectly classified by the model to be processed are marked as abnormal samples, that is, initial error samples, and samples that were correctly classified by the model to be processed are marked as normal samples, that is, initial correct samples. Afterwards, the large model is used to analyze the initial error samples and the initial correct samples to obtain patterns in the incorrect and correct predictions of the model to be processed.
[0067] Optionally, when marking samples in the current sample set as samples in abnormal state and samples in normal state, they can be marked by adding labels, wherein the specific content of the label can be determined according to the task performed by the model to be processed, that is, the label is associated with the task performed by the model to be processed.
[0068] For example, in an image classification task, incorrectly classified images can be labeled as "error" or have a specific suffix, such as "_error," added to their file names. Correctly classified images can be labeled as "correct" or have a specific suffix, such as "_right," added to their file names to distinguish them.
[0069] For example, in a sentiment classification task, text samples with positive sentiment can be labeled as "positive" or have a specific suffix, such as "_positive", added to their file names. Text samples with negative sentiment can be labeled as "negative" or have a specific suffix, such as "_negative", added to their file names to distinguish them.
[0070] Next, we will further introduce a method for using the model to be processed to perform tasks on the current sample set and mark the initial correct samples and initial error samples according to the execution results.
[0071] In this embodiment, when the model to be processed is used to perform a task on samples in the current sample set to mark initial error samples and initial correct samples, the samples in the current sample set can be input into the model to be processed to perform the task. In response to the model to be processed outputting an error execution result, the sample is marked as an initial error sample (e.g., Dwrong sample). Similarly, in response to the model to be processed outputting a correct execution result, the sample is marked as an initial correct sample (e.g., Dcorrect sample). The task performed by the model to be processed can be a classification task or an entity recognition task, which is not specifically limited here.
[0072] For example, in image classification, the goal is to correctly classify images of cats and dogs. Suppose a picture shows a cat. If the picture is fed into the model to be processed and the model returns a dog, the sample can be labeled as an initial error sample. Similarly, if a picture shows a dog, if the picture is fed into the model to be processed and the model returns a dog, the sample can be labeled as an initial correct sample. Using the above method, the samples in the current sample set can be labeled as initial correct samples and initial error samples.
[0073] In this embodiment, after marking the samples in the current sample set as initial correct samples and initial error samples, the large model can be used to analyze the initial correct samples and initial error samples in the current sample set to obtain prompt information. The following further describes the process of using the large model to analyze the samples in the current sample set and obtain prompt information.
[0074] As an optional implementation, a large model is used to analyze samples marked as abnormal and samples marked as normal in the current sample set to obtain prompt information, including: using the large model to learn samples marked as abnormal and samples marked as normal respectively to obtain first grammatical information and second grammatical information, wherein the first grammatical information is used to represent the grammatical rules satisfied by samples marked as abnormal, and the second grammatical information is used to represent the grammatical rules satisfied by samples marked as normal; using the second grammatical information to adjust the first grammatical information; and generating prompt information from the adjusted first grammatical information.
[0075] In this embodiment, after obtaining samples marked as abnormal and samples marked as normal in the current sample set, the large model can be used to actively learn the samples marked as abnormal and samples marked as normal in the current sample set, so as to summarize the regularities of the samples marked as abnormal and samples marked as normal in the current sample set, and obtain first grammatical information satisfied by the samples marked as abnormal and second grammatical information satisfied by the samples marked as normal. The first grammatical information and the second grammatical information can be expressed in text form.
[0076] For example, let's take a sentiment classification task. Assume the samples in the current sample set are movie reviews. The samples marked as abnormal in the current sample set are those whose actual sentiment label is "positive" but whose predictions are "negative" by the processing model. For example, "I like this movie; it's a sad yet heartwarming story." The samples marked as normal in the current sample set are those whose actual sentiment label is "positive" and whose predictions are also "positive" by the processing model. Based on this, after learning the samples marked as abnormal in the current sample set, the large model obtains first grammatical information that can be the grammar satisfied by sentences containing a mixture of positive and negative language—that is, sentences with mixed emotions. This first grammatical information represents the rules satisfied by the samples marked as abnormal in the current sample set. Similarly, after learning the samples marked as normal in the current sample set, the large model obtains second grammatical information that can be the grammar satisfied by sentences containing a single emotion. This second grammatical information represents the rules satisfied by the samples marked as normal in the current sample set.
[0077] Optionally, after obtaining the rule information, the large model may adjust the first grammatical information using the second grammatical information, and generate prompt information according to the adjusted first grammatical information.
[0078] For example, since the second grammatical information is used to represent the rules satisfied by the samples marked as normal in the current sample set, that is, the rules satisfied by the samples predicted correctly by the model to be processed, based on this, the rules can be reversely searched from the samples predicted correctly by the model to be processed according to the second grammatical information, and the first grammatical information can be adjusted so that the large model can summarize more accurate rules for the errors made by the model to be processed.
[0079] Optionally, after adjusting the first grammatical information, the large model can generate prompt information based on the first grammatical information. For example, the first grammatical information can be used as prompt information, where the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set, that is, the pattern of errors made by the model to be processed.
[0080] As an optional implementation, step S203, controlling the large model to generate abnormal monitoring samples that match the prompt information, includes: determining at least one sample type of the abnormal monitoring samples to be generated; controlling the large model to obtain a first initial monitoring sample set that meets the sample type; controlling the large model to determine the samples in the first initial monitoring sample set that meet the prompt information as abnormal monitoring samples.
[0081] In this embodiment, to prevent the large model from acquiring samples irrelevant to the task to be performed by the processing model, the type of at least one sample of the anomaly monitoring samples to be generated can be determined. This sample type can be a movie review or a book review, without specific limitation. After determining the type of at least one sample of the anomaly monitoring samples to be generated, the large model can be controlled to acquire a first initial set of monitoring samples that meet the sample type.
[0082] For example, assuming at least one of the anomaly monitoring samples to be generated is a movie review, the large model can be controlled to obtain movie reviews from public datasets, open data sources, or the internet to form a first initial monitoring sample set. The large model is then controlled to match samples in the first initial monitoring sample set with prompt information and identify those samples in the first initial monitoring sample set that meet the prompt information as anomaly monitoring samples.
[0083] Next, the process of controlling the large model to determine abnormal monitoring samples from the first initial monitoring sample set is further introduced.
[0084] As an optional implementation, the control large model determines the samples in the first initial monitoring sample set that meet the prompt information as abnormal detection samples, including: controlling the large model to match the samples in the first initial monitoring sample set with the prompt information; and determining the samples in the first initial monitoring sample set that successfully match the prompt information as abnormal monitoring samples.
[0085] In this embodiment, as can be seen from the above introduction, the prompt information is the rule satisfied by the sample marked as abnormal state. Based on this, after obtaining the first initial monitoring sample set, the sample that meets the prompt information in the first initial monitoring sample set can be determined according to the prompt information, and the sample can be determined as an abnormal detection sample.
[0086] For example, assume that the samples included in the first initial monitoring sample set obtained may include: "The ending is disappointing, but overall it is a great movie", "The movie is really interesting and made me laugh all the time", etc. Since the prompt information is the rule satisfied by the sample marked as abnormal, that is, the first grammatical information satisfied by the sample predicted incorrectly by the model to be processed, and it can be seen from the above introduction that the first grammatical information can be a sentence containing a mixture of positive and negative language, based on this, the samples in the first initial monitoring sample set that match the first grammatical information can be determined. For example, the sample "The ending is disappointing, but overall it is a great movie" contains both positive and negative language. Based on this, the sample can be determined as an abnormal monitoring sample. According to this method, all abnormal monitoring samples in the first initial monitoring sample set can be determined. For the convenience of explanation, the abnormal monitoring sample can be called a Dhard sample.
[0087] As an optional implementation, the sample processing method also includes: determining a first sample quantity of abnormal monitoring samples to be generated; controlling the large model to determine the samples that meet the prompt information in the first initial monitoring sample set as abnormal monitoring samples, including: controlling the large model to determine a second initial monitoring sample set that meets the prompt information in the first initial monitoring sample set, and in the second initial monitoring sample set, determining the samples whose sample quantity is the first sample quantity as abnormal monitoring samples.
[0088] In this embodiment, to avoid excessive data volume, a first sample size of abnormal monitoring samples to be generated can be determined. The control model then determines a second initial monitoring sample set that satisfies the prompt information within the first initial monitoring sample set. Because this second initial monitoring sample set includes a large number of abnormal monitoring samples that meet the prompt information, the first sample size of abnormal monitoring samples can be obtained from the second initial monitoring sample set.
[0089] For example, the first number of samples can be pre-set, for example, the first number of samples can be 2 or 4, and there is no specific limitation here. The specific implementation method of the control large model determining the second initial monitoring sample set that meets the prompt information in the first initial monitoring sample set can refer to the method of the control large model determining the samples that meet the prompt information in the first initial monitoring sample set introduced above, and will not be repeated here. Assuming that the acquired second initial monitoring sample set contains 10 samples, and the 10 samples all meet the prompt information, based on this, the samples of the first number of samples can be selected from the 10 samples as abnormal monitoring samples.
[0090] As an optional implementation, step S204, labeling the abnormal monitoring samples to generate enhanced samples, includes: labeling the abnormal monitoring samples using a large model to obtain a first label of the abnormal monitoring samples; and generating enhanced samples based on the abnormal monitoring samples associated with the first label.
[0091] In this embodiment, after obtaining the anomaly monitoring sample, the large model can also be used to label the anomaly monitoring sample, that is, to add a label to the anomaly monitoring sample, thereby obtaining a first label of the anomaly monitoring template, and then generating an enhanced sample from the anomaly detection sample labeled with the first label. The label can be associated with the task to be performed by the model to be processed.
[0092] For example, assuming the task being processed by the model is sentiment classification, after obtaining anomaly detection samples, the labels used by the large model to label the anomaly detection samples can be "positive" or "negative." For example, anomaly detection samples may include: "The ending is disappointing, but overall it's a great movie" or "The book starts off slow and boring, but the heartwarming ending makes up for it." After analyzing these samples, the large model labels each sample, and the resulting first labels may be "positive" or "negative," respectively.
[0093] Optionally, after obtaining the first label of the anomaly detection sample, an enhanced sample may be generated based on the anomaly monitoring sample associated with the first label, where the enhanced sample at least includes an enhanced sample that matches the anomaly detection sample.
[0094] Optionally, the above describes how to control the large model to generate abnormal monitoring samples that match the prompt information and add labels to the abnormal monitoring samples. It should be noted that the large model can not only generate abnormal detection samples that match the prompt information, but also generate normal monitoring samples that do not match the prompt information. The following further introduces the process of controlling the large model to generate normal monitoring samples that do not match the prompt information.
[0095] As an optional implementation, the sample processing method also includes: controlling the large model to generate normal monitoring samples that do not match the prompt information; using the large model to mark the normal monitoring samples to obtain a second label for the normal monitoring samples; generating enhanced samples based on the abnormal monitoring samples associated with the first label, including: determining the abnormal monitoring samples associated with the first label and the normal monitoring samples associated with the second label as enhanced samples, wherein the enhanced samples also include enhanced samples that match the normal monitoring samples.
[0096] In this embodiment, the type of at least one sample of the normal monitoring samples to be generated can be determined to be consistent with the type of the at least one sample of the abnormal monitoring samples to be generated described above. The at least one sample of the normal monitoring samples can also be a book review or a movie review, etc., without specific limitations here. After determining the type of the at least one sample of the normal monitoring samples to be generated, the large model can be controlled to obtain samples consistent with the at least one sample type from public datasets, open data sources, or the internet. Then, samples among the obtained samples that do not meet the prompt information are determined as normal monitoring samples.
[0097] For example, assuming that at least one of the normal monitoring samples to be generated is a movie review, the samples acquired by the large model based on the at least one sample type of the normal monitoring samples to be generated may include: "The ending is disappointing, but overall it's a great movie," "This movie is very funny and kept me laughing," and "The plot is boring and poorly developed." As mentioned above, the prompt information is the rules satisfied by the samples marked as abnormal, that is, the first grammatical information satisfied by the samples that the processing model predicts incorrectly. This first grammatical information can be a sentence containing a mixture of positive and negative language. Based on this, it can be determined that the samples that do not satisfy the prompt information are: "This movie is very funny and kept me laughing," and "The plot is boring and poorly developed." Based on this, the samples that do not satisfy the prompt information can be determined as normal monitoring samples, where the processing model may predict correctly.
[0098] Optionally, after the normal monitoring samples are determined, the large model may be controlled to label the normal monitoring samples to obtain a second label for the normal monitoring samples.
[0099] For example, assuming the task being processed by the model is sentiment classification, after obtaining normal monitoring samples, the large model can label these samples as "positive" or "negative." For example, the second label for the normal monitoring sample "The ending is disappointing, but overall it's a great movie" might be "positive," while the second label for the normal monitoring sample "The book starts off slow and boring, but the heartwarming ending makes up for it" might be "positive." This method can be used to label each normal monitoring sample with a second label.
[0100] Optionally, after marking the abnormal monitoring sample with a first label and the normal monitoring sample with a second label, the abnormal monitoring sample associated with the first label and the normal monitoring sample associated with the second label can be determined as enhanced samples, that is, the enhanced samples not only include enhanced samples that match the abnormal detection samples, but also include enhanced samples that match the normal monitoring samples.
[0101] As an optional implementation, the sample processing method further includes: using abnormal monitoring samples and normal monitoring samples as training sets for the model to be processed; and using the samples in the training set to train the model to be processed into a target model.
[0102] In this embodiment, after obtaining the abnormal detection samples and the normal monitoring samples, the abnormal monitoring samples and the normal monitoring samples can be used as the training set of the model to be processed, and the samples of the training set can be used to train the model to be processed. Among them, since the abnormal monitoring samples are samples that may be misclassified by the model to be processed as predicted by the large model, that is, samples that are difficult for the model to be processed, the abnormal monitoring samples can be used to conduct targeted training on the model to be processed, so that the model to be processed can quickly make up for the weaknesses of low prediction accuracy and large loss. The normal monitoring samples are samples that may be correctly classified by the model to be processed as predicted by the large model, that is, samples that are simple for the model to be processed. Using the normal monitoring samples to train the model to be processed can enable the model to be processed to reversely search for patterns from the normal monitoring samples, so as to summarize more accurate patterns and improve the accuracy of task execution.
[0103] In the above operating environment, the present disclosure further provides a sample processing method as shown in Figure 3. Figure 3 is a flow chart of another sample processing method according to an embodiment of the present disclosure. As shown in Figure 3, the method may include the following steps.
[0104] Step S301: responding to inquiry information received in the dialogue interface.
[0105] In the technical solution provided in step S301 above, the user can enter a query message in the dialogue interface as needed, wherein the query message is used to request enhancement processing of the current sample set used to train the model to be processed. The query message can be multimodal information, such as text information containing character information, video frame information containing frame image information, audio information, etc. The model to be processed can be a small model in its initial state.
[0106] Step S302: Display the current sample set in the dialogue interface.
[0107] In the technical solution provided in step S302 of the present disclosure, the current sample set may include a small number of initial samples used to train the model to be processed, that is, the current sample set may be a small sample data set. The model to be processed may be a small, untrained model. The current sample set may be obtained based on the task to be performed by the model to be processed. After obtaining the current sample set, the current sample set may be displayed in the dialogue interface.
[0108] Step S303: Use the large model to analyze the current sample set and display the generated prompt information on the dialogue interface.
[0109] In the technical solution provided in the above step S303 of the present disclosure, after obtaining the current sample set, a large model can be used to analyze the samples in the current sample set, and the generated prompt information can be displayed on the dialogue interface, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set.
[0110] In this embodiment, since the current sample set is a data set that only contains a small number of samples, the current sample set is used to train the model to be processed. Due to the limited amount of training data, the performance of the model to be processed cannot be well trained. Based on this, a large model can be used to analyze the samples in the current sample set to obtain the rules that are satisfied by the samples marked as abnormal in the current sample set, that is, the rules that are satisfied by the samples that are predicted incorrectly by the model to be processed.
[0111] For example, the model to be processed can be used to perform a task on the current sample set, and based on the execution results of the model to be processed, the samples in the current sample set can be marked as abnormal state samples and normal state samples, wherein the samples marked as abnormal state are samples corresponding to incorrect execution results of the task execution of the model to be processed, and the samples marked as normal state are samples corresponding to correct execution results of the task execution of the model to be processed. The large model is used to analyze the samples in the current sample set marked as abnormal state to obtain the rules satisfied by the abnormal state samples. The large model is used to analyze the samples in the current sample set marked as normal state to obtain the rules satisfied by the normal state samples. The rules satisfied by the normal state samples are used to further adjust the rules satisfied by the abnormal state samples to obtain prompt information, which is used to represent the rules satisfied by the samples in the current sample set marked as abnormal state.
[0112] Step S304: display at least the abnormal monitoring sample that matches the prompt information on the dialogue interface.
[0113] In the technical solution provided in the above step S304 of the present disclosure, after obtaining the abnormal monitoring samples, at least the abnormal monitoring samples matching the prompt information can be displayed on the dialogue interface, wherein the abnormal monitoring samples are generated based on the large model.
[0114] Optionally, abnormal monitoring samples that match the prompt information and normal monitoring samples that do not match the prompt information can be displayed in the dialogue interface, and there is no specific limitation here.
[0115] Step S305: Displaying, on the dialogue interface, at least the enhanced sample generated by marking the abnormal monitoring sample.
[0116] In the technical solution provided in step S305 of the present disclosure, after labeling the abnormal monitoring sample and generating the enhanced sample, at least the enhanced sample generated by labeling the abnormal monitoring sample can be displayed on the dialogue interface. The process of labeling the abnormal monitoring sample and generating the enhanced sample can refer to the method of labeling the abnormal detection sample with the first label described above, and will not be repeated here.
[0117] Step S306: Based on the enhanced sample, response information corresponding to the inquiry information is generated and displayed on the dialogue interface.
[0118] In the technical solution provided in step S306 above, since the query information is used to enhance the current sample set, a response message corresponding to the query information can be generated based on the enhanced sample and displayed on the dialogue interface. The query information can be multimodal information, and the types of multimodal information include at least one of the following: text information containing character information, video frame information containing frame image information, and audio information. The types of response information include at least one of the following: text information, image information, video information, and voice information.
[0119] Based on steps S301 to S306 of the above embodiment, the samples in the current sample set can be analyzed by the large model to generate prompt information. The prompt information is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal. The current sample set is enhanced according to the prompt information to obtain abnormal monitoring samples, and the abnormal monitoring samples are marked to obtain enhanced samples. Since the enhanced samples at least include enhanced samples that match the abnormal monitoring samples, the enhanced error samples can be used to train the model to be processed in a targeted manner, so that the model to be processed learns the samples that were previously predicted incorrectly, avoiding training on useless samples. This achieves the technical effect of using a large model to generate effective training samples in a small number of sample scenarios, thereby improving the performance of the initial model in a small number of sample scenarios, thereby solving the technical problem of difficulty in generating effective samples.
[0120] The above method of this embodiment is further elaborated below.
[0121] As an optional implementation, the present disclosure may modify the prompt information by responding to a modification operation performed on the interactive interface.
[0122] In this embodiment, after the large model analyzes the samples in the current sample set and obtains prompt information, the prompt information can be displayed on the interactive interface. In response to a modification operation on the prompt information, the prompt information can be modified to obtain prompt information that better meets the user's standards. The modification operation can include adding data, deleting data, updating data, and other operations, which are not specifically limited here.
[0123] As another optional implementation, the present disclosure may also update the current sample set by utilizing abnormal monitoring samples in response to a sample update operation on the interactive interface.
[0124] In this embodiment, after using the large model to generate abnormal monitoring samples and normal monitoring samples, the generated abnormal monitoring samples and normal monitoring samples can be used to update the samples in the current sample set to continuously generate new data and avoid monotony in the model training data. This method can continuously enhance the data to improve the effectiveness of model training.
[0125] As another optional implementation, the present disclosure may also modify the abnormal detection samples and / or normal monitoring samples by responding to modification operations on the abnormal detection samples and / or normal monitoring samples on the interactive interface.
[0126] In this embodiment, the interactive interface may also display abnormal detection samples and / or normal monitoring samples. Based on this, the user may also modify and adjust the abnormal detection samples and / or normal monitoring samples displayed on the interactive interface to make them more consistent with the user's requirements for training the initial model. The second modification operation may be operations such as adding data, deleting data, and updating data, which are not specifically limited here.
[0127] It can be seen from the scheme implemented in the above steps that the present disclosure can modify the content displayed on the interactive interface so that the obtained abnormal monitoring samples and normal monitoring samples are more in line with user requirements, ensuring that the processing model is trained according to the abnormal monitoring samples and normal monitoring samples, and the obtained target model is more in line with user requirements.
[0128] According to an embodiment of the present disclosure, a sample processing method is also provided. FIG4 is a flow chart of another sample processing method according to an embodiment of the present disclosure. As shown in FIG4 , the method may include the following steps:
[0129] Step S401: determine the model to be processed.
[0130] In the technical solution provided in the above step S401 of the present disclosure, the model to be processed may be a small model that has not been trained, that is, a small model in an initial state.
[0131] Step S402: Use the large model to analyze the current sample set of the model to be processed and generate prompt information.
[0132] In the technical solution provided in step S402 above, the current sample set can be a dataset containing only a small number of samples, i.e., a small-sample dataset. After obtaining the current sample set, the large model can be used to analyze the current sample set of the model to be processed and generate prompt information. The current sample set is used to train the model to be processed, and the prompt information is used to identify the rules satisfied by the samples in the current sample set that are marked as abnormal.
[0133] In this embodiment, the current sample set for training the model to be processed can be collected from public data sets, open data sources, or the Internet based on the sample type of the sample corresponding to the task to be performed by the model to be processed. After obtaining the current sample set, the model to be processed can be used to perform tasks on the samples in the current sample set, and based on the task execution results of the model to be processed, the samples in the current sample set marked as abnormal and the samples marked as normal are determined, and then the large model is used to analyze the samples in the current sample set marked as abnormal and the samples marked as normal, and obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples in the current sample set marked as abnormal.
[0134] Step S403: at least control the large model to generate anomaly monitoring samples that match the prompt information.
[0135] In the technical solution provided in the above step S403 of the present disclosure, after obtaining the prompt information, the large model can at least be controlled to generate anomaly monitoring samples that match the prompt information, wherein the anomaly monitoring samples meet the rules met by the samples marked as abnormal states.
[0136] Optionally, after obtaining the prompt information, the large model may be controlled to generate normal monitoring samples that do not match the prompt information, wherein the normal monitoring samples do not satisfy the rules satisfied by the samples marked as abnormal.
[0137] Step S404: at least mark the abnormal monitoring samples to generate enhanced samples.
[0138] In the technical solution provided in step S404 of the present disclosure, after obtaining the abnormal monitoring sample, the abnormal monitoring sample can be marked to generate an enhanced sample. The enhanced sample includes at least an enhanced sample that matches the abnormal monitoring sample. The method for marking the abnormal monitoring sample and generating the enhanced sample can refer to the method described in the previous embodiment and will not be repeated here.
[0139] Optionally, the normal detection sample may be marked to generate an enhanced sample, which includes an enhanced sample that matches the normal monitoring sample.
[0140] Step S405: Use the enhanced samples as samples of the sample set to train the trained model to be processed to obtain a target model.
[0141] In the technical solution provided in the above step S405 of the present disclosure, after obtaining the enhanced samples, the enhanced samples can be used as samples of the sample set to train the trained model to be processed, wherein the enhanced samples may include samples after the abnormal monitoring samples are marked, and may also include samples after the normal monitoring samples are marked. Since the abnormal monitoring samples are samples that may be misclassified by the model to be processed as predicted by the large model, that is, samples that are difficult for the model to be processed, the abnormal monitoring samples can be used to conduct targeted training on the model to be processed, so that the model to be processed can quickly make up for the weaknesses of low prediction accuracy and large loss. The normal monitoring samples are samples that may be correctly classified by the model to be processed as predicted by the large model, that is, samples that are simple for the model to be processed. Using the normal monitoring samples to train the model to be processed can enable the model to be processed to reversely search for patterns from the normal monitoring samples, so as to summarize more accurate patterns and improve the accuracy of task execution.
[0142] Based on steps S401 to S405 of the above embodiment, the samples in the current sample set can be analyzed by the large model to generate prompt information, which is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set. The current sample set is enhanced according to the prompt information to obtain abnormal monitoring samples, and the abnormal monitoring samples are marked to obtain enhanced samples. Since the enhanced samples at least include enhanced samples that match the abnormal monitoring samples, the enhanced error samples can be used to train the model to be processed in a targeted manner, so that the model to be processed learns the samples that were predicted incorrectly before, avoiding training on useless samples, and achieving the technical effect of generating effective training samples in a few-sample scenario using a large model, thereby improving the performance of the initial model in a few-sample scenario, thereby solving the technical problem of difficulty in generating effective samples.
[0143] FIG5 is a schematic diagram of a sample processing system according to an embodiment of the present disclosure. As shown in FIG5 , the sample processing system 500 includes: a data recognition end 501 , a data enhancement end 502 , and a model training end 503 .
[0144] The data identification terminal 501 is configured to identify a current sample set of the model to be processed, wherein the current sample set is used to train the model to be processed.
[0145] The data enhancement end 502 is configured to use a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; at least control the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; at least mark the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0146] The model training section 503 is configured to use at least the enhanced sample as a sample of the sample set, and train the trained model to be processed to obtain a target model.
[0147] The technical solution of the embodiment of the present disclosure is further introduced below with examples in combination with preferred implementation modes.
[0148] In low-resource scenarios, small models are often limited by the amount of training data and cannot achieve good performance. While large models have strong task generalization capabilities, they are expensive to infer and deploy, limiting their use cases. The collaborative approach of large and small models combines the advantages of each and has gained widespread favor.
[0149] At present, large models (for example, Chat GPT) can be used to generate targeted training data, that is, the large model is used to enhance the training sample set, and the enhanced data is used to train the small model. However, the enhanced data is fixed and not all of it is useful. There may be some redundant data, which makes the training of the small model repeated. There may also be some lack of content that is useful for the training of the small model, which makes the small model unable to learn relevant content. There is still a technical problem of low model training efficiency.
[0150] For example, the samples enhanced by the large model may repeatedly mention certain content, but the small model has already learned this content well. In this case, the enhanced samples are redundant. Alternatively, the samples enhanced by the large model may not involve certain knowledge or words, resulting in the small model not learning the relevant content and performing poorly on these contents.
[0151] However, the embodiment of the present disclosure provides a sample processing method, which can analyze the samples in the current sample set through a large model, and then generate prompt information, which is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal. The current sample set is enhanced according to the prompt information to obtain abnormal monitoring samples, and the abnormal monitoring samples are marked to obtain enhanced samples. Since the enhanced samples at least include enhanced samples that match the abnormal monitoring samples, the enhanced error samples can be used to train the model to be processed in a targeted manner, so that the model to be processed learns the samples that were predicted incorrectly before, and avoids training on useless samples, thereby achieving the technical effect of using a large model to generate effective training samples in a few-sample scenario, thereby improving the performance of the initial model in a few-sample scenario, thereby solving the technical problem of difficulty in generating effective samples.
[0152] Figure 6 is a schematic diagram of a sample processing and model training method according to an embodiment of the present disclosure. As shown in Figure 6, it includes a sample identification process, a large model active learning process, and a model training process. These processes are described below.
[0153] First, the sample differentiation process in the initial sample is further introduced.
[0154] In this embodiment, after obtaining a small number of samples, the small sample data can be input into the model to be processed to perform the corresponding classification task, and then the small sample data can be divided into correct samples and incorrect samples according to the execution result output by the model to be processed, wherein the model to be processed can be a small model. When the model to be processed outputs a correct classification result, the sample corresponding to the classification result can be marked as a correct sample, which can also be called a Dcorrect sample. When the model to be processed outputs an incorrect classification result, the sample corresponding to the classification result can be marked as an incorrect sample, which can also be called a Dwrong sample.
[0155] After obtaining the correct and incorrect samples, the large model can be used to perform active learning on these samples to generate a sample set for training. The following section further describes the active learning process of the large model.
[0156] In this embodiment, correct and incorrect samples can be input into the model, and the large model can be used to analyze these samples to obtain the error patterns of the small model. For example, the small model performs poorly on samples with certain characteristics, resulting in large losses or low prediction accuracy. The error patterns of the model to be processed can then be output in text form.
[0157] The large model can then perform data augmentation based on the identified patterns, using both error and correct samples to generate augmented sample data. The augmented sample data is then labeled to describe the specific characteristics of the sample. The specific form of the label depends on the classification task being performed by the model. In classification tasks, the label can be the corresponding label text; in other tasks, such as entity recognition, it can be the corresponding entity type. Labels are not unique. For example, in a sentiment recognition task, the label corresponding to a sample could be "positive," "negative," or "with mixed emotions."
[0158] Optionally, the sample data after data enhancement by the large model is divided into difficult samples and simple samples, wherein the difficult samples are samples that the to-be-processed model may predict incorrectly as predicted by the large model, that is, abnormal monitoring samples, and the simple samples are samples that the to-be-processed model may predict correctly as predicted by the large model, that is, normal monitoring samples. The difficult samples and simple samples are output, wherein the difficult samples can be samples that the to-be-processed model may classify incorrectly as predicted by the large model; and the simple samples can be samples that the to-be-processed model may classify correctly as predicted by the large model. In order to distinguish between correct samples that are actually correctly classified by the to-be-processed model (for example, Dcorrect samples) and incorrect samples that are actually incorrectly classified by the to-be-processed model (for example, Dwrong samples), the simple samples that the to-be-processed model may classify correctly as predicted by the large model can be called Deasy samples, and the samples that the to-be-processed model may classify incorrectly as predicted by the large model can be called Dhard samples.
[0159] Optionally, the difficult samples and the simple samples predicted by the large model are used as batch data for training the model to be processed. The size of the batch data can be set to batch size, wherein the size of the difficult samples and the size of the simple samples are respectively set to batch size / 2.
[0160] After obtaining the batch data, we can use it to train the model to be processed. In other words, we use the model to be processed to identify the batch data samples. The model training process is further described below.
[0161] In this embodiment, batch data can be input into the model to be processed, and then the samples correctly classified and incorrectly classified by the model to be processed can be determined based on the loss value and prediction accuracy of the model to be processed. The samples correctly classified by the model to be processed are used as Dcorrect samples to iterate the previous Dcorrect samples. At the same time, the samples incorrectly classified by the model to be processed are used as Dwrong samples to iterate the previous Dwrong samples. In this way, multiple rounds of data enhancement are performed on the initial samples, and the enhanced data is then used to train the model to be processed until the model to be processed achieves good performance in the task being performed. At this time, the model to be processed is used as the target model.
[0162] In the present disclosure, data enhancement does not generate all the data for training the small model at one time, but performs multiple update iterations. This ensures that the small model will not always be trained on the same samples. During the entire training process, the large model will continuously analyze the performance and weaknesses of the small model and continuously generate new training data to avoid the monotony of the small model training data. In addition, the present disclosure uses the method of specifying active learning strategies by the large model to generate training sample data in a targeted manner, which can make up for the knowledge that the small model has not seen before. In addition, the samples that the large model actively enhances can directly discover the weaknesses of the small model. The generated prediction samples can avoid the small model from training on useless samples, thereby enhancing the training efficiency of the model.
[0163] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0164] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and components involved are not necessarily required by the present disclosure.
[0165] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0166] According to an embodiment of the present disclosure, a sample processing device for implementing the above-mentioned sample processing method is also provided. Figure 7 is a schematic diagram of a sample processing device according to an embodiment of the present disclosure. As shown in Figure 7, the sample processing device 700 may include: an acquisition component 701, an analysis component 702, a first control component 703 and a first marking component 704.
[0167] The acquisition component 701 is configured to acquire a current sample set for training the model to be processed.
[0168] The analysis component 702 is configured to use a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set.
[0169] The first control component 703 is configured to control the large model to generate anomaly monitoring samples that match the prompt information, wherein the anomaly monitoring samples meet the rules.
[0170] The first marking component 704 is configured to mark the abnormal monitoring sample to generate an enhanced sample, wherein the enhanced sample at least includes an enhanced sample that matches the abnormal monitoring sample.
[0171] It should be noted that the acquisition component 701, analysis component 702, control component 703, and first marking component 704 correspond to steps S201 to S204 in Example 1. The four components and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned components can be hardware components or software components stored in a memory and processed by one or more processors. The above-mentioned components can also be run as part of the device in the server 10 provided in Example 1.
[0172] According to an embodiment of the present disclosure, a sample processing device for implementing the above-mentioned sample processing method is also provided. Figure 8 is a schematic diagram of another sample processing and generation device according to an embodiment of the present disclosure. As shown in Figure 8, the sample processing device 800 may include: a receiving component 801, a first display component 802, a second display component 803, a third display component 804, a fourth display component 805 and a first generation component 806.
[0173] The receiving component 801 is configured to respond to an inquiry message received in the dialogue interface, wherein the inquiry message is used to request enhancement processing of the current sample set, and the current sample set is used to train the model to be processed.
[0174] The first display component 802 is configured to display the current sample set in the dialogue interface.
[0175] The second display component 803 is configured to analyze the current sample set using the large model and display the generated prompt information on the dialogue interface, wherein the prompt information is used to represent the rules satisfied by the samples marked as abnormal in the current sample set.
[0176] The third display component 804 is configured to display at least an abnormality monitoring sample that matches the prompt information on the dialogue interface, wherein the abnormality monitoring sample is generated based on the large model.
[0177] The fourth display component 805 is configured to display, on the dialogue interface, at least enhanced samples generated by marking the abnormal monitoring samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0178] The first generating component 806 is configured to generate reply information corresponding to the inquiry information based on the enhanced sample and display it on the dialogue interface.
[0179] It should be noted that the receiving component 801, the first display component 802, the second display component 803, the third display component 804, the fourth display component 805, and the first generating component 806 correspond to steps S301 to S306 in Example 1. The six components and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in Example 1. It should be noted that the above components can be hardware components or software components stored in a memory and processed by one or more processors. The above components can also be run as part of the device in the server 10 provided in Example 1.
[0180] According to an embodiment of the present disclosure, a sample processing device for implementing the above-mentioned sample processing method is also provided. Figure 9 is a schematic diagram of a sample processing device according to an embodiment of the present disclosure. As shown in Figure 9, the sample processing device 900 may include: a determination component 901, a second generation component 902, a second control component 903, a second labeling component 904 and a training component 905.
[0181] The determination component 901 is configured to determine a model to be processed.
[0182] The second generation component 902 is configured to use the large model to analyze the current sample set of the model to be processed and generate prompt information, wherein the current sample set is used to train the model to be processed, and the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set.
[0183] The second control component 903 is configured to at least control the large model to generate anomaly monitoring samples that match the prompt information, wherein the anomaly monitoring samples meet the rules.
[0184] The second marking component 904 is configured to mark at least the abnormal monitoring sample to generate an enhanced sample, wherein the enhanced sample at least includes an enhanced sample that matches the abnormal monitoring sample.
[0185] The training component 905 is configured to use the enhanced samples as samples of the sample set to train the trained model to be processed to obtain a target model.
[0186] It should be noted that the above-mentioned determination component 901, second generation component 902, second control component 903, second labeling component 904 and training component 905 correspond to steps S401 to S405 in Example 1. The five components and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned components can be hardware components or software components stored in a memory and processed by one or more processors. The above-mentioned components can also be run in the server 10 provided in Example 1 as part of the device.
[0187] It should be noted that the preferred implementation scheme involved in the above embodiments of the present disclosure is the same as the solution provided in Example 1, as well as the application scenario and implementation process, but is not limited to the solution provided in Example 1.
[0188] The embodiment of the present disclosure may provide a computer terminal, which may be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal may also be replaced by a terminal device such as a mobile terminal.
[0189] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of a computer network.
[0190] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the sample processing method: obtaining a current sample set for training a model to be processed; using a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; controlling the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; marking the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0191] Optionally, Figure 10 is a block diagram of a computer terminal according to an embodiment of the present disclosure. As shown in Figure 10, the computer terminal A may include: one or more (only one is shown in the figure) processors 1002, a memory 1004, a storage controller, and a peripheral interface, wherein the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0192] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the sample processing method and device in the embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned sample processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal A via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0193] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: obtain the current sample set for training the model to be processed; use the large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; control the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; mark the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0194] Optionally, the processor may further execute program code of the following steps: using the large model, analyzing samples marked as abnormal and samples marked as normal in the current sample set to obtain prompt information.
[0195] Optionally, the processor may also execute the program code of the following steps: using a large model to respectively study samples marked as abnormal and samples marked as normal to obtain first grammatical information and second grammatical information, wherein the first grammatical information is used to represent the grammatical rules satisfied by samples marked as abnormal, and the second grammatical information is used to represent the grammatical rules satisfied by samples marked as normal; using the second grammatical information to adjust the first grammatical information; and generating prompt information using the adjusted first grammatical information.
[0196] Optionally, the processor can also execute the program code of the following steps: determining at least one sample type of the abnormal monitoring samples to be generated; controlling the large model to obtain a first initial monitoring sample set that meets the sample type; controlling the large model to determine the samples in the first initial monitoring sample set that meet the prompt information as abnormal monitoring samples.
[0197] Optionally, the processor may also execute the program code of the following steps: controlling the large model to match samples in the first initial monitoring sample set with prompt information; and determining samples in the first initial monitoring sample set that successfully match the prompt information as abnormal monitoring samples.
[0198] Optionally, the processor can also execute the program code of the following steps: determining the first sample quantity of abnormal monitoring samples to be generated; controlling the large model to determine a second initial monitoring sample set that meets the prompt information in the first initial monitoring sample set, and in the second initial monitoring sample set, determining the samples with the first sample quantity as abnormal monitoring samples.
[0199] Optionally, the processor may further execute program code of the following steps: labeling the abnormal monitoring sample using the large model to obtain a first label of the abnormal monitoring sample; and generating an enhanced sample based on the abnormal monitoring sample associated with the first label.
[0200] Optionally, the processor may also execute the program code of the following steps: controlling the large model to generate normal monitoring samples that do not match the prompt information; using the large model to mark the normal monitoring samples to obtain a second label for the normal monitoring samples; generating enhanced samples based on the abnormal monitoring samples associated with the first label, including: determining the abnormal monitoring samples associated with the first label and the normal monitoring samples associated with the second label as enhanced samples, wherein the enhanced samples also include enhanced samples that match the normal monitoring samples.
[0201] Optionally, the processor may further execute program codes of the following steps: using abnormal monitoring samples and normal monitoring samples as training sets for the model to be processed; and using samples in the training set to train the model to be processed into a target model.
[0202] According to an embodiment of the present disclosure, a sample processing method is provided. A current sample set for training a model to be processed can be first obtained. Since the current sample set contains a small number of samples, a large model can be used to analyze the samples in the current sample set to obtain prompt information. The prompt information is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal, that is, the rules satisfied by the samples that are incorrectly predicted by the model to be processed. Subsequently, the large model can be controlled to generate abnormal monitoring samples that match the prompt information, and the abnormal monitoring samples can be marked to generate enhanced samples. The enhanced samples at least include enhanced samples that match the abnormal monitoring samples. Since the abnormal monitoring samples satisfy the rules satisfied by the samples that are incorrectly predicted by the model to be processed, when the enhanced samples are used to train the model to be processed, the model to be processed can be trained in a targeted manner, so that the model to be processed learns the samples that were previously incorrectly predicted, avoiding training on useless samples. This achieves the technical effect of using a large model to generate effective training samples in a small number of sample scenarios, thereby improving the performance of the initial model in small number of sample scenarios, thereby solving the technical problem of difficulty in generating effective samples.
[0203] Those skilled in the art will appreciate that the structure shown in FIG10 is merely illustrative, and the computer terminal may also be a smartphone (such as an Android phone, iOS phone, etc.), a tablet computer, a PDA, a mobile internet device (MID), a PAD, or other terminal device. FIG10 does not limit the structure of the aforementioned electronic devices. For example, the computer terminal A may include more or fewer components (such as a network interface, a display device, etc.) than those shown in FIG10 , or may have a configuration different from that shown in FIG10 .
[0204] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0205] The embodiment of the present disclosure further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the sample processing method provided in the first embodiment.
[0206] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0207] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining a current sample set for training a model to be processed; using a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; controlling the large model to generate abnormal monitoring samples that match the prompt information, wherein the abnormal monitoring samples satisfy the rules; marking the abnormal monitoring samples to generate enhanced samples, wherein the enhanced samples at least include enhanced samples that match the abnormal monitoring samples.
[0208] Optionally, the storage medium is further configured to store program codes for executing the following steps: using the large model, analyzing samples marked as abnormal and samples marked as normal in the current sample set to obtain prompt information.
[0209] Optionally, the storage medium is further configured to store program codes for executing the following steps: using a large model to respectively study samples marked as abnormal and samples marked as normal to obtain first grammatical information and second grammatical information, wherein the first grammatical information is used to represent the grammatical rules satisfied by samples marked as abnormal, and the second grammatical information is used to represent the grammatical rules satisfied by samples marked as normal; using the second grammatical information to adjust the first grammatical information; and generating prompt information using the adjusted first grammatical information.
[0210] Optionally, the above-mentioned storage medium is also configured to store program codes for executing the following steps: determining at least one sample type of the abnormal monitoring samples to be generated; controlling the large model to obtain a first initial monitoring sample set that meets the sample type; and controlling the large model to determine the samples in the first initial monitoring sample set that meet the prompt information as abnormal monitoring samples.
[0211] Optionally, the storage medium is also configured to store program codes for executing the following steps: controlling the large model to match samples in the first initial monitoring sample set with prompt information; and determining samples in the first initial monitoring sample set that successfully match the prompt information as abnormal monitoring samples.
[0212] Optionally, the above-mentioned storage medium is also configured to store program codes for executing the following steps: determining a first sample quantity of abnormal monitoring samples to be generated; controlling the large model to determine a second initial monitoring sample set that meets the prompt information in the first initial monitoring sample set, and in the second initial monitoring sample set, determining samples with the first sample quantity as abnormal monitoring samples.
[0213] Optionally, the storage medium is further configured to store program codes for executing the following steps: labeling the abnormal monitoring samples using the large model to obtain a first label of the abnormal monitoring samples; and generating enhanced samples based on the abnormal monitoring samples associated with the first label.
[0214] Optionally, the above-mentioned storage medium is also configured to store program codes for executing the following steps: controlling the large model to generate normal monitoring samples that do not match the prompt information; using the large model to mark the normal monitoring samples to obtain a second label for the normal monitoring samples; generating enhanced samples based on the abnormal monitoring samples associated with the first label, including: determining the abnormal monitoring samples associated with the first label and the normal monitoring samples associated with the second label as enhanced samples, wherein the enhanced samples also include enhanced samples that match the normal monitoring samples.
[0215] Optionally, the storage medium is further configured to store program codes for executing the following steps: using abnormal monitoring samples and normal monitoring samples as training sets for the model to be processed; and using samples in the training set to train the model to be processed into a target model.
[0216] The present disclosure also provides a computer program product, including a computer program, which implements any of the above-mentioned sample processing methods when executed by a processor.
[0217] An embodiment of the present disclosure further provides a computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements any one of the sample processing methods described above.
[0218] The embodiments of the present disclosure further provide a computer program product, which, when executed by a processor, implements any one of the above-mentioned sample processing methods.
[0219] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0220] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0221] In the several embodiments provided in this disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the components is only a logical function division. In actual implementation, there may be other division methods. For example, multiple components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, components or indirect coupling or communication connection of components, which can be electrical or other forms.
[0222] The components described as separate parts may or may not be physically separate, and the components shown as components may or may not be physical components, that is, they may be located in one place or distributed across multiple network components. Some or all of these components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0223] In addition, the functional components in the various embodiments of the present disclosure may be integrated into a single processing component, each component may exist physically separately, or two or more components may be integrated into a single component. The aforementioned integrated components may be implemented in the form of hardware or software functional components.
[0224] If the integrated components are implemented in the form of software functional components and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0225] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure. Industrial Applicability
[0226] The solution provided by the embodiment of the present disclosure can be applied to the sample generation process in the field of large model technology. First, the current sample set used to train the model to be processed is obtained. Since the number of samples contained in the current sample set is relatively small, based on this, the samples in the current sample set can be analyzed using the large model to obtain prompt information. The prompt information is used to characterize the rules satisfied by the samples in the current sample set that are marked as abnormal, that is, the rules satisfied by the samples predicted incorrectly by the model to be processed. Afterwards, the large model is controlled to generate abnormal monitoring samples that match the prompt information, and the abnormal monitoring samples are marked to generate enhanced samples. The enhanced samples at least include enhanced samples that match the abnormal monitoring samples. Since the abnormal monitoring samples meet the rules satisfied by the samples predicted incorrectly by the model to be processed, based on this, when the enhanced samples are used to train the model to be processed, the model to be processed can be trained in a targeted manner, so that the model to be processed learns the samples that were previously predicted incorrectly, avoiding training on useless samples. This achieves the technical effect of using the large model to generate effective training samples in a small number of sample scenarios, thereby improving the performance of the initial model in a small number of sample scenarios, thereby solving the technical problem of difficulty in generating effective samples.
Claims
1. A sample processing method, comprising: Get the current sample set used to train the model to be processed; Using a large model to analyze the current sample set, to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; Controlling the large model to generate an abnormal monitoring sample matching the prompt information, wherein the abnormal monitoring sample satisfies the rule; The abnormal monitoring sample is marked to generate an enhanced sample, wherein the enhanced sample at least includes an enhanced sample that matches the abnormal monitoring sample.
2. The method according to claim 1, wherein: The current sample set is analyzed using a large model to obtain prompt information, including: The large model is used to analyze the samples marked as abnormal and the samples marked as normal in the current sample set to obtain the prompt information.
3. The method according to claim 2, wherein: Using the large model, analyzing the samples marked as abnormal and the samples marked as normal in the current sample set to obtain the prompt information includes: Using the large model to learn the samples marked as abnormal and the samples marked as normal, respectively, to obtain first grammatical information and second grammatical information, wherein the first grammatical information is used to represent the grammatical rules satisfied by the samples marked as abnormal, and the second grammatical information is used to represent the grammatical rules satisfied by the samples marked as normal; adjusting the first grammatical information using the second grammatical information; The adjusted first grammatical information is used to generate the prompt information.
4. The method according to claim 1, wherein: Controlling the large model to generate an abnormal monitoring sample matching the prompt information includes: Determining at least one sample type of the abnormal monitoring sample to be generated; Controlling the large model to obtain a first initial monitoring sample set that meets the sample type; The large model is controlled to concentrate the first initial monitoring samples on samples that meet the prompt information and determine them as the abnormal monitoring samples.
5. The method according to claim 4, wherein: Controlling the large model to collect samples that meet the prompt information from the first initial monitoring samples and determine them as the abnormal monitoring samples, including: Controlling the large model to perform matching processing on samples in the first initial monitoring sample set and the prompt information; The samples in the first initial monitoring sample set that successfully match the prompt information are determined as the abnormal monitoring samples.
6. The method according to claim 4, wherein: The method further comprises: Determining a first sample quantity of the abnormal monitoring samples to be generated; Controlling the large model to determine the samples that meet the prompt information in the first initial monitoring sample set as the abnormal monitoring samples, including: controlling the large model to determine a second initial monitoring sample set that meets the prompt information in the first initial monitoring sample set, and in the second initial monitoring sample set, determining the samples whose sample number is the first sample number as the abnormal monitoring samples.
7. The method according to claim 1, wherein: Marking the abnormal monitoring sample to generate an enhanced sample includes: Using the large model to label the abnormal monitoring sample, to obtain a first label of the abnormal monitoring sample; The enhanced sample is generated based on the abnormal monitoring sample associated with the first label.
8. The method according to claim 7, wherein: The method further comprises: Controlling the large model to generate normal monitoring samples that do not match the prompt information; Using the large model to label the normal monitoring sample, to obtain a second label of the normal monitoring sample; Generating the enhanced sample based on the abnormal monitoring sample associated with the first label includes: The abnormal monitoring sample associated with the first label and the normal monitoring sample associated with the second label are determined as the enhanced samples, wherein the enhanced samples also include enhanced samples that match the normal monitoring samples.
9. The method according to claim 8, wherein: The method further comprises: Using the abnormal monitoring samples and the normal monitoring samples as training sets for the model to be processed; The model to be processed is trained as a target model using samples of the training set.
10. A method for processing a sample, comprising: Responding to an inquiry message received in the dialogue interface, wherein the inquiry message is used to request enhancement processing of a current sample set, and the current sample set is used to train a model to be processed; In the dialogue interface, displaying the current sample set; Analyzing the current sample set using a large model, and displaying generated prompt information on the dialogue interface, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; At least displaying an abnormal monitoring sample matching the prompt information on the dialogue interface, wherein the abnormal monitoring sample is generated based on the large model; On the dialogue interface, an enhanced sample generated by marking at least the abnormal monitoring sample is displayed, wherein the enhanced sample at least includes an enhanced sample that matches the abnormal monitoring sample; Based on the enhanced sample, reply information corresponding to the inquiry information is generated and displayed on the dialogue interface.
11. The method according to claim 10, wherein: The inquiry information is multimodal information, and the type of the multimodal information includes at least one of the following: text information containing character information, video frame information containing frame image information, and audio information. The type of the reply information includes at least one of the following: text information, image information, video information, and voice information.
12. The method according to claim 10, wherein: The method further comprises: In response to a modification operation performed on the interactive interface, the prompt information is modified.
13. The method according to claim 10, wherein: The method further comprises: In response to a sample update operation performed on the interactive interface, the current sample set is updated using the abnormal monitoring sample.
14. A method for processing a sample, comprising: Determine the model to be processed; Using the large model to analyze the current sample set of the model to be processed, and generating prompt information, wherein the current sample set is used to train the model to be processed, and the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; at least controlling the large model to generate an abnormal monitoring sample matching the prompt information, wherein the abnormal monitoring sample satisfies the rule; At least marking the abnormal monitoring sample to generate an enhanced sample, wherein the enhanced sample at least includes an enhanced sample that matches the abnormal monitoring sample; The enhanced samples are used as samples of a sample set, and the trained model to be processed is trained to obtain a target model.
15. A sample processing system, comprising: A data identification terminal, configured to identify a current sample set of a model to be processed, wherein the current sample set is used to train the model to be processed; The data enhancement end is configured to use a large model to analyze the current sample set to obtain prompt information, wherein the prompt information is used to characterize the rules satisfied by the samples marked as abnormal in the current sample set; At least controlling the large model to generate an abnormal monitoring sample matching the prompt information, wherein the abnormal monitoring sample satisfies the rule; at least marking the abnormal monitoring sample to generate an enhanced sample, wherein the enhanced sample at least includes an enhanced sample matching the abnormal monitoring sample; The model training end is configured to use at least the enhanced sample as a sample of a sample set, train the trained model to be processed, and obtain a target model.
16. An electronic device comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the method described in any one of claims 1 to 14 are implemented.
17. A computer program product, wherein: The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 14.
18. A computer program product, wherein: The invention comprises a non-volatile computer-readable storage medium storing a computer program, wherein the computer program implements the method according to any one of claims 1 to 14 when executed by a processor.
19. A computer program, wherein When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.
Citation Information
Patent Citations
Song marking model training method, song marking method, electronic equipment and storage medium
CN113159203A
Abnormal traffic detection model training method and device based on semi-supervised learning
CN114039794A
Model training method and device, text classification method and device, medium and electronic equipment
CN115422926A
Classification model training method and device suitable for text auditing
CN116226375A
Data processing method, model training method, electronic equipment and storage medium
CN116756576A
Cited By
Anti-money laundering risk rule generation method and system based on multi-modal large language model
CN120598567A