Data development detection method and system

By comparing and modifying the similarity of SQL statements in data development, combined with automated testing, the problem of poor inspection of the development process in traditional data development is solved, and the development quality and efficiency are improved, and the cost is reduced.

CN119149564APending Publication Date: 2024-12-17JIANGSU KUNSHAN RURAL COMMERCIAL BANK CO LTD

Patent Information

Application Number
CN202411172598.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

Traditional data development technology is difficult to meticulously inspect the development process, resulting in low development quality and difficult to learn from historical development experience, increasing development and testing costs.

Method used

By saving historical SQL statements, compare the similarity between the SQL statements currently required by the current development and the historical statement. If the similarity is high, modify the current statement to form the final statement; if the similarity is low, use the current statement directly and perform automated tests to determine the statement and save the test results for reference.

Benefits of technology

It improves the inspection and management quality of the data development process, reduces development and testing costs, realizes automated testing, and improves development efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_1
    Figure SMS_1
  • Figure SMS_2
    Figure SMS_2
  • Figure SMS_3
    Figure SMS_3
Patent Text Reader

Abstract

The invention relates to a data development detection method and system. When current data development is carried out, a first SQL statement is generated according to the current data development requirement; querying a historical SQL statement having the same data source table as the first SQL statement, and comparing the first SQL statement with the historical SQL statement having the same data source table; if the character string similarity between the first SQL statement and the historical SQL statement is greater than or equal to a similarity threshold value, modifying the first SQL statement based on a character string different from the first SQL statement in the historical SQL statement, so as to form a second SQL statement; if the character string similarity between the first SQL statement and the historical SQL statement is smaller than a similarity threshold value, the first SQL statement serves as a final SQL statement generated according to the current data development requirement. According to the method, the accuracy of the data development result can be verified, the development process can be checked, the development and test cost is reduced, and the development quality is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and in particular relates to a data development detection method and system. Background Art

[0002] With the development of digital transformation, the scope of data business needs is becoming wider and wider, the complexity of data is increasing, the requirements for data security and data quality are constantly improving, and data automation testing is becoming more and more important. In traditional data development and development result testing technology, developers use tools to write SQL statements to query, insert, update, and delete data in the database to achieve data development, and verify the accuracy of data development based on the results of data development. That is, in traditional data development, after the development results are formed, the data development process will not be refined. In addition, if there is a demand similar to the previous data development demand, it is difficult for developers or testers to find similar business needs that have been developed before, and it is impossible to learn from the development experience of previous development tasks and continuously improve the development quality, which will increase the cost of data development and testing. Summary of the invention

[0003] In view of the shortcomings of the prior art, the present invention proposes a data development detection method and system, which can not only verify the accuracy of data development results, but also inspect the development process, improve the quality of development process detection and management, and reduce development and testing costs.

[0004] In order to solve the technical problems in the prior art, the present invention proposes a data development detection method for generating corresponding SQL statements according to data development requirements, specifically:

[0005] Pre-save historical SQL statements generated for historical data development needs;

[0006] When developing current data, generate a first SQL statement according to current data development requirements;

[0007] Query the historical SQL statements with the same data source table as the first SQL statement.

[0008] Compare the first SQL statement with historical SQL statements having the same data source table;

[0009] If the string similarity between the first SQL statement and the historical SQL statement is greater than or equal to the similarity threshold, the first SQL statement is modified based on the string in the historical SQL statement that is different from the first SQL statement to form a second SQL statement; the second SQL statement is used as the final SQL statement generated according to the current data development requirements, or the data testing step is entered to perform data testing on the second SQL statement;

[0010] If the string similarity between the first SQL statement and the historical SQL statement is less than the similarity threshold, the first SQL statement is used as the final SQL statement generated according to the current data development requirements, or the data testing step is entered to perform data testing on the first SQL statement.

[0011] As a preferred method, a data table for storing historical SQL statements is provided as a historical development requirement SQL statement stock table. After the first SQL statement is generated, the historical SQL statement is queried in the historical development requirement SQL statement stock table.

[0012] As a preferred embodiment, the similarity threshold is 80%.

[0013] As a preferred method, if the data testing step is entered, then after entering the data testing step, the second SQL statement or the first SQL statement is tested item by item according to the data development test items to determine whether the second SQL statement or the first SQL statement is qualified.

[0014] As a preferred method, when testing the second SQL statement or the first SQL statement item by item according to the data development test items, firstly, the total number of data items in the target table is tested. If the total number of data items in the target table is 0, the data testing step is terminated and other test items are no longer tested; if the total number of data items in the target table is not 0, other test items are continued to be tested; each test item is pre-set with a corresponding execution program, and when executing the test item, the pre-set execution program is directly called.

[0015] As a preferred method, a test item table is provided for storing test items; according to current data development requirements, specific test items are selected from the test item table to detect the second SQL statement or the first SQL statement.

[0016] As a preferred method, a test key point result table is set up. If the test item fails, the test result is stored in the test key point result table and displayed by the display device, so that the technical developer can modify the second SQL statement or the first SQL statement according to the displayed unqualified test item, and use the modified SQL statement as the final SQL statement; the final SQL statement is saved to the historical development requirement SQL statement stock table as a historical SQL statement.

[0017] As a preferred method, after data testing, if any test items fail, the second SQL statement or the first SQL statement is modified for the unqualified test items, and the modified SQL statement is used as the final SQL statement; the final SQL statement is saved to the historical development demand SQL statement inventory table as a historical SQL statement.

[0018] The present invention also provides a computer program product for data development detection, the computer program product comprising a software code portion for responding to a start command and for completing the data development detection method described in any of the preceding claims.

[0019] The present invention also proposes a data development detection system, comprising: a processor; a database; and a memory, wherein a program is stored in the memory, wherein when the processor executes the program, the data development detection method described in any of the preceding claims is implemented.

[0020] Compared with the prior art, the present invention has the following significant advantages:

[0021] (1) Based on the effective management of historical data development requirements, the present invention can detect similar development requirements and development results in the past, provide card development technology reference and reference for the processing of current data requirements from similar development requirements and development results in the past, improve the development results, and thus reduce business exploration costs and development and testing costs;

[0022] (2) The present invention can effectively implement the testing of data development test items and obtain test results through automated programs during the data processing of a data lake or data warehouse, and display the test results to development or testing personnel through a display device. Compared with traditional manual testing methods, there is no need to manually write and execute data test SQL statements to obtain test results, making the development process more efficient and simple;

[0023] (3) The present invention can effectively manage the SQL statements of data development results, save the developed and tested data processing SQL statements into the database and record the corresponding business needs, form a knowledge base accumulation, and thus provide support for future data development.

[0024] Other features and advantages of the present invention will be described in the following description, and part of them will become obvious from the description, or will be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures specifically pointed out in the written description and claims. DETAILED DESCRIPTION

[0025] It is easy to understand that according to the technical solution of the present invention, without changing the essential spirit of the present invention, a person skilled in the art can imagine various embodiments of the present invention. Therefore, the following specific embodiments are only exemplary descriptions of the technical solution of the present invention, and should not be regarded as the whole of the present invention or as limitations or restrictions on the technical solution of the present invention. On the contrary, the purpose of providing these embodiments is to enable those skilled in the art to understand the present invention more thoroughly.

[0026] The so-called data development in the present invention refers to the process of adding (inserting), deleting, modifying (updating) and other operations on the target table data in the database through SQL statements to achieve data processing or data operations. In the actual data development process, there are situations where manual repeated testing and verification of data development accuracy exist. The present invention is aimed at data development, and improves data development quality and development efficiency by detecting the development process, detecting the data development results, and managing the SQL statements after the development test passes.

[0027] The data development detection method described in the present invention is used to generate corresponding SQL statements according to data development requirements, specifically:

[0028] Pre-save historical SQL statements generated for historical data development needs;

[0029] When developing current data, generate a first SQL statement according to current data development requirements;

[0030] Query the historical SQL statements with the same data source table as the first SQL statement.

[0031] Compare the first SQL statement with historical SQL statements having the same data source table;

[0032] If the string similarity between the first SQL statement and the historical SQL statement is greater than or equal to the similarity threshold, the first SQL statement is modified based on the string in the historical SQL statement that is different from the first SQL statement to form a second SQL statement; the second SQL statement is used as the final SQL statement generated according to the current data development requirements, or the data testing step is entered to perform data testing on the second SQL statement;

[0033] If the string similarity between the first SQL statement and the historical SQL statement is less than the similarity threshold, the first SQL statement is used as the final SQL statement generated according to the current data development requirements, or the data testing step is entered to perform data testing on the first SQL statement.

[0034] Among them, a data table for storing historical SQL statements can be set up as a historical development demand SQL statement stock table. After the first SQL statement is generated, the historical SQL statement is queried in the historical development demand SQL statement stock table.

[0035] The similarity threshold is 80%.

[0036] If the data testing step is entered, then after entering the data testing step, the second SQL statement or the first SQL statement is tested item by item according to the data development test items to determine whether the second SQL statement or the first SQL statement is qualified.

[0037] Among them, when the second SQL statement or the first SQL statement is tested item by item according to the data development test items, the total number of data in the target table is first tested. If the total number of data in the target table is 0, the data testing step is ended and other test items are no longer tested; if the total number of data in the target table is not 0, other test items continue to be tested; each test item is pre-set with a corresponding execution program, and when the test item is executed, the pre-set execution program is directly called.

[0038] Among them, a test item table is provided for storing test items; according to the current data development requirements, a specific test item is selected in the test item table to detect the second SQL statement or the first SQL statement.

[0039] Among them, a test key point result table is set up. If the test item fails, the test result will be stored in the test key point result table and displayed by the display device, so that the technical developer can modify the second SQL statement or the first SQL statement according to the displayed unqualified test item, and use the modified SQL statement as the final SQL statement; the final SQL statement is saved to the historical development requirement SQL statement stock table as a historical SQL statement.

[0040] Among them, after data testing, if any test items fail, the second SQL statement or the first SQL statement is modified for the unqualified test items, and the modified SQL statement is used as the final SQL statement; the final SQL statement is saved to the historical development demand SQL statement inventory table as a historical SQL statement.

[0041] The data development detection method of the present invention will be described in detail below with reference to a specific embodiment.

[0042] In this embodiment, it is assumed that the current data development requirement is: the number of credit card transactions for private customers on the same day (job name PRVT_CRCS_CNT). The development and testing process of the data developer is as follows:

[0043] S100, determine that the data source table for the number of credit card transactions for private customers on the same day is the credit card transaction flow table (fdm.fdm_t05_fe_py_socsec_evt t1). According to the data development requirements, the data developer writes a preliminary SQL statement for the data development requirements as sql1:

[0044] select

[0045] t1.cust_no as prvt_cust_no

[0046] ,'{tx_date}'as etl_date

[0047] ,'PRVT_CUST_CRCD_AMT'as index_ennm

[0048] ,count(1)as index_result

[0049] from fdm.fdm_t05_fe_py_socsec_evt t1

[0050] where t1.etl_date='{tx_date}'group by t1.cust_no

[0051] S200, after the data developer writes a preliminary data development SQL statement sql1, he searches the historical development requirement SQL statement stock table JOB_INFO for historical development requirement SQL statements related to the SQL statement corresponding to the current development requirement (i.e., sql1), and compares the sql1 statement with the historical development requirement SQL statement to provide correction and adjustment suggestions for sql1. Specifically,

[0052] First, query the historical SQL statements corresponding to the historical development requirements with the same data source table as the current development requirements; then compare the strings of sql1 statement and historical SQL statements to obtain the similarity between the two strings; finally, according to the SQL statements with string similarity greater than a certain threshold, improve and modify sql1 statement to obtain sql2 statement. In this way, the data development process can be tested, and the knowledge and experience accumulated from historical development can be quickly matured to improve development efficiency and quality.

[0053] In this embodiment, historical development demand SQL statements are stored in the historical development demand SQL statement inventory table JOB_INFO. An example of this table is shown in Table 1.

[0054] Table 1 Historical development requirements SQL statement inventory table JOB_INFO (partial examples)

[0055]

[0056]

[0057] In Table 1,

[0058] JOB_NAME is the SQL statement job name corresponding to the development requirement. The SQL statement job name corresponding to each data development requirement is unique and cannot be repeated.

[0059] JOB_DESC is a description of the SQL statement job content, corresponding to specific data development requirements.

[0060] TAB_NAME is the English name of the target table for the SQL statement operation, that is, the development requirement is to implement the corresponding SQL statement operation in these target tables to complete data development according to the development requirements. As can be seen from Table 1, the two SQL statements correspond to different target tables IDM_I01_CUST_RES_AMT and

[0061] IDM_I01_CUST_RES_BAL.

[0062] JOB_SQL is a specific SQL statement, that is, a SQL statement that implements a specific data development requirement.

[0063] In this embodiment, after the developer writes the sql1 statement, it can be seen from the sql1 statement that the data source table in the current data development is the credit card transaction flow table (fdm.fdm_t05_fe_py_socsec_evt t1). In the table, according to the historical development requirement SQL statement, it can be seen that the first line of development requirements for the credit card transaction amount of private customers on the same day (PRVT_CUST_CRCD_AMT) has the same data source table, which is the credit card transaction flow table (fdm.fdm_t05_fe_py_socsec_evt t1).

[0064] In the historical development requirement SQL statement inventory table JOB_INFO, query all historical development requirement SQL statements that have the same data source table as the current development requirement. Then compare the similarity between the sql1 statement of the current development requirement and the historical development requirement SQL statements. If multiple historical development requirement SQL statements with the same data source table are queried, compare the similarity between the sql1 statement of the current development requirement and multiple historical development requirement SQL statements with the same data source table. If there are no historical development requirement SQL statements with the same data source table, it means that similar data development requirements have not been developed before, and the historical development requirement SQL statements are quite different from the current data development requirements, and there is not much technical reference significance for the current data development. At this point, there is no need to further compare the similarity. After writing the preliminary data development SQL statement sql1 of the current development requirement, go directly to the test item test step.

[0065] When comparing the similarity between the sql1 statement and the historical SQL statement, this embodiment uses the shortest edit distance method for comparison. When the similarity is greater than a certain threshold, for example, greater than 80%, it means that the historical development requirement SQL statement has a high technical reference or comparison significance for the current book development, and it is possible to provide technical suggestions for modifying and improving the sql1 statement of the current development requirement.

[0066] For example, through similarity comparison, the SQL statement (sql1) corresponding to the operation of the number of credit card transactions for private customers on the same day (PRVT_CUST_CRCD_CNT) and the SQL statement corresponding to the operation of the amount of credit card transactions for private customers on the same day (PRVT_CUST_CRCD_AMT) are 91% similar. Through comparison, the technicians can see that the part where t1.etl_date='{tx_date}'and t1.status='1'group by t1.cust_no in the SQL of the operation of the amount of credit card transactions for private customers on the same day (PRVT_CRCS_CNT) is different from the sql1 of the number of credit card transactions for private customers on the same day (PRVT_CRCS_CNT). Through judgment, it is concluded that the business meaning of t1.status='1' is that the transaction is successful. Sql1 is for all transactions, including successful and failed transactions, but in fact, the number of credit card transactions for private customers on the same day (PRVT_CUST_CRCD_CNT) only counts the number of successful transactions, not the number of failed transactions. Therefore, based on the reference to the SQL statement for the operation of the credit card transaction amount for private customers on the same day (PRVT_CUST_CRCD_AMT), the developer can correct the business scope of sql1 and modify the sql1 statement to only count the number of transactions in the successful transaction state. The adjusted number of credit card transactions for private customers on the same day (PRVT_CUST_CRCD_CNT) is as follows in Sql2:

[0067] select

[0068] t1.cust_no as prvt_cust_no

[0069] ,'{tx_date}'as etl_date

[0070] ,'PRVT_CUST_CRCD_AMT'as index_ennm

[0071] ,count(1)as index_result

[0072] from fdm.fdm_t05_fe_py_socsec_evt t1

[0073] where t1.etl_date='{tx_date}'and t1.status='1'group by t1.cust_no

[0074] In order to facilitate technical developers to query, view, and later use the similarity comparison results and specific sentence comparisons, the comparison results can be stored in the test item result table TB_TEST_RST. An example of this table is shown in Table 2.

[0075] Table 2 Test item result table TB_TEST_RST (partial example)

[0076]

[0077]

[0078] In Table 2:

[0079] TST_ID is the development test serial number corresponding to the current development requirement and is the unique identifier of this test of the job.

[0080] JOB_NAME is the job name corresponding to the current development requirement, which has the same meaning as JOB_NAME in Table 1.

[0081] POINT_ID is the test item number, which has the same meaning as POINT_ID in Table 3.

[0082] POINT_NAME is the Chinese name of the test item.

[0083] POINT_RST is the key point of the test result corresponding to the test item.

[0084] In this embodiment, the test results can be displayed to the demand developers through the display device to facilitate the technical developers to query, view, and adjust the SQL statements of the current development requirements.

[0085] The above-mentioned similarity comparison and reference modification and improvement steps reflect the detection of the data development process by the present invention. By detecting during the data development process rather than after the development is completed, the development quality and efficiency can be improved.

[0086] Based on the similarity comparison, Sql1 is modified and improved to obtain Sql2, which is the SQL statement developed for the current data development needs. Next, Sql2 needs to be developed and tested.

[0087] S300, according to the data development test project, perform data testing on Sql2 to check whether Sql2 meets the test requirements.

[0088] Table 3 Test item table POINT_LIST

[0089]

[0090]

[0091] The specific test items in the data test are shown in Table 3 Test Item Table POINT_LIST, where:

[0092] POINT_ID is the test item number, which is the unique identifier of the test item;

[0093] POINT_NAME is the Chinese name of the test item;

[0094] SQL statement similarity: Use the shortest edit distance method to obtain the similarity of two SQL statement strings;

[0095] Total number of target table data: query and obtain the data query result of the total number of target table data through SQL statement: select count(1)from target table;

[0096] Number of data entries after field deduplication: Get the data result through the total number of data entries in the target table: select count(distinct field A) from target table;

[0097] The number of data after the field is removed: Get the data result through SQL statement: select count(1)from target table where field A<>'';

[0098] Whether the code value field conversion is incorrect: Determine whether the code value in the code value conversion configuration table completely corresponds to the actual data code value;

[0099] Total number of source table data: Get data results through SQL statement: select count(1)from source table;

[0100] Whether the field is truncated: For character fields, determine whether the maximum length of the source table field data is consistent with that of the target table field data; for numeric fields, determine whether the maximum and minimum values ​​of the source table field data are consistent with those of the target table field data;

[0101] Whether the association is divergent: Determine whether the data volume of the target table is less than or equal to the data volume of the source table. If this condition is not met, it is determined that the association is divergent;

[0102] Aggregate value of numeric fields: Get data results through SQL statements: select sum (numeric fields) from target table

[0103] Maximum value of numeric fields: Get data results through SQL statements: select max(numeric field) from target table

[0104] Minimum value of numeric fields: Get data results through SQL statements: select min (numeric field) from target table

[0105] Business primary key verification: Use SQL statements to select the business primary key field, count(1)from the target table group by the business primary key field having count(1)>1. If there is a result, it means that the business primary key is repeated, and the business primary key field xxx verification fails.

[0106] The 12 test items listed in Table 3 Test Item Table POINT_LIST are only enumerations. Actual business development is not limited to the above test items and can be expanded according to actual conditions.

[0107] For data development in a data lake or data warehouse, the development and testing focuses of different data layers are different. For data development testing at the standard layer, the focus is on detecting code values ​​and benchmarking. For data development testing at the model layer, the focus is on detecting whether the model data is associated and divergent, whether the data is distorted when it falls into the model (whether the model table benchmarking is correct), etc. For data development testing at the application layer, the focus is on whether the data is divergent, whether the values ​​processed in the numerical fields are within a reasonable range, etc. In actual data development, specific test items can be selected according to specific circumstances. For example, when there is no code value conversion, the test item for whether the code value field conversion is incorrect can be omitted.

[0108] In the present invention, each test item is pre-programmed with a corresponding code program. When developing and testing specific data, the corresponding test program is directly called without writing the test program on site. The present invention assists manual rapid testing through automated test item test programs, speeds up manual testing efficiency, and optimizes development process management.

[0109] In the present invention, when performing data testing on Sql2, the total number of target table data is tested first, and then it is determined whether the number of data in the current operation target table is 0. If it is 0, the data test on Sql2 is terminated. If it is not 0, the test of other test items of Sql2 is continued. The test result of the total number of target table data can be stored in the test item result table TB_TEST_RST in Table 2. The test result or the content of Table 2 can also be displayed to the developer through the display device.

[0110] Query the total number of data in the current job target table through SQL query. The query SQL is as follows:

[0111] select count(1)from IDM_I01_CUST_RES_INFO

[0112] Write the query result test item table data volume 221128 into Table 2

[0113] Table 2 Test points results table TB_TEST_RST

[0114]

[0115] The remaining test items in Table 3 are all tests of the target table data. If the total number of target table data is 0, it means that there is no data in the target table. The remaining test items in Table 3 cannot and do not need to be performed, and the test program terminates. If the total number of target table data is not 0, the remaining test item programs continue to execute to obtain the corresponding test item results. The test results of the aforementioned other items can all be stored in the test item result table TB_TEST_RST in Table 2. The test results or the contents of Table 2 can also be displayed to developers through a display device.

[0116] If there are no problems or abnormalities in the results of other test items, the test results are written in Table 2 as follows:

[0117] Table 2 Test points results table TB_TEST_RST

[0118]

[0119] If there are problems or abnormalities in the results of other test items, the test results are written into Table 2 as follows:

[0120] Table 2 Test points results table TB_TEST_RST

[0121]

[0122] The test key results are displayed on the display device (data in Table 2 are displayed), and the tester determines whether the developed sql2 statement passes the test based on the test results. If it passes the test, the currently developed sql2 statement is saved in the historical stock SQL job information table JOB_INFO in Table 1. If it fails the test, the sql2 statement is further corrected and improved according to the problems reflected by the existing or abnormal test items until the test items pass.

[0123] The above process demonstrates the detection of development results.

[0124] S400, after all test items have passed the test, the currently developed sql2 statement is saved in Table 1, the historical stock SQL job information table JOB_INFO.

[0125] After the tester passes the test, the current data processing requirements and sql2 are saved in Table 1. For example, the current data development job PRVT_CUST_CRCD_CNT After the test is completed, the job SQL is saved and written into Table 1, which serves as the data basis for demand similarity comparison in subsequent data development, thereby realizing SQL logic management.

[0126] Table 1 Historical stock job information table JOB_INFO (partial example)

[0127]

[0128] The present invention helps enterprises and organizations to quickly and accurately complete testing tasks by detecting the development process, detecting the development results, and logically managing the development test through SQL statements, thereby improving data development efficiency and quality, and forming knowledge base construction and accumulation.

[0129] The present invention also provides a computer program product for data development detection, the computer program product comprising a software code portion for completing the aforementioned data development detection method in response to a start command.

[0130] The present invention also proposes a data development detection system, comprising: a processor; a database; and a memory, wherein a program is stored in the memory, wherein when the processor executes the program, the aforementioned data development detection method is implemented.

[0131] The structures of the tables in the above embodiments are only examples. In actual operation, the data items in each column are not necessarily limited to the items shown in the tables in the above embodiments, and may also have other item data.

[0132] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

[0133] It should be understood that in order to simplify the present invention and help those skilled in the art understand the various aspects of the present invention, in the above description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes described in a single embodiment. However, the present invention should not be interpreted as the features included in the exemplary embodiments are all necessary technical features of the patent claims.

[0134] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.

[0135] It should be understood that the devices, modules, units, components, etc. included in the system of an embodiment of the present invention can be adaptively changed to be set in a device or system different from the embodiment. The different devices, modules, units, or components included in the system of the embodiment can be combined into one device, module, unit, or component, or they can be divided into multiple sub-devices, sub-modules, sub-units, or sub-components.

[0136] The devices, modules, units or components in the embodiments of the present invention may be implemented in hardware, or in software running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement the embodiments of the present invention. The present invention may also be implemented as a computer program product or computer-readable medium for executing part or all of the methods described herein.

Claims

1. A data development detection method for generating corresponding SQL statements according to data development requirements. It is characterized in that Pre-save historical SQL statements generated for historical data development needs; When developing current data, generate a first SQL statement according to current data development requirements; Query the historical SQL statements with the same data source table as the first SQL statement. Compare the first SQL statement with historical SQL statements having the same data source table; If the string similarity between the first SQL statement and the historical SQL statement is greater than or equal to the similarity threshold, modify the first SQL statement based on the string in the historical SQL statement that is different from the first SQL statement, thereby forming a second SQL statement; Use the second SQL statement as the final SQL statement generated according to the current data development requirements, or enter the data testing step to perform data testing on the second SQL statement; If the string similarity between the first SQL statement and the historical SQL statement is less than the similarity threshold, the first SQL statement is used as the final SQL statement generated according to the current data development requirements, or the data testing step is entered to perform data testing on the first SQL statement.

2. The data development detection method according to claim 1, It is characterized in that A data table for storing historical SQL statements is provided as a historical development requirement SQL statement stock table. After the first SQL statement is generated, the historical SQL statement is queried in the historical development requirement SQL statement stock table.

3. The data development detection method according to claim 1, It is characterized in that The similarity threshold is 80%.

4. The data development detection method according to claim 1, It is characterized in that If the data testing step is entered, then after entering the data testing step, the second SQL statement or the first SQL statement is tested item by item according to the data development test items to determine whether the second SQL statement or the first SQL statement is qualified.

5. The data development detection method according to claim 4, It is characterized in that When testing the second SQL statement or the first SQL statement item by item according to the data development test items, First, the total number of data in the target table is detected. If the total number of data in the target table is 0, the data test step is terminated and other test items are no longer detected; if the total number of data in the target table is not 0, other test items are continued to be detected; Each test item is pre-set with a corresponding execution program. When executing the test item, the pre-set execution program is directly called.

6. The data development detection method according to claim 5, It is characterized in that A test item table is provided for storing test items; According to the current data development requirements, select a specific test item in the test item table to test the second SQL statement or the first SQL statement.

7. The data development detection method according to claim 6, It is characterized in that A test key point result table is provided. If a test item fails, the test result is stored in the test key point result table and displayed by a display device, so that the technical developer can modify the second SQL statement or the first SQL statement according to the displayed failed test item, and use the modified SQL statement as the final SQL statement; The final SQL statement is saved to the historical development requirement SQL statement inventory table as a historical SQL statement.

8. The data development detection method according to claim 5, It is characterized in that After the data test, if any test item fails, the second SQL statement or the first SQL statement is modified for the failed test item, and the modified SQL statement is used as the final SQL statement; The final SQL statement is saved to the historical development requirement SQL statement inventory table as a historical SQL statement.

9. A computer program product for use in data exploitation detection, It is characterized in that The computer program product includes a software code portion for responding to a start command to complete the data development detection method described in any one of claims 1-8.

10. A data development detection system, It is characterized in that include: processor; database; and a memory storing a program, When the processor executes the program, the data development detection method described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • SQL code automatic completion method and system and storage medium

    CN111857688A

  • SQL injection vulnerability detection method and device thereof, computer equipment and storage medium

    CN113987511A

  • Method and device for detecting similarity of SQL (Structured Query Language) statements

    CN114528311A

  • Natural language intelligent query method and device based on multi-agent interaction

    CN118012900A

  • Method and apparatus for dynamic synchronous testing, device, and storage medium

    WO2022227314A1

Cited By

  • Data development intelligent auditing method and system based on large language model

    CN122570516A