A database change risk assessment method and device

By analyzing the database version package and obtaining indicator data in the test environment, and generating database change risk assessment results, the problem of impact assessment of database table structure changes in the banking business system is solved, risk assessment and early warning are realized, and system stability and availability are improved.

CN113535688BActive Publication Date: 2024-12-20INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110866761.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2024-12-20
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

In the banking business system, the application database table volume is large and the monitoring difficulty is increased. If the impact of the database table structure change is not evaluated, especially when large or hot tables are involved, the change time is too long, which will seriously affect the use of the system user, resulting in stability and Availability is challenged.

Method used

Provide a database change risk assessment method and device. By analyzing the database version package in a test environment, obtaining change attributes and indicator data, inputting them into a preset evaluation model, and generating database change risk assessment results, including change attributes and time-consuming relatedness. , and provide reference and basis for subsequent changes.

Benefits of technology

It realizes risk assessment and early warning before version changes in the production environment, avoids the risks of uncertainty in database changes and production, and improves the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113535688B_ABST
    Figure CN113535688B_ABST
Patent Text Reader

Abstract

A database change risk assessment method and device provided by the present invention can be used in the field of artificial intelligence. The present invention obtains a database change risk assessment result through a preset assessment model combined with the current change attributes analyzed under a test environment, thereby achieving effective management and visual query of historical database change information, and providing reference and basis for subsequent changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a database change risk assessment method and device. Background Art

[0002] With the development of the financial Internet industry, the functions of banking business systems have gradually increased. At present, there are tens of thousands of application database tables in the production and operation environment of banking business systems. At the same time, changes in financial business needs and business system changes are becoming more and more frequent. When the system version is put into production, the frequency of changes in the business-related database table structure is gradually increasing, such as deleting table fields and modifying indexes. When the database table structure change operation is put into production without stopping the whole bank's production and operation environment, the read and write requests may be blocked due to table locking, and the user's access to the banking business system function will continue to be affected. The large number of application database tables makes monitoring more difficult. If the impact of database table structure changes is not evaluated before the function is put into production, especially when large tables and hot tables are involved, the change time is too long, which will seriously affect the use of system users when it is put into production, and the stability and availability of the system are greatly challenged. Therefore, it is necessary to accurately evaluate the data change time of each application system and their corresponding database tables when they are put into production in the test environment to avoid production risks. Summary of the invention

[0003] The large number of application database tables makes monitoring more difficult, but the existing technology lacks corresponding evaluation technology. If the impact of database table structure changes is not evaluated before the function is put into production, especially when large tables and hot tables are involved, the change time is too long, which will seriously affect the use of system users when it is put into production, and the stability and availability of the system are greatly challenged. The present invention provides a database change risk assessment method and device, which obtains the database change risk assessment result through a preset evaluation model combined with the current change attributes obtained by analysis under a test environment, realizes effective management and visual query of historical database change information, and provides reference and basis for subsequent changes.

[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0005] A first aspect of the present invention provides a database change risk assessment method, comprising:

[0006] Parse the database version package in the test environment to obtain the current change attributes of each application system;

[0007] Acquire the index data of each application database of the production operation system according to the changed attributes;

[0008] The indicator data is input into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation.

[0009] In a preferred embodiment, the current change attributes include: change table name, change field name and database table change type; correspondingly, the database version package is parsed in the test environment to obtain the current change attributes of each application system, including:

[0010] The database version package is parsed in the test environment to obtain the changed table name, changed field name and database table change type of each application system.

[0011] In a preferred embodiment, the database version package is parsed in the test environment to obtain the change table name, change field name and database table change type of each application system, including:

[0012] Decompiling the database version package to obtain an original change database schema definition language statement;

[0013] Extracting the changed table name and the changed field name in the original changed database schema definition language statement;

[0014] The original change database schema definition language statement is parsed by using a regular expression to obtain a database table change type.

[0015] In a preferred embodiment, the indicator data includes: production data capacity, number of table records and index capacity information; correspondingly, the indicator data of each application database of the production operation system is obtained according to the change attribute, including:

[0016] The production data capacity, number of table records and index capacity information of the corresponding table names of each application database of the production operation system are obtained according to the changed table name, changed field name and database table change type.

[0017] In a preferred embodiment, the method further includes: establishing the evaluation model.

[0018] In a preferred embodiment, the evaluation model includes: a correlation curve between data volume and change duration, and a correlation curve between field length and change duration;

[0019] The establishing of the evaluation model comprises:

[0020] Use the same fixed test environment as production in the test environment;

[0021] Build the initial table;

[0022] Build database stored procedures and functions to insert initial data in batches;

[0023] Create a new table with the same table structure, where the table with the same table structure is a table with the same data volume and different field lengths;

[0024] Based on the same table structure table, execute the database schema definition language statements of all change types and record the change duration;

[0025] A correlation curve between data volume and change duration is generated according to the change duration corresponding to all change types, and a correlation curve between field length and change duration is generated.

[0026] In a preferred embodiment, the initial table includes a non-partitioned table, a partitioned table, and a partitioned table.

[0027] In a preferred embodiment, the initial data is the number of bytes of the line length corresponding to each scene and the fixed characters used in the test.

[0028] A second aspect of the present invention provides a database change risk assessment device, comprising:

[0029] Parsing module: The test environment parses the database version package to obtain the current change attributes of each application system;

[0030] An acquisition module, which acquires the index data of each application database of the production operation system according to the changed attributes;

[0031] The evaluation module inputs the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes a correlation relationship between database change attributes and time-consuming correlation.

[0032] In a third aspect, the present invention provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the database change risk assessment method when executing the program.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the database change risk assessment method when executed by a processor.

[0034] It can be seen from the above technical scheme that the present invention provides a database change risk assessment method and device, which first parses the database version package in a test environment to obtain the current change attributes of each application system; then obtains the indicator data of each application database of the production operation system according to the change attributes; finally, inputs the indicator data into a preset assessment model to obtain a database change risk assessment result, and the assessment model includes the correlation relationship between the database change attributes and the time-consuming correlation. It can be seen that the present invention obtains the database change risk assessment result through the preset assessment model combined with the current change attributes obtained by parsing in the test environment, realizes the effective management and visual query of historical database change information, and provides a reference and basis for subsequent changes. Furthermore, it can accurately locate the change content that may cause timeout problems during production, realize risk assessment and early warning before implementing version changes in the production environment, and avoid the risk of uncertainty in database change production. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] 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 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.

[0036] Figure 1 It is a structural diagram of a database change risk assessment device in an embodiment of the present invention.

[0037] Figure 2 It is a unit structure diagram of the version parsing module in an embodiment of the present invention.

[0038] Figure 3 It is a unit structure diagram of the risk assessment module in an embodiment of the present invention.

[0039] Figure 4 It is a unit structure diagram of the risk management module in an embodiment of the present invention.

[0040] Figure 5 It is a flowchart of a database change risk assessment scenario in an embodiment of the present invention.

[0041] Figure 6 It is a flowchart of a database change risk assessment method in an embodiment of the present invention.

[0042] Figure 7 It is a structural diagram of a database change risk assessment device in an embodiment of the present invention.

[0043] Figure 8 It is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution 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, 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.

[0045] It should be noted that the database change risk assessment method and device disclosed in the present invention can be used in the financial field, and can also be used in any field other than the financial field. The application field of the database change risk assessment method and device disclosed in the present invention is not limited.

[0046] The application database has a large number of tables, which makes monitoring more difficult. If the impact of changes in the database table structure is not evaluated before the function is put into production, especially when large tables and hot tables are involved, the change time will be too long, which will seriously affect the use of system users when it is put into production. The stability and availability of the system are greatly challenged. Therefore, it is necessary to accurately evaluate the data change time of each application system and their corresponding database tables when they are put into production in a test environment to avoid production risks.

[0047] In view of the various loopholes and problems existing in the current technical solutions, and in order to prevent the risk of database table structure changes in the production environment, we propose a method for evaluating the risk of database production changes in advance in the test environment. Through database production version analysis and production database monitoring, the real-time collection and acquisition of information such as database change type and production application table data volume can be achieved; through the change risk assessment model, the collected data change indicator information is analyzed and predicted, and the duration of all application database version changes can be evaluated before production; after simulating the production operation environment through the test environment, the risk change is executed to reproduce the scenario, and the accurate assessment of the duration of the test environment database change can be achieved; through the construction of a risk assessment management system, the effective management and visual query of historical database change information can be achieved, providing reference and basis for subsequent changes. The present invention can also automatically push risk reports to business tests for active risk warnings, and notify production and operation personnel to take risk response and prevention measures, greatly avoiding the risk of uncertainty in database changes and production.

[0048] The present invention provides a method and device for evaluating the risk of database changes provided in one or more embodiments of the present invention, specifically including: parsing the database version package in a test environment to obtain the current change attributes of each application system; obtaining the indicator data of each application database of the production operation system according to the change attributes; inputting the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes the correlation between the database change attributes and the time-consuming correlation. The present invention obtains the database change risk evaluation result through a preset evaluation model in combination with the current change attributes obtained by parsing in a test environment, thereby achieving effective management and visual query of historical database change information, providing reference and basis for subsequent changes, and further, accurately locating the changes that may cause timeout problems during production, achieving risk assessment and early warning before implementing version changes in the production environment, and avoiding the risk of uncertainty in database change production.

[0049] It is understandable that the database change risk assessment device of the present invention may be a server or a mobile terminal, for example, a smart phone, a tablet electronic device, a portable computer, a desktop computer, a personal digital assistant (PDA), a smart wearable device, etc. The smart wearable device may include smart glasses, a smart watch, a smart bracelet, etc.

[0050] The above-mentioned database change risk assessment device has a communication module, which can be connected to the server corresponding to the assessed database to achieve data transmission with the server corresponding to the assessed database.

[0051] The above-mentioned database change risk assessment device and the server corresponding to the assessed database can communicate using any suitable network protocol, including network protocols that have not been developed on the date of submission of the present invention. The network protocol may include, for example, TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above-mentioned protocols.

[0052] The present invention provides a database change risk assessment method and device, which obtains a database change risk assessment result through a preset assessment model combined with the current change attributes analyzed in a test environment, realizes effective management and visual query of historical database change information, and provides reference and basis for subsequent changes. Furthermore, it can accurately locate the change content that may cause timeout problems during production, realize risk assessment and early warning before implementing version changes in the production environment, and avoid the risk of uncertainty in database change production.

[0053] The details are described through the following multiple embodiments and application examples.

[0054] In order to solve the problem that the application database table volume is large and the monitoring difficulty becomes greater, but the existing technology lacks corresponding assessment technology, if the impact of the database table structure change is not assessed before the function is put into production, especially when it involves large tables and hot tables, the change time is too long, which will seriously affect the use of system users during production, and the stability and availability of the system are greatly challenged. The present invention provides an embodiment of a database change risk assessment method, see Figure 6 , specifically including the following contents:

[0055] Step S101: parsing the database version package in the test environment to obtain the current change attributes of each application system.

[0056] Specifically, the current change attributes include: change table name, change field name and database table change type; correspondingly, step S101, that is, parsing the database version package in the test environment to obtain the current change attributes of each application system, includes:

[0057] The database version package is parsed in the test environment to obtain the changed table name, changed field name and database table change type of each application system.

[0058] Step S102: Obtaining index data of each application database of the production operation system according to the change attribute.

[0059] Specifically, the indicator data includes: production data capacity, number of table records and index capacity information; correspondingly, step S102, that is, obtaining the indicator data of each application database of the production operation system according to the change attribute, includes:

[0060] The production data capacity, number of table records and index capacity information of the corresponding table names of each application database of the production operation system are obtained according to the changed table name, changed field name and database table change type.

[0061] Step S103: inputting the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation.

[0062] It can be seen from the above technical scheme that the present invention provides a database change risk assessment method, which obtains the database change risk assessment result through a preset assessment model combined with the current change attributes analyzed under the test environment, thereby realizing effective management and visual query of historical database change information, and providing reference and basis for subsequent changes.

[0063] In order to provide a specific implementation method of the evaluation model, one or more embodiments of the present invention also include: the step of establishing an evaluation model. Of course, it can be understood that the evaluation model can be established online or offline in the present invention, that is, the present invention can establish the evaluation model in advance, and can also establish it in real time as needed, which will not be elaborated here.

[0064] The establishment of the evaluation model of the present invention is described in detail below.

[0065] In some embodiments, the evaluation model includes: a correlation curve between data volume and change duration, and a correlation curve between field length and change duration; in fact, according to the aforementioned current change attributes including: change table name, change field name and database table change type, the computer can determine the production data volume, field length and other information based on the change table, change field and other information.

[0066] In this embodiment, the establishing of the evaluation model includes:

[0067] Use the same fixed test environment as production in the test environment;

[0068] Build the initial table;

[0069] Build database stored procedures and functions to insert initial data in batches;

[0070] Create a new table with the same table structure, where the table with the same table structure is a table with the same data volume and different field lengths;

[0071] Based on the same table structure table, execute the database schema definition language statements of all change types and record the change duration;

[0072] A correlation curve between data volume and change duration is generated according to the change duration corresponding to all change types, and a correlation curve between field length and change duration is generated.

[0073] For example, in the test environment, different DDL change scenarios of non-partitioned tables, columns, indexes, primary keys, foreign keys, and partitioned tables are tested and the change duration is recorded to produce a change duration evaluation model. Below we give the specific construction method and principle.

[0074] 1) Use the same fixed test environment as the production environment in the test environment, mainly including the MYSQL version number, operating system, and write Python scripts for number generation and testing

[0075] 2) Build the initial table, including non-partitioned table, partitioned table (hash), partitioned table (range) and other types.

[0076] 3) Build MySQL stored procedures and functions to batch insert initial data: Use fixed characters for testing to correspond to the row length of each scenario. For example, if the row length of the scenario is 300, insert 300 fixed characters per row; if the row length of the scenario is 700, insert 700 fixed characters per row.

[0077] 4) Create a new table with the same structure and the number of records ranging from 1 to 50,000,000.

[0078] 5) Create a new table with the same table structure, the same amount of data, but different field lengths.

[0079] 6) Based on these tables, execute DDL statements of all change types and record the change duration.

[0080] 7) Obtain the correlation curves between data volume and change duration, and the correlation curves between field length and change duration in more than 20 types of changes.

[0081] Those skilled in the art can understand that the initial table includes a non-partition table, a partition table, and a partition table.

[0082] The specific embodiments of the present invention are described in detail below in conjunction with the computer module.

[0083] like Figure 1 As shown, an evaluation system of an embodiment of the invention includes a version parsing module 1, a data acquisition module 2, a risk evaluation module 3, a test simulation module 4, and a risk management module 5.

[0084] Furthermore, the version parsing module 1 parses the version package in the test environment to obtain the current change DDL, change table name, change field, and change type of each application system, and sends it to the data acquisition module 2. The data acquisition module 2 determines the production data volume, field length, and other information based on the change table, change field, and other information sent by the version parsing module 1, and sends it to the risk assessment module 3. The risk assessment module evaluates the execution time of the database DDL production environment based on the information sent by the data acquisition module 2, and sends it to the test simulation module 4 for processing together with the current version number, change DDL, table name, and other information. The test simulation module 4 simulates the production environment, and obtains the accurate duration of the database change by executing the table change, and finally sends the information to the risk management module 5. The risk management module 5 forms a risk assessment report based on the change duration, change duration, and other information, and sends it to each application person in charge and production support personnel, and supports the effective management and visual query of historical database change information, providing a reference basis for later database changes.

[0085] Table 1 shows the common DDL change types in MySQL database. Different DDL change types have different database change time consumption under different factors such as table data volume and table field length. The present invention conducts evaluation model testing for all DDL change types and different data volumes or field lengths under the same table structure.

[0086] Table 1-DDL change type table in MySQL database

[0087]

[0088] Figure 2 This is a unit structure diagram of the version analysis module 1 of the present invention, such as Figure 2 The version parsing module 1 shown includes a DDL statement parsing generation unit 31 and a change table name parsing unit 32, wherein: the DDL statement parsing generation unit 31: implements decompilation according to the compiled database version package provided by the development center, obtains the original change DDL statement, and sends it to the change table name parsing unit 32 for processing. The change table name parsing unit 32: is used to extract the table name, change type, change field and application name information of the change in the development version package, that is, the DDL statement obtained by the DDL statement parsing production unit 31, extracts the change table name and change field name in the statement, and parses the DDL statement through a regular expression to obtain the database DDL change type. The above information obtained by parsing is annotated with the application name and DDL statement and sent to the data acquisition module 2 for processing.

[0089] Data acquisition module 2: Connect to the production operation system and monitor the production operation system, and then obtain real-time indicators such as the capacity of each application database table of the production operation system through tools such as NAVICATE. The monitoring frequency is once a day. The real-time indicators of the database table obtained include the number of table records (items), data capacity (MB), index capacity (MB), etc. After obtaining the real-time indicators of each application table, combine the table name and table field name obtained by the version analysis module 1 to obtain the production data capacity, number of table records, and index capacity information of the corresponding table name. The above information is packaged with the database change type and other information sent to the data acquisition module 2 by the version analysis module 1 and sent to the risk assessment module 3 for processing.

[0090] Figure 3 is a unit structure diagram of the risk assessment module 3 of the present invention, such as Figure 3 As shown, the risk assessment module 3 includes a risk assessment model building unit 41 and a risk assessment execution unit 42, wherein:

[0091] Risk assessment model construction unit 41: Test different DDL change scenarios of non-partitioned tables, columns, indexes, primary keys, foreign keys and partitioned tables in the test environment and record the change duration to produce a change duration assessment model. Below we give the specific construction method and principle.

[0092] 1) Use the same fixed test environment as the production environment in the test environment, mainly including the MYSQL version number, operating system, and write Python scripts for number generation and testing

[0093] 2) Build the initial table, including non-partitioned table, partitioned table (hash), partitioned table (range) and other types.

[0094] 3) Build MySQL stored procedures and functions to batch insert initial data: Use fixed characters for testing to correspond to the row length of each scenario. For example, if the row length of the scenario is 300, insert 300 fixed characters per row; if the row length of the scenario is 700, insert 700 fixed characters per row.

[0095] 4) Create a new table with the same structure and the number of records ranging from 1 to 50,000,000.

[0096] 5) Create a new table with the same table structure, the same amount of data, but different field lengths.

[0097] 6) Based on these tables, execute DDL statements of all change types and record the change duration.

[0098] 7) Obtain the correlation curves between data volume and change duration, and the correlation curves between field length and change duration in more than 20 types of changes.

[0099] In summary, we summarize the correlation curves of database change time under the influence of different types of DDL scenarios, different data volumes, field lengths and other factors, and build a general evaluation model for subsequent DDL change duration evaluation.

[0100] Execution risk assessment unit 42: used to apply the risk assessment model obtained by the risk assessment model construction unit 31 to process the data change table name, field length, and data volume information sent by the data acquisition module 2, and output the change assessment duration. When the assessment change duration exceeds the set value (for example, 5s, this value is assessed by the tester and the production together), the data acquisition module 2 is noted to transmit the information and sent to the test simulation module 4 for processing. Similarly, when the change duration is less than the set value, it is directly sent to the risk management module 5 for management.

[0101] Test simulation module 4: executes the table name sent by the risk assessment unit 42, builds the same table structure as production and synchronizes the production data volume, executes the change DDL, determines the prepared change execution time, and sends the time information together with the data sent by the execution risk assessment unit 42 to the risk management module 5.

[0102] Figure 4 is a unit structure diagram of the risk management module 5 of the present invention, such as Figure 4 As shown, the risk management module 5 includes a risk problem location unit 51 and a risk DDL management unit 52, wherein:

[0103] Risk problem location unit 51: Based on the DDL change information of large tables and hot tables sent in the test simulation module 4, a risk assessment report and risk warning are formed and automatically pushed to the production change implementation personnel and application testers. The test report should include information such as the change time, change version number, change duration, and risk warning level. Different risk levels are marked with different colors, icons, or texts according to their priority.

[0104] Risk DDL management unit 52: manages DDL with change timeout risk and DDL without risk, and provides visual display, supports query by table name, version number, and risk level, and provides reference for subsequent DDL changes.

[0105] Figure 5This is a flow chart of a database change risk assessment method of the present invention. The version parsing module 1 obtains information such as DDL, table name, change type, and change field by parsing the change version package, and sends it to the risk assessment module 3 together with the production data volume and change field length information obtained in the data acquisition module 2. The implementation change assessment unit in the risk assessment module 3 evaluates the information sent by the data acquisition module 2 and outputs the change duration. If the change duration> the set value, all information is sent to the test simulation module 4. The test simulation module synchronizes the production environment and executes this change to obtain the production change execution duration, and sends it to the risk management module together with all information; if the change time < is less than the set value, it will not pass through the test simulation module 4, and directly send it to the risk management module together with all information. Finally, the risk management module 5 forms a risk assessment report and risk warning, and automatically pushes them to the production change implementation personnel and application testers.

[0106] The present invention provides a database change risk assessment method, which establishes a general method for database version parsing, associating production data information, change risk assessment and early warning, and provides database change risk management, risk assessment and risk early warning for system database testing and production change implementation personnel, thereby achieving accurate assessment of the database version change duration before implementing version changes in the production environment, avoiding change risks during production, and improving system reliability and stability.

[0107] 1. The present invention realizes the real-time collection of risk assessment indicator information: by automatically parsing the execution version package, obtaining indicator information such as the change table name and field name, and real-time collection of production data volume, field length and other information of the change table, inputting the evaluation model, and improving the accuracy of change risk assessment.

[0108] 2. The present invention realizes early warning of risks: The present invention constructs an evaluation model in advance, and by inputting evaluation index information and executing the evaluation model, it can accurately locate the timed DDL changes. Before the change is put into production, potential change risks are discovered, and early warnings and risks are issued to the change executors and testers, which can reduce the emergency safety hazards caused by the timeout of production changes, making the production system changes more robust and reliable.

[0109] 3. The risk management system provided by the present invention supports querying historical database change records by table name, version number, and risk level, providing a reference for subsequent DDL changes and improving the overall quality of production work.

[0110] In order to solve the problem that the application database table volume is large and the monitoring difficulty is increased, but the existing technology lacks corresponding evaluation technology, if the impact of the database table structure change is not evaluated before the function is put into production, especially when it involves large tables and hot tables, the change time is too long, which will seriously affect the use of system users during production, and the stability and availability of the system are greatly challenged. In one or more embodiments of the present invention, the present invention provides a database change risk assessment method and device, such as Figure 7 As shown, including:

[0111] The parsing module 11 parses the database version package in the test environment to obtain the current change attributes of each application system;

[0112] An acquisition module 12 acquires the index data of each application database of the production operation system according to the change attribute;

[0113] The evaluation module 13 inputs the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes a correlation relationship between database change attributes and time-consuming correlation.

[0114] It can be seen from the above technical scheme that the present invention provides a database change risk assessment method and device, which obtains the database change risk assessment result through a preset assessment model combined with the current change attributes analyzed under the test environment, thereby realizing effective management and visual query of historical database change information, and providing reference and basis for subsequent changes.

[0115] Based on the same inventive concept, in a preferred embodiment, the current change attributes include: change table name, change field name and database table change type; correspondingly, the parsing module is specifically used for:

[0116] The database version package is parsed in the test environment to obtain the changed table name, changed field name and database table change type of each application system.

[0117] Based on the same inventive concept, in a preferred embodiment, the parsing module includes:

[0118] A decompilation unit decompiles the database version package to obtain an original change database schema definition language statement;

[0119] An extraction unit extracts a changed table name and a changed field name in the original changed database schema definition language statement;

[0120] The parsing unit parses the original change database schema definition language statement through a regular expression to obtain a database table change type.

[0121] Based on the same inventive concept, in a preferred embodiment, the indicator data includes: production data capacity, number of table records and index capacity information; correspondingly, the acquisition module is specifically used to:

[0122] The production data capacity, number of table records and index capacity information of the corresponding table names of each application database of the production operation system are obtained according to the changed table name, changed field name and database table change type.

[0123] Based on the same inventive concept, in a preferred embodiment, a model building module is also included to build the evaluation model.

[0124] Based on the same inventive concept, in a preferred embodiment, the evaluation model includes: a correlation curve between data volume and change duration, and a correlation curve between field length and change duration;

[0125] The model building module comprises:

[0126] Fixed test environment unit, the test environment uses the same fixed test environment as production;

[0127] An initial table building unit, building an initial table;

[0128] Batch insert units, build database stored procedures and functions, and batch insert initial data;

[0129] A structure table building unit is used to create a table with the same structure, wherein the table with the same structure is a table with the same data volume and different field lengths;

[0130] The recording unit, based on the same table structure table, executes the database schema definition language statements of all change types and records the change duration;

[0131] The generating unit generates a correlation curve between the data volume and the change duration according to the change duration corresponding to all the change types, and generates a correlation curve between the field length and the change duration.

[0132] Based on the same inventive concept, in a preferred embodiment, the initial table includes a non-partition table, a partition table and a partition table.

[0133] Based on the same inventive concept, in a preferred embodiment, the initial data is the number of bytes of the line length corresponding to each scene and the fixed characters used in the test.

[0134] From the hardware level, in order to solve the problem that the application database table volume is large and the monitoring difficulty becomes greater, but the existing technology lacks corresponding evaluation technology, if the impact of the database table structure change is not evaluated before the function is put into production, especially when it involves large tables and hot tables, the change time is too long, which will seriously affect the use of system users during production, and the stability and availability of the system are greatly challenged. The present invention provides an embodiment of an electronic device for implementing all or part of the contents of the database change risk assessment method, and the electronic device specifically includes the following contents:

[0135] Figure 8 FIG. 9 is a schematic block diagram of the device structure of the electronic device 9600 according to an embodiment of the present invention. Figure 8 As shown, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. It is worth noting that Figure 8 is exemplary; other types of structures may also be used to supplement or replace this structure to implement telecommunication functions or other functions.

[0136] In one embodiment, the database change risk assessment method function may be integrated into a central processing unit. The central processing unit may be configured to perform the following control:

[0137] Step S101: parsing the database version package in the test environment to obtain the current change attributes of each application system.

[0138] Step S102: Obtaining index data of each application database of the production operation system according to the change attribute.

[0139] Step S103: inputting the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation.

[0140] It can be seen from the above technical solution that an electronic device provided by the present invention obtains a database change risk assessment result through a preset evaluation model combined with the current change attributes analyzed under a test environment, thereby realizing effective management and visual query of historical database change information, and providing reference and basis for subsequent changes.

[0141] In another embodiment, the server may be configured separately from the central processor 9100. For example, the server may be a chip connected to the central processor 9100, and the function of the database change risk assessment method may be implemented under the control of the central processor.

[0142] like Figure 8As shown, the electronic device 9600 may also include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily have to include Figure 8 In addition, the electronic device 9600 may also include Figure 8 For components not shown, reference may be made to the prior art.

[0143] like Figure 8 As shown, the central processing unit 9100 is sometimes also referred to as a controller or an operation control, and may include a microprocessor or other processor device and / or logic device. The central processing unit 9100 receives input and controls the operation of various components of the electronic device 9600.

[0144] The memory 9140 may be, for example, one or more of a cache, a flash memory, a hard drive, a removable medium, a volatile memory, a non-volatile memory or other suitable devices. The above-mentioned information related to the failure may be stored, and a program for executing the relevant information may also be stored. The CPU 9100 may execute the program stored in the memory 9140 to implement information storage or processing, etc.

[0145] The input unit 9120 provides input to the central processing unit 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used to display display objects such as images and texts. The display may be, for example, an LCD display, but is not limited thereto.

[0146] The memory 9140 may be a solid-state memory, such as a read-only memory (ROM), a random access memory (RAM), a SIM card, etc. It may also be a memory that saves information even when the power is off, can be selectively erased, and is provided with more data, examples of which are sometimes referred to as EPROMs, etc. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142, which is used to store application programs and function programs or processes for executing the operation of the electronic device 9600 through the central processor 9100.

[0147] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for communication functions of the electronic device and / or for executing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0148] The communication module 9110 is a transmitter / receiver 9110 that sends and receives signals via an antenna 9111. The communication module (transmitter / receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, which may be the same as the case of a conventional mobile communication terminal.

[0149] Based on different communication technologies, multiple communication modules 9110 may be provided in the same electronic device, such as a cellular network module, a Bluetooth module and / or a wireless LAN module, etc. The communication module (transmitter / receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide an audio output via the speaker 9131 and receive an audio input from the microphone 9132, thereby realizing a common telecommunication function. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. In addition, the audio processor 9130 is also coupled to the central processor 9100, so that recording can be performed on the local machine through the microphone 9132, and the sound stored on the local machine can be played through the speaker 9131.

[0150] An embodiment of the present invention also provides a computer-readable storage medium capable of implementing all steps of the database change risk assessment method in the above embodiment. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, all steps of the database change risk assessment method in the above embodiment are implemented by the execution subject being a server or a client. For example, when the processor executes the computer program, the following steps are implemented:

[0151] Step S101: parsing the database version package in the test environment to obtain the current change attributes of each application system.

[0152] In the present invention, demand analysis is an essential part of software development. The demand plan is mainly used to clarify the business scenarios, processes, etc. The analysis and understanding of demand documents are crucial for developers. Unclear requirements will lead to code modification or even rewriting. With the increase in the complexity of business logic, the demand for graphical requirements document processes is more urgent.

[0153] Step S102: Obtaining index data of each application database of the production operation system according to the change attribute.

[0154] Step S103: inputting the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation.

[0155] It can be seen from the above technical solution that the computer storage medium provided by the present invention obtains the database change risk assessment result through a preset evaluation model combined with the current change attributes analyzed under the test environment, thereby realizing effective management and visual query of historical database change information, and providing reference and basis for subsequent changes.

[0156] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices, 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.

[0157] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (apparatus), 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 generate 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.

[0158] 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.

[0159] 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 The steps for the functions specified in one or more boxes.

[0160] 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.

Claims

1. A database change risk assessment method, characterized in that: include: Parse the database version package in the test environment to obtain the current change attributes of each application system; Acquire the index data of each application database of the production operation system according to the changed attributes; Inputting the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation; The evaluation model includes: a correlation curve between data volume and change duration, and a correlation curve between field length and change duration; Establishing the evaluation model includes: Use the same fixed test environment as production in the test environment; Build the initial table; Build database stored procedures and functions to insert initial data in batches; Create a new table with the same table structure, where the table with the same table structure is a table with the same data volume and different field lengths; Based on the same table structure table, execute the database schema definition language statements of all change types and record the change duration; A correlation curve between data volume and change duration is generated according to the change duration corresponding to all change types, and a correlation curve between field length and change duration is generated.

2. The database change risk assessment method according to claim 1, characterized in that: The current change attributes include: change table name, change field name and database table change type; correspondingly, the database version package is parsed in the test environment to obtain the current change attributes of each application system, including: The database version package is parsed in the test environment to obtain the changed table name, changed field name and database table change type of each application system.

3. The database change risk assessment method according to claim 2, characterized in that: The database version package is parsed in the test environment to obtain the changed table name, changed field name and database table change type of each application system, including: Decompiling the database version package to obtain an original change database schema definition language statement; Extracting the changed table name and the changed field name in the original changed database schema definition language statement; The original change database schema definition language statement is parsed by using a regular expression to obtain a database table change type.

4. The database change risk assessment method according to claim 2, characterized in that: The indicator data includes: production data capacity, number of table records and index capacity information; correspondingly, the indicator data of each application database of the production operation system is obtained according to the change attribute, including: The production data capacity, number of table records and index capacity information of the corresponding table names of each application database of the production operation system are obtained according to the changed table name, changed field name and database table change type.

5. The database change risk assessment method according to claim 1, characterized in that: The initial table includes a non-partitioned table, a hash partitioned table, and a range partitioned table.

6. The database change risk assessment method according to claim 1, characterized in that: The initial data is the number of bytes of the line length corresponding to each scene and the fixed characters used in the test.

7. A database change risk assessment device, characterized in that: include: Parsing module: The test environment parses the database version package to obtain the current change attributes of each application system; An acquisition module, which acquires the index data of each application database of the production operation system according to the changed attributes; An evaluation module, which inputs the indicator data into a preset evaluation model to obtain a database change risk evaluation result, wherein the evaluation model includes an association relationship between database change attributes and time-consuming correlation; The evaluation model includes: a correlation curve between data volume and change duration, and a correlation curve between field length and change duration; Establishing the evaluation model includes: Use the same fixed test environment as production in the test environment; Build the initial table; Build database stored procedures and functions to insert initial data in batches; Create a new table with the same table structure, where the table with the same table structure is a table with the same data volume and different field lengths; Based on the same table structure table, execute the database schema definition language statements of all change types and record the change duration; A correlation curve between data volume and change duration is generated according to the change duration corresponding to all change types, and a correlation curve between field length and change duration is generated.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.