Model training method and device, equipment, storage medium and product

By using big models to infer the task demand data, generate training code and target algorithms, and through iterative training of training set data, the problems of manual intervention and dependence on big models in small model training are solved, and the automated training of small models is realized and Efficient data processing.

CN119474879APending Publication Date: 2025-02-18中移信息技术有限公司 +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411686320.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In a large number of scenarios in some fields, the data scale is not large and the value that can be mined is single. It is impossible to mine the value of these smaller business data through large models. At the same time, there is a lot of manual intervention when training small models. , and it has a high degree of dependence on large models, so it is impossible to achieve automated training of models.

Method used

By receiving task demand data, sending training request instructions to a preset big model, inferring the task demand data based on the big model, generating training codes and recommended target algorithms, extracting training set data from task demand data, and through training codes and training Set data to iteratively train the target algorithm to obtain the trained small model.

Benefits of technology

Automatic training of small models is realized, which reduces deep dependence on large models, maximizes the utilization of existing computing resources, reduces manual intervention, and improves training efficiency and automation of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119474879A_ABST
    Figure CN119474879A_ABST
Patent Text Reader

Abstract

The invention discloses a model training method and device, equipment, a storage medium and a product, and relates to the technical field of artificial intelligence, and the model training method comprises the steps: receiving task demand data used for model training; sending a training request instruction corresponding to the task demand data to a preset large model, reasoning the task demand data based on the preset large model, and generating a training code and a recommended target algorithm; and extracting training set data from the task demand data, and performing iterative training on the target algorithm through the training code and the training set data to obtain a trained small model. According to the invention, the small model training process is automatically executed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model training method, device, equipment, storage medium and computer program product. Background Art

[0002] In recent years, the requirements for enterprise automation and intelligence have been continuously increasing, and the application scenarios of large models have become more and more numerous. However, in a large number of scenarios in certain fields, the data scale is small and the value that can be mined is single, which is not suitable for pre-training or fine-tuning of large models. As a result, it is impossible to mine the value of these smaller business data through large models. When training small models, there is a lot of manual intervention and the degree of dependence on large models is high. In other words, there is an urgent need for an automated training solution for small models.

[0003] Therefore, how to realize automatic training of small models is a problem that needs to be solved urgently.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a model training method, device, equipment, storage medium and computer program product, aiming to solve the technical problems in the related technology that when training small models, there is a lot of manual intervention, and the degree of dependence on large models is high, making it impossible to realize automated training of models.

[0006] To achieve the above objectives, the present application proposes a model training method, which includes:

[0007] Receive task requirement data for model training;

[0008] Sending a training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, inferring the task requirement data to generate a training code and a recommended target algorithm;

[0009] The training set data is extracted from the task requirement data, and the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model.

[0010] In one embodiment, the step of iteratively training the target algorithm through the training code and the training set data to obtain a trained small model includes:

[0011] Convert the training code into an executable code file, and input the training set data into a target algorithm;

[0012] Iteratively training the target algorithm through the executable code file to obtain an initial training model;

[0013] Performing model testing on the initial training model and outputting labeled test data;

[0014] When the normal proportion of the labeled test data is greater than a preset threshold, the trained small model is output.

[0015] In one embodiment, after the step of iteratively training the target algorithm using the training code and the training set data to obtain a trained small model, the step further includes:

[0016] Establishing a matching relationship between the trained small model and the model keyword to generate matching data;

[0017] Performing vectorization processing on the matching data to obtain matching vector data, and storing the matching vector data in a specified vector library;

[0018] Receive task execution data, and based on the matching vector data, call the trained small model to perform data processing on the task execution data to obtain an execution result;

[0019] The execution result is stored in a preset storage location.

[0020] In one embodiment, the step of calling the trained small model to process the task execution data based on the matching vector data to obtain the execution result includes:

[0021] Analyzing and processing the task execution data to obtain model keywords;

[0022] Matching the model keyword with the matching vector data to determine the small model to be called;

[0023] The task execution data is processed by the small model to be called to obtain an execution result.

[0024] In one embodiment, the step of storing the execution result in a preset storage location includes:

[0025] Saving the executable code corresponding to the execution result as a first file in a preset storage location;

[0026] When the task execution data is received again within the next preset time period, the first file is called to load the small model to be called for data processing.

[0027] In one embodiment, the step of reasoning the task requirement data based on the preset large model, generating training code and a recommended target algorithm includes:

[0028] Based on the preset big model, the task requirement data is subjected to operational analysis to determine the data business scenario;

[0029] Based on the data business scenario, a recommended target algorithm is generated, and according to the training process of the target algorithm, a training code is generated.

[0030] In addition, to achieve the above objectives, the present application also proposes a model training device, which includes:

[0031] A first receiving module, used to receive task requirement data for model training;

[0032] A first processing module is used to send the training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, infer the task requirement data to generate a training code and a recommended target algorithm;

[0033] The training module is used to extract training set data from the task requirement data, and iteratively train the target algorithm through the training code and the training set data to obtain a trained small model.

[0034] In addition, to achieve the above-mentioned purpose, the present application also proposes a model training device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the model training method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the model training method described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the model training method described above.

[0037] The present application proposes a model training method, apparatus, equipment, storage medium and computer program product. The present application uses a large model to perform model inference on the task requirement data used for model training, and generates a recommended target algorithm and training code. The large model is used to infer the task requirement data to obtain a model to be trained or an algorithm to be trained suitable for the current scenario, and then the training set data is extracted from the task requirement data. Then, the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model. In the overall process, only data inference needs to be performed through the large model, which reduces the deep dependence on the large model, can maximize the use of existing computing resources, realize automated execution, and reduce manual intervention. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A flowchart of the first embodiment of the model training method of the present application is provided;

[0041] Figure 2 A flowchart of the second embodiment of the model training method of the present application is provided;

[0042] Figure 3 This is a schematic diagram of the overall process involved in the model training method of this application;

[0043] Figure 4 This is a schematic diagram of the module structure of the model training device in the embodiment of the present application;

[0044] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the model training method in the embodiment of the present application.

[0045] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0047] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0048] The main solutions of the embodiments of this application are:

[0049] Receive task requirement data for model training;

[0050] Sending a training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, inferring the task requirement data to generate a training code and a recommended target algorithm;

[0051] The training set data is extracted from the task requirement data, and the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model.

[0052] In related technologies, in a large number of scenarios in certain fields, the data scale is small and the value that can be mined is single, which is not suitable for pre-training or fine-tuning of large models. As a result, it is impossible to mine the value of these smaller business data through large models. When training small models, there is a lot of manual intervention and the degree of dependence on large models is high. In other words, there is an urgent need for an automated training solution for small models.

[0053] The present application proposes a model training method, apparatus, equipment, storage medium and computer program product. The present application uses a large model to perform model inference on the task requirement data used for model training, and generates a recommended target algorithm and training code. The large model is used to infer the task requirement data to obtain a model to be trained or an algorithm to be trained suitable for the current scenario, and then the training set data is extracted from the task requirement data. Then, the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model. In the overall process, only data inference needs to be performed through the large model, which reduces the deep dependence on the large model, can maximize the use of existing computing resources, realize automated execution, and reduce manual intervention.

[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a model training device, etc. The following takes the model training device as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the present application embodiment provides a model training method, referring to Figure 1 , Figure 1This is a flow chart of the first embodiment of the model training method of the present application.

[0056] In this embodiment, the model training method includes steps S10 to S30:

[0057] Step S10, receiving task requirement data for model training;

[0058] It should be noted that the task requirement data includes data characteristics, business data, task data, data scale, analysis and operation task descriptions of different business scenarios. Among them, the task requirement data can be uploaded by users or stored in the database. In different business scenarios, the training requirements for the model are also different.

[0059] It should be noted that this embodiment mainly uses a large model to perform reasoning and analysis on the input task requirement data, and only uses the reasoning ability of the large model to determine which machine learning algorithm / model needs to be trained, and then trains the recommended algorithm by generating corresponding training codes and data sets, thereby achieving iterative training of small models while maximizing the use of computing resources to obtain a small model that processes business needs.

[0060] In a feasible implementation, step S10 may include steps A11 to A13:

[0061] Step S20, sending the training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, inferring the task requirement data to generate a training code and a recommended target algorithm;

[0062] It should be noted that, according to user needs, the metadata features, data scale, analysis operation task description and other information in the task requirement data are assembled into a training request instruction, and the instruction is sent to the preset big model so that the preset big model can perform reasoning based on the request instruction, input the recommendation algorithm and generate training code. The work of generating training code can be done by most big models and is well known to those skilled in the art, so it will not be elaborated here.

[0063] It should be noted that the preset large model can be the Qianwen 72b large model, GPT4 (Generative Pre-Trained, a deep learning model trained based on Internet data), Code Llama (code generation large model) and other large models. The large model can analyze which small model is more suitable for the current task requirements based on the input text data and user needs, and then input the recommended target algorithm.

[0064] It should be noted that the target algorithm can be a machine learning algorithm / model based on deep learning, a regression algorithm, a random forest algorithm, etc. It will be adjusted according to different task requirements and is not limited to any specific ones.

[0065] In a feasible implementation manner, the step S20 of inferring the task requirement data based on the preset large model and generating training code and a recommended target algorithm includes:

[0066] Based on the preset big model, the task requirement data is subjected to operational analysis to determine the data business scenario;

[0067] It should be noted that the business scenario may be an image processing scenario, an image classification scenario, etc., without any specific limitation.

[0068] It should be noted that the task requirement data includes user needs and tasks that need to be processed. The big model can determine the current business scenario through data extraction or data analysis.

[0069] Based on the data business scenario, a recommended target algorithm is generated, and according to the training process of the target algorithm, a training code is generated.

[0070] It should be noted that after determining the data business scenario, the corresponding target algorithm is selected according to the needs. There are multiple target algorithms, and each target algorithm is arranged in order from large to small according to the degree of matching between the algorithm and the data business scenario. During the training process, the models corresponding to one or more target algorithms can be trained, and the optimal model obtained can be used as the final callable model.

[0071] It should be noted that the training code is mainly based on the model training process to generate the corresponding execution code, which includes:

[0072] Language constraint: Which language is used to generate the code? In theory, Java, Python, C and other high-level languages ​​are all acceptable. This proposal takes Python as an example and stipulates that the generated code is wrapped in Python{}.

[0073] Data acquisition: requires obtaining the training data set from {data_location (data location)}.

[0074] Data training: Complete model training of specific algorithms for specific data fields based on {data_features (data structure)} and {process (analysis operation)}.

[0075] Model testing: Get the test set from {data_location} and evaluate the accuracy of the trained small model.

[0076] Model saving: Save the trained small model {model_file (model file)} to the specified location {model_saved}, bind {model_file} with {keywords (keywords)}, and store it in the vector library {vector_store} for subsequent small model retrieval.

[0077] Among them, the data location, data structure and analysis operation are the specified template contents.

[0078] Step S30, extracting training set data from the task requirement data, iteratively training the target algorithm through the training code and the training set data, and obtaining a trained small model.

[0079] It should be noted that the corresponding metadata describing the data features, that is, the training set data, is extracted based on the uploaded task requirement data. After the training set code is determined, the training set data is input into the target algorithm or target model by executing the training code for iterative training until the model converges to obtain a trained small model.

[0080] In a feasible implementation manner, the step S30 of iteratively training the target algorithm through the training code and the training set data to obtain a trained small model includes:

[0081] Convert the training code into an executable code file, and input the training set data into a target algorithm;

[0082] It should be noted that, from the generated code fed back by the large model, the code block wrapped in Python{} is parsed and saved as an executable Python file, that is, an executable code file. At the same time, the keyword list {keywords} corresponding to the target algorithm generated by the large model is obtained.

[0083] Then obtain the training data, obtain the training set in the corresponding directory according to {data_location}, use it as the input when the executable Python file is executed, and input the training set data into the target algorithm for training.

[0084] Iteratively training the target algorithm through the executable code file to obtain an initial training model;

[0085] It should be noted that by executing the executable code file and executing the training process of the target algorithm, the initial training model after training is obtained. The initial training model has only been trained but has not been tested with the test set. The model also needs to be tested with the test set data to ensure the accuracy of the model output results.

[0086] Performing model testing on the initial training model and outputting labeled test data;

[0087] It should be noted that the model test is performed by obtaining the test set in the {data_location} directory. The test set is usually composed of a small amount of labeled data, including some normal data and some abnormal data. The normal data ratio right_accuracy = the number of normal data / the total number of test set elements is known. By inputting the test set into the trained small model, the test set data is labeled (normal: 1, abnormal: 0), and the normal ratio of the test label test_right_accrucy is obtained:

[0088] test_right_accrucy=Num(1) / N

[0089] N is the total number of elements in the test set, and Num(1) is the number of elements that are labeled normal when testing the model.

[0090] When the normal proportion of the labeled test data is greater than a preset threshold, the trained small model is output.

[0091] It should be noted that the size of the preset threshold is the known normal data ratio. The known normal data ratio right_accuracy and the test-annotated normal ratio test_right_accrucy are fed back to the large model. When test_right_accrucy>=right_accuracy, it means that the training model prediction effect is good. Otherwise, the large model adjusts the model parameters according to the comparison results of the two and regenerates the training code.

[0092] The present application proposes a model training method, apparatus, equipment, storage medium and computer program product. The present application uses a large model to perform model inference on the task requirement data used for model training, and generates a recommended target algorithm and training code. The large model is used to infer the task requirement data to obtain a model to be trained or an algorithm to be trained suitable for the current scenario, and then the training set data is extracted from the task requirement data. Then, the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model. In the overall process, only data inference needs to be performed through the large model, which reduces the deep dependence on the large model, can maximize the use of existing computing resources, realize automated execution, and reduce manual intervention.

[0093] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 2, after the step S30 of iteratively training the target algorithm through the training code and the training set data to obtain the trained small model, the method further includes steps S40 to S50:

[0094] Step S40, establishing a matching relationship between the trained small model and the model keyword to generate matching data;

[0095] It should be noted that after the small model training is completed, a matching relationship will be established between the trained small model and the model keyword to facilitate subsequent calls. After the small model training is completed and stored in the database, the same or similar business scenarios and data features can be matched and called against the trained small model in the database.

[0096] Step S50, performing vectorization processing on the matching data to obtain matching vector data, and storing the matching vector data in a designated vector library.

[0097] It should be noted that the matching vector data contains the binding relationship between the model keywords and the model.

[0098] For the well-evaluated trained small model, save it as the model file {model_file}, and establish a binding relationship between {keywords} and {model_file}:

[0099] binding={model_file:[keywords]}

[0100] The binding is then vectorized through the embedding model and stored in the specified vector library {vector_store}. The corresponding model file will be obtained through keyword vector matching to complete the call.

[0101] Step S60, receiving the task execution data, and based on the matching vector data, calling the trained small model to process the task execution data to obtain an execution result;

[0102] It should be noted that the task execution data is the data to be processed that needs to be input into the trained small model during the actual application process. By obtaining the task execution data, the user's task requirements are obtained, and the corresponding small model is matched to process the task execution data.

[0103] It should be noted that the corresponding small model can be called by matching vector data to perform data processing on the task execution data.

[0104] Step S70, storing the execution result in a preset storage location.

[0105] It should be noted that after the small model completes data processing, the execution results can be stored in a set storage location. The next time the same type of task execution data is received, the data can be directly called to reduce data processing time.

[0106] In a feasible implementation manner, the step of calling the trained small model to process the task execution data based on the matching vector data to obtain the execution result includes:

[0107] Analyzing and processing the task execution data to obtain model keywords;

[0108] It should be noted that model keywords are obtained by extracting keywords from task execution data, wherein the model keywords may be keywords related to the model name, keywords related to the model type, etc., without specific limitation.

[0109] Matching the model keyword with the matching vector data to determine the small model to be called;

[0110] It should be noted that when storing the trained model, the model keywords have been bound to the corresponding small models. After determining the model keywords, the small model to be called can be determined by matching the vector data with the model keywords.

[0111] The task execution data is processed by the small model to be called to obtain an execution result.

[0112] It should be noted that after determining the small model that needs to be called, the task execution data is processed through the model. Since the model has been trained, the execution result can be directly output.

[0113] It should be noted that when calling the small model, the calling process is as follows:

[0114] Tell the big model what kind of analysis operation {process} needs to be done on the known data features. This can be done by calling a small model in the library and generating the corresponding calling code. The task description can usually be preset with a prompt template or directly provided by user input. An example is as follows:

[0115] "You are a data mining engineer, please:

[0116] Data structure: {data_features},

[0117] Analysis operation: {process},

[0118] Data location: {data_location}

[0119] Analyze the business scenario and use the following small model in the library:

[0120] {saved_models}

[0121] Select the most suitable small model to complete the analysis task and generate executable training code according to the following requirements:

[0122] {code_format}

[0123] Human:{human_input}

[0124] ”

[0125] According to the analysis operation {process} description, obtain keywords {keywords} through large model analysis or embedding model analysis, call the small model management module through {keywords}, and obtain the topN matching N small models.

[0126] To enforce code generation constraints:

[0127] Language constraint: the language used to generate the code. In theory, Java, Python, C and other high-level languages ​​are all acceptable. This embodiment takes Python as an example and specifies that the generated code is wrapped in Python{}.

[0128] Data acquisition: Requires to obtain a new test data set from {data_location}.

[0129] Data analysis: Analyze the new test set by matching the most suitable small model.

[0130] Web API interface generation: After the call is passed, the calling method is encapsulated into the SDK file (software development file) of the web api.

[0131] In another embodiment, in general, the user's task description is sufficient for the large model to generate content as required, and the user can also enter additional questions to help the large model recommend models and generate code more accurately. The above information is assembled into a call instruction request and sent to the large model to complete reasoning and code generation.

[0132] In a feasible implementation manner, the step of storing the execution result in a preset storage location includes:

[0133] Saving the executable code corresponding to the execution result as a first file in a preset storage location;

[0134] It should be noted that the first file can be an SDK file, which includes all code files in the calling process. After the model is executed, the executable code of the model can be saved in the form of a code file, which is convenient for direct calling when similar task data is input later.

[0135] When the task execution data is received again within the next preset time period, the first file is called to load the small model to be called for data processing.

[0136] It should be noted that the preset time period can be 5 minutes, 10 minutes, etc., and there is no specific limitation.

[0137] It should be noted that in the future, if the same or similar task execution data is received, the task execution data can be processed by calling the first file, thereby avoiding the overall process of matching and calling the model and improving computing efficiency.

[0138] In this embodiment, the keyword extraction of the task description is completed through the large model, and the keyword set is bound to the trained small model and vectorized and stored in the vector library to realize the vectorized retrieval of the trained small model. The retrieval accuracy, retrieval speed and result precision are improved through the keyword vectorization association, ensuring that the small model is trained once and N retrieval calls are made.

[0139] For example, to help understand the implementation process of the model training method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A brief flowchart of a model training method is provided, specifically:

[0140] In the embodiment of the present application, it is divided into two parts: small model training and small model calling. In the small model training part, after the user stores the specific business data, the data features are obtained, and the large model request instructions are assembled in the training instruction module according to the task features and code generation specifications. The large model is inferred according to the training instruction request, and the target machine learning algorithm is recommended and the training code is generated as required. The small model training module completes the parsing and execution of the training code, and the trained small model is saved through the small model management module; in the small model calling part, the user inputs the features and task requirements of the new data, retrieves the closest N trained models through the small model management module, and generates a call instruction request in the call instruction module according to the call code generation specification. The large model matches the most suitable trained small model according to the call instruction request, and generates the call code. The parsing and execution of the call code are completed through the small model calling module, the SDK is saved, and the API is exposed in the web module. The specified small model can be called directly through the API to complete the business processing. In the scheme, the training and calling of the small model are automatically completed with the help of the reasoning ability of the general large model, and can also be evaluated according to the training and calling results, and the training model and calling parameter adjustment can be realized through dialogue with the large model.

[0141] The beneficial effects achieved by the technical solution of this application are as follows:

[0142] 1. Build scenario-specific task instructions based on business scenarios, data features, task descriptions, and other requirements. By setting code generation specifications, guide the general large model to recommend machine learning algorithms that can complete corresponding tasks, and generate training code. Complete model training in an environment independent of the large model, reduce deep dependence on the large model, and maximize the use of existing computing resources. The entire process is automated and reduces manual intervention.

[0143] 2. Complete keyword extraction of the task description through the large model, establish a binding relationship between the keyword set and the trained small model, vectorize and store it in the vector library, realize vectorized retrieval of the trained small model, improve the accuracy, speed and result precision of the retrieval through keyword vectorization association, and ensure that the small model can be trained once and called N times for retrieval.

[0144] 3. Build scenario-specific task instructions based on business scenarios, data features, task descriptions, and other requirements. By setting code generation specifications, guide the general large model to match the most suitable small model that has been stored, and generate calling code to complete the analysis and evaluation of new data by the small model in an environment independent of the large model; and through SDK or web, the trained model can guarantee subsequent business calls. The trained small model has low resource requirements and can be deployed and called independently of the large model. At the same time, multiple instances can be deployed in a distributed manner to cope with concurrent task processing. Similarly, the entire process is executed automatically without human intervention.

[0145] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the model training method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0146] This application also provides a model training device, please refer to Figure 4 , the model training device comprises:

[0147] A first receiving module 10 is used to receive task requirement data for model training;

[0148] The first processing module 20 is used to send the training request instruction corresponding to the task requirement data to the preset large model, and based on the preset large model, infer the task requirement data to generate training code and a recommended target algorithm;

[0149] The training module 30 is used to extract training set data from the task requirement data, and iteratively train the target algorithm through the training code and the training set data to obtain a trained small model.

[0150] Optionally, the training module includes:

[0151] A conversion unit, used to convert the training code into an executable code file, and input the training set data into a target algorithm;

[0152] A training unit, used for iteratively training the target algorithm through the executable code file to obtain an initial training model;

[0153] A testing unit, used to perform model testing on the initial training model and output labeled test data;

[0154] The output unit is used to output the trained small model when the normal proportion of the labeled test data is greater than a preset threshold.

[0155] Optionally, the device further comprises:

[0156] Establishing a module, used to establish a matching relationship between the trained small model and the model keyword, and generate matching data;

[0157] A vectorization processing module, used for performing vectorization processing on the matching data to obtain matching vector data, and storing the matching vector data in a specified vector library;

[0158] A calling module, used for receiving task execution data, and based on the matching vector data, calling the trained small model to process the task execution data to obtain an execution result;

[0159] The storage module is used to store the execution result in a preset storage location.

[0160] Optionally, the calling module includes:

[0161] An analysis and processing unit, used for analyzing and processing the task execution data to obtain model keywords;

[0162] A matching processing unit, used for matching the model keyword with the matching vector data to determine the small model to be called;

[0163] The processing unit is used to process the task execution data through the small model to be called to obtain an execution result.

[0164] Optionally, the storage module includes:

[0165] A saving unit, used to save the executable code corresponding to the execution result as a first file;

[0166] The calling unit is used to call the first file to load the small model to be called for data processing when the task execution data is received again within the next preset time period.

[0167] Optionally, the training module further includes:

[0168] An analysis unit, configured to perform an operation analysis on the task requirement data based on the preset large model to determine a data business scenario;

[0169] A generating unit is used to generate a recommended target algorithm based on the data service scenario, and to generate a training code according to the training process of the target algorithm.

[0170] The model training device provided by the present application adopts the model training method in the above embodiment to solve the technical problems of model training. Compared with the prior art, the beneficial effects of the model training device provided by the present application are the same as the beneficial effects of the model training method provided by the above embodiment, and the other technical features in the model training device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0171] The present application provides a model training device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the model training method in the above-mentioned embodiment one.

[0172] Reference below Figure 5, which shows a schematic diagram of the structure of a model training device suitable for implementing an embodiment of the present application. The model training device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The model training device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0173] like Figure 5 As shown, the model training device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the model training device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the model training device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a model training device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.

[0174] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0175] The model training device provided by the present application adopts the model training method in the above embodiment to solve the technical problems of model training. Compared with the prior art, the beneficial effects of the model training device provided by the present application are the same as the beneficial effects of the model training method provided by the above embodiment, and the other technical features in the model training device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0176] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0177] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0178] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the model training method in the above-mentioned embodiment.

[0179] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0180] The above-mentioned computer-readable storage medium may be included in the model training device; or it may exist independently without being assembled into the model training device.

[0181] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the model training device, the model training device:

[0182] Receive task requirement data for model training;

[0183] Sending a training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, inferring the task requirement data to generate a training code and a recommended target algorithm;

[0184] The training set data is extracted from the task requirement data, and the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model.

[0185] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0186] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0187] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0188] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned model training method, and can solve the technical problems of model training. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the model training method provided in the above-mentioned embodiment, and will not be repeated here.

[0189] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned model training method when executed by a processor.

[0190] The computer program product provided in this application can solve the technical problems of model training. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the model training method provided in the above embodiment, which will not be repeated here.

[0191] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A model training method, characterized in that: The method comprises: Receive task requirement data for model training; Sending a training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, inferring the task requirement data to generate a training code and a recommended target algorithm; The training set data is extracted from the task requirement data, and the target algorithm is iteratively trained through the training code and the training set data to obtain a trained small model.

2. The method according to claim 1, characterized in that The step of iteratively training the target algorithm through the training code and the training set data to obtain a trained small model includes: Convert the training code into an executable code file, and input the training set data into a target algorithm; Iteratively training the target algorithm through the executable code file to obtain an initial training model; Performing model testing on the initial training model and outputting labeled test data; When the normal proportion of the labeled test data is greater than a preset threshold, the trained small model is output.

3. The method according to claim 1, characterized in that After the step of iteratively training the target algorithm through the training code and the training set data to obtain a trained small model, the method further includes: Establishing a matching relationship between the trained small model and the model keyword to generate matching data; Performing vectorization processing on the matching data to obtain matching vector data, and storing the matching vector data in a specified vector library; Receive task execution data, and based on the matching vector data, call the trained small model to perform data processing on the task execution data to obtain an execution result; The execution result is stored in a preset storage location.

4. The method according to claim 3, characterized in that The step of calling the trained small model to process the task execution data based on the matching vector data to obtain the execution result includes: Analyzing and processing the task execution data to obtain model keywords; Matching the model keyword with the matching vector data to determine the small model to be called; The task execution data is processed by the small model to be called to obtain an execution result.

5. The method according to claim 3, characterized in that The step of storing the execution result in a preset storage location includes: Saving the executable code corresponding to the execution result as a first file in a preset storage location; When the task execution data is received again within the next preset time period, the first file is called to load the small model to be called for data processing.

6. The method according to claim 1, characterized in that The step of inferring the task requirement data based on the preset large model, generating training code and a recommended target algorithm includes: Based on the preset big model, the task requirement data is subjected to operational analysis to determine the data business scenario; Based on the data business scenario, a recommended target algorithm is generated, and according to the training process of the target algorithm, a training code is generated.

7. A model training device, characterized in that: The device comprises: A first receiving module, used to receive task requirement data for model training; A first processing module is used to send the training request instruction corresponding to the task requirement data to a preset large model, and based on the preset large model, infer the task requirement data to generate a training code and a recommended target algorithm; The training module is used to extract training set data from the task requirement data, and iteratively train the target algorithm through the training code and the training set data to obtain a trained small model.

8. A model training device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the model training method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the model training method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the steps of the model training method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Method and system for evaluating deviation degree between software requirement and code development

    CN120872396A

  • Robot model training method, device, equipment and medium

    CN121303202A