A method and device for predicting key tables in business scenarios

By obtaining and processing business application information and SQL execution-related information, selecting and training business scenario key table prediction models, the risk problem that relies on experience prediction in business scenario testing is solved, and accurate prediction and risk avoidance of key tables are achieved.

CN113393047BActive Publication Date: 2025-05-06INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110698937.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-23
Publication Date
2025-05-06
Estimated Expiration
2041-06-23

AI Technical Summary

Technical Problem

During the acceptance and testing process of the business system, testers rely on experience prediction to conduct performance testing, which makes it difficult to fully cover business scenarios, and poses great risks.

Method used

By obtaining the application information of the business to be predicted and SQL execution related information, selecting the corresponding business scenario key table prediction model, performing feature engineering processing, inputting the model, and generating business scenario key table.

Benefits of technology

It realizes accurate prediction of key tables in database business scenarios, ensures that all key tables are covered in the test stage, risk warnings are provided, and the normal operation of the business system is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113393047B_ABST
    Figure CN113393047B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for predicting key tables of business scenarios, which can be applied to the field of artificial intelligence. The method includes: obtaining application information of the business to be predicted in the current scenario and execution-related information during the execution of the business to be predicted. Select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set based on the application information and execution-related information. After feature engineering processing, the application information and execution-related information are input into the business scenario key table prediction model to obtain the business scenario key table. Through the machine learning model, the function of predicting the key tables in the database business scenario is finally realized. By predicting the analysis of the key tables in the historical business path, the key tables of the new business can be accurately predicted, ensuring that all key tables are covered in the test phase, and risk warnings are given to ensure the normal commissioning and operation of the business system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of artificial intelligence technology, and specifically, relates to a method and device for predicting key tables in business scenarios. Background Art

[0002] Under the new wave of financial technology changes, the banking industry has gradually become online and scenario-based, and new businesses are emerging in an endless stream. How to meet the growing business needs and ensure the stable production and operation of business systems has become a major challenge for current financial technology.

[0003] In the acceptance test phase of the business system, testers need to conduct simulated business tests in the test environment in advance. During the test, database performance issues are a major pain point in performance testing. Performance tests for new businesses are mostly based on experience and are first predicted and then tested. However, business innovation and R&D are rapidly iterating, and simply conducting performance scenario tests based on experience will be extremely risky. It is difficult to fully cover business scenarios for performance testing, but forcing full coverage will increase the workload. Summary of the invention

[0004] The present application provides a method and device for predicting key tables in a business scenario, so as to at least solve the risk problem caused by relying on experience-based prediction in current business scenario testing.

[0005] According to a first aspect of the present application, a business scenario key table prediction method is provided, comprising:

[0006] Obtain application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted.

[0007] According to the application information and SQL execution related information, the corresponding business scenario key table prediction model is selected from the pre-established business scenario key table prediction model set.

[0008] The application information and SQL execution related information are processed by feature engineering and then input into the business scenario key table prediction model to obtain the business scenario key table.

[0009] In one embodiment, a training method for a business scenario key table prediction model includes:

[0010] Obtain training data from key tables of historical business scenarios. The training data includes application information and SQL execution related information.

[0011] Preprocess the training data.

[0012] Use the preprocessed training data to train the pre-built business scenario key table prediction model.

[0013] In one embodiment, preprocessing the training data includes:

[0014] Perform feature derivation on the time dimension of the training data to obtain time features.

[0015] Perform feature derivation on the statistical dimension of the training data to obtain statistical features.

[0016] Generate feature data based on time features and statistical features.

[0017] In one embodiment, the pre-constructed business scenario key table prediction model is trained using the pre-processed training data, including:

[0018] The feature data is input into the business scenario key table prediction model and the business scenario key table prediction model is trained through the hyperparameter adjustment method.

[0019] In one embodiment, the training method of the business scenario key table prediction model further includes:

[0020] Use the trained business scenario key table prediction model to generate prediction results.

[0021] Evaluate whether the forecast results meet the forecast requirements.

[0022] In one embodiment, evaluating whether the prediction result meets the prediction requirement includes:

[0023] Calculate several error values ​​between the forecast results and the forecast demand.

[0024] Calculate the average error value based on several error values.

[0025] The relationship between the average error value and the preset threshold is used to determine whether the prediction requirements are met.

[0026] According to a second aspect of the present application, a business scenario key table prediction device is also provided, including:

[0027] An information acquisition unit, used to acquire application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted;

[0028] A model selection unit, used to select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to application information and SQL execution related information;

[0029] The business scenario key table prediction unit is used to perform feature engineering processing on application information and SQL execution related information and then input them into the business scenario key table prediction model to obtain the business scenario key table.

[0030] In one embodiment, the business scenario key table prediction device further includes a business scenario key table prediction model training device, including:

[0031] A training data acquisition unit is used to acquire training data from key tables of historical business scenarios. The training data includes application information and SQL execution related information.

[0032] A preprocessing unit, used for preprocessing training data;

[0033] The training unit is used to train the pre-built business scenario key table prediction model using the pre-processed training data.

[0034] In one embodiment, the pre-processing unit comprises:

[0035] The time feature extraction module is used to derive features from the time dimension of the training data to obtain time features;

[0036] The statistical feature extraction module is used to derive features from the statistical dimensions of the training data to obtain statistical features;

[0037] The feature data acquisition module is used to generate feature data according to time features and statistical features.

[0038] In one embodiment, the training unit comprises:

[0039] The hyperparameter adjustment training module is used to input feature data into the business scenario key table prediction model and train the business scenario key table prediction model through the hyperparameter adjustment method.

[0040] In one embodiment, the training device of the business scenario key table prediction model further includes:

[0041] A prediction result generation module is used to generate prediction results using the trained business scenario key table prediction model;

[0042] The evaluation module is used to evaluate whether the prediction results meet the prediction requirements.

[0043] In one embodiment, the evaluation module includes:

[0044] An error value calculation module is used to calculate several error values ​​between the prediction result and the prediction demand;

[0045] An average error calculation module, used for calculating an average error value based on a number of error values;

[0046] The demand judgment module is used to judge whether the forecast demand is met based on the size relationship between the average error value and the preset threshold.

[0047] According to the third aspect of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the business scenario key table prediction method when executing the program.

[0048] According to a fourth aspect of the present application, a computer-readable storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the business scenario key table prediction method are implemented.

[0049] It can be seen from the above technical solution that the present application provides a method and device for predicting key tables in business scenarios, and the method includes: obtaining application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted; selecting the corresponding business scenario key table prediction model from the pre-established business scenario key table prediction model set according to the application information and SQL execution related information; and inputting the application information and SQL execution related information into the business scenario key table prediction model to obtain the business scenario key table. Through the machine learning model, the historical data is pre-processed and used as training data to train the model, and finally the function of predicting the key tables in the database business scenario is realized. By predicting the analysis of the key tables in the historical business path, the key tables of the new business can be accurately predicted, ensuring that all key tables are covered in the test phase, and risk warnings are issued to ensure the normal commissioning and operation of the business system. Not only that, by analyzing the transaction paths in the historical business scenarios, the key tables in the new business scenarios are predicted, and the key factors faced by the new business tests are prepared. Without changing the test environment, adding test processes, or affecting the test architecture, we can avoid test risks and provide accurate estimates of key tables, which can effectively control test risks, improve test quality, and provide strong guarantees for the stable operation of business systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 A flow chart of a prediction method for a key table of a business scenario provided in this application.

[0052] Figure 2 This is a training method for the business scenario key table prediction model in the embodiment of the present application.

[0053] Figure 3This is a flow chart of a method for preprocessing training data in an embodiment of the present application.

[0054] Figure 4 This is a flow chart of the evaluation method of the business scenario key table prediction model in the embodiment of the present application.

[0055] Figure 5 This is a flow chart of the forecasting demand assessment method in an embodiment of the present application.

[0056] Figure 6 This is a structural block diagram of a prediction device for a business scenario key table provided in this application.

[0057] Figure 7 This is a decoupled block diagram of a training device for a business scenario key table prediction model in an embodiment of the present application.

[0058] Figure 8 This is a structural block diagram of the preprocessing unit in an embodiment of the present application.

[0059] Fig. 9 This is an evaluation diagram of the business scenario key table prediction model in the embodiment of the present application.

[0060] Fig.10 Schematic diagram of the evaluation module in the embodiment of the present application.

[0061] Fig.11 This is a specific implementation of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] It should be noted that the method and device for predicting key tables for business scenarios disclosed in this application can be used in the field of artificial intelligence technology, and can also be used in any field outside the field of artificial intelligence technology. This application does not limit the application field of the disclosed method and device for predicting key tables for business scenarios.

[0064] In the acceptance test phase of the business system, testers need to conduct simulated business tests in the test environment in advance. During the test, database performance issues are a major pain point in performance testing. Performance tests for new businesses are mostly based on experience and are first predicted and then tested. However, business innovation and R&D are rapidly iterating, and simply conducting performance scenario tests based on experience will be extremely risky. It is difficult to fully cover business scenarios for performance testing, but forcing full coverage will increase the workload.

[0065] Based on this, it is necessary to establish a method for predicting key tables in business scenarios through machine learning technology, which can analyze the transaction paths in historical business scenarios and predict key tables in new business scenarios. Without changing the test environment, increasing the test process, and affecting the test architecture, test risk avoidance and accurate prediction of key tables can be provided, which can effectively control test risks and improve test quality.

[0066] The present application provides a prediction method for key tables of business scenarios, a prediction device for key tables of business scenarios, an electronic device and a computer-readable medium. Through a machine learning model, the historical data is pre-processed and used as training data to train the model, and finally the function of predicting key tables in database business scenarios is realized. The key tables of new businesses can be accurately predicted by analyzing the key tables in the predicted historical business paths, ensuring that all key tables are covered in the test phase, and risk warnings are given to ensure the normal commissioning and operation of the business system. Not only that, by analyzing the transaction paths in historical business scenarios, the key tables in new business scenarios are predicted, and the key factors faced by new business testing are prepared to be grasped. Without changing the test environment, increasing the test process, and affecting the test architecture, test risk avoidance is performed, and accurate estimates of key tables are provided, which can effectively control test risks, improve test quality, and provide strong guarantees for the stable operation of business systems.

[0067] Based on the above content, the present application also provides a prediction device for a business scenario key table for implementing the prediction method for a business scenario key table provided in one or more embodiments of the present application. The prediction device for the business scenario key table can communicate with the client device by itself or through a third-party server, and return the execution result to the client to achieve the technical effect of predicting the key table.

[0068] It is understandable that the client device may include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Among them, the smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.

[0069] In another practical application scenario, the part of the prediction of the business scenario key table by the prediction device of the aforementioned business scenario key table can be executed in the server as described above, or all operations can be completed in the client device. The specific selection can be based on the processing capability of the client device and the limitations of the user's usage scenario. This application is not limited to this. If all operations are completed in the client device, the client device may also include a processor for specific processing of the prediction of the business scenario key table.

[0070] The client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and other implementation scenarios may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster consisting of multiple servers, or a server structure of a distributed device.

[0071] The server and the client device may communicate with each other using any suitable network protocol, including network protocols that have not yet been developed on the date of filing this application. The network protocols may include, for example, TCP / IP, UDP / IP, HTTP, HTTPS, etc. Of course, the network protocols may also include, for example, RPC (Remote Procedure Call Protocol) and REST (Representational State Transfer) protocols used on top of the above protocols.

[0072] The details are described in detail through the following embodiments and application examples.

[0073] This application provides a prediction method for a key table of a business scenario, such as Figure 1 As shown, including:

[0074] S101: Acquire application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted.

[0075] S102: Select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to application information and SQL execution related information.

[0076] S103: Perform feature engineering on the application information and SQL execution related information and input them into the business scenario key table prediction model to obtain the business scenario key table.

[0077] In a specific embodiment, the present application can be divided into two parts, namely, the training part of the business scenario key table prediction model and the prediction part of the business scenario key table prediction model. The hardware and hardware functions included in these two parts are introduced below:

[0078] The business scenario key table prediction model training part is composed of an application information collection device, a SQL statement execution related information collection device in the business scenario, a machine learning model training device, and a key table prediction model storage device in the business scenario. The business scenario key table prediction model prediction part is composed of a business application information collection device, a SQL statement execution related information collection device in the business scenario, and a key table prediction device in the business scenario.

[0079] The business application information collection device is responsible for collecting business application type information in historical business scenarios, and the collected information serves as input to the machine learning model training device.

[0080] The device for collecting information related to the execution of SQL statements in business scenarios is responsible for using the relevant information of SQL execution during business transactions as input to the machine learning model training device.

[0081] The machine learning model training device is responsible for using multiple machine learning models to train the machine learning models according to the input business application information and SQL statement execution related information, and generate different machine learning models.

[0082] The business scenario key table prediction model storage device is responsible for storing the model trained by the machine learning model training device.

[0083] The business application information collection device is composed of an application name collection unit, a business scenario type collection unit, a channel type collection unit, and a service type collection unit. The business scenario type collection unit information includes but is not limited to: smart government affairs, public services, smart business districts, community properties, transportation, group enterprises, etc. The application name collection unit information includes but is not limited to risk control applications, marketing applications, decision-making applications, product applications, business management applications, etc. The channel type collection unit information includes but is not limited to mobile banking, smart counters, corporate online banking, personal online banking, smart marketing, smart customer service, etc. The service type collection unit includes but is not limited to application transaction services, application component services, business object services, technical services, etc.

[0084] The SQL execution related information collection device is composed of a SQL execution related table name collection unit, a SQL operation type collection unit, and a SQL execution time collection unit. The SQL execution related table name collection unit information includes the table name involved in the transaction during the transaction process. The SQL operation type collection unit information includes but is not limited to select, update, delete, etc. The SQL execution time collection unit information mainly records the SQL execution time.

[0085] The business application key table information storage device is composed of a plurality of groups of application key table recording units and application non-key table recording units.

[0086] The machine learning model training device consists of a feature engineering unit, a hyperparameter adjustment and training unit, and a model evaluation unit. The feature engineering unit is responsible for performing feature engineering processing on the training data collected by the application information collection device and the SQL related information collection device, including but not limited to finding the maximum value, minimum value, average value, variance, information entropy, and bag-of-words encoding, unique hot encoding, Word2Vec word vector encoding, etc. for encoding natural language.

[0087] The hyperparameter adjustment and training unit is responsible for adjusting and training the model parameters. The model evaluation unit is responsible for evaluating the prediction results of the model. If the error requirements are met, the model is output. If the error requirements are not met, the model is retrained.

[0088] In one embodiment, if Figure 2 As shown, the training method of the business scenario key table prediction model includes:

[0089] S201: Acquire training data from key tables of historical business scenarios, where the training data includes application information and SQL execution related information.

[0090] S202: Preprocess the training data.

[0091] S203: Use the preprocessed training data to train a pre-built business scenario key table prediction model.

[0092] In one embodiment, the training data is preprocessed, such as Figure 3 As shown, including:

[0093] S301: deriving features from the time dimension of the training data to obtain time features.

[0094] S302: deriving features from the statistical dimensions of the training data to obtain statistical features.

[0095] S303: Generate feature data according to the time feature and the statistical feature.

[0096] In one embodiment, the pre-constructed business scenario key table prediction model is trained using the pre-processed training data, including:

[0097] The feature data is input into the business scenario key table prediction model and the business scenario key table prediction model is trained through the hyperparameter adjustment method.

[0098] In one embodiment, if Figure 4 As shown, the training method of the business scenario key table prediction model also includes:

[0099] S401: Generate prediction results using the trained business scenario key table prediction model.

[0100] S402: Evaluate whether the prediction results meet the prediction requirements.

[0101] In one embodiment, the prediction result is evaluated to see whether it meets the prediction requirements, such as Figure 5 As shown, including:

[0102] S501: Calculate several error values ​​between the prediction result and the prediction demand.

[0103] S502: Calculate an average error value based on a plurality of error values.

[0104] S503: Determine whether the prediction requirement is met based on the relationship between the average error value and a preset threshold.

[0105] In a specific embodiment, firstly, an application information collection device is used to record the hardware information, hardware usage information, software information, and execution information of the environment in which the current SQL statement is located to form training data 1; then, an SQL-related information collection device is used to record the hardware information, hardware usage information, software information, and execution information of the environment in which the current SQL statement is located to form training data 2; a business application key table information storage device is used to record the key tables of the current application in the transaction process as label data.

[0106] Before starting model training, use the feature engineering unit in the model training device to process the features of training data 1 and training data 2. Specifically, the commonly used processing method is the feature derivation of the time dimension and the statistical dimension. Use the hyperparameter adjustment and training unit to train the features processed by the feature engineering unit. The commonly used model is the Lightgbm model, and the hyperparameter adjustment methods used are grid search and random search. Use the model evaluation unit to evaluate the model to determine whether it meets the prediction requirements. Generally, the average error of the prediction results within 30% can be considered to basically meet the requirements. The model that meets the requirements is delivered to the business scenario key table prediction model storage device for storage.

[0107] To store the model obtained through model training, it is necessary to clearly record the model training time, model training environment, and model evaluation results, so as to select the corresponding model for training according to different scenarios.

[0108] Finally, the application information collection device is used to record the application information of the business to be predicted in the current scenario, and the SQL statement execution related information collection device is used to record the SQL execution related information in the process of the business to be predicted. The business scenario key table prediction model storage device is used to select the corresponding model, input the collected information after feature engineering processing, and carry out prediction.

[0109] Based on the same inventive concept, the embodiments of the present application also provide a prediction device for a business scenario key table, which can be used to implement the method described in the above embodiments, as described in the following embodiments. Because the principle of solving the problem by the prediction device for the business scenario key table is similar to the prediction method for the business scenario key table. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0110] According to another aspect of the present application, a business scenario key table prediction device is also provided, such as Figure 6 As shown, including:

[0111] The information acquisition unit 601 is used to acquire application information of the service to be predicted in the current scenario and SQL execution related information during the execution of the service to be predicted;

[0112] A model selection unit 602 is used to select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to application information and SQL execution related information;

[0113] The business scenario key table prediction unit 603 is used to perform feature engineering processing on the application information and SQL execution related information and then input them into the business scenario key table prediction model to obtain the business scenario key table.

[0114] In a specific embodiment, the present application can be divided into two parts, namely, the training part of the business scenario key table prediction model and the prediction part of the business scenario key table prediction model. The hardware and hardware functions included in these two parts are introduced below:

[0115] The business scenario key table prediction model training part is composed of an application information collection device, a SQL statement execution related information collection device in the business scenario, a machine learning model training device, and a key table prediction model storage device in the business scenario. The business scenario key table prediction model prediction part is composed of a business application information collection device, a SQL statement execution related information collection device in the business scenario, and a key table prediction device in the business scenario.

[0116] The business application information collection device is responsible for collecting business application type information in historical business scenarios, and the collected information serves as input to the machine learning model training device.

[0117] The device for collecting information related to the execution of SQL statements in business scenarios is responsible for using the relevant information of SQL execution during business transactions as input to the machine learning model training device.

[0118] The machine learning model training device is responsible for using multiple machine learning models to train the machine learning models according to the input business application information and SQL statement execution related information, and generate different machine learning models.

[0119] The business scenario key table prediction model storage device is responsible for storing the model trained by the machine learning model training device.

[0120] The business application information collection device is composed of an application name collection unit, a business scenario type collection unit, a channel type collection unit, and a service type collection unit. The business scenario type collection unit information includes but is not limited to: smart government affairs, public services, smart business districts, community properties, transportation, group enterprises, etc. The application name collection unit information includes but is not limited to risk control applications, marketing applications, decision-making applications, product applications, business management applications, etc. The channel type collection unit information includes but is not limited to mobile banking, smart counters, corporate online banking, personal online banking, smart marketing, smart customer service, etc. The service type collection unit includes but is not limited to application transaction services, application component services, business object services, technical services, etc.

[0121] The SQL execution related information collection device is composed of a SQL execution related table name collection unit, a SQL operation type collection unit, and a SQL execution time collection unit. The SQL execution related table name collection unit information includes the table name involved in the transaction during the transaction process. The SQL operation type collection unit information includes but is not limited to select, update, delete, etc. The SQL execution time collection unit information mainly records the SQL execution time.

[0122] The business application key table information storage device is composed of a plurality of groups of application key table recording units and application non-key table recording units.

[0123] The machine learning model training device consists of a feature engineering unit, a hyperparameter adjustment and training unit, and a model evaluation unit. The feature engineering unit is responsible for performing feature engineering processing on the training data collected by the application information collection device and the SQL related information collection device, including but not limited to finding the maximum value, minimum value, average value, variance, information entropy, and bag-of-words encoding, unique hot encoding, Word2Vec word vector encoding, etc. for encoding natural language.

[0124] The hyperparameter adjustment and training unit is responsible for adjusting and training the model parameters. The model evaluation unit is responsible for evaluating the prediction results of the model. If the error requirements are met, the model is output. If the error requirements are not met, the model is retrained.

[0125] In one embodiment, the business scenario key table prediction device also includes a business scenario key table prediction model training device, such as Figure 7 As shown, including:

[0126] A training data acquisition unit 701 is used to acquire training data from a historical business scenario key table, where the training data includes application information and SQL execution related information;

[0127] A preprocessing unit 702, used for preprocessing the training data;

[0128] The training unit 703 is used to train the pre-built business scenario key table prediction model using the pre-processed training data.

[0129] In one embodiment, if Figure 8 As shown, the pre-processing unit 702 includes:

[0130] The time feature extraction module 801 is used to derive features from the time dimension of the training data to obtain time features;

[0131] The statistical feature extraction module 802 is used to derive features from the statistical dimensions of the training data to obtain statistical features;

[0132] The feature data acquisition module 803 is used to generate feature data according to time features and statistical features.

[0133] In one embodiment, the training unit 703 includes:

[0134] The hyperparameter adjustment training module is used to input feature data into the business scenario key table prediction model and train the business scenario key table prediction model through the hyperparameter adjustment method.

[0135] In one embodiment, if Fig. 9 As shown, the training device of the business scenario key table prediction model also includes:

[0136] A prediction result generation module 901 is used to generate prediction results using the trained business scenario key table prediction model;

[0137] The evaluation module 902 is used to evaluate whether the prediction result meets the prediction requirements.

[0138] In one embodiment, if Fig.10 As shown, the evaluation module 902 includes:

[0139] The error value calculation module 1001 is used to calculate a number of error values ​​between the prediction result and the prediction demand;

[0140] An average error calculation module 1002, used to calculate an average error value according to a plurality of error values;

[0141] The demand determination module 1003 is used to determine whether the forecast demand is met based on the size relationship between the average error value and a preset threshold.

[0142] In a specific embodiment, firstly, an application information collection device is used to record the hardware information, hardware usage information, software information, and execution information of the environment in which the current SQL statement is located to form training data 1; then, an SQL-related information collection device is used to record the hardware information, hardware usage information, software information, and execution information of the environment in which the current SQL statement is located to form training data 2; a business application key table information storage device is used to record the key tables of the current application in the transaction process as label data.

[0143] Before starting model training, use the feature engineering unit in the model training device to process the features of training data 1 and training data 2. Specifically, the commonly used processing method is the feature derivation of the time dimension and the statistical dimension. Use the hyperparameter adjustment and training unit to train the features processed by the feature engineering unit. The commonly used model is the Lightgbm model, and the hyperparameter adjustment methods used are grid search and random search. Use the model evaluation unit to evaluate the model to determine whether it meets the prediction requirements. Generally, the average error of the prediction results within 30% can be considered to basically meet the requirements. The model that meets the requirements is delivered to the business scenario key table prediction model storage device for storage.

[0144] To store the model obtained through model training, it is necessary to clearly record the model training time, model training environment, and model evaluation results, so as to select the corresponding model for training according to different scenarios.

[0145] Finally, the application information collection device is used to record the application information of the business to be predicted in the current scenario, and the SQL statement execution related information collection device is used to record the SQL execution related information in the process of the business to be predicted. The business scenario key table prediction model storage device is used to select the corresponding model, input the collected information after feature engineering processing, and carry out prediction.

[0146] The method and device provided in this application use a machine learning model to pre-process historical data and then use it as training data to train the model, ultimately achieving the function of predicting key tables in database business scenarios. By predicting the analysis of key tables in historical business paths, key tables of new businesses can be accurately predicted, ensuring that all key tables are covered during the test phase, and risk warnings are provided to ensure the normal commissioning and operation of the business system. Not only that, by analyzing the transaction paths in historical business scenarios, key tables in new business scenarios are predicted, and the key factors faced by new business testing are prepared to be grasped. Without changing the test environment, increasing the test process, and affecting the test architecture, test risk avoidance is performed, and accurate estimates of key tables are provided, which can effectively control test risks, improve test quality, and provide strong guarantees for the stable operation of business systems.

[0147] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0148] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0149] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0151] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

[0152] The embodiments of the present application also provide a specific implementation of an electronic device that can implement all the steps in the method in the above embodiments, see Fig.11 , the electronic device specifically includes the following contents:

[0153] Processor 1101, memory 1102, communication interface 1103, bus 1104 and non-volatile memory 1105;

[0154] The processor 1101, memory 1102, and communication interface 1103 communicate with each other via the bus 1104;

[0155] The processor 1101 is used to call the computer program in the memory 1102 and the non-volatile memory 1105. When the processor executes the computer program, all the steps in the method in the above embodiment are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0156] S101: Acquire application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted.

[0157] S102: Select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to application information and SQL execution related information.

[0158] S103: Perform feature engineering on the application information and SQL execution related information and input them into the business scenario key table prediction model to obtain the business scenario key table.

[0159] The embodiments of the present application also provide a computer-readable storage medium capable of implementing all the steps of the method in the above embodiments. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all the steps of the method in the above embodiments are implemented. For example, when the processor executes the computer program, the following steps are implemented:

[0160] S101: Acquire application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted.

[0161] S102: Select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to application information and SQL execution related information.

[0162] S103: Perform feature engineering on the application information and SQL execution related information and input them into the business scenario key table prediction model to obtain the business scenario key table.

[0163] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. Although the embodiment of this specification provides the method operation steps described in the embodiment or flow chart, more or less operation steps can be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such a process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the embodiments of this specification, the functions of each module can be implemented in the same one or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units. The device embodiments described above are only schematic. For example, the division of the 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 coupling or direct coupling or communication connection between each other 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. The present invention is described with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the process and / or box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process Figure 1 A process or multiple processes and / or boxes Figure 1A device for specifying functions in a box or multiple boxes. It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts refer to the partial description of the method embodiment. In the description of this specification, the description of the reference term "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction. The above description is only an embodiment of the embodiment of this specification and is not intended to limit the embodiment of this specification. For those skilled in the art, the embodiment of this specification may have various changes and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the embodiment of this specification shall be included in the scope of the claims of the embodiment of this specification.

Claims

1. A business scenario key table prediction method, characterized in that: include: Obtain application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted, where application information includes application name, business scenario type, channel type, and service type; SQL execution related information includes table name involved in SQL execution, SQL operation type, and SQL execution time; Selecting a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to the application information and the SQL execution related information; The application information and the execution related information are subjected to feature engineering processing and then input into the business scenario key table prediction model to obtain the business scenario key table.

2. The business scenario key table prediction method according to claim 1, characterized in that: The training methods for business scenario key table prediction models include: Acquire training data from a historical business scenario key table, wherein the training data includes application information and execution related information; Preprocessing the training data; The preprocessed training data is used to train a pre-built business scenario key table prediction model.

3. The business scenario key table prediction method according to claim 2 is characterized in that: The preprocessing of the training data comprises: Performing feature derivation on the time dimension of the training data to obtain a time feature; Performing feature derivation on the statistical dimension of the training data to obtain statistical features; Generate feature data according to the time feature and the statistical feature.

4. The business scenario key table prediction method according to claim 3 is characterized in that: The using the preprocessed training data to train a pre-built business scenario key table prediction model includes: The feature data is input into the business scenario key table prediction model and the business scenario key table prediction model is trained through a hyperparameter adjustment method.

5. The business scenario key table prediction method according to claim 4 is characterized in that: The training method of the business scenario key table prediction model also includes: Generate prediction results using the trained business scenario key table prediction model; Evaluate whether the prediction results meet the prediction requirements.

6. The business scenario key table prediction method according to claim 5, characterized in that: The evaluating whether the prediction result meets the prediction requirement includes: Calculating a plurality of error values ​​between the prediction result and the prediction demand; Calculate an average error value based on a number of error values; The relationship between the average error value and the preset threshold is used to determine whether the prediction requirements are met.

7. A business scenario key table prediction device, characterized in that: include: An information acquisition unit, used to acquire application information of the business to be predicted in the current scenario and SQL execution related information during the execution of the business to be predicted, wherein the application information includes application name, business scenario type, channel type and service type, and the SQL execution related information includes table name involved in SQL execution, SQL operation type and SQL execution time; A model selection unit, configured to select a corresponding business scenario key table prediction model from a pre-established business scenario key table prediction model set according to the application information and the execution related information; A business scenario key table prediction unit is used to perform feature engineering processing on the application information and the execution related information and then input them into the business scenario key table prediction model to obtain a business scenario key table.

8. The business scenario key table prediction device according to claim 7, characterized in that: Also included is a training device for a business scenario key table prediction model, including: A training data acquisition unit, used to acquire training data from a historical business scenario key table, wherein the training data includes application information and execution related information; A preprocessing unit, used for preprocessing the training data; The training unit is used to train a pre-built business scenario key table prediction model using the pre-processed training data.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the business scenario key table prediction method described in any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the business scenario key table prediction method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Vehicle insurance data test method and device, test platform and vehicle insurance test system

    CN110489325A

  • Business data processing method and device and server

    CN111738852A