Data change detection method and device

By performing syntax detection and backup database data change operations on database change requests, calculating task execution time and performance detection results, and generating detection results, the problem that the existing technology cannot detect database changes in advance is solved, the detection accuracy is improved, the error rate is reduced, and the normal operation of the database is ensured.

CN119576955APending Publication Date: 2025-03-07JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411708343.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The prior art cannot effectively detect database changes in advance, resulting in the inability to ensure the normal operation of the database.

Method used

By calling the syntax rule database, syntax detection of data change requests is determined, and data change operations are performed based on the data of the backup database, task execution time and performance detection results are calculated, and data change results are generated.

Benefits of technology

The detection process before the database changes is realized, the accuracy of the detection results is improved, the error rate of data changes is reduced, and the normal operation of the database is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576955A_ABST
    Figure CN119576955A_ABST
Patent Text Reader

Abstract

The invention discloses a data change detection method and device, and relates to the technical field of computers. A specific embodiment of the method comprises the steps of performing grammar detection based on a data change request, performing data change of a backup library corresponding to a to-be-changed database based on a grammar detection result, performing calculation of task execution time based on the data obtained by change, and performing performance detection in combination with the data obtained by change and the data of the backup library, and synthesizing the grammar detection result and the performance detection result to generate a final data change detection result. According to the implementation mode, the influence generated by the data change operation is detected in advance, meanwhile, grammar detection can be carried out on the data change request, normal proceeding of the data change operation is guaranteed, and the error rate is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for detecting data changes. Background Art

[0002] At present, databases, as an important component of various systems, play a vital role in providing various business services. When managing the database, it is necessary to detect and analyze the change operations of common structured query language (SQL) statements to ensure the normal operation of the database and avoid problems such as database failure caused by the change. Static SQL analysis tools are often used to detect the change operations of SQL statements. Static SQL analysis tools detect the syntax of SQL statements and can identify potential coding problems. However, the above methods cannot pre-detect the changes in the database and cannot ensure the normal operation of the database. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a method and device for detecting data changes, which can implement a detection process for database data changes before the database is changed, thereby ensuring the normal operation of the database.

[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for detecting data changes is provided, comprising:

[0005] Based on the data change request, the grammar rule library is called to perform grammar detection on the data change request to obtain a grammar detection result, which includes the data information to be changed and the data change type;

[0006] Determine the database to be changed according to the data information to be changed, and obtain the data of the backup library corresponding to the database;

[0007] According to the data change type, the data is changed based on the data information to be changed and the data in the backup library to obtain the data of the changed database;

[0008] Calculate the task execution time based on the data in the changed database and the data change request;

[0009] Determine task execution data based on task execution time, data of the change database and data of the backup database, and generate performance test results based on the task execution data;

[0010] A data change detection result is generated based on the syntax detection result and the performance detection result.

[0011] Optionally, the method further comprises:

[0012] Determine the data table to be changed based on the data information to be changed;

[0013] Determine the changed data in the changed data table based on the data in the changed database;

[0014] Generate data range detection results based on the changed data table and changed data;

[0015] The data change detection result is updated based on the data range detection result.

[0016] Optionally, the method further comprises:

[0017] Determine the changed fields of the database according to the data information to be changed;

[0018] Generate business process detection results based on the business information corresponding to the changed fields;

[0019] Update the detection results of data changes based on the business process detection results.

[0020] Optionally, the task execution time is calculated based on the data of the changed database and the data change request, including:

[0021] Based on the data change type in the data change request, calculate the change complexity of the data change request;

[0022] The task execution time is calculated based on the change complexity and the data in the change database.

[0023] Optionally, the task execution time is calculated based on the change complexity and the data of the change database, including:

[0024] Determining the amount of changed data based on the changed data table in the data of the changed database;

[0025] Calculate the initial execution time based on the amount of data changed and the preset single data processing time;

[0026] Calculate the task execution time based on the initial execution time and the change complexity.

[0027] Optionally, the method further comprises:

[0028] A visual inspection report is generated based on the inspection results of data changes, so that users can provide optimization suggestions based on the inspection report, and a technical inspection report is generated based on the optimization suggestions and data inspection results.

[0029] Optionally, the method further comprises:

[0030] Before determining the database to be changed according to the data information to be changed, determining that the grammar check result indicates that there is no grammar error; and,

[0031] In response to the grammar check result indicating a grammar error, a correction suggestion is generated based on a grammar rule base, so that the user can modify the data change request based on the correction suggestion, and a performance check is performed based on the modified data change request.

[0032] According to another aspect of an embodiment of the present invention, a data change detection device is provided, comprising:

[0033] A detection module is used to call a grammar rule library to perform grammar detection on the data change request based on the data change request to obtain a grammar detection result;

[0034] An acquisition module, configured to acquire data of a backup library corresponding to the database in response to a grammar detection result indicating that there is no grammar error;

[0035] The change module is used to change the data based on the data change request and the data in the backup library to obtain the data of the changed database;

[0036] A calculation module, used for calculating the task execution time based on the data of the change database and the data change request;

[0037] A generation module, used to generate performance test results based on task execution data, where the task execution data is determined based on task execution time, data of a change database, and data of a backup library;

[0038] The generation module is also used to generate data change detection results based on the syntax detection results and the performance detection results.

[0039] According to another aspect of an embodiment of the present invention, there is provided an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the data change detection method provided by an embodiment of the present invention.

[0040] According to another aspect of an embodiment of the present invention, a computer readable medium is provided, on which a computer program is stored. When the program is executed by a processor, the method for detecting data changes provided by an embodiment of the present invention is implemented.

[0041] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the data change detection method provided by an embodiment of the present invention is implemented.

[0042] An embodiment of the above invention has the following advantages or beneficial effects: it is capable of determining the database to be changed according to a data change request, and performing data change operations by generating a backup library of the database; it is capable of implementing performance detection based on the acquired changed database data in combination with the data change request, and at the same time, it is capable of generating detection result data based on the data change request in combination with the syntax detection result of the data change request, thereby ensuring the normal operation of the database; it is capable of performing data change operation detection based on the backup library before executing the change operation on the database, thereby greatly improving the accuracy of the detection result and helping to reduce the error rate of the data change operation.

[0043] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0045] Figure 1 is a schematic diagram of main steps of a method for detecting data changes according to an embodiment of the present invention;

[0046] Figure 2 is a schematic diagram of main modules of a data change detection device according to an embodiment of the present invention;

[0047] Figure 3 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0048] Figure 4 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0049] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0050] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution disclosed in the present invention are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.

[0051] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0052] Figure 1 FIG. 1 is a schematic diagram of the main steps of a method for detecting a change in data allocation according to an embodiment of the present invention. Figure 1 As shown, the data change detection method of the embodiment of the present invention mainly includes the following steps S101 to S106.

[0053] Step S101: Based on the data change request, a grammar rule library is called to perform grammar detection on the data change request to obtain a grammar detection result, which includes data information to be changed and a data change type.

[0054] Receive a data change request, which contains the SQL change statement to be executed input by the user, describing how to change the database data. For the SQL change statement, call the grammar rule library to perform grammar analysis on it, detect the grammatical errors therein, and obtain the detection result. Among them, the detection result is the data information to be changed and the data change type determined based on the SQL statement. The data information to be changed specifically includes data tables and fields, and the data change type is, for example, adding data, deleting data, modifying data, etc.

[0055] Optionally, the grammar rule library is pre-established data, including the following aspects. Naming specifications: naming specifications for libraries, tables, and fields; table design specifications: reasonable use of field types, such as specifying time types, prohibiting the use of TEXT (digital format conversion function) and BLOB (large binary object function), etc.; index specifications: standardizing the reasonable number of indexes, index efficiency, and index failure scenarios; SQL specifications: writing format, SQL performance, and recommended writing methods; behavior specifications: database data manipulation language (Data Manipulation Language, DML) and database model definition language (Data Definition Language, DDL) operation specifications. Among them, the SQL recommended writing method can generate corresponding modification suggestions for non-standard SQL statements.

[0056] Step S102, determining the database to be changed according to the data information to be changed, and acquiring the data of the backup library corresponding to the database.

[0057] According to the data information to be changed obtained by parsing the SQL statement, the database to be changed for executing the SQL statement can be determined, and the data of the backup library corresponding to the database can be obtained. Specifically, it can be achieved by capturing a snapshot of the database to be changed, obtaining the table structure, index, storage data volume and other information of the database through the snapshot, and generating a backup library.

[0058] Step S103, according to the data change type, the data is changed based on the data information to be changed and the data in the backup library to obtain the data of the changed database.

[0059] Based on the data change type and the data information to be changed, SQL statements are used to perform data change operations on the data in the backup database to obtain the data in the changed backup database.

[0060] Optionally, the SQL statement and the data of the backup database may be input as input parameters to the performance predictor, and the performance predictor performs a data change operation on the backup database to obtain the data of the changed database for subsequent performance analysis.

[0061] Step S104: Calculate the task execution time based on the data in the changed database and the data change request.

[0062] The task execution time of the change task is calculated based on the data in the change database and the data change request. Specifically, the task execution time is calculated based on the amount of data in the change database, the preset processing time of each data and the data change request.

[0063] Optionally, the difficulty of the data change operation can be determined based on the data change request, and the task execution time is calculated by combining the amount of data in the changed database and the preset processing time of each data.

[0064] Step S105 , determining the task execution data based on the task execution time, the data of the change database and the data of the backup library, and generating a performance detection result based on the task execution data.

[0065] The task execution data is determined based on the task execution time, the data of the changed database and the data of the backup library, including the row locks, table locks, task execution time and changed data involved in the data change process. And the performance test results are further generated based on the task execution data. For example, whether each data is normal, such as the task execution time is short, the row locks are less occupied, and the performance test result is that the impact on database performance is small. Among them, the performance test results can be described in other ways, as long as they can describe the performance impact caused by the above data, and there is no limitation on this.

[0066] Step S106: Generate a data change detection result based on the syntax detection result and the performance detection result.

[0067] The final data change detection result is generated by combining the syntax detection result and the performance detection result. The data change detection result data can be displayed through a visual interface.

[0068] According to the data change detection method provided by the embodiment of the present invention, the database to be changed can be determined according to the data change request, and the data change operation can be performed by generating a backup library of the database. The performance detection can be realized according to the acquired changed database data in combination with the data change request, and the detection result data based on the data change request can be generated in combination with the syntax detection result of the data change request, thereby ensuring the normal operation of the database. Before executing the change operation on the database, the data change operation can be detected based on the backup library, which greatly improves the accuracy of the detection result and helps to reduce the error rate of the data change operation.

[0069] Optionally, the method also includes: determining the changed data table based on the data information to be changed; determining the changed data in the changed data table based on the data of the changed database; generating a data range detection result based on the changed data table and the changed data; and updating the data change detection result based on the data range detection result. In addition to performance detection, the data range affected by the data change operation can also be detected. Determine the changed data table based on the data of the changed database, and the changed data in the changed data table. Further, generate the detection result of the data range affected by this change operation based on the changed data table and the changed data in the table. For example, the detection result can be that 3 data tables are affected this time, and a total of 1,000 data are affected, or it can specifically include the name of the affected data table, and the row number of the data in the data table, etc.

[0070] Optionally, the data scope may be changed by parsing the data change request and determining the data table and the data in the data table that will be affected by the data change in combination with the database backup library.

[0071] The data change detection method provided in the embodiment of the present invention can determine the data scope affected by the data change request based on the data of the changed database and generate corresponding detection results, which helps to obtain multi-faceted data change detection results and improve detection accuracy.

[0072] Optionally, the method further includes: determining the changed fields of the database according to the data information to be changed; generating business process detection results based on the business information corresponding to the changed fields; and updating the detection results of the data change based on the business process detection results. Determine the changed fields in the changed data table according to the data information to be changed, determine the business process affected by the change operation based on the business information contained in the annotation of the changed fields, and generate corresponding business process detection results. Add the business process detection results to the detection results of the data change.

[0073] The data change detection method provided in the embodiment of the present invention can determine the changed fields based on the changed data information, and further determine the business processes affected by the data change request, thereby improving the accuracy of detection and facilitating subsequent targeted optimization.

[0074] Optionally, the task execution time is calculated based on the data in the changed database and the data change request, including: calculating the change complexity of the data change request based on the data change type in the data change request; and calculating the task execution time based on the change complexity and the data in the changed database. When calculating the task execution time, the calculation can be performed according to the complexity of the change operation. Specifically, the complexity is calculated according to the data change type in the data change request. For example, the correspondence between each change type and the corresponding complexity value can be pre-set, and the complexity of the data change request can be determined based on the parsed data change type and the correspondence. Determine the amount of data in the changed database, and calculate the task execution time based on the preset processing time of a single piece of data and the complexity of the change request. Among them, the complexity of the change request can be regarded as a weight value, which is used to describe the difficulty of the change operation.

[0075] Optionally, a method for calculating complexity is as follows: the initial complexity score is 0, the operation type of each step in the data change request is parsed, the complexity score of each step is determined according to the operation type, and the sum of the complexity scores of all steps is summarized as the complexity of the data change request. In addition, the complexity score needs to be increased according to the return value of the scalar function (Cardinality). For example, if the return value is greater than 1000, the complexity score is +5, if it is less than or equal to 1000 and greater than 100, the complexity score is +3, otherwise +1. Optionally, the complexity score needs to be increased according to the length of the SQL statement in the request. For example, the complexity score is +1 for every 100 increase in length.

[0076] Optionally, calculating the task execution time based on the complexity of the change and the data of the changed database includes: determining the amount of changed data based on the changed data table in the data of the changed database; calculating the initial execution time based on the amount of changed data and the preset single data processing time; calculating the task execution time based on the initial execution time and the complexity of the change. Calculate the product of the amount of changed data a and the preset single data processing time b as the initial execution time, normalize the complexity score to obtain c, multiply a, b, c and the preset safety factor f to obtain the final task execution time t. The calculation formula for t is: t=a*b*c*f. Among them, the role of the preset safety factor is to reserve buffer time to obtain the most accurate detection result.

[0077] The data change detection method provided in the embodiment of the present invention can perform data change operations on the data in the backup library based on the data change request, calculate the change complexity based on the change operation result, further calculate the task execution time, and finally obtain accurate performance detection results.

[0078] Optionally, the method further includes: generating a visual inspection report based on the detection results of the data change, so that the user can provide optimization suggestions based on the inspection report, and generating a technical inspection report based on the optimization suggestions and the data inspection results. A visual inspection report is generated based on the obtained data change inspection results so that the user can understand the impact of the change operation, and make corresponding optimization suggestions based on the report, so that the database can be better changed and the error rate can be reduced.

[0079] Optionally, the method further includes: before determining the database to be changed according to the data information to be changed, determining that the grammar detection result indicates that there is no grammar error; and, in response to the grammar detection result indicating that there is a grammar error, generating a correction suggestion based on the grammar rule base, so that the user can modify the data change request based on the correction suggestion, and perform a performance test based on the modified data change request. When performing grammar detection, if the detection result indicates that there is a grammar error, a corresponding correction suggestion is generated based on the grammar rule base, providing the user with a modification basis, so that the user can modify the data change request, and perform a performance test based on the modified data change request.

[0080] According to the data change detection method provided by the embodiment of the present invention, it is possible to implement syntax detection of data change requests through a syntax rule library to obtain corresponding syntax detection results, and execute data change operations through a backup library corresponding to the acquired database to obtain corresponding changed database data, and implement performance detection, impact data range detection, and impact business process detection based on the data to obtain the final detection results, generate a visual report for user browsing, improve the accuracy of the detection results, including syntax detection and detection of the impact of change operations before the change operation, ensure the normal operation of the database, and avoid the error rate of database changes.

[0081] Figure 2 is a schematic diagram of a data change detection device 200 provided in an embodiment of the present invention, such as Figure 2 As shown, the data change detection device 200 of the embodiment of the present invention includes:

[0082] The detection module 201 is used to call the grammar rule library to perform grammar detection on the data change request based on the data change request to obtain a grammar detection result;

[0083] An acquisition module 202 is used to acquire data of a backup library corresponding to the database in response to a grammar detection result indicating that there is no grammar error;

[0084] The change module 203 is used to change the data based on the data change request and the data in the backup library to obtain the data of the changed database;

[0085] A calculation module 204, used to calculate the task execution time based on the data in the change database and the data change request;

[0086] A generating module 205, for generating a performance test result based on the task execution data, where the task execution data is determined based on the task execution time, the data of the change database and the data of the backup library;

[0087] The generating module 205 is further used to generate a detection result of data change based on the syntax detection result and the performance detection result.

[0088] The data change detection device provided in an embodiment of the present invention can determine the database to be changed according to the data change request, perform data change operations by generating a backup library of the database, and realize performance detection based on the acquired changed database data in combination with the data change request. At the same time, combined with the syntax detection result of the data change request, detection result data based on the data change request is generated, thereby ensuring the normal operation of the database. Before executing the change operation on the database, the data change operation can be detected based on the backup library, which greatly improves the accuracy of the detection result and helps to reduce the error rate of the data change operation.

[0089] Optionally, the device also includes: a determination module 206 (not shown in the figure), which is used to determine the changed data table based on the data information to be changed; determine the changed data in the changed data table based on the data of the changed database; a generation module 205, which is used to generate a data range detection result based on the changed data table and the changed data; and an update module 207 (not shown in the figure), which is used to update the data change detection result based on the data range detection result.

[0090] Optionally, the device also includes: a determination module 206 (not shown in the figure), which is used to determine the changed fields of the database based on the data information to be changed; a generation module 205, which is used to generate business process detection results based on the business information corresponding to the changed fields; and an update module 207 (not shown in the figure), which is used to update the detection results of data changes based on the business process detection results.

[0091] Optionally, the calculation module 204 is further used to: calculate the change complexity of the data change request based on the data change type in the data change request; and calculate the task execution time based on the change complexity and the data in the change database.

[0092] Optionally, the calculation module 204 is also used to: determine the amount of changed data based on the changed data table in the data of the changed database; calculate the initial execution time based on the amount of changed data and the preset single data processing time; calculate the task execution time based on the initial execution time and the change complexity.

[0093] Optionally, the device further includes: a generating module 205, which is used to generate a visual detection report based on the detection result of the data change, so that the user can provide optimization suggestions based on the detection report, and generate a technical detection report based on the optimization suggestions and the data detection result.

[0094] Optionally, the device also includes: a determination module 206 (not shown in the figure), which is also used to determine that the grammar check result indicates no grammatical errors before determining the database to be changed based on the data information to be changed; and a generation module 205, which is used to generate correction suggestions based on the grammar rule base in response to the grammar check result indicating a grammatical error, so that the user can modify the data change request based on the correction suggestions, and perform performance testing based on the modified data change request.

[0095] The data change detection device provided in accordance with the embodiment of the present invention can implement syntax detection of data change requests through a syntax rule library to obtain corresponding syntax detection results, and execute data change operations through a backup library corresponding to the acquired database to obtain corresponding changed database data, and implement performance detection, impact data range detection, and impact business process detection based on the data to obtain the final detection results, generate a visual report for user browsing, improve the accuracy of the detection results, including syntax detection and detection of the impact of change operations before the change operation, ensure the normal operation of the database, and avoid the error rate of database changes.

[0096] Figure 3 An exemplary system architecture 300 is shown to which the data change detection method or data change detection apparatus according to the embodiments of the present invention can be applied.

[0097] like Figure 3 As shown, the system architecture 300 may include terminal devices 301, 302, 303, a network 304 and a server 305. The network 304 is used to provide a medium for communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0098] Users can use terminal devices 301, 302, 303 to interact with server 305 through network 304 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 301, 302, 303, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).

[0099] The terminal devices 301 , 302 , and 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.

[0100] The server 305 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 301, 302, and 303. The backend management server may analyze and process the received data such as the detection request, and feed back the processing result (such as the detection report - only an example) to the terminal device.

[0101] It should be noted that the data change detection method provided in the embodiment of the present invention is generally executed by the server 305 , and accordingly, the data change detection device is generally set in the server 305 .

[0102] It should be understood that Figure 3 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0103] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 of a terminal device or a server suitable for implementing an embodiment of the present invention. Figure 4 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0104] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0105] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.

[0106] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present invention are executed.

[0107] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0108] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0109] The units or modules involved in the embodiments of the present invention may be implemented in software or hardware. The units or modules described may also be arranged in a processor. For example, they may be described as: a processor includes a detection module, an acquisition module, a change module, a calculation module, and a generation module. The names of these units or modules do not, in some cases, constitute limitations on the units or modules themselves. For example, the detection module may also be described as "a module that, based on a data change request, calls a grammar rule library to perform grammar detection on a data change request and obtains a grammar detection result."

[0110] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes:

[0111] Based on the data change request, the grammar rule library is called to perform grammar detection on the data change request to obtain a grammar detection result, which includes the data information to be changed and the data change type;

[0112] Determine the database to be changed according to the data information to be changed, and obtain the data of the backup library corresponding to the database;

[0113] According to the data change type, the data is changed based on the data information to be changed and the data in the backup library to obtain the data of the changed database;

[0114] Calculate the task execution time based on the data in the changed database and the data change request;

[0115] Determine task execution data based on task execution time, data of the change database and data of the backup database, and generate performance test results based on the task execution data;

[0116] A data change detection result is generated based on the syntax detection result and the performance detection result.

[0117] According to the technical solution of the embodiment of the present invention, the database to be changed can be determined according to the data change request, and the data change operation can be performed by generating a backup library of the database. The performance detection can be implemented according to the acquired changed database data in combination with the data change request, and the detection result data based on the data change request is generated in combination with the syntax detection result of the data change request, thereby ensuring the normal operation of the database. Before executing the change operation on the database, the data change operation can be detected based on the backup library, which greatly improves the accuracy of the detection result and helps to reduce the error rate of the data change operation.

[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting data changes, characterized in that: include: Based on the data change request, calling a grammar rule library to perform grammar detection on the data change request to obtain a grammar detection result, wherein the grammar detection result includes data information to be changed and a data change type; Determine the database to be changed according to the data information to be changed, and obtain the data of the backup library corresponding to the database; According to the data change type, the data is changed based on the data information to be changed and the data in the backup library to obtain the data of the changed database; Calculating task execution time based on the data in the change database and the data change request; Determining task execution data based on the task execution time, the data in the change database and the data in the backup database, and generating a performance detection result based on the task execution data; A data change detection result is generated based on the syntax detection result and the performance detection result.

2. The method according to claim 1, characterized in that: The method further comprises: Determine the data table to be changed based on the data information to be changed; Determine the changed data in the changed data table based on the data in the changed database; Based on the changed data table and the changed data, generating a data range detection result; The data change detection result is updated based on the data range detection result.

3. The method according to claim 2, characterized in that The method further comprises: Determine the changed fields of the database according to the data information to be changed; Generate a business process detection result based on the business information corresponding to the changed field; The detection result of the data change is updated based on the business process detection result.

4. The method according to any one of claims 1 to 3, characterized in that: The calculating the task execution time based on the data in the changed database and the data change request includes: Calculating the change complexity of the data change request based on the data change type in the data change request; The task execution time is calculated based on the change complexity and data in the change database.

5. The method according to claim 4, characterized in that The data calculation task execution time based on the change complexity and the change database includes: Determining the amount of changed data based on a changed data table in the data of the change database; Calculate the initial execution time based on the amount of data changed and the preset single data processing time; The task execution time is calculated based on the initial execution time and the change complexity.

6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: A visual inspection report is generated based on the inspection results of the data changes, so that the user can provide optimization suggestions based on the inspection report, and a technical inspection report is generated based on the optimization suggestions and the data inspection results.

7. The method according to claim 1, characterized in that The method further comprises: Before determining the database to be changed according to the data information to be changed, determining that the grammar detection result indicates that there is no grammar error; and, In response to the grammar check result indicating a grammar error, a correction suggestion is generated based on the grammar rule base, so that the user can modify the data change request based on the correction suggestion, and a performance check is performed based on the modified data change request.

8. A data change detection device, characterized in that: include: A detection module, configured to call a grammar rule library to perform grammar detection on the data change request based on the data change request, and obtain a grammar detection result; An acquisition module, configured to acquire data of a backup library corresponding to the database in response to the grammar detection result being that there is no grammar error; A change module, used to change the data based on the data change request and the data of the backup library, and obtain the data of the changed database; A calculation module, used for calculating the task execution time based on the data in the change database and the data change request; A generating module, used to generate a performance detection result based on task execution data, wherein the task execution data is determined based on the task execution time, the data of the change database and the data of the backup database; The generating module is further used to generate a detection result of data change based on the grammar detection result and the performance detection result.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable 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 7 is implemented.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.