Model generation method, model generation device and electronic device
By responding to the model generation instructions, determining the target code based on key information, and model generation and processing is carried out based on resource configuration information, the time-consuming and laborious problem of engineers writing code is solved, and efficient automatic model generation is achieved.
Patent Information
- Application Number
- CN202411402408.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-09
AI Technical Summary
In the prior art, engineers write code to build models is time-consuming and labor-intensive, and it is difficult to meet the growing demand for models.
Provide a model generation method, which can automatically generate the target model by responding to the model generation instructions, determine the target code based on key information, and perform model generation processing based on the resource configuration information required to execute the target code.
It realizes the automatic generation of corresponding models based on the received model generation instructions, which improves the efficiency and speed of model construction and can meet the growing model needs.
Smart Images

Figure CN118916014B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a model generation method, a model generation device and an electronic device. Background Art
[0002] In the current era of data explosion, big data technology is developing rapidly, and the amount of data processing is becoming increasingly huge. Models can quickly process and analyze data, especially in image recognition, natural language processing, predictive analysis and other fields, where models have shown great advantages. Therefore, in the field of big data, the application of models is becoming more and more extensive, and the number of models that need to be built is also increasing.
[0003] Currently, models are usually built by engineers writing code and then running the code to train the model. However, this method of engineers writing code is time-consuming and labor-intensive, and it is difficult to meet the growing demand for models.
[0004] Therefore, a method that can automatically generate models is urgently needed. Summary of the invention
[0005] The main technical problem solved by the present application is to provide a model generation method, a model generation device and an electronic device, which can automatically generate a corresponding model according to a received model generation instruction.
[0006] A first aspect of the present application provides a model generation method, which is applied to a model generation device, and includes: in response to receiving a model generation instruction of a target model, determining a target code for generating the target model according to key information in the model generation instruction; performing model generation processing according to resource configuration information required to execute the target code to obtain the target model.
[0007] In one embodiment, the step of performing model generation processing according to the resource configuration information required to execute the target code to obtain the target model includes: comparing the current resource information of the model generation device with the resource configuration information required to execute the target code to obtain a comparison result; in response to the comparison result indicating that the current resource information satisfies the resource configuration information required to execute the target code, running the target code to obtain the target model; in response to the comparison result indicating that the current resource information does not satisfy the resource configuration information required to execute the target code, continuously detecting the current resource information until the current resource information satisfies the resource configuration information required to execute the target code, running the target code to obtain the target model.
[0008] In one embodiment, running the target code to obtain the target model includes: in response to the target code running normally, determining the model after the running is completed as the target model; in response to the target code running error, updating the resource configuration information to obtain updated resource configuration information; and re-running the target code according to the updated resource configuration information to obtain the target model.
[0009] In one embodiment, the step of updating the resource configuration information to obtain the updated resource configuration information includes: determining the current running time of the target code and the expected running time of the target code; updating the resource configuration information according to the current running time and the expected running time to obtain the updated resource configuration information.
[0010] In one embodiment, the step of determining the target code for generating the target model based on the key information in the model generation instruction includes: determining matching code sub-fragment information from a preset code database based on the key information in the model generation instruction; arranging and combining the code sub-fragments in the matching code sub-fragment information to obtain the target code for generating the target model.
[0011] In one embodiment, the step of determining matching code sub-fragment information from a preset code database based on key information in the model generation instruction includes: reconstructing the key information in the model generation instruction to obtain reconstructed text information; matching the reconstructed text information with the code sub-fragment information in the preset code database to obtain the matching code sub-fragment information.
[0012] In one embodiment, the method further includes: determining a target access right required for generating the target model from preset access rights according to a model type of the target model; and writing the target access right into a target code required for generating the target model.
[0013] In one embodiment, the target model is a data analysis model; the model generation processing is performed according to the resource configuration information required to execute the target code, and after obtaining the target model, it also includes: inputting the original data into the target model to obtain the probability of multiple data analysis results; in response to the probability of there being a data analysis result that meets a preset requirement, determining the data analysis result whose probability meets the preset requirement as the data analysis result output by the target model.
[0014] A second aspect of the present application provides a model generation device, which includes an intelligent agent and a big data cluster platform; the intelligent agent, in response to receiving a model generation instruction of a target model, determines a target code for generating the target model based on key information in the model generation instruction; the big data cluster platform performs model generation processing based on resource configuration information required to execute the target code to obtain the target model.
[0015] A third aspect of the present application provides an electronic device, including a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the above-mentioned model generation method.
[0016] The beneficial effects of the present application are as follows: in response to receiving a model generation instruction of a target model, a target code for generating the target model is determined according to key information in the model generation instruction; model generation processing is performed according to resource configuration information required to execute the target code to obtain the target model. Thus, the corresponding model is automatically generated according to the received model generation instruction.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0019] Figure 1 is a flow chart of a model generation method according to an exemplary embodiment of the present application;
[0020] Figure 2 This application Figure 1 A flow chart of an exemplary embodiment of step S110 in the model generation method shown;
[0021] Figure 3 This application Figure 1 A flow chart of an exemplary embodiment of step S120 in the model generation method shown;
[0022] Figure 4 is a flow chart of an exemplary embodiment of a model generation device shown in the present application;
[0023] Figure 5 is a flowchart of another exemplary embodiment of the model generation method shown in the present application;
[0024] Figure 6 is a schematic diagram of a real-time status display interface of each task according to an exemplary embodiment of the present application;
[0025] Figure 7 It is a schematic diagram of a display interface of mission key performance indicators and resource utilization conditions of an exemplary embodiment shown in the present application;
[0026] Figure 8 is a schematic diagram of a display interface of a task warning and suggestion of an exemplary embodiment shown in the present application;
[0027] Fig. 9 It is a schematic diagram of an interface interaction and a task execution result display interface of an exemplary embodiment shown in the present application;
[0028] Fig.10 is a block diagram of a model generation device shown in an exemplary embodiment of the present application;
[0029] Fig.11 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0030] Fig.12 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0032] First of all, it should be noted that in the current era of data explosion, big data technology is developing rapidly, and the amount of data processing is becoming increasingly huge. Models can quickly process and analyze data, especially in many fields such as image recognition, natural language processing, and predictive analysis, where models have shown remarkable advantages. Therefore, in the field of big data, the application of models is becoming more and more extensive, and the number of models that need to be built is also increasing. Currently, models are usually built by engineers writing code and then training the model by running the code. However, this method of engineers writing code is time-consuming and labor-intensive, and it is difficult to meet the growing demand for models.
[0033] Based on this, in order to automatically generate a model, the present application provides a model generation method, a model generation device, and an electronic device. The present application determines the target code for generating the target model according to the key information in the model generation instruction; performs model generation processing according to the resource configuration information required to execute the target code to obtain the target model. Thus, the corresponding model is automatically generated according to the received model generation instruction.
[0034] The model generation method provided in the present application is applied to a model generation device. Exemplarily, the model generation device may be a computer, a programming controller, a code interpreter, a debugger, an integrated development environment, a debugger, a simulator, and the like.
[0035] Specifically, if Figure 1 As shown, a model generation method of this embodiment includes the following steps:
[0036] Step S110 : in response to receiving a model generation instruction of a target model, determining a target code for generating the target model according to key information in the model generation instruction.
[0037] The target model is the model to be generated. Specifically, the target model can be an analysis model, a prediction model, an image recognition model, or a natural language processing model.
[0038] The model generation instruction is an instruction for generating a target model. In one embodiment, the model generation device receives input information determined based on the object operation and generates the model generation instruction according to the input information. In another embodiment, the model generation device directly receives the model generation instruction sent by other devices.
[0039] Key information is the data required to generate the target model. For example, if the model generation device receives a model generation instruction to generate a sales forecast model, the key information in the model generation instruction may be the sales forecast model and the sales history data and sales market factor data required to generate the sales forecast model. For another example, if the model generation device receives a model generation instruction to generate a financial market trend forecast model, the key information in the model generation instruction may be the financial market trend forecast model and the financial transaction data and financial market factor data required to generate the financial market trend forecast model.
[0040] The target code is the code required to generate the target model.
[0041] In response to receiving a model generation instruction for a target model, the model generation device determines a target code for generating the target model based on key information in the model generation instruction. As an example, in response to receiving a model generation instruction for a target model, the model generation device performs a matching operation on key information in the model generation instruction in a preset code database to obtain a matched target code; and determines the matched target code as the target code for generating the target model. As another example, the model generation device reconstructs key information in the model generation instruction to obtain reconstructed text information; performs a matching operation on the code in the preset code database based on the reconstructed text information to obtain a matched code, and determines the matched code as the target code. The text information is a preset standard expression that describes key information.
[0042] Step S120: Perform model generation processing according to the resource configuration information required to execute the target code to obtain a target model.
[0043] Resource configuration information refers to the storage nodes and computing nodes required for the model generation device to execute the target code. Specifically, the model generation device obtains code feature parameters based on the target code; and obtains resource configuration information based on the code feature parameters. Code feature parameters can be code complexity, estimated data volume, expected running time, etc. Exemplarily, the model generation device inputs the code feature parameters into the resource configuration model, conducts learning and analysis on historical resource configuration cases through the resource configuration model, determines the mapping relationship between the code feature parameters and the resource configuration information, and uses the mapping relationship between the code feature parameters and the resource configuration information to obtain the resource configuration information corresponding to the code feature parameters of the target code.
[0044] The model generation device performs model generation processing according to the resource configuration information required for executing the target code to obtain the target model. Exemplarily, the model generation device configures resources according to the resource configuration information, and then uses the configured resources to run the target code to obtain the target model.
[0045] It can be seen that the model generation method of the embodiment of the present application responds to receiving the model generation instruction of the target model, determines the target code used to generate the target model according to the key information in the model generation instruction, and performs model generation processing according to the resource configuration information required to execute the target code to obtain the target model. Thus, the target model is generated by the target code used to generate the target model and the resource configuration information required to execute the target code, thereby realizing automatic generation of the model.
[0046] Based on the above examples, please continue to refer to Figure 2 , Figure 2 This application Figure 1The flowchart of an exemplary embodiment of step S110 in the model generation method is shown. Specifically, the process of determining the target code for generating the target model according to the key information in the model generation instruction in step S110 includes the following steps:
[0047] Step S210: determining matching code sub-segment information from a preset code database according to key information in the model generation instruction.
[0048] The preset code database is a preset database storing code sub-segment information.
[0049] The code sub-segment information may be at least one code sub-segment, or may be at least two code sub-segments and associations between the code sub-segments.
[0050] The model generation device determines matching code sub-segment information from a preset code database according to key information in the model generation instruction. Specifically, the model generation device reconstructs the key information in the model generation instruction to obtain reconstructed text information; and matches the reconstructed text information with the code sub-segment information in the preset code database to obtain matching code sub-segment information.
[0051] In one embodiment, the model generation device receives a model generation instruction, performs a query operation on the target model in the model generation instruction in a preset industry tool library, and obtains the industry data processing tool corresponding to the industry to which the target model belongs; the industry data processing tool may include an industry-specific semantic recognition and conversion algorithm, an industry-specific semantic generation algorithm, and an industry-specific text retrieval algorithm; the model generation device uses the industry-specific semantic recognition and conversion algorithm to process the model generation instruction to obtain key information; uses the industry-specific semantic generation algorithm to perform semantic generation processing on the key information to obtain text information; uses the industry-specific text retrieval algorithm to perform a retrieval operation on the text information in a preset code database to obtain matching code sub-segment information. Exemplarily, if the industry to which the target model belongs is the financial industry, then the industry data processing tool may be the financial industry's semantic recognition and conversion algorithm, the financial industry's semantic generation algorithm, and the financial industry's text retrieval algorithm.
[0052] It can be seen that this embodiment uses the industry-specific semantic recognition and conversion algorithm of the industry to which the target model belongs to process the model generation instructions, which can recognize and understand industry-specific terms and contexts to obtain more accurate key information. Subsequently, an industry-specific semantic generation algorithm is used to accurately convert the key information into computer language to ensure that the obtained text information is close to the requirements of the calculation and execution levels, so that the computer program can accurately perform the required operations and improve the applicability and accuracy of the solution. Finally, an industry-specific text retrieval algorithm is used to search the text information in the preset code database, which optimizes the efficiency of information-to-code conversion and lays a solid foundation for the subsequent target code generation step.
[0053] Step S220: Arrange and combine the code sub-segments in the matched code sub-segment information to obtain a target code for generating a target model.
[0054] The model generation device arranges and combines the code sub-segments in the matched code sub-segment information to obtain the target code for generating the target model. Exemplarily, the model generation device arranges and combines the multiple code sub-segments in the code sub-segment information according to the semantics of each code sub-segment to obtain the target code for generating the target model. In another exemplary embodiment, the code sub-segment information may include multiple code sub-segments and the association relationship between each code sub-segment; the model generation device arranges and combines each code sub-segment according to the association relationship to obtain the target code for generating the target model.
[0055] Furthermore, the model generation device inputs the code sub-segment in the matched code sub-segment information into the code generation model to obtain the target code for generating the target model. The training process of the code generation model includes the following steps: obtaining a code segment dataset to be trained, the code segment dataset to be trained includes code sub-segment samples and sample labels of each code sub-segment, and the sample label represents the target code corresponding to the code sub-segment; inputting the code sub-segment sample into the code generation model to be trained to obtain the target code output by the code generation model to be trained; calculating the loss function based on the sample label of the code sub-segment sample and the output target code; continuing to train the code generation model to be trained with the loss function convergence as the goal until an alternative code generation model that meets the requirements is obtained; obtaining a pre-processed preset industry code segment dataset, using a deep learning architecture to adjust the parameters of the alternative code generation model, inputting the pre-processed preset industry code segment dataset into the parameter-adjusted alternative code generation model for training, and obtaining the trained alternative code generation model. Using a preset industry code segment test dataset to perform performance testing on the trained alternative code generation model until the requirements are met; determining the trained alternative code generation model that meets the requirements as the code generation model. It can be seen that by training the general candidate code generation model with preset industry code snippet data, a code generation model that is more suitable for the preset industry is obtained with higher accuracy.
[0056] Furthermore, the step of the model generation device determining the target code for generating the target model based on the key information in the model generation instruction also includes: detecting the target code to obtain a detection result; in response to the detection result indicating that the target code is wrong, repairing the target code, and then performing model generation processing based on the resource configuration information required to execute the repaired target code to obtain the target model. For performing model generation processing based on the resource configuration information required to execute the repaired target code to obtain the target model, please refer to step S120, which will not be repeated here. Therefore, by detecting the target code, potential risks are effectively avoided and performance is optimized, ensuring the high quality and high stability of the target code when it is actually deployed.
[0057] The model generation device detects the target code to obtain the detection result, and in response to the detection result indicating the target code error, the target code is repaired. For example, a code detection tool is used to perform format detection and semantic detection on the target code to obtain the detection result; when the detection result is a format error and / or a semantic error, the format and / or language of the target code is corrected. For another example, a simulated sandbox environment is used to run the target code to obtain the running result; when the running result meets the requirements of the target model, the logic detection result of the target code is that the target code is logically correct; when the running result does not meet the requirements of the target model, the logic detection result of the target code is a target code logic error, and the target code whose logic detection result is a target code logic error is logically repaired. The logic repair method includes regenerating the target code based on the model generation instruction, or replacing the code sub-segment in which the logic running error is detected with the correct code sub-segment.
[0058] It can be seen that according to the key information in the model generation instruction, the matching code sub-segment information is determined from the preset code database, and the code sub-segments in the matching code sub-segment information are arranged and combined to obtain the target code for generating the target model. By matching the code sub-segments with key information and then arranging and combining the code sub-segments to obtain the target code, the target code is automatically generated, which is more time-saving and labor-saving than programming by engineers.
[0059] Based on the above examples, please continue to refer to Figure 3 , Figure 3 This application Figure 1 The flowchart of an exemplary embodiment of step S120 in the model generation method is shown. Specifically, in step S120, the model generation process is performed according to the resource configuration information required to execute the target code, and the process of obtaining the target model includes the following steps:
[0060] Step S310: Compare the current resource information of the model generation device with the resource configuration information required to execute the target code to obtain a comparison result.
[0061] The current resource information is the storage nodes and computing nodes that are not currently used by the model generation device. The model generation device compares the storage nodes and computing nodes that are not currently used with the storage nodes and computing nodes required to execute the target code to obtain a comparison result; the comparison result includes whether the current resource information meets the resource configuration information required to execute the target code or whether the current resource information does not meet the resource configuration information required to execute the target code.
[0062] Step S320: In response to the comparison result indicating that the current resource information satisfies the resource configuration information required for executing the target code, the target code is run to obtain the target model.
[0063] In response to the comparison result indicating that the current resource information satisfies the resource configuration information required for executing the target code, the model generation device runs the target code to obtain the target model. Specifically, in response to the target code running normally, the model generation device determines the model after the running is completed as the target model; in response to the target code running error, the resource configuration information is updated to obtain the updated resource configuration information; and the target code is re-run according to the updated resource configuration information to obtain the target model.
[0064] The model generation device updates the resource configuration information to obtain updated resource configuration information. Specifically, the model generation device determines the current running time of the target code and the expected running time of the target code; updates the resource configuration information according to the current running time and the expected running time to obtain updated resource configuration information.
[0065] The current runtime is the duration of the target code's execution. The expected runtime is the total duration of the target code's execution. The current runtime of the target code, the expected runtime of the target code, and the updated resources satisfy the following relationship:
[0066]
[0067] In the above formula, Represents the updated resource, Represents the resource before the update, The coefficient that represents the preset control growth rate, The value range is 0~1, for example, It can be 0.2, Characterizes the expected runtime, Indicates the current running time. Characterizes the expected coefficient of the preset, The value range is 0~1, for example, It can be 0.25.
[0068] In one embodiment, the current running time is 60 minutes, the expected running time is 48 minutes, the expected coefficient is 0.25, and the coefficient of regulating the growth rate is 0.2. Then the updated resources and the resources before the update satisfy the following formula, which shows that the updated resources increase by 5% over the resources before the update.
[0069]
[0070] The model generation method also includes: the model generation device performs anomaly detection on the target code in response to an error in the target code operation to obtain anomaly detection results; automatically repairs the target code according to the anomaly detection results to obtain a repaired target code; and runs the repaired target code to obtain a target model. As an example, if the anomaly detection result is a surge in data in the intermediate table, the target code is adjusted according to an adjustment strategy corresponding to the surge in data in the intermediate table; if the anomaly detection result is other error problems, the target code is regenerated according to the model generation instruction; and the regenerated target code is run to obtain a target model.
[0071] Step S330: In response to the comparison result indicating that the current resource information does not satisfy the resource configuration information required for executing the target code, the current resource information is continuously detected until the current resource information satisfies the resource configuration information required for executing the target code, the target code is run, and the target model is obtained.
[0072] Furthermore, in response to the comparison result indicating that the current resource information does not meet the resource configuration information required to execute the target code, the model generation device predicts the execution time of the target code, and the execution time includes the execution start time point; if it is detected that the current time point reaches the execution start time point, the target code is run to obtain the target model. Specifically, the model generation device obtains the available time point of each resource, determines the available resource information of the available time point, determines whether the available resource information meets the resource configuration information in the order of the available time points, and determines the available time point corresponding to the available resource information that meets the resource configuration information as the execution start time.
[0073] It can be seen that by comparing the current resource information of the model generation device with the resource configuration information required to execute the target code, when the current resource information meets the resource configuration information required to execute the target code, the target code is run to obtain the target model; when the current resource information does not meet the resource configuration information required to execute the target code, the current resource information is continuously detected until the current resource information meets the resource configuration information required to execute the target code, and the target code is run to obtain the target model. In this way, the resources required to execute the target code are met, which is conducive to ensuring the smooth operation of the target code and the generation of the target model.
[0074] In one embodiment, the target model is a data analysis model; model generation processing is performed according to resource configuration information required to execute the target code, and after obtaining the target model, it also includes: inputting the original data into the target model to obtain the probability of multiple data analysis results; in response to the probability of the existence of a data analysis result meeting a preset requirement, determining the data analysis result whose probability meets the preset requirement as the data analysis result output by the target model.
[0075] The original data is the data to be analyzed. The original data can be image data, text information, etc.
[0076] The preset requirement may be that the probability of the data analysis result is greater than a first threshold. Specifically, the model generation device inputs the image data into the data analysis model, the data analysis model obtains the probabilities of multiple image analysis results, and determines the image analysis result with a probability greater than the first threshold as the data analysis result output by the data analysis model. In this way, automatic analysis of the original data is achieved.
[0077] Please continue reading Figure 4 , Figure 4 The following is a flow chart of an exemplary embodiment of a model generation device shown in the present application. Specifically, the model generation device of the embodiment of the present application includes an intelligent agent and a big data cluster platform, including the following steps:
[0078] Step S410: In response to receiving a model generation instruction for a target model, the agent determines a target code for generating the target model according to key information in the model generation instruction.
[0079] The detailed description of step S410 in the embodiment of the present application can refer to step S110 in the above embodiment, which will not be repeated here.
[0080] After the agent determines the target code for generating the target model based on the key information in the model generation instruction, the agent transmits the target code for generating the target model to the big data cluster platform. It should be noted that the data transmission process between the agent and the big data cluster platform adopts encrypted transmission to ensure security during the transmission process.
[0081] Step S420: The big data cluster platform performs model generation processing according to the resource configuration information required to execute the target code to obtain a target model.
[0082] The detailed description of step S420 in the embodiment of the present application can refer to step S120 in the above embodiment, which will not be repeated here.
[0083] It can be seen that the agent responds to the model generation instruction of the target model and determines the target code for generating the target model according to the key information in the model generation instruction, thereby realizing automatic code writing. The agent transmits the target code for generating the target model to the big data cluster platform; the big data cluster platform receives the target code and performs model generation processing according to the resource configuration information required to execute the target code to obtain the target model. In this way, the automatic generation of the model is realized.
[0084] See also Figure 5 , Figure 5The following is a flow chart of another exemplary embodiment of the model generation method shown in the present application. Specifically, the model generation method of the embodiment of the present application includes the following steps:
[0085] Step S510: In response to receiving a model generation instruction of a target model, determining a target code for generating the target model according to key information in the model generation instruction.
[0086] The detailed description of step S510 in the embodiment of the present application can refer to step S110 in the above embodiment, which will not be repeated here.
[0087] Step S520: Determine the target access rights required for generating the target model from the preset access rights according to the model type of the target model.
[0088] The model type is the type of the target model. The model type can be financial analysis type, weather forecast type, sales forecast type, etc.
[0089] The preset access rights are the preset rights to read, write, and store data. The target access rights are the rights to read, write, and store data of the target model. For example, the financial analysis model only has the right to read financial transaction data, but does not have the right to write, modify, and store financial transaction data.
[0090] The model generation device determines the target access rights required to generate the target model from the preset access rights according to the model type of the target model. Specifically, the model generation device matches the model type of the target model to obtain the target access rights corresponding to the target model from the preset access rights.
[0091] Step S530: Write the target access rights into the target code required to generate the target model.
[0092] The model generation device writes the target access right into the target code required to generate the target model. Specifically, the model generation device matches the permission code corresponding to the target access right from the preset permission code database, and writes the matched permission code into the target code required to generate the target model.
[0093] Step S540: Perform model generation processing according to the resource configuration information required to execute the target code to obtain the target model.
[0094] The detailed description of step S540 in the embodiment of the present application can refer to step S120 in the above embodiment, which will not be repeated here.
[0095] It can be seen that this embodiment determines the target code for generating the target model based on the key information in the model generation instruction, determines the target access rights required for generating the target model from the preset access rights according to the model type of the target model, writes the target access rights into the target code required for generating the target model, and then performs model generation processing according to the resource configuration information required to execute the target code. The target model thus obtained has access rights, which fundamentally prevents unauthorized data access and potential data leakage, and is more secure.
[0096] The model generation method of the embodiment of the present application also includes: the intelligent agent determines multiple target codes and transmits each target code to the big data cluster platform; after the big data cluster platform receives the target codes required for each target model generation, it creates tasks for generating target models respectively; when the current resource information of the big data cluster platform meets the resource configuration information required by a target code, the corresponding task of generating the target model is executed. It should be noted that the big data cluster platform can execute multiple tasks of generating target models at the same time. On the one hand, efficient code generation and automatic submission and operation are achieved, and on the other hand, automatic model generation is achieved.
[0097] Furthermore, the big data cluster platform may include an interface display of the running status of the task. The running status of the task may include: the real-time status of each task, the key performance indicators of each task and the utilization of each resource, warnings and suggestions, task running results, etc. The key performance indicators may be IO-intensive or CPU-intensive identifiers, code complexity, estimated data volume, etc. Resources may be CPU, memory, and storage utilization.
[0098] For example, the real-time status display interface of each task can be found in Figure 6 ,exist Figure 6 The display interface shows the task search, search box and notification, as well as Task 1, Task 2, Task 1 status and Task 2 status. The real-time status display interface can also include real-time task progress indicators, graphical progress indicators, task health indicators and pop-up reminders for high-priority notifications. The display interface for key performance indicators of tasks and resource utilization can be found in Figure 7 ,exist Figure 7 In the display interface, Task 1 and its status, KPI 1, KPI 2, KPI 3, KPI 4 and KPI 5, and the utilization of Resource 1, Resource 2, Resource 3, Resource 4 and Resource 5 are displayed. The display interface of the KPI and the utilization of each resource can also include a timeline and a chart showing the detailed execution of the task from the beginning to the present. The display interface of the task warning and suggestion can be found in Figure 8 ,exist Figure 8In the example above, the display shows Task 1, its status, and warnings and suggested actions. Warning displays can include color coding and symbols to instantly warn of problems in tasks, such as missed deadlines and resource bottlenecks. For more information about the interface and the task run results display, see Fig. 9 ,exist Fig. 9 In the display interface, the current conversation, historical conversations, and the custom report area are displayed; the custom report area includes a title, a text summary, a pie chart, and a bar chart. The pie chart is used to display the analysis results of the target model generated by the historical conversation. The custom report area also includes a drawing tool and a download. The download is used to provide the option of downloading a complete data set or generating a report, allowing the format of the report and the data included to be customized. The task run result display box can also include a result summary box, which is used to display key information of the task results, such as the success rate, key output data points, and their improvement compared to earlier results.
[0099] It can be seen that the real-time status of each task, the key performance indicators of each task, the utilization of each resource, warnings and suggestions, and task operation results are displayed through the display interface. On the one hand, the visualization of the target model generation is realized, and on the other hand, the interface interaction function is realized, which improves practicality.
[0100] Fig.10 FIG. 1 is a block diagram of a model generation device shown in an exemplary embodiment of the present application. Fig.10 As shown, the exemplary model generation device 1000 includes: a target code determination module 1010 and a target model generation module 1020. Specifically:
[0101] The target code determination module 1010 is used to determine the target code for generating the target model according to key information in the model generation instruction in response to receiving the model generation instruction of the target model.
[0102] The target model generation module 1020 is used to perform model generation processing according to the resource configuration information required for executing the target code to obtain the target model.
[0103] In this exemplary model generation device, in response to receiving a model generation instruction of a target model, a target code for generating the target model is determined according to key information in the model generation instruction; model generation processing is performed according to resource configuration information required to execute the target code to obtain the target model. Thus, the target model is generated by the target code for generating the target model and the resource configuration information required to execute the target code, thereby realizing automatic generation of the corresponding model according to the received model generation instruction.
[0104] Among them, the functions of each module can be found in the embodiment of the model generation method, and will not be repeated here.
[0105] In order to implement the model generation method of the above embodiment, the present application proposes another electronic device, which can be specifically referred to as Fig.11 , Fig.11 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0106] The electronic device 1100 includes a memory 1101 and a processor 1102 , wherein the memory 1101 and the processor 1102 are coupled.
[0107] The memory 1101 is used to store program data, and the processor 1102 is used to execute the program data to implement the model generation method of the above embodiment.
[0108] In this embodiment, the processor 1102 may also be referred to as a CPU (Central Processing Unit). The processor 1102 may be an integrated circuit chip having signal processing capabilities. The processor 1102 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 1102 may also be any conventional processor, etc.
[0109] The present application also provides a computer-readable storage medium, such as Fig.12 As shown, the computer-readable storage medium 1200 is used to store program data 1201. When the program data 1201 is executed by the processor, it is used to implement the model generation method in the method embodiment of the present application.
[0110] The method involved in the model generation method embodiment of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0111] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A model generation method, characterized in that: The method is applied to a model generation device, and the method comprises: In response to receiving a model generation instruction of a target model, determining a target code for generating the target model according to key information in the model generation instruction; Performing model generation processing according to resource configuration information required to execute the target code to obtain the target model; The step of performing model generation processing according to the resource configuration information required to execute the target code to obtain the target model includes: Comparing the current resource information of the model generation device with the resource configuration information required to execute the target code to obtain a comparison result; In response to the comparison result indicating that the current resource information satisfies the resource configuration information required for executing the target code, the target code is run to obtain the target model; The running of the target code to obtain the target model comprises: In response to the target code running error, updating the resource configuration information to obtain updated resource configuration information; Re-run the target code according to the updated resource configuration information to obtain the target model; The step of updating the resource configuration information to obtain updated resource configuration information comprises: Determining a current running time of the target code and an expected running time of the target code; Updating the resource configuration information according to the current running time and the expected running time to obtain the updated resource configuration information; The current running time of the target code, the expected running time of the target code and the updated resources satisfy the following relationship: In the above formula, Represents the updated resource, Represents the resource before the update, The coefficient that represents the preset control growth rate, Characterizes the expected runtime, Indicates the current running time. Characterizes the expected coefficient of the preset.
2. The model generation method according to claim 1, characterized in that: The step of performing model generation processing according to the resource configuration information required to execute the target code to obtain the target model also includes: In response to the comparison result indicating that the current resource information does not satisfy the resource configuration information required to execute the target code, the current resource information is continuously detected until the current resource information satisfies the resource configuration information required to execute the target code, the target code is run, and the target model is obtained.
3. The model generation method according to claim 1, characterized in that: The running of the target code to obtain the target model further comprises: In response to the target code running normally, the model after the running is completed is determined as the target model.
4. The model generation method according to claim 1, characterized in that: The step of determining the target code for generating the target model according to the key information in the model generation instruction comprises: Determine matching code sub-segment information from a preset code database according to key information in the model generation instruction; The code sub-segments in the matched code sub-segment information are arranged and combined to obtain a target code for generating the target model.
5. The model generation method according to claim 4, characterized in that: The step of determining matching code sub-segment information from a preset code database according to key information in the model generation instruction comprises: Reconstructing key information in the model generation instruction to obtain reconstructed text information; The reconstructed text information is matched with the code sub-segment information in the preset code database to obtain the matched code sub-segment information.
6. The model generation method according to claim 1, characterized in that: The method further comprises: Determining, according to the model type of the target model, the target access rights required for generating the target model from preset access rights; The target access permission is written into the target code required to generate the target model.
7. The model generation method according to claim 1, characterized in that: The target model is a data analysis model; The model generation process is performed according to the resource configuration information required for executing the target code, and after obtaining the target model, the following further comprises: Inputting the original data into the target model to obtain the probability of multiple data analysis results; In response to the probability that there is a data analysis result that meets a preset requirement, the data analysis result whose probability meets the preset requirement is determined as the data analysis result output by the target model.
8. A model generation device, characterized in that: The model generation device includes an intelligent agent and a big data cluster platform; The agent, in response to receiving a model generation instruction of a target model, determines a target code for generating the target model according to key information in the model generation instruction; The big data cluster platform performs model generation processing according to the resource configuration information required to execute the target code to obtain the target model; The step of performing model generation processing according to the resource configuration information required to execute the target code to obtain the target model includes: Comparing the current resource information of the model generation device with the resource configuration information required to execute the target code to obtain a comparison result; In response to the comparison result indicating that the current resource information satisfies the resource configuration information required for executing the target code, the target code is run to obtain the target model; The running of the target code to obtain the target model comprises: In response to the target code running error, updating the resource configuration information to obtain updated resource configuration information; Re-run the target code according to the updated resource configuration information to obtain the target model; The step of updating the resource configuration information to obtain updated resource configuration information comprises: Determining a current running time of the target code and an expected running time of the target code; Updating the resource configuration information according to the current running time and the expected running time to obtain the updated resource configuration information; The current running time of the target code, the expected running time of the target code and the updated resources satisfy the following relationship: In the above formula, Represents the updated resource, Represents the resource before the update, The coefficient that represents the preset control growth rate, Characterizes the expected runtime, Indicates the current running time. Characterizes the expected coefficient of the preset.
9. An electronic device, characterized in that: It comprises a memory and a processor, wherein the processor is used to execute program instructions stored in the memory to implement the model generation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Artificial intelligence model construction method, system and device and storage medium
CN117289904A