A method and system for automatic algorithm matching and parameter optimization
Through search space construction and candidate model screening driven by user needs, combined with semantic similarity matching and fitness function optimization, the problem of high computational complexity in big data analysis tasks in the existing technology is solved, and efficient algorithm automatic matching and Parameter optimization.
Patent Information
- Application Number
- CN202410942232.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-15
AI Technical Summary
Existing algorithm matching and optimization methods have high computational complexity, large time overhead, and high resource consumption in big data analysis tasks, especially in scenarios such as population data mining and other tasks for big data analysis.
By obtaining user demand information, a search space is constructed, and based on this space, multiple models in the algorithm warehouse are initially screened, and then the optimal parameters are searched for candidate models, and the target algorithm is determined by combining semantic similarity matching and fitness function optimization. model and its parameters.
It achieves more efficient algorithm automatic matching and parameter optimization, reduces computational complexity and resource consumption, improves search efficiency, and is suitable for big data analysis tasks.
Smart Images

Figure CN118468061B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an algorithm automatic matching and parameter optimization method and system. Background Art
[0002] The algorithm warehouse provides efficient and reusable solutions to help developers and researchers implement the entire process from data preprocessing, feature extraction to model training and prediction in various application scenarios. By calling the algorithm models in the mature algorithm warehouse, users can significantly reduce development time and avoid reinventing the wheel.
[0003] Algorithm matching and tuning are key steps to improve system performance and accuracy. Matching the right algorithm ensures that the best solution is selected for a specific problem, while tuning further optimizes the algorithm parameters to achieve the best performance in practical applications. This not only improves the effectiveness and efficiency of the algorithm, but also enhances the robustness and reliability of the system.
[0004] The existing algorithm matching and optimization methods mainly include grid search, random search, and Bayesian optimization. The grid search method uses an exhaustive search method to find the best parameter combination in a predefined hyperparameter space, but when the search space is large, the computing time and resource consumption are huge. Random search randomly extracts parameter combinations from the hyperparameter space for search. Although it reduces the computational complexity, it is likely to miss the best parameter combination. Bayesian optimization uses the Bayesian statistical model to predict the optimal hyperparameters and iteratively updates the model to find the optimal solution. Its main disadvantage is that it has high implementation complexity and may not perform well in high-dimensional parameter space. Although the above existing matching and optimization methods have good results in small parameter spaces, they have many defects such as high computational complexity, high time overhead, and high resource consumption in some tasks for big data analysis, such as population data mining. Summary of the invention
[0005] In order to solve the above-mentioned problems in the prior art, the present invention provides an algorithm automatic matching and parameter optimization method and system.
[0006] In a first aspect, an embodiment of the present application provides an algorithm automatic matching and parameter optimization method, comprising: obtaining user demand input information; wherein the demand input information includes scenario requirements, object requirements and task requirements; determining multiple related algorithm models from an algorithm warehouse based on the task requirements, and extracting related target data from a database based on the scenario requirements and the object requirements; constructing a search space based on the scenario requirements, and based on the search space and the target data, screening out candidate algorithm models that meet the conditions from the multiple algorithm models; wherein the search space includes the number of hyperparameter iterations and the range of hyperparameter values of the algorithm model; performing optimal parameter search for the candidate algorithm models according to the search space, and determining the target algorithm model and the optimal parameters of the target algorithm model.
[0007] Optionally, based on the search space and the target data, screening out candidate algorithm models that meet conditions from the multiple algorithm models includes: dividing the target data into sample data and test data; wherein the sample data includes labeled data and unlabeled data; in combination with the search space, substituting the sample data into the multiple algorithm models to obtain multiple trained algorithm models; substituting the test data into the multiple trained algorithm models to screen out candidate algorithm models that meet conditions.
[0008] Optionally, the label data is determined by the following steps, including: matching the semantic attributes of the data attribute labels of the sample data with the description of the task requirements for semantic similarity; masking the data attributes that meet the similarity conditions and using them as labels; and using the labeled sample data as the label data.
[0009] Optionally, the semantic similarity matching of the semantic attributes of the data attribute labels of the sample data with the description of the task requirements includes: extracting multiple keywords in the description of the task requirements based on a preset language model; similarity matching of the semantic attributes of the data attribute labels of the sample data with the multiple keywords to obtain a matching degree; wherein the matching degree is an average of similarities of similarity matching with the multiple keywords; correspondingly, the similarity condition is that the matching degree is greater than a set similarity threshold.
[0010] Optionally, substituting the test data into the multiple algorithm models after training to screen out candidate algorithm models that meet the conditions includes: substituting the test data into the multiple algorithm models after training to calculate the index accuracy of the multiple algorithm models; in response to the existence of an algorithm model that meets the index requirements, outputting the algorithm model; wherein the algorithm model is the screened out candidate algorithm model.
[0011] Optionally, after substituting the test data into the multiple algorithm models after training and calculating the index accuracy of the multiple algorithm models, the method also includes: in response to the absence of an algorithm model that meets the index requirements, extracting the hidden layer outputs of each algorithm model at multiple steps in training; fitting the data distribution of the hidden layer outputs of each algorithm model at multiple steps in training; and taking a preset number of algorithm models that are closest to the data distribution of the input original data as the candidate algorithm models.
[0012] Optionally, the optimal parameter search for the candidate algorithm model in the search space is performed to determine the target algorithm model and the optimal parameters of the target algorithm model, including: S1: obtaining the search space, and constructing a population with each hyperparameter as a population individual; S2: constructing a fitness function, and calculating the fitness based on the current population; wherein the fitness function is used to calculate the error of the candidate algorithm model under the hyperparameters of the current population; S3: according to the fitness, screening the individuals in the population, and cross-mutating the remaining individuals through a roulette algorithm to obtain a new population; repeating steps S2 to S3 until the termination condition is met, and outputting the target algorithm model and the optimal parameters of the target algorithm model.
[0013] Optionally, the termination condition includes: the duration of searching for optimal parameters of the candidate algorithm model in the search space reaches a maximum duration.
[0014] Optionally, the termination condition includes: the difference between the latest calculated fitness and the optimal value of the fitness is smaller than a set threshold for multiple consecutive times.
[0015] In the second aspect, the present application provides an algorithm automatic matching and parameter optimization system, including: an acquisition module, used to obtain user demand input information; wherein the demand input information includes scenario requirements, object requirements and task requirements; an extraction module, used to determine multiple related algorithm models from an algorithm warehouse based on the task requirements, and extract related target data from a database based on the scenario requirements and the object requirements; an algorithm screening module, used to construct a search space based on the scenario requirements, and based on the search space and the target data, screen out candidate algorithm models that meet the conditions from the multiple algorithm models; wherein the search space includes the number of hyperparameter iterations and the range of hyperparameter values of the algorithm model; a parameter screening module, used to search for optimal parameters of the candidate algorithm models according to the search space, and determine the target algorithm model and the optimal parameters of the target algorithm model.
[0016] The beneficial effects of the present invention include: the algorithm automatic matching and parameter optimization method provided by the present application, taking user needs as conditions, obtains target data and constructs a search space through user needs, and then, based on the target data and the search space, performs a preliminary screening of multiple algorithm models associated in the algorithm warehouse to obtain candidate algorithm models that meet the conditions. Then, for the candidate algorithm models after the initial screening, continue to complete the optimal search for parameters through the search space. Compared with the prior art, this method can achieve more efficient algorithm automatic matching and parameter optimization, and the computational complexity is also lower than that of the prior art.
[0017] It should be noted that this application achieves the above purpose through two improvements. First, the candidate algorithm models are preliminarily screened, and then the optimal parameters of the candidate algorithm models are searched. Compared with the existing technology such as the grid search method, which searches for the best parameter combination of all algorithm models in the predefined hyperparameter space through exhaustive search, it can greatly improve efficiency and reduce computing time and resource consumption. Second, this application obtains target data and constructs a search space based on user needs. This method also further improves search efficiency and reduces computing time and resource consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of the steps of an algorithm automatic matching and parameter optimization method provided by an embodiment of the present invention;
[0019] Figure 2 A flowchart of another algorithm automatic matching and parameter optimization method provided by an embodiment of the present invention;
[0020] Figure 3 A flowchart of another algorithm automatic matching and parameter optimization method provided by an embodiment of the present invention;
[0021] Figure 4 A module block diagram of an algorithm automatic matching and parameter optimization system provided by an embodiment of the present invention;
[0022] Figure 5 A module block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0024] Although existing matching and optimization methods have good effects in small parameter spaces, they have many defects in some tasks oriented to big data analysis, such as population data mining, such as high computational complexity, large time overhead, and high resource consumption.
[0025] In view of the above problems, the present application proposes the following embodiments to solve the above technical problems.
[0026] See also Figure 1 , an embodiment of the present application provides an algorithm automatic matching and parameter optimization method, including: step 101 to step 104.
[0027] Step 101: Obtain user demand input information.
[0028] Among them, the demand input information includes scene requirements, object requirements and task requirements.
[0029] As an implementation method, the demand input method may be a form input method, that is, through a drop-down box, the user may select the corresponding demand.
[0030] Specifically, according to scene requirements, it may include scene type, scene size, and data volume.
[0031] The scenario types are divided into marketing, financial analysis, health care, e-commerce, and social networks. The scenario size refers to the actual regional scope, such as counties, cities, companies, schools, factories, etc. The data volume can include the classification of data volume, which can be divided into level 1, level 2, and level 3. Level 1 is data volume of 10,000 or less, level 2 is data volume of 100,000 to 10 million, and level 3 is data volume of more than 10 million.
[0032] The object in the above object requirements refers to the object to which the data belongs, such as people, cars, production machines, power grids, etc. Objects can also be further subdivided. For example, if the object is a person, it can be further subdivided into the elderly, young people, men, women, and so on.
[0033] The tasks in the above task requirements refer to the specific functions that need to be implemented, such as classification, detection, clustering, etc. For example, if the user wants to know the population distribution, then the corresponding clustering algorithm model is here.
[0034] In addition, in the task requirements section, users can also fill in auxiliary descriptions for the task, such as animal classification, accurate face recognition, object classification, etc.
[0035] It is understandable that in other embodiments, an input box may be provided in which the user may input text requirements, and then the method provided in this embodiment performs text recognition on the text requirements input by the user to obtain corresponding scene requirements, object requirements, and task requirements.
[0036] In addition, in one embodiment, an indicator requirement is also provided. When the task requirement is determined, the indicator panel will automatically display the indicators that match the task, and the user only needs to fill in the value in the box. The indicator here can be an evaluation indicator for the algorithm model.
[0037] Step 102: Determine multiple associated algorithm models from the algorithm warehouse based on task requirements, and extract associated target data from the database based on scenario requirements and object requirements.
[0038] It should be noted that the embodiment of the present application provides two parts of data storage.
[0039] The first part is the algorithm warehouse, which is mainly used to store algorithm models. For example, the types of algorithm models in the algorithm warehouse include: prediction algorithm, classification algorithm, clustering algorithm, association algorithm, description algorithm, graph algorithm, etc.
[0040] The second part is the database, which is mainly used to store data corresponding to the object. Taking the object as population as an example, the data stored in the database may include but is not limited to basic population data, travel data, economic data, medical data, video surveillance data, etc.
[0041] Step 103: construct a search space based on scenario requirements, and screen out candidate algorithm models that meet the conditions from multiple algorithm models based on the search space and target data.
[0042] Among them, the search space includes the number of hyperparameter iterations of the algorithm model and the range of hyperparameter values.
[0043] It should be noted that in the embodiments of the present application, the search space is constructed based on the scene requirements. That is, the range of hyperparameter values can be determined by the scene size and the amount of data. For example, large scenes and large amounts of data require a larger learning rate. Therefore, the learning rate can be placed in a larger numerical interval, and in the embodiments, a regular division can be used. Different scene requirement ranges correspond to different hyperparameter value ranges.
[0044] It should be noted that the above process can be understood as constructing a search space based on scenario requirements, and then combining the target data corresponding to the user's demand input information to achieve initial screening of multiple associated algorithm models to obtain candidate algorithm models that meet the conditions.
[0045] Step 104: Search for optimal parameters of candidate algorithm models in the search space to determine the target algorithm model and optimal parameters of the target algorithm model.
[0046] After determining the candidate algorithm model that meets the conditions, continue to search for the optimal parameters of the candidate algorithm model in the search space, and then determine the output target algorithm model with the optimal algorithm model and the optimal parameters of the optimal algorithm model as the goal.
[0047] In summary, the algorithm automatic matching and parameter optimization method provided in the embodiment of the present application has the following beneficial effects:
[0048] In the embodiment of the present application, the user demand is used as a condition, the target data is obtained through the user demand and the search space is constructed, and then, based on the target data and the search space, the multiple algorithm models associated in the algorithm warehouse are initially screened to obtain the candidate algorithm models that meet the conditions. Then, for the candidate algorithm models after the initial screening, the search space is continued to complete the optimal search for parameters. Compared with the prior art, this method can achieve more efficient automatic algorithm matching and parameter optimization, and the computational complexity is also lower than that of the prior art.
[0049] It should be noted that this application achieves the above purpose through two improvements. First, the candidate algorithm models are preliminarily screened, and then the optimal parameters of the candidate algorithm models are searched. Compared with the existing technology such as the grid search method, which searches for the best parameter combination of all algorithm models in the predefined hyperparameter space through exhaustive search, it can greatly improve efficiency and reduce computing time and resource consumption. Second, this application obtains target data and constructs a search space based on user needs. This method also further improves search efficiency and reduces computing time and resource consumption.
[0050] See also Figure 2 Optionally, the above steps may specifically include steps 201 to 203, based on the search space and the target data, to select candidate algorithm models that meet the conditions from multiple algorithm models.
[0051] Step 201: Divide the target data into sample data and test data.
[0052] The sample data includes labeled data and unlabeled data.
[0053] It should be noted that in the embodiment of the present application, the sample data includes both labeled data and unlabeled data, so as to avoid falling into the local optimal situation during the subsequent model training process.
[0054] Step 202: In combination with the search space, the sample data is substituted into multiple algorithm models to obtain multiple trained algorithm models.
[0055] Step 203: Substitute the test data into the multiple trained algorithm models to screen out candidate algorithm models that meet the conditions.
[0056] It should be noted that in the embodiment of the present application, the target data is divided into sample data and test data, and the sample data specifically includes labeled data and unlabeled data, the purpose of which is to ensure that the model can perform well on new and unseen data, that is, has good generalization ability. Sample data is used to train the model to allow the model to learn the characteristics and laws of the data; while test data is used to evaluate the performance of the model.
[0057] Optionally, the label data is determined by the following steps, including: matching the semantic attributes of the data attribute labels of the sample data with the description of the task requirements for semantic similarity; masking the data attributes that meet the similarity conditions and using them as labels; and using the labeled sample data as label data.
[0058] The description of the task requirements here can be understood as an auxiliary description of the human input in the aforementioned embodiment.
[0059] Optionally, in one embodiment, performing semantic similarity matching between the semantic attributes of the data attribute labels of the sample data and the description of the task requirements may specifically include: extracting multiple keywords in the description of the task requirements based on a preset language model; performing similarity matching between the semantic attributes of the data attribute labels of the sample data and the multiple keywords to obtain a matching degree.
[0060] Wherein, the matching degree is the average similarity of similarity matching with multiple keywords; accordingly, in the above-mentioned embodiment, the similarity condition is that the matching degree is greater than the set similarity threshold. The similarity threshold here can be set according to requirements. The above-mentioned preset language model can be but is not limited to the BERT model.
[0061] For example, assuming that three keywords in the task requirement description are extracted based on the preset language model, the semantic attributes of the data attribute labels of the sample data are sequentially matched with the three keywords for similarity, and then the average of the three similarity values is taken as the final matching degree. In this way, accurate and reasonable semantic similarity matching can be achieved, and semantic similarity matching of keywords has low computational complexity and high efficiency.
[0062] The following is an example of constructing the search space in combination with the above training. Assuming the iteration count is 5, the sample data is divided into 5 subsets, each subset contains 20% of the unlabeled data, and the algorithm is run 5 times. Each subset has a different subset of unlabeled training instances. The purpose is to avoid local optimality.
[0063] Optionally, the test data is substituted into multiple trained algorithm models to screen out candidate algorithm models that meet the conditions, including: substituting the test data into multiple trained algorithm models to calculate the index accuracy of multiple algorithm models; in response to the existence of an algorithm model that meets the index requirements, outputting the algorithm model; wherein the algorithm model is the screened out candidate algorithm model.
[0064] That is, the embodiment of the present application provides a method for screening candidate algorithm models based on indicator accuracy.
[0065] Different algorithm models have corresponding indicators that can be specified manually. For example, clustering is evaluated using the silhouette coefficient and Davis-Boulding index.
[0066] Optionally, after substituting the test data into multiple algorithm models after training and calculating the index accuracy of multiple algorithm models, the method also includes: in response to the absence of an algorithm model that meets the index requirements, extracting the hidden layer outputs of each algorithm model at multiple steps in training; fitting the data distribution of the hidden layer outputs of each algorithm model at multiple steps in training; and taking a preset number of algorithm models that are closest to the data distribution of the input original data as candidate algorithm models.
[0067] In an embodiment of the present application, a processing method is provided when it is impossible to screen out candidate algorithm models by means of indicators, that is, when there is no algorithm model that meets the indicator requirements, the data output distribution of the hidden layer in the extraction algorithm training process is matched with the original data distribution for similarity, and the closest one is retained to obtain the optimal matching algorithm (that is, the candidate algorithm model).
[0068] See also Figure 3 Optionally, the above steps search for optimal parameters of candidate algorithm models in the search space to determine the target algorithm model and the optimal parameters of the target algorithm model, and may also specifically include: S1~S4.
[0069] S1: Get the search space and take each hyperparameter as a population individual to construct a population.
[0070] S2: Construct a fitness function and calculate the fitness based on the current population.
[0071] Among them, the fitness function is used to calculate the error of the candidate algorithm model under the hyperparameters of the current population.
[0072] S3: According to the fitness, the individuals in the population are screened out, and the remaining individuals are cross-mutated through the roulette algorithm to obtain a new population.
[0073] S4: Determine whether the termination condition is met.
[0074] If not, repeat steps S2 to S3; if so, output the target algorithm model and the optimal parameters of the target algorithm model.
[0075] Specifically, the above process is as follows: obtain the search space, take each hyperparameter as a population individual, and construct the population .
[0076] Among them, each individual are all hyperparameter vectors.
[0077] Then, construct the fitness function, which is expressed as: ;in, represents the constructed fitness function, The hyperparameters are set to The following algorithm, is the test data in the aforementioned embodiment, is the loss function, such as the expression of the loss function: , For the model outputs, For the corresponding tags, Indicates the total number of outputs.
[0078] Individuals are screened out according to their fitness, and the remaining individuals are cross-mutated through a roulette algorithm to obtain a new population. The embodiment of the present invention adopts a single-point cross-mutation form, and the mutated individuals are , the right superscript indicates the sequence number of the element in the vector, is a minimum value.
[0079] Optionally, the termination condition includes: the duration of searching for optimal parameters of the candidate algorithm model in the search space reaches a maximum duration.
[0080] The expression of the above termination condition can be specifically as follows: ;in, Indicates the current search duration; Indicates the maximum duration.
[0081] Optionally, the termination condition includes: the difference between the latest calculated fitness and the optimal fitness value is smaller than a set threshold for multiple consecutive times.
[0082] That is, the expression of the above termination condition can be specifically:
[0083] ;
[0084] in, Representation and The corresponding fitness, represents the optimal value of fitness; Indicates the number of individuals; Indicates setting a threshold; it is used to judge whether the model performance has improved.
[0085] It should be noted that the above-mentioned termination condition can be set to determine whether the model performance will no longer continue to improve. If so, the process is terminated.
[0086] Finally, the final target algorithm model is trained with the complete target data (only part of the sample data is used for training during the initial screening), and the trained algorithm weights are frozen and saved. The model is translated into ONNX format and pushed to the user together with the weights.
[0087] In summary, the embodiments of the present application provide a faster algorithm warehouse algorithm automatic matching and parameter optimization method, which obtains target data and constructs a search space through user input requirements, masks data attributes that can be used as labels through semantic matching to obtain a positive set of sample data sets, and retains data that does not have this attribute to prevent falling into a local optimum. Under the premise that there is no algorithm that meets the indicator requirements, the data output distribution of the hidden layer in the extraction algorithm reasoning process is matched with the original data distribution for similarity, and the closest one is retained to obtain the optimal matching algorithm. Finally, the algorithm's parameter tuning is completed through the optimal parameter search method based on the elite algorithm to obtain the final algorithm. Compared with the existing methods, the present invention has higher efficiency and lower computational complexity than the existing methods.
[0088] Based on the same inventive concept, please refer to Figure 4 The present application provides an algorithm automatic matching and parameter optimization system 40, including: an acquisition module 401, used to obtain user demand input information; wherein the demand input information includes scene requirements, object requirements and task requirements; an extraction module 402, used to determine multiple related algorithm models from the algorithm warehouse based on the task requirements, and extract related target data from the database based on the scene requirements and the object requirements; an algorithm screening module 403, used to construct a search space based on the scene requirements, and based on the search space and the target data, screen out candidate algorithm models that meet the conditions from the multiple algorithm models; wherein the search space includes the number of hyperparameter iterations and the range of hyperparameter values of the algorithm model; a parameter screening module 404, used to search for the optimal parameters of the candidate algorithm models according to the search space, and determine the target algorithm model and the optimal parameters of the target algorithm model.
[0089] See also Figure 5 Based on the same inventive concept, the present application embodiment provides a module frame of an electronic device 500 that applies the above method. The electronic device 500 includes: at least one processor 501 ( Figure 5Only one is shown in the figure), a memory 502, a computer program 503 stored in the memory 502 and executable on at least one processor 501, and when the processor 501 executes the computer program 503, the steps of the method in any of the foregoing embodiments are implemented.
[0090] The electronic device 500 may be a server, a personal computer, a notebook computer, etc.
[0091] Those skilled in the art will understand that Figure 5 The electronic device 500 is merely an example and does not constitute a limitation on the electronic device 500 , and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.
[0092] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0093] In some embodiments, the memory 502 may be an internal storage unit of the electronic device 500, such as a hard disk or memory of the electronic device 500. In other embodiments, the memory 502 may also be an external storage device of the electronic device 500, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 500. Furthermore, the memory 502 may also include both an internal storage unit of the electronic device 500 and an external storage device.
[0094] It should be noted that the above-mentioned systems, devices, etc. are based on the same concept as the method embodiments of the present application. The modules designed for the systems, the steps performed by the devices, and the technical effects brought about can all be found in the method embodiment section and will not be repeated here.
[0095] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0096] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0097] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0098] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.
[0099] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.
[0100] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0101] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0102] In the embodiments provided in the present application, it should be understood that the disclosed devices / network equipment and methods can be implemented in other ways. For example, the device / network equipment embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0103] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0104] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An algorithm automatic matching and parameter optimization method, characterized in that: include: Obtaining user demand input information; wherein the demand input information includes scene requirements, object requirements and task requirements; Determining multiple associated algorithm models from an algorithm warehouse based on the task requirements, and extracting associated target data from a database based on the scenario requirements and the object requirements; Constructing a search space based on the scenario requirements, and screening out candidate algorithm models that meet the conditions from the multiple algorithm models based on the search space and the target data; wherein the search space includes the number of hyperparameter iterations and the hyperparameter value range of the algorithm model; Searching for optimal parameters of the candidate algorithm model in the search space to determine a target algorithm model and optimal parameters of the target algorithm model; The method of selecting candidate algorithm models that meet the conditions from the multiple algorithm models based on the search space and the target data includes: dividing the target data into sample data and test data; wherein the sample data includes labeled data and unlabeled data; combining the search space, substituting the sample data into the multiple algorithm models to obtain multiple trained algorithm models; substituting the test data into the multiple trained algorithm models to select candidate algorithm models that meet the conditions; The label data is determined by the following steps, including: matching the semantic attributes of the data attribute labels of the sample data with the description of the task requirements for semantic similarity; masking the data attributes that meet the similarity conditions and using them as labels; using the sample data with labels as the label data; The semantic similarity matching of the semantic attributes of the data attribute labels of the sample data with the description of the task requirements includes: extracting multiple keywords in the description of the task requirements based on a preset language model; similarity matching of the semantic attributes of the data attribute labels of the sample data with the multiple keywords to obtain a matching degree; wherein the matching degree is an average of similarities of similarity matching with the multiple keywords; correspondingly, the similarity condition is that the matching degree is greater than a set similarity threshold.
2. The algorithm automatic matching and parameter optimization method according to claim 1, characterized in that: Substituting the test data into the trained multiple algorithm models to select candidate algorithm models that meet the conditions includes: Substituting the test data into the multiple algorithm models after training, and calculating the index accuracy of the multiple algorithm models; In response to the existence of an algorithm model that meets the indicator requirements, the algorithm model is output; wherein the algorithm model is a screened candidate algorithm model.
3. The algorithm automatic matching and parameter optimization method according to claim 2, characterized in that: After substituting the test data into the trained multiple algorithm models and calculating the index accuracy of the multiple algorithm models, the method further includes: In response to the absence of an algorithm model that meets the indicator requirements, extracting hidden layer outputs of each algorithm model at multiple steps in training; Fit the data distribution of the hidden layer output of each algorithm model at multiple steps in training; A preset number of algorithm models that are closest to the data distribution of the input original data are selected as the candidate algorithm models.
4. The algorithm automatic matching and parameter optimization method according to claim 1, characterized in that: The step of searching for optimal parameters of the candidate algorithm model in the search space to determine the target algorithm model and optimal parameters of the target algorithm model includes: S1: Obtain the search space, and use each hyperparameter as a population individual to construct a population; S2: construct a fitness function and calculate the fitness based on the current population; wherein the fitness function is used to calculate the error of the candidate algorithm model under the hyperparameters of the current population; S3: Screening out individuals from the population according to fitness, and performing crossover mutation on the remaining individuals through a roulette algorithm to obtain a new population; Repeat steps S2 to S3 until the termination condition is met, and then output the target algorithm model and the optimal parameters of the target algorithm model.
5. The algorithm automatic matching and parameter optimization method according to claim 4, characterized in that: The termination condition includes: the duration of searching for optimal parameters of the candidate algorithm model in the search space reaches a maximum duration.
6. The algorithm automatic matching and parameter optimization method according to claim 4, characterized in that: The termination condition includes: the difference between the latest calculated fitness and the optimal fitness value is smaller than a set threshold value for multiple consecutive times.
7. An algorithm automatic matching and parameter optimization system, characterized in that: include: An acquisition module is used to acquire user demand input information; wherein the demand input information includes scene requirements, object requirements and task requirements; An extraction module, used to determine a plurality of associated algorithm models from an algorithm warehouse based on the task requirements, and to extract associated target data from a database based on the scenario requirements and the object requirements; An algorithm screening module, used to construct a search space based on the scenario requirements, and screen out candidate algorithm models that meet the conditions from the multiple algorithm models based on the search space and the target data; wherein the search space includes the number of hyperparameter iterations and the hyperparameter value range of the algorithm model; A parameter screening module, used to search for optimal parameters of the candidate algorithm model in the search space, and determine the target algorithm model and the optimal parameters of the target algorithm model; The algorithm screening module is further used to divide the target data into sample data and test data; wherein the sample data includes labeled data and unlabeled data; in combination with the search space, the sample data is substituted into the multiple algorithm models to obtain multiple trained algorithm models; the test data is substituted into the multiple trained algorithm models to screen out candidate algorithm models that meet the conditions; The algorithm screening module is further used to match the semantic attributes of the data attribute labels of the sample data with the description of the task requirements in terms of semantic similarity; mask the data attributes that meet the similarity conditions and use them as labels; and use the sample data with labels as the label data; The algorithm screening module is also used to extract multiple keywords in the description of the task requirements based on a preset language model; perform similarity matching on the semantic attributes of the data attribute labels of the sample data with the multiple keywords to obtain a matching degree; wherein the matching degree is an average of similarities matched with the multiple keywords; correspondingly, the similarity condition is that the matching degree is greater than a set similarity threshold.
