Database-based parameter result prediction method

By embedding predictive analysis models in the database and using SQL calls to manage machine learning models, the problem of enterprises ignoring the consumptionability of models in the Internet of Things scenario is solved, and the effect of lowering development thresholds, optimizing prediction performance and improving security is achieved.

CN119646071APending Publication Date: 2025-03-18INSPUR QILU SOFTWARE IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411649705.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

In the Internet of Things scenario, enterprises ignore the consumability of the model when using machine learning models, resulting in the failure to implement projects, losing corporate resources and affecting their willingness to expand machine learning applications.

Method used

By embedding predictive analysis models in the database, using SQL calls to import and manage machine learning models, the training, evaluation and deployment of models are implemented, reducing the dependence on application developers.

Benefits of technology

No application developers need to learn machine learning frameworks, lower the development threshold for artificial intelligence projects, optimize the data transmission path of online prediction, shorten response time, improve performance and security, and improve the accuracy of intelligent database prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646071A_ABST
    Figure CN119646071A_ABST
Patent Text Reader

Abstract

The invention provides a database-based parameter result prediction method, which belongs to the technical field of database testing, supplements the blank aspect of database parameter prediction and function verification in the prior art, and comprises the following steps of: building a prediction analysis database, embedding a prediction analysis model into the prediction analysis database, and performing function verification on the prediction analysis model. Parameters are analyzed through the prediction analysis model, judgment is made according to the analysis result after the parameters are analyzed, and the accuracy of intelligent prediction of the database is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database testing, and in particular to a method for predicting parameter results based on a database. Background Art

[0002] Background technology In the IOT scenario, intelligent sensor devices will continuously generate massive heterogeneous data. The ultimate demand of users for these data management is to dig out and extract useful knowledge to assist decision-making and improve the quality of business operations, such as improving production efficiency. Based on the above needs, in today's IoT where machine learning is generally used as a basic capability, a machine learning prediction and analysis engine is built on the basis of the timing engine to provide users with prediction and analysis capabilities. According to statistics, only a few companies have completed their projects within one year. The important reason why these projects failed to land is that they only focus on how to train machine learning models and ignore how to use the models effectively, that is, they ignore the consumability of the models. The lack of consumability has brought losses to enterprises and also affected the willingness of enterprises to expand machine learning applications. There are a limited number of people with data science backgrounds, and even fewer application developers with this ability. The deployment, development and operation and maintenance services for machine learning models require application developers to master the basic knowledge of machine learning and have a deep understanding of the machine learning framework and data preprocessing tools and APIs used by the models to be deployed. However, most companies do not have enough application developers with these skills. Summary of the invention

[0003] In order to solve the above technical problems, the present invention provides a method for predicting parameter results based on a database.

[0004] The technical solution of the present invention is:

[0005] A method for predicting parameter results based on a database, embedding a predictive analysis model into the predictive analysis database, analyzing the parameters through the predictive analysis model, and making judgments based on the analysis results after analyzing the parameters, thereby improving the accuracy of intelligent prediction of the database.

[0006] The user imports the model training pipeline through SQL calls to the import pipeline function, and the model training pipeline will be saved in the specified test table of the database; the user calls the train model function through SQL to initiate the model training job; the model training pipeline and metadata are sent to the training service through a request; the training service constructs the model training job and starts the model training task; the model training task will run in the service; the model training task is responsible for loading training data, loading user logic for data preprocessing, loading user logic training models, and evaluating model performance; the training service calls the import model function to save the model to the specified test table of the database; the user calls the view model function through SQL to view the machine learning model; the user calls the set active version function through SQL to deploy a specific version of the machine learning model; the user calls the evaluate model function through SQL to initiate the model evaluation job (a separate evaluation process after model training); the user calls the batch prediction function through SQL to initiate the batch prediction job; similar to the training job, the model evaluation and batch prediction jobs will run in separate services, the results of the evaluation job will be saved in the specified data evaluation table of the database, and the results of the batch prediction job will be saved in the user-specified test table, and the results of these two jobs are also saved through the SQL interface.

[0007] Import the prediction model by calling the import function through SQL, and the model will be saved in the specified test table of the database; the newly imported model will automatically call the set version active function to deploy; the user calls the set version active function through SQL to update the active version of the prediction model; the user calls the online prediction function through SQL to initiate the model online prediction request; the model metadata request is sent to the inference service; the inference service checks and deploys the KaiwuDB model; the inference service calls the interface to complete the online prediction; the online prediction result is returned to the prediction engine; the online prediction result is returned to the caller of the prediction function. The user views the prediction result through SQL call;

[0008] If an exception or error is detected, the log is recorded and the operation is rolled back, and then the Error Code is returned to the SQL client; if there is no exception or error, a request is sent to the training / inference service, and the training / inference service processes the request; if an exception or error is detected, the log is recorded and the error information is returned to the prediction engine, and the prediction engine records the log and rolls back the operation, and then returns the Error Code to the SQL client; if there is no exception or error, a prediction job is created or online prediction is performed; during job processing or online prediction, if an exception or error is detected, it is returned to the prediction engine, which handles the error and returns; if there is no exception or error, the prediction engine returns to the SQL client.

[0009] The beneficial effects of the present invention are

[0010] Through the database application interface (such as calling SOL through JDBC or ODBC), application developers do not need to learn machine learning framework development, nor do they need to set up additional development environments with different development languages, which reduces the development threshold of artificial intelligence projects. The data transmission path of online prediction is optimized, the response time of online prediction is shortened, and the performance is improved. The authentication and authorization system consistent with the database is used to improve security. The parameters are analyzed through the predictive analysis model. After the parameters are analyzed, judgments are made based on the analysis results to improve the accuracy of database intelligent prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a schematic diagram of the workflow of the present invention. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0013] Compared with traditional, higher-level machine learning services, database predictive analysis engines have the following three advantages: First, databases are the cornerstone of every enterprise's informatization. Using databases to directly build predictive analysis engines and provide SQL-based machine learning capability calls can effectively improve the consumability of machine learning services and simplify enterprise machine learning model deployment, management, and operation and maintenance. Second, machine learning calculations are closely integrated with data to significantly improve model training and reasoning efficiency. Third, multiple machine learning participants are brought together on a unified collaboration platform.

[0014] The present invention provides a method for predicting parameter results based on a database. The user enters the test database IP address, port, user name, password and other parameters into the tool. Then the prediction engine tool calls the connection module to access the database. The database verifies the information and returns a success mark. It should be noted that the provided user name and password need to have ROOT permissions in the database so that the corresponding data table and the authorized user have corresponding permissions.

[0015] The user calls the import pipeline function through SQL to import the training model training pipeline. The model training pipeline will be saved in the corresponding table of the K database. The user calls the training model function through SQL to initiate the model training job. The model training pipeline and metadata are sent to the training service through the request. The training service constructs the model training job and starts the model training task. The model training task is responsible for loading the training data, loading the user logic for data preprocessing, loading the user logic training model, and evaluating the model performance. The import model function is called to save the model to the corresponding table of the training database. The user calls the view model function through SQL to view the machine learning model, and deploys a specific version of the machine learning model by setting the active spot function. The function can also be used to initiate model evaluation jobs and batch prediction jobs.

[0016] When users train models, the newly imported models will automatically call function deployment; users call functions through SQL to update the active version of the training model, initiate model online prediction requests through prediction functions, and send model metadata to the prediction service through requests. The prediction service checks and deploys the training model, and the prediction service calls the interface to complete the online prediction. The online prediction results are returned to the caller of the prediction function.

[0017] The prediction tool will prompt the user to submit the required content in a wizard manner, then generate the parameters required by the SOL function and execute the SOL function. If the user needs to directly use the SOL function to import the model, implement the corresponding interface in the model file and data preprocessing script, and package the model file and data preprocessing script into a zip file as required. Generate a JSON file that describes the model features and target format, and then import it using any development tool that supports SOL execution.

[0018] Train the model by calling the train model function. Train the model will return the ID of the task created for model evaluation. The task status can be viewed through the SQL function. After the task is completed, the evaluation results can be viewed through the view model function. If a model with the same name already exists, the trained model will become the new version of the model. The model parameter must be specified as true, otherwise the train model function will return an error code. If you want the trained model to take effect immediately, the parameter must be specified as true, otherwise the effective model version must be specified by setting the model active version later. Evaluate the data by evaluating the model. Evaluate the model will return the ID of the task created for model evaluation. The task status can be viewed through the model function. After the task is completed, the evaluation results can be viewed through the model display function. Prepare the data required for model prediction and pass it in through the prediction function in the application. The prediction results will be in the result set of the query containing the prediction function. Prepare the data required for model prediction and store it in the database table. Then, predict the data in the input table or the input query result set by calling the batch function. The prediction results will be stored in the output table specified by the user. You can call the view model function to view the specified model. The model information returned includes basic information such as model name and description, model input and output mode, model performance, etc. By deleting the specified model through the delete function, all versions of the model will be deleted. You can call the view pipeline function to view the specified training pipeline; the returned training pipeline information includes basic information such as the training pipeline name and description, and the input and output modes of the training pipeline.

[0019] Users can view the information of a specified job through the View Job function. The returned job information includes the job ID, job status, job start time, job end time, etc. When a job runs for too long or occupies too many system resources, the job can be canceled. A running job can be canceled through the Cancel Job function. When a job's running history is no longer needed, the job can be deleted. When a model or training pipeline is deleted, the related jobs will be deleted in cascade. A stopped job can be deleted through the Delete Job function. After completing the parameter prediction, the prediction results are saved in the specified table of the database.

[0020] The above description is only a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, and is not used to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for predicting parameter results based on a database, characterized in that: Build a predictive analysis database, embed a predictive analysis model into the predictive analysis database, analyze the parameters through the predictive analysis model, and after analyzing the parameters, make judgments based on the analysis results.

2. The method according to claim 1, characterized in that The user calls the import pipeline function through SQL to import the model training pipeline, and the model training pipeline is saved in the specified test table of the database; The user initiates a model training job by calling the training model function through SQL.

3. The method according to claim 2, characterized in that The model training pipeline and metadata are sent to the training service via a request; The training service constructs a model training job and starts the model training task; The model training task will run in the service; The model training task is responsible for loading training data, loading user logic for data preprocessing, loading user logic training models, and evaluating model performance; The training service calls the import model function to save the model to the specified test table in the database.

4. The method according to claim 3, characterized in that Users view machine learning models by calling the View Model function through SQL; Users deploy a specific version of the machine learning model by calling the Set Active Version function through SQL; The user initiates a model evaluation job by calling the evaluation model function through SQL; The user initiates a batch prediction job by calling the batch prediction function through SQL.

5. The method according to claim 4, characterized in that Model evaluation and batch prediction jobs will run in separate services. The results of the evaluation job will be saved in the specified data evaluation table of the database, and the results of the batch prediction job will be saved in the user-specified test table. The results of these two jobs are also saved through the SQL interface.

6. The method according to claim 4 or 5, characterized in that: Import the prediction model by calling the import function through SQL, and the model is saved in the specified test table of the database; The newly imported model automatically calls the set version active function deployment; The user calls the set version active function through SQL to update the active version of the prediction model; The user initiates a model online prediction request by calling the online prediction function through SQL; Model metadata request is sent to the inference service; The inference service checks and deploys the KaiwuDB model; The inference service calls the interface to complete online prediction; The online prediction results are returned to the prediction engine; The online prediction result is returned to the caller of the prediction function.

7. The method according to claim 6, characterized in that Users view prediction results through SQL calls.

8. The method according to claim 6 or 7, characterized in that: If an exception or error is detected, the log is recorded and the operation is rolled back, and the Error Code is returned to the SQL client; If there is no exception or error, the request is sent to the training / inference service, which processes the request.

9. The method according to claim 6 or 7, characterized in that: If an exception or error is detected, the error information is recorded in the log and returned to the prediction engine. The prediction engine records the log and rolls back the operation, and then returns the Error Code to the SQL client. If there are no exceptions or errors, a prediction job is created or online prediction is performed; During job processing or online prediction, if an exception or error is detected, it is returned to the prediction engine, which handles the error and returns; If there are no exceptions or errors, it is returned by the prediction engine to the SQL client.