Training method, device, equipment and medium for interface data generation model
By updating the parameters of the basic interface data generation model, combining hardware parameters and model evaluation scores for iterative training, the problem of low accuracy of interface display data in the existing technology is solved, and higher training accuracy and model adaptability are achieved.
Patent Information
- Application Number
- CN202411260045.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2044-09-10
AI Technical Summary
The existing technology cannot find problems on site and dynamically adjust the data display of the smart center large screen, resulting in low accuracy of interface display data.
By determining the basic model parameters of the pre-constructed basic interface data generation model and updating it in combination with the hardware parameters of the current server, a candidate interface data generation model is obtained. Then, the current training data in the model training data set is input into the candidate model, the current interface data is output, and iterative training is performed based on the model evaluation score to obtain the target interface data generation model.
The training accuracy of the interface data generation model is improved, thereby improving the accuracy of subsequent interface display data, and enhancing the adaptability of the target interface data generation model with the current server.
Smart Images

Figure CN118779663B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of neural network technology, and in particular to a method, device, equipment and medium for training an interface data generation model. Background Art
[0002] The current command center screens in the construction industry are divided into the following types: 1. Fixed statistical dimensions of human-machine-material-method-environmental measurement are displayed through code. Each statistic requires early communication with the demand side, coding and testing by R&D personnel, and finally released to the customer's site for use. 2. Through the low-code mode, it is made configurable, which can reduce the development workload of R&D personnel. However, the demand side is also required to configure it in the background before publishing it. The above two methods cannot find problems on site, and the smart center screen can display non-preset data for the problem.
[0003] Based on the above problems, in the prior art, AI is used to perform intent recognition through user input, recognize the intent to generate dynamic SQL search data, and return dynamic result display. However, the accuracy of the interface display data obtained by the above method is low. Summary of the invention
[0004] The present invention provides an interface data generation model training method, device, equipment and medium to improve the training accuracy of the interface data generation model, thereby improving the accuracy of subsequent determination of interface display data based on the interface data generation model.
[0005] According to one aspect of the present invention, a method for training an interface data generation model is provided, comprising:
[0006] Determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied;
[0007] The basic model parameters are updated according to the hardware parameters to obtain a candidate interface data generation model after initial update;
[0008] Inputting current training data in the model training data set into the candidate interface data generation model, outputting current interface data, and determining a model evaluation score of the candidate interface data generation model based on the current interface data;
[0009] The candidate interface data generation model is iteratively trained according to the model evaluation score and the hardware parameters to obtain a target interface data generation model.
[0010] According to another aspect of the present invention, there is provided a training device for an interface data generation model, comprising:
[0011] A parameter determination module, used to determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied;
[0012] A candidate model determination module, used to update the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after initial update;
[0013] An evaluation score determination module, used to input the current training data in the model training data set into the candidate interface data generation model, output the current interface data, and determine the model evaluation score of the candidate interface data generation model based on the current interface data;
[0014] The target model determination module is used to iteratively train the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model.
[0015] According to another aspect of the present invention, there is provided an electronic device, comprising:
[0016] one or more processors;
[0017] A memory for storing one or more programs;
[0018] When one or more programs are executed by one or more processors, the one or more processors can execute any one of the training methods for the interface data generation model provided by the embodiments of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer instructions, and the computer instructions are used to enable a processor to implement any one of the training methods for interface data generation models provided in the embodiments of the present invention when executed.
[0020] The embodiment of the present invention provides a training scheme for an interface data generation model, which determines the basic model parameters of a pre-built basic interface data generation model and the hardware parameters of the current server to which the basic interface data generation model is applied; updates the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after the initial update; inputs the current training data in the model training data set into the candidate interface data generation model, outputs the current interface data, and determines the model evaluation score of the candidate interface data generation model according to the current interface data; iteratively trains the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model. The above scheme improves the accuracy of training the basic interface data generation model by training the basic interface data generation model according to the basic model parameters, the hardware parameters and the model evaluation score, thereby improving the accuracy of subsequently determining the interface display data based on the target interface data generation model; at the same time, by introducing the hardware parameters, the adaptability between the target interface data generation model and the current server is improved.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 It is a flow chart of a training method of an interface data generation model provided in the first embodiment of the present invention;
[0024] Figure 2 is a flow chart of a method for training an interface data generation model provided in Embodiment 2 of the present invention;
[0025] Figure 3 It is a structural diagram of a model iterative training system provided in Embodiment 3 of the present invention;
[0026] Figure 4 It is a structural schematic diagram of a training device for an interface data generation model provided by a fourth embodiment of the present invention;
[0027] Figure 5 It is a structural schematic diagram of an electronic device for implementing a training method for an interface data generation model provided in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0028] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0029] Embodiment 1
[0030] Figure 1 It is a flowchart of a method for training an interface data generation model provided in the first embodiment of the present invention. This embodiment is applicable to the situation of training an interface data generation model. The method can be executed by a training device for the interface data generation model. The device can be implemented in software and / or hardware and can be configured in an electronic device that carries the training function of the interface data generation model.
[0031] See also Figure 1 The training method of the interface data generation model shown includes:
[0032] S110: Determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied.
[0033] The basic interface data generation model refers to a basic model that has the function of generating interface display data and has not been iteratively trained. The basic interface data generation model in the embodiment of the present invention may be a large language model. The interface display data refers to display data on a large screen. For example, the interface display data may be display data on a large screen of a command center in the construction industry.
[0034] Exemplarily, the basic interface data generation model can be determined based on the following method: obtain a model pre-training data set, and pre-train the interface data generation network through the model pre-training data set to obtain a basic interface data generation model. Among them, the model pre-training data set refers to a data set that can be used to pre-train the interface data generation network. The model pre-training data set may include training data for general industries and associated data specific to the construction industry. The training data for general industries refers to the training data of traditional large language models that are unrelated to the industry. The associated data specific to the construction industry refers to data exclusive to intelligent construction, such as unlabeled data such as relevant regulations, safety precautions and general knowledge of the intelligent construction industry. The interface data generation network can be any model network with adjustable hyperparameters. Exemplarily, the interface data generation network can adopt a llama3 network.
[0035] It should be noted that in order to improve the applicability of the training data in the model pre-training dataset, the training data in the model pre-training dataset may be cleaned.
[0036] It is understandable that the benefit of introducing pre-training is to determine the model function of the basic interface data generation model; the benefit of adopting the llama3 network is to improve the performance of the basic interface data generation model.
[0037] The basic model parameters refer to the model parameters of the basic interface data generation model. Exemplarily, the basic model parameters may include at least one of the model network depth n_layer, vector dimension n_embd, batch size batch_size, and block size block_size.
[0038] The current server refers to the server that generates the model for the application basic interface data. The hardware parameters refer to the parameters of the hardware in the current server. Exemplarily, the hardware parameters may include at least one of the number of nodes, node cpu (Central Processing Unit), node memory, node graphics card gpu_cuda, and node graphics memory gpu_value.
[0039] Specifically, basic model parameters are obtained from the basic interface data generation model, and hardware parameters are obtained from the current server to which the basic interface data generation model is applied.
[0040] S120 . Update basic model parameters according to hardware parameters to obtain a candidate interface data generation model after initial update.
[0041] The candidate interface data generation model refers to the basic interface data generation model after the basic model parameters are updated.
[0042] S130, inputting the current training data in the model training data set into the candidate interface data generation model, outputting the current interface data, and determining the model evaluation score of the candidate interface data generation model based on the current interface data.
[0043] Among them, the model training data set refers to the data set for iterative training of the candidate interface data generation model. The model training data set may include an intent recognition data set and a kanban data set. Among them, the intent recognition data set refers to a collection of historical intent data. Exemplarily, the intent recognition data refers to the instruction data generated by the intelligent construction kanban, such as the intent, input parameters, statistical dimensions, statistical items, and display forms. For example, the instruction data is the number of material receiving vehicles of vehicle X of organization A in the past 7 days, the statistical dimension project, the statistical item weight, and the display type table; then the instruction data is identified, and the intention is to obtain the material receiving vehicle situation; the input parameters include project [organization A], time [nearly 7 days] and license plate [vehicle X]; the statistical dimension is project; the statistical item is weight; and the display form is a table.
[0044] The kanban data set refers to a data set that generates different kanban data according to the intent instruction. The kanban data set includes the annotation data of the title, kanban graphic style, statistical dimension column and statistical item column.
[0045] It should be noted that in order to improve the applicability of the training data in the model training data set, the training data in the model training data set may be cleaned.
[0046] The current training data refers to the data in the model training data set that is used for this iteration training. The current interface data refers to the data output by the candidate interface data generation model based on the current training data. The model evaluation score can be used to evaluate the accuracy of the candidate interface data generation model.
[0047] Exemplarily, the current training data can be determined in the following manner: directly obtain a preset threshold number of training data as the current training data from the model training data set; or, according to a preset new and old data ratio, obtain a preset threshold number of training data as the current training data from the model training data set. Among them, the embodiment of the present invention does not impose any restrictions on the size of the preset threshold and the preset new and old data ratio, which can be set by a technician based on experience. Exemplarily, the preset new and old data ratio can be 9:1, that is, the new training data accounts for 90% and the old training data accounts for 10%. New training data refers to training data in the model training data set that has not participated in model iterative training. Old training data refers to training data in the model training data set that has participated in model iterative training.
[0048] It should be noted that the model training data set includes a new training data set and an old training data set. During the model iterative training process, each time an iterative training is completed, the training data used in this iterative training is marked as old data and stored in the old training data set. The new training data set can be used to store new training data, and the old training data set can be used to store old training data.
[0049] It is understandable that the benefit of introducing a preset new-to-old ratio is that it improves the utilization rate of training data in the model training data set, avoids repeated use of training data, and improves the accuracy of model training.
[0050] In an embodiment of the present invention, the model training data set is classified according to the training data type to obtain the intent recognition data set and the kanban data set; the model training data set is classified according to whether the training data has been used to obtain the new training data set and the old training data set.
[0051] S140. Iteratively train the candidate interface data generation model according to the model evaluation score and hardware parameters to obtain the target interface data generation model.
[0052] Among them, the target interface data generation model refers to the candidate interface data generation model with the highest model evaluation score.
[0053] In an optional embodiment, the method also includes: determining model evaluation data of the target interface data generation model based on the target interface data generation model usage results; wherein the model evaluation data includes positive label evaluation data and negative label evaluation data; and updating the model training data set based on the positive label evaluation data and the negative label evaluation data, so as to re-iteratively train the target interface data generation model based on the updated model training data set.
[0054] Among them, the model usage result refers to the output result of the target interface data generation model. Model evaluation data refers to the data fed back by users after using the target interface data generation model. The positive label evaluation data may include user approval data, user intention data and model output data. The negative label evaluation data may include user disapproval data, user intention data and model output data. User intention data refers to user demand data, such as user intention instruction data. Model output data refers to the data output by the target interface data generation model based on user intention data.
[0055] It can be understood that by updating the model training dataset according to the model evaluation data, the training data in the model training dataset can better reflect the advantages and disadvantages of the target interface data generation model, thereby improving the real-time performance of the training data in the model training dataset, thereby improving the accuracy of subsequent iterative training of the target interface data generation model based on the model training dataset.
[0056] The model evaluation data in the embodiment of the present invention also includes unlabeled evaluation data. The unlabeled evaluation data may include user intent data and model output data. Exemplarily, the model pre-training data set may be updated according to the unlabeled evaluation data.
[0057] Based on the above technical solution, the method also includes: obtaining user intention data, inputting the user intention data into a trained target interface data generation model, and outputting interface display data.
[0058] The embodiment of the present invention provides a training scheme for an interface data generation model, which determines the basic model parameters of a pre-built basic interface data generation model and the hardware parameters of the current server to which the basic interface data generation model is applied; updates the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after the initial update; inputs the current training data in the model training data set into the candidate interface data generation model, outputs the current interface data, and determines the model evaluation score of the candidate interface data generation model according to the current interface data; iteratively trains the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model. The above scheme improves the accuracy of training the basic interface data generation model by training the basic interface data generation model according to the basic model parameters, the hardware parameters and the model evaluation score, thereby improving the accuracy of subsequently determining the interface display data based on the target interface data generation model; at the same time, by introducing the hardware parameters, the adaptability between the target interface data generation model and the current server is improved.
[0059] In an optional embodiment, if the number of model training nodes in the current server is at least two, the basic model parameters are updated according to the hardware parameters to obtain a candidate interface data generation model after the initial update, including: updating the basic model parameters according to the hardware parameters to determine the updated basic model parameters of each model training node; updating the basic interface data generation model corresponding to each model training node based on the updated basic model parameters to obtain a candidate interface data generation model corresponding to each model training node.
[0060] Among them, the model training node refers to the node that can be used to train the model, such as the hardware node in the current server.
[0061] Specifically, for any model training node, determine the update sub-parameters that need to be updated in the basic model parameters corresponding to the model training node; update the update sub-parameters according to the hardware parameters and the preset data intervals corresponding to the update sub-parameters; based on the updated update sub-parameters, update the basic interface data generation model under the model training node to obtain the candidate interface data generation model under the model training node.
[0062] The update sub-parameter refers to the parameter that needs to be updated in the basic model parameter. The preset data interval refers to the value range of each sub-parameter in the basic model parameter. The embodiment of the present invention does not impose any limitation on the size of the preset data interval, which can be set by the technician according to experience or needs.
[0063] For example, the preset data interval of the sub-parameter model network depth n_layer is (16, 80); the preset data interval of the sub-parameter vector dimension n_embd is (512, 8192); the preset data interval of the sub-parameter batch size batch_size is (24, 2048); and the preset data interval of the sub-parameter block size block_size is (256, 4096).
[0064] It can be understood that when the number of model training nodes is multiple, different hyper-parameter adjustment methods are provided for the basic interface data generation models under different model training nodes to obtain different candidate interface data generation models, so that multiple different candidate interface data generation models can be trained simultaneously in the subsequent process, thereby improving the efficiency of iterative training.
[0065] In an optional embodiment, the current training data in the model training data set is input into the candidate interface data generation model, the current interface data is output, and the model evaluation score of the candidate interface data generation model is determined based on the current interface data, including: determining the number of model training nodes, and dividing the model training data set according to the number of nodes to obtain model training sub-data sets with the number of nodes; performing current iteration training on the corresponding candidate interface data generation model based on the model training sub-data sets of each model training node, outputting the corresponding current interface data, and determining the model evaluation score of each candidate interface data generation model after the current iteration training based on the current interface data.
[0066] The number of nodes refers to the number of model training nodes in the current server. The model training sub-dataset refers to a sub-dataset including at least part of the training data obtained after dividing the model training data set.
[0067] Specifically, for any model training node, an iterative training is performed on the candidate interface data generation model under the model training node according to the model training sub-data set of the model training node, the current interface data of this iterative training is output, and the model evaluation score of the candidate interface data generation model after this iterative training is determined based on the current interface data.
[0068] It can be understood that by dividing the model training data set according to the number of nodes, model training sub-data sets of the number of nodes are obtained, so that each model training node has its own training data set, and the training data sets of each model training node are different, thereby improving the utilization rate of the training data in the model training data set.
[0069] In an optional embodiment, the candidate interface data generation model is iteratively trained according to the model evaluation score and hardware parameters to obtain a target interface data generation model, including: based on the model evaluation score, selecting the candidate interface data generation model for the next iterative training from the candidate interface data generation models undergoing the current iterative training; distributing the selected candidate interface data generation model for the next iterative training to each model training node, each model training node performing different parameter adjustments on the candidate interface data generation model according to the hardware parameters, and performing the next iterative training on the candidate interface data generation model after the parameter adjustments, to obtain the model evaluation score of the candidate interface data generation model under each model training node after the next iterative training; and determining the target interface data generation model from the candidate interface data generation models according to the model evaluation score.
[0070] Specifically, according to the candidate interface data generation model under each model training node and the model evaluation score after this iterative training, a candidate interface data generation model for the next iterative training is selected from the candidate interface data generation models undergoing this iterative training; the selected candidate interface data generation model for the next iterative training is distributed to each model training node; each model training node takes the received candidate interface data generation model as a benchmark, performs different parameter adjustments on the candidate interface data generation model according to hardware parameters and preset data intervals, and performs the next iterative training on the candidate interface data generation model after the parameter adjustments; until the number of iterative training reaches the preset iteration threshold, the candidate interface data generation model with the highest model evaluation score is used as the target interface data generation model.
[0071] The embodiment of the present invention does not impose any limitation on the size of the preset iteration threshold, which can be set by technicians based on experience.
[0072] In an embodiment of the present invention, each model training node may perform different parameter adjustments on the candidate interface data generation model, including: each model training node adjusts different item update sub-parameters in the candidate interface data generation model according to a preset adjustment threshold. The embodiment of the present invention does not impose any limitation on the size of the preset adjustment threshold, which can be set by a technician based on experience or needs.
[0073] It should be noted that, in the embodiment of the present invention, the candidate interface data generation model selected before each iterative training is the candidate interface data generation model with the highest model evaluation score after the previous iterative training.
[0074] It should be noted that, in the embodiment of the present invention, the candidate interface data generation model obtained after each iterative training is stored in the multi-segment model library and does not need to be deleted.
[0075] It can be understood that each model training node adjusts different parameters for the candidate interface data generation model with a high model evaluation score each time, and then trains the candidate interface data generation model after the adjustment, thereby realizing the simultaneous training of multiple models and improving the training efficiency of the candidate interface data generation model.
[0076] Embodiment 2
[0077] Figure 2 It is a flow chart of a training method for an interface data generation model provided in the second embodiment of the present invention. Based on the above embodiments, this embodiment further refines the operation of "updating the basic model parameters according to the hardware parameters" into "determining the total model parameters of the basic interface data generation model according to the hardware parameters; determining the preset data interval corresponding to each sub-parameter in the basic model parameters; updating the sub-parameters in the basic model parameters according to the total model parameters and the preset data interval" to improve the parameter update mechanism. It should be noted that for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions of other embodiments.
[0078] See also Figure 2 The training method of the interface data generation model shown includes:
[0079] S210: Determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied.
[0080] S220: Determine total model parameters of the basic interface data generation model according to the hardware parameters.
[0081] The total model parameter refers to the size of the model that the current server can accept.
[0082] S230: Determine a preset data interval corresponding to each sub-parameter in the basic model parameters.
[0083] Wherein, the sub-parameter refers to any parameter in the basic model parameter. The preset data interval refers to the value range of each sub-parameter in the basic model parameter. The embodiment of the present invention does not impose any limitation on the size of the preset data interval, which can be set by the technician according to experience or needs.
[0084] For example, the preset data interval of the sub-parameter model network depth n_layer is (16, 80); the preset data interval of the sub-parameter vector dimension n_embd is (512, 8192); the preset data interval of the sub-parameter batch size batch_size is (24, 2048); and the preset data interval of the sub-parameter block size block_size is (256, 4096).
[0085] S240. According to the total model parameters and the preset data interval, the sub-parameters of the basic model parameters are updated to obtain a candidate interface data generation model after the initial update.
[0086] Specifically, the basic total parameter of the basic model parameter is determined. If the basic total parameter is less than or equal to the model total parameter, there is no need to adjust the basic model parameter, and the basic interface data generation model can be directly used as the candidate interface data generation model; if the basic total parameter is greater than the model total parameter, the update sub-parameter in the basic model parameter is determined, and the update sub-parameter is adjusted according to the preset data interval corresponding to the update sub-parameter to obtain the candidate interface data generation model after the initial update. Among them, the basic total parameter refers to the size of the basic interface data generation model.
[0087] S250, input the current training data in the model training data set into the candidate interface data generation model, output the current interface data, and determine the model evaluation score of the candidate interface data generation model based on the current interface data.
[0088] S260. Iteratively train the candidate interface data generation model according to the model evaluation score and hardware parameters to obtain the target interface data generation model.
[0089] In an optional embodiment, the candidate interface data generation model is iteratively trained according to the model evaluation score and hardware parameters to obtain a target interface data generation model, including: determining the candidate model parameters of the candidate interface data generation model to be iteratively trained, and determining the current update sub-parameters from the candidate model parameters; updating the current update sub-parameters according to the total model parameters and the preset data interval corresponding to the current update sub-parameters; performing the current iterative training on the candidate interface data generation model after the parameter update, and determining the model evaluation score corresponding to the candidate interface data generation model after the current iterative training; and determining the target interface data generation model according to the model evaluation score corresponding to the candidate interface data generation model after each iterative training.
[0090] The candidate interface data generation model to be iteratively trained currently refers to the candidate interface data generation model that needs to be iteratively trained at the current moment. The candidate model parameters refer to the model parameters of the candidate interface data generation model. The currently updated sub-parameters refer to the sub-parameters in the candidate model parameters that need to be adjusted currently.
[0091] It can be understood that by introducing the current update sub-parameters and the preset data interval, the candidate interface data generation model is adjusted, thereby improving the accuracy of the adjustment.
[0092] In an optional embodiment, the candidate interface data generation model currently to be iteratively trained is the candidate interface data generation model corresponding to the maximum model evaluation score obtained from the historical iterative training.
[0093] Among them, historical iterative training refers to the iterative training of the candidate interface data generation model in the past.
[0094] It can be understood that the candidate interface data generation model with the largest model evaluation score obtained from historical iterative training is used as the candidate interface data generation model to be currently iteratively trained, thereby improving the accuracy of iterative training.
[0095] The embodiment of the present invention provides a training scheme for an interface data generation model, which refines the updating operation of the basic model parameters according to the hardware parameters into determining the total model parameters of the basic interface data generation model according to the hardware parameters; determining the preset data intervals corresponding to each sub-parameter in the basic model parameters; and updating the sub-parameters in the basic model parameters according to the total model parameters and the preset data intervals, thereby improving the parameter update mechanism. The above scheme, by introducing the total model parameters and the preset data intervals, updates the sub-parameters in the basic model parameters, thereby improving the accuracy of parameter updates and avoiding over- or under-adjustment of parameters, which affects the performance of the model.
[0096] Embodiment 3
[0097] Based on the above embodiments, the present invention provides a model iteration training system. Figure 3 As shown, the model iteration training system may include a model network structure module, a multi-segment model library, a segmented model training system, a self-evaluation system, an automatic hyperparameter iteration system, an automatic reinforcement training data set module, a model tuning module and a data collection module.
[0098] Exemplarily, the model network structure module is a module for constructing a basic interface data generation model. Different from the prior art, the present invention uses the latest LLama3 high-performance model network that surpasses BERT and GPT for pre-training. The accuracy of the generated sentence quality has exceeded BERT and GPT. Currently, LLama3 is used, but it is not limited to LLama3. It can be replaced with any model network with adjustable hyperparameters.
[0099] Exemplarily, the segmented model training system can monitor the automatic reinforcement training data set module and the automatic hyperparameter iteration system, and automatically start training when the automatic reinforcement training data set module and the automatic hyperparameter iteration system change; the segmented model training system automatically obtains the current updated sub-parameters of the candidate interface data generation model, and obtains the current training data from the automatic reinforcement training data set module to start training the candidate interface data generation model. During the training process, the reinforcement training data set will be randomly sampled.
[0100] Exemplarily, the enhanced training dataset in the automatic enhanced training dataset module is divided into an unlabeled dataset and a labeled dataset, each of which is divided into an old dataset and a new dataset. The unlabeled dataset (i.e., the model pre-training dataset) is generally used as a basic training, and the labeled dataset (i.e., the model training dataset) is generally used as an enhanced training.
[0101] Exemplarily, the enhanced training data set will add new annotated data at any time. For the newly added annotated data, the sampling ratio needs to be considered. Annotate the samples that have been sampled each time. If they have been sampled, no more sampling will be done. Divide the old data set D_old and the new data set D_new into n parts respectively, with a sampling ratio of 1:P; that is, take one sample from D_old and P samples from D_new. The training set and the validation set are split n:1. The new data is generally a user feedback data set (i.e., model evaluation data), and user feedback is received during the use of the system. The old data is generally a large-scale sample data set collected by experts. Increase the sampling rate of the newly annotated data to ensure that user feedback issues are resolved.
[0102] Exemplary, automatic hyperparameter iteration system: Before performing segmented model training, the automatic hyperparameter iteration system will evaluate the configuration of the current server, that is, update the basic model parameters in the basic interface data generation model according to the hardware parameters of the current server.
[0103] Exemplary, segmented model training system: according to the number of nodes of model training nodes, several training clusters (i.e., model training sub-datasets) are automatically divided, and different hyperparameters are automatically assigned. After training, several models are output and saved to the multi-segment model library.
[0104] Exemplary, self-evaluation system: Use F1 Score to perform harmonic mean of precision and recall of multiple candidate interface data generation models output, and comprehensively evaluate the accuracy and robustness of the model. After the basic interface data generation model is generated, the basic interface data generation model is added to the multi-segment model library as the first model. After the basic interface data generation model enters the model library, it is taken over by the segmented model training system.
[0105] Exemplarily, the self-evaluation system automatically assigns different hyperparameters. When assigning, refer to the F1 Score of the last training (i.e., the model evaluation score). The total model parameter t_param remains unchanged, and the n_layer, n_embd, batch_size, and block_size parameters increase or decrease. The parameter with the highest F1 Score is selected as the latest parameter. Then train with the new parameter set. Until the corresponding hyperparameter parameters of the optimal F1 Score are found. Define the objective function F1 (t_param, n_layer, n_embd, b_size, b_block), train the model with the initial parameters, and calculate the initial F1 0 , based on F1 0 Perform hyperparameter adjustment, randomly adjust one of t_param, n_layer, n_embd, b_size, b_block to increase or decrease, and each adjustment changes to the preset adjustment threshold lr. And the result F1 1 and F1 0 For comparison. 1 Better than F1 0 , the current parameters are saved. And enter the next round of adjustment. The parameter value after increase or decrease cannot exceed the preset data range. Each time the candidate interface data generation model after adjusting the hyperparameters, it will be saved to the multi-segment model library, and then evaluated by the self-evaluation system, and the parameters will be adjusted until the target interface data generation model with the optimal parameters is found. The maximum number of iterations does not exceed the preset iteration threshold N times. N is set according to user expectations. The target interface data generation model with the best accuracy is found through the self-evaluation system.
[0106] Exemplary, data collection module: users can evaluate the output of the target interface data generation model and give the correct answer. If the user agrees, a forward labeled data (i.e., forward label evaluation data) will be generated; if the user disagrees, a reverse labeled data (i.e., reverse label evaluation data) will be generated. If the user disagrees and submits the correct answer, the AST algorithm will be compared with the previous output based on the answer submitted by the user to find the difference. Verify user input to prevent random filling, and generate a forward labeled data. When generating labeled data, a de-labeled unlabeled data (i.e., unlabeled evaluation data) will be generated at the same time. Add the two data to the reinforcement training data set and they will be used the next time the model is trained. Further improve the accuracy of reinforcement training through feedback.
[0107] In the embodiment of the present invention, a segmented self-evaluation method is used to perform segmented training, evaluation, automatic adjustment of hyperparameters, and automatic data collection, and self-iteration gradually improves the accuracy of the model.
[0108] Embodiment 4
[0109] Figure 4 This is a schematic diagram of the structure of a training device for an interface data generation model provided in Embodiment 4 of the present invention. This embodiment is applicable to the case of training an interface data generation model. The method can be executed by a training device for an interface data generation model. The device can be implemented in software and / or hardware and can be configured in an electronic device that carries the training function of the interface data generation model.
[0110] like Figure 4 As shown, the device includes: a parameter determination module 310, a candidate model determination module 320, an evaluation score determination module 330 and a target model determination module 340. Among them,
[0111] The parameter determination module 310 is used to determine the basic model parameters of the pre-built basic interface data generation model, and determine the hardware parameters of the current server to which the basic interface data generation model is applied;
[0112] A candidate model determination module 320, configured to update the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after initial update;
[0113] An evaluation score determination module 330 is used to input the current training data in the model training data set into the candidate interface data generation model, output the current interface data, and determine the model evaluation score of the candidate interface data generation model based on the current interface data;
[0114] The target model determination module 340 is used to iteratively train the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model.
[0115] The embodiment of the present invention provides a training scheme for an interface data generation model, which determines the basic model parameters of a pre-built basic interface data generation model and the hardware parameters of the current server to which the basic interface data generation model is applied; updates the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after the initial update; inputs the current training data in the model training data set into the candidate interface data generation model, outputs the current interface data, and determines the model evaluation score of the candidate interface data generation model according to the current interface data; iteratively trains the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model. The above scheme improves the accuracy of training the basic interface data generation model by training the basic interface data generation model according to the basic model parameters, the hardware parameters and the model evaluation score, thereby improving the accuracy of subsequently determining the interface display data based on the target interface data generation model; at the same time, by introducing the hardware parameters, the adaptability between the target interface data generation model and the current server is improved.
[0116] Optionally, the candidate model determination module 320 includes:
[0117] A total parameter determination unit, used to determine the total model parameters of the basic interface data generation model according to the hardware parameters;
[0118] A preset interval determination unit, used to determine a preset data interval corresponding to a sub-parameter in the basic model parameter;
[0119] A parameter updating unit is used to update the sub-parameters of the basic model parameters according to the total model parameters and the preset data interval.
[0120] Optionally, the target model determination module 340 includes:
[0121] A current parameter determination unit, used to determine candidate model parameters of the candidate interface data generation model to be iteratively trained, and determine current update sub-parameters from the candidate model parameters;
[0122] A current parameter updating unit, configured to update the current updating sub-parameter according to the total model parameter and a preset data interval corresponding to the current updating sub-parameter;
[0123] An evaluation score determination unit, used to perform current iterative training on the candidate interface data generation model after parameter update, and determine a model evaluation score corresponding to the candidate interface data generation model after the current iterative training;
[0124] The target model determination unit is used to determine the target interface data generation model according to the model evaluation score corresponding to the candidate interface data generation model after each iterative training.
[0125] Optionally, the candidate interface data generation model currently to be iteratively trained is the candidate interface data generation model corresponding to the maximum model evaluation score obtained from historical iterative training.
[0126] Optionally, if the number of model training nodes in the current server is at least two, the candidate model determination module 320 includes:
[0127] A node parameter updating unit, used to update the basic model parameters according to the hardware parameters, and determine the updated basic model parameters of each of the model training nodes;
[0128] The node model determination unit is used to update the basic interface data generation model corresponding to each of the model training nodes based on the updated basic model parameters to obtain the candidate interface data generation model corresponding to each of the model training nodes.
[0129] Optionally, the evaluation score determination module 330 includes:
[0130] A sub-dataset determining unit, used to determine the number of nodes of the model training node, and divide the model training data set according to the number of nodes to obtain model training sub-datasets with the number of nodes;
[0131] A current score determination unit, used to perform current iterative training on the corresponding candidate interface data generation model according to the model training sub-data set of each model training node, output the corresponding current interface data, and determine the model evaluation score of each candidate interface data generation model after the current iterative training according to the current interface data;
[0132] Optionally, the target model determination module 340 includes:
[0133] A next model determination unit, configured to select a candidate interface data generation model for next iterative training from each candidate interface data generation model undergoing current iterative training based on the model evaluation score;
[0134] A next score determination unit is used to distribute the selected candidate interface data generation model for the next iterative training to each model training node, each model training node performs different parameter adjustments on the candidate interface data generation model according to the hardware parameters, and performs the next iterative training on the candidate interface data generation model after the parameter adjustment, so as to obtain the model evaluation score of the candidate interface data generation model under each model training node after the next iterative training;
[0135] A target model selection unit is used to determine a target interface data generation model from the candidate interface data generation models according to the model evaluation score.
[0136] The training device for the interface data generation model provided in the embodiment of the present invention can execute the training method for the interface data generation model provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the training methods for each interface data generation model.
[0137] In the technical solution of the present invention, the collection, storage, use, processing, transmission, provision and disclosure of the hardware parameters, basic model parameters and model evaluation data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0138] Embodiment 5
[0139] Figure 5 It is a structural diagram of an electronic device for implementing a training method for an interface data generation model provided by Embodiment 5 of the present invention. Electronic device 410 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0140] like Figure 5 As shown, the electronic device 410 includes at least one processor 411, and a memory connected to the at least one processor 411 in communication, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. In the RAM 413, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 411, the ROM 412, and the RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0141] Multiple components in the electronic device 410 are connected to the I / O interface 415, including: an input unit 416, such as a keyboard, a mouse, etc.; an output unit 417, such as various types of displays, speakers, etc.; a storage unit 418, such as a disk, an optical disk, etc.; and a communication unit 419, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 419 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0142] The processor 411 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 411 executes the various methods and processes described above, such as the training method of the interface data generation model.
[0143] In some embodiments, the training method of the interface data generation model can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 410 via the ROM 412 and / or the communication unit 419. When the computer program is loaded into the RAM 413 and executed by the processor 411, one or more steps of the training method of the interface data generation model described above can be performed. Alternatively, in other embodiments, the processor 411 can be configured to execute the training method of the interface data generation model by any other appropriate means (for example, by means of firmware).
[0144] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0145] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0146] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.
[0147] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0148] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0149] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0150] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0151] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A training method for an interface data generation model, characterized in that: include: Determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied; wherein the basic model parameters refer to model parameters of the basic interface data generation model; The basic model parameters are updated according to the hardware parameters to obtain a candidate interface data generation model after initial update; Inputting current training data in the model training data set into the candidate interface data generation model, outputting current interface data, and determining a model evaluation score of the candidate interface data generation model based on the current interface data; Iteratively training the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model; Wherein, updating the basic model parameters according to the hardware parameters includes: Determine the total model parameters of the basic interface data generation model according to the hardware parameters; wherein the total model parameters refer to the size of the model acceptable to the current server; Determine a preset data interval corresponding to each sub-parameter in the basic model parameters; According to the total model parameters and the preset data interval, sub-parameters of the basic model parameters are updated.
2. The method according to claim 1, characterized in that The iterative training of the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain the target interface data generation model includes: Determine candidate model parameters of the candidate interface data generation model to be iteratively trained, and determine current update sub-parameters from the candidate model parameters; updating the current updating sub-parameter according to the total model parameter and the preset data interval corresponding to the current updating sub-parameter; Performing current iteration training on the candidate interface data generation model after parameter update, and determining a model evaluation score corresponding to the candidate interface data generation model after current iteration training; The target interface data generation model is determined according to the model evaluation scores corresponding to the candidate interface data generation models after each iterative training.
3. The method according to claim 2, characterized in that The candidate interface data generation model currently to be iteratively trained is the candidate interface data generation model corresponding to the maximum model evaluation score obtained from the historical iterative training.
4. A training method for an interface data generation model, characterized in that: include: Determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied; wherein the basic model parameters refer to model parameters of the basic interface data generation model; The basic model parameters are updated according to the hardware parameters to obtain a candidate interface data generation model after initial update; Inputting current training data in the model training data set into the candidate interface data generation model, outputting current interface data, and determining a model evaluation score of the candidate interface data generation model based on the current interface data; Iteratively training the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model; Wherein, if the number of model training nodes in the current server is at least two, then updating the basic model parameters according to the hardware parameters to obtain the candidate interface data generation model after the initial update includes: According to the hardware parameters, the basic model parameters are updated to determine the updated basic model parameters of each model training node; wherein the hardware parameters include at least one of the number of nodes, node central processing unit, node memory, node graphics card and node video memory; The basic interface data generation model corresponding to each of the model training nodes is updated based on the updated basic model parameters to obtain a candidate interface data generation model corresponding to each of the model training nodes.
5. The method according to claim 4, characterized in that The step of inputting the current training data in the model training data set into the candidate interface data generation model, outputting the current interface data, and determining the model evaluation score of the candidate interface data generation model according to the current interface data includes: Determine the number of nodes of the model training nodes, and divide the model training data set according to the number of nodes to obtain model training sub-data sets of the number of nodes; According to the model training sub-data set of each model training node, the corresponding candidate interface data generation model is trained in the current iteration, the corresponding current interface data is output, and based on the current interface data, the model evaluation score of each candidate interface data generation model after the current iteration training is determined.
6. The method according to claim 5, characterized in that The iterative training of the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain the target interface data generation model includes: Based on the model evaluation score, selecting a candidate interface data generation model for the next iteration training from each candidate interface data generation model undergoing the current iteration training; The selected candidate interface data generation model for the next iterative training is distributed to each model training node. Each model training node performs different parameter adjustments on the candidate interface data generation model according to the hardware parameters, and performs the next iterative training on the candidate interface data generation model after the parameter adjustment, so as to obtain the model evaluation score of the candidate interface data generation model under each model training node after the next iterative training; According to the model evaluation score, a target interface data generation model is determined from the candidate interface data generation models.
7. A training device for an interface data generation model, characterized in that: include: A parameter determination module, used to determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied; wherein the basic model parameters refer to model parameters of the basic interface data generation model; A candidate model determination module, used to update the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after initial update; An evaluation score determination module, used to input the current training data in the model training data set into the candidate interface data generation model, output the current interface data, and determine the model evaluation score of the candidate interface data generation model based on the current interface data; A target model determination module, used to iteratively train the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model; Wherein, the candidate model determination module includes: A total parameter determination unit, used to determine the total model parameters of the basic interface data generation model according to the hardware parameters; wherein the total model parameters refer to the size of the model acceptable to the current server; A preset interval determination unit, used to determine a preset data interval corresponding to a sub-parameter in the basic model parameter; A parameter updating unit is used to update the sub-parameters of the basic model parameters according to the total model parameters and the preset data interval.
8. A training device for an interface data generation model, characterized in that: include: A parameter determination module, used to determine basic model parameters of a pre-built basic interface data generation model, and determine hardware parameters of a current server to which the basic interface data generation model is applied; wherein the basic model parameters refer to model parameters of the basic interface data generation model; A candidate model determination module, used to update the basic model parameters according to the hardware parameters to obtain a candidate interface data generation model after initial update; An evaluation score determination module, used to input the current training data in the model training data set into the candidate interface data generation model, output the current interface data, and determine the model evaluation score of the candidate interface data generation model based on the current interface data; A target model determination module, used to iteratively train the candidate interface data generation model according to the model evaluation score and the hardware parameters to obtain a target interface data generation model; Wherein, if the number of model training nodes in the current server is at least two, the candidate model determination module includes: A node parameter updating unit, used to update the basic model parameters according to the hardware parameters, and determine the updated basic model parameters of each model training node; wherein the hardware parameters include at least one of the number of nodes, node central processing unit, node memory, node graphics card and node video memory; The node model determination unit is used to update the basic interface data generation model corresponding to each of the model training nodes based on the updated basic model parameters to obtain the candidate interface data generation model corresponding to each of the model training nodes.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a training method for an interface data generation model as described in any one of claims 1-6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, it implements a training method for an interface data generation model as described in any one of claims 1-6.
Citation Information
Patent Citations
Framework for optimizing machine learning architecture
CN116011510A
Chart-based time series model user interface
US11222077B1