Data testing method and system

By automatically building multi-dimensional test cases and distributed parallel processing, combining machine learning model analysis and dynamic resource scheduling, the problems of large-scale data testing efficiency and accuracy in the financial industry are solved, and efficient and accurate data testing and resource optimization are achieved.

CN119273480AInactive Publication Date: 2025-01-07SHENZHEN FARBEN INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411786903.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-01-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

It is difficult for existing technology to conduct large-scale data testing efficiently and accurately, especially when processing complex transaction data and market data in the financial industry, the test cycle is long and it is easy to generate false positives or missed reports.

Method used

Technical means such as automatic construction of multi-dimensional test cases, distributed parallel processing, machine learning model analysis and dynamic resource scheduling are adopted, and combined with the generation test script technology, it can achieve efficient and accurate testing of financial transaction records, customer information and market conditions.

Benefits of technology

Improve testing efficiency through automated construction of test cases and distributed processing, ensure the comprehensiveness and accuracy of tests, dynamic resource scheduling optimize resource utilization, generate reusable test cases, respond to data changes in a timely manner, and ensure the reliability of data quality and test results. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273480A_ABST
    Figure CN119273480A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a data test method, which comprises the following steps: acquiring a to-be-tested data set, automatically constructing a multi-dimensional test case according to a preset test rule and metadata information of the data set, performing parallel processing on the multi-dimensional test case by using a distributed computing framework, and acquiring a corresponding test result; calling an analysis model to analyze the test result, obtaining test analysis data, comparing the test analysis data with a preset standard, and generating a corresponding detailed test report; test parameters are adjusted according to root cause analysis in the detailed test report, and computing resources are adjusted according to the real-time load condition and historical load data of the test task corresponding to the to-be-tested data set through a preset dynamic resource scheduling mechanism in the test process; and curing the test process and the detailed test report into a reusable test case based on a test script generation technology. According to the invention, efficient and accurate large-scale data testing can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computers, and in particular to a data testing method and system. Background Art

[0002] In the financial industry, data analysis and risk management are crucial. Financial institutions need to conduct efficient and accurate testing on large amounts of transaction data, customer information, and market data to ensure the integrity and accuracy of the data, identify potential risk points in a timely manner, and formulate corresponding risk response strategies. Traditional data testing methods usually rely on manually configuring the test environment, writing test scripts, and analyzing test results. This method is not only time-consuming and labor-intensive, but also prone to errors and cannot meet the needs of large-scale data testing.

[0003] Although some existing automated data testing tools can improve testing efficiency to a certain extent, they still have the following problems when faced with complex data sets and changing testing requirements: first, they cannot effectively process massive amounts of data, resulting in a long testing cycle; second, testing of complex data structures is prone to false positives or omissions.

[0004] From the above, we can see that how to achieve efficient and accurate large-scale data testing remains to be solved. Summary of the invention

[0005] In order to achieve efficient and accurate large-scale data testing, the present application provides a data testing method and system.

[0006] In a first aspect, the present application provides a data testing method, which adopts the following technical solution: A data testing method comprises: obtaining a data set to be tested, automatically constructing a multi-dimensional test case according to preset test rules and metadata information of the data set, using a distributed computing framework to perform parallel processing on the multi-dimensional test case, and obtaining corresponding test results, wherein the data set to be tested comprises financial transaction records, customer information and market conditions; calling a pre-trained analysis model to analyze the test results, and obtaining corresponding test analysis data, comparing the test analysis data with preset standards, and generating a corresponding detailed test report, wherein the detailed test report comprises test coverage, test pass rate, abnormal data details, root cause analysis and potential abnormal data; adjusting test parameters according to the root cause analysis in the detailed test report, and during the test process, adjusting the test parameters according to the real-time scheduling of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. The computing resources are adjusted according to the load conditions and historical load data. After the test is completed, the test process and detailed test report are solidified into reusable test cases based on the test script generation technology; wherein, during the test process, it also includes: building a data test framework, and using the data test framework to perform a full range of tests on the data set to be tested during the migration process, wherein the data test framework includes data collection, conversion, verification and rollback mechanisms; full range of detection includes consistency, correctness and performance; after the migration of the data set to be tested is completed, the real-time verification data of the target end is obtained, and the pre-set automated data comparison and verification tool is called, and the data structure, field type, data content and association relationship between the data set to be tested and the real-time verification data are verified in real time based on the automated data comparison and verification tool, and the corresponding verification results are obtained, and the verification results are written into a detailed test report.

[0007] By adopting the above technical solutions, through the automated construction of multi-dimensional test cases, distributed parallel processing, machine learning model analysis, dynamic resource scheduling and test script generation, we have achieved efficient and accurate testing of complex data sets of financial transaction records, customer information and market conditions. By automatically building multi-dimensional test cases, we ensure the comprehensiveness and pertinence of the test, and use a distributed computing framework to improve the test efficiency; call pre-trained analysis models for multi-level intelligent analysis to ensure the accuracy and reliability of the test results; optimize resource allocation according to real-time load and historical data through a dynamic resource scheduling mechanism to improve resource utilization; finally, by generating test script technology, the test process and results are solidified into reusable test cases to facilitate subsequent verification and regression testing. Through the above combined effects, the efficiency and accuracy of large-scale data testing are ensured.

[0008] Optionally, the method also includes: obtaining a corresponding real-time monitoring data stream, wherein the real-time monitoring data includes current data traffic, data type, and data source; calling a pre-set monitoring strategy, and identifying corresponding key test cases based on the monitoring strategy, wherein the key test cases include transaction records of high-risk customers and data with large market fluctuations; adjusting the priority of key test cases according to the real-time monitoring data stream, and prioritizing the execution of key test cases based on a priority queue.

[0009] By adopting the above technical solution, by dynamically adjusting the priority of key test cases and using priority queues to ensure that these key test cases are executed first, we can respond to data changes in real time during the test process, improve the efficiency and accuracy of the test, and ensure that key data is tested in a timely and sufficient manner.

[0010] Optionally, the method also includes: collecting current load data of each computing node, and retrieving corresponding historical load data, wherein the current load data includes CPU usage, memory usage, disk I / O, network bandwidth, etc., and the historical load data is the load conditions in the past period extracted from the time series database; retrieving a pre-trained analysis model, inputting the historical load data and the current load data into the analysis model, and obtaining the corresponding load prediction results, which are real-time predictions of load changes in the future period; and adjusting the computing resource allocation of each computing node based on the load prediction results.

[0011] By adopting the above technical solution, the current load data and historical load data of each computing node are collected, and the pre-trained analysis model is used to predict the load changes in the future. Based on the load prediction results, the computing resource allocation of each computing node is dynamically adjusted to ensure efficient resource utilization and load balancing, thereby improving the execution efficiency of the test task and resource utilization.

[0012] Optionally, the method also includes: calling the corresponding real-time monitoring data stream, detecting the real-time monitoring data stream for quality detection through a data quality detection module, and obtaining the corresponding quality detection results, wherein the quality detection includes integrity, consistency, format, range, and identification of missing values, null values, and abnormal values ​​in the data; if there is a data abnormality pattern in the quality detection result, determining the abnormality level of the data abnormality pattern, wherein the abnormality level includes low, medium or high; if the abnormality level is low, starting the automatic repair mechanism to repair the data problem corresponding to the data abnormality pattern, and if the abnormality level is medium or high, generating an alarm and notifying relevant personnel, recording all operations of relevant personnel in the process of detecting and repairing data problems, and generating a data quality report.

[0013] By adopting the above technical solution, by real-time monitoring of data flow, using the data quality detection module to detect the data, determining the abnormal level of the data abnormal pattern according to the detection results and performing corresponding processing, this process ensures the high quality of data and the accuracy of the test, and timely discovers and handles data problems.

[0014] Optionally, the method also includes: during the test process, testing is performed using a preset initial test frequency, and the result data of each test is recorded, wherein the result data includes test coverage, test pass rate, and details of abnormal data; analyzing the test results and extracting key indicators, wherein the key indicators include test coverage, the number and type of abnormal data; determining real-time feedback data of the initial test frequency based on the key indicators, and adjusting the initial test frequency based on the real-time feedback data.

[0015] By adopting the above technical solution, the test is performed at the preset initial test frequency, and the result data of each test is recorded, including test coverage, test pass rate and abnormal data details. By analyzing the test results, extracting key indicators such as test coverage and the number and type of abnormal data, and dynamically adjusting the initial test frequency based on the real-time feedback data of these key indicators, the above process ensures the efficiency and accuracy of the test, can respond to data changes in a timely manner, and optimize the use of test resources.

[0016] Optionally, the method also includes: during the testing process, determining corresponding test objectives and data characteristics, wherein the data characteristics include data volume, data distribution, data type, and data correlation; determining a corresponding data sampling strategy based on the test objectives and the data characteristics; obtaining test results of data testing based on the sampling strategy, and adjusting the sampling strategy based on the data characteristics and the test results.

[0017] By adopting the above technical solution, by determining the test objectives and data characteristics, a suitable data sampling strategy is selected based on this information; during the test process, the test results are obtained according to the sampling strategy, and the sampling strategy is dynamically adjusted in combination with the data characteristics and test results to ensure the representativeness and coverage of the test data and improve the efficiency and accuracy of the test.

[0018] In a second aspect, the present application provides a data testing system, which adopts the following technical solution: A data testing system, comprising: A test result acquisition module acquires a data set to be tested, automatically constructs a multi-dimensional test case according to preset test rules and metadata information of the data set, and uses a distributed computing framework to perform parallel processing on the multi-dimensional test case to obtain corresponding test results, wherein the data set to be tested includes financial transaction records, customer information, and market conditions; A detailed test report generation module, which uses a pre-trained analysis model to analyze the test results, obtains corresponding test analysis data, compares the test analysis data with preset standards, and generates a corresponding detailed test report, wherein the detailed test report includes test coverage, test pass rate, abnormal data details, root cause analysis, and potential abnormal data; The computing resource adjustment module adjusts the test parameters according to the root cause analysis in the detailed test report. During the test process, the computing resources are adjusted according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. After the test is completed, the test process and detailed test report are solidified into reusable test cases based on the test script generation technology.

[0019] In a third aspect, the present application provides a data testing method, which adopts the following technical solution: A data testing method comprises a processor, wherein a program of any one of the above-mentioned data testing methods is running on the processor.

[0020] In a fourth aspect, the present application provides a storage medium, which adopts the following technical solution: A storage medium stores a program of any one of the data testing methods described above.

[0021] In summary, the present application includes at least one of the following beneficial technical effects: By automatically constructing multi-dimensional test cases, the comprehensiveness and pertinence of the test can be ensured; by using a distributed computing framework to improve test efficiency, the rapid processing of large-scale data can be ensured; and by calling pre-trained analysis models for multi-level intelligent analysis, the accuracy and reliability of the test results can be ensured.

[0022] Dynamically adjusting computing resources according to real-time load and historical data can improve resource utilization and load balancing; and generating test script technology to solidify the test process and results into reusable test cases can facilitate subsequent verification and regression testing.

[0023] By real-time monitoring of data flows and dynamically adjusting the priorities of key test cases, it is possible to ensure that key data is tested in a timely and adequate manner. By real-time detection of data quality, automatic repair of low-level anomalies, generation of alarms and notification of relevant personnel to handle intermediate and high-level anomalies, it is possible to ensure high data quality. By dynamically adjusting the test frequency based on feedback from test results, it is possible to ensure the efficiency and accuracy of the test. By dynamically selecting appropriate sampling strategies based on test objectives and data characteristics, it is possible to ensure the representativeness and coverage of test data. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1The figure is a flow chart of a data testing method according to an exemplary embodiment.

[0025] Figure 2 It is a structural block diagram of a data testing method system according to an exemplary embodiment. DETAILED DESCRIPTION

[0026] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings.

[0027] In the description of this specification, the description with reference to the terms "certain embodiments", "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0028] The present application embodiment discloses a data testing method, referring to Figure 1 ,include: S100, obtaining a data set to be tested, automatically constructing a multi-dimensional test case according to preset test rules and metadata information of the data set, using a distributed computing framework to perform parallel processing on the multi-dimensional test case, and obtaining corresponding test results.

[0029] The data sets to be tested are obtained from multiple data sources (such as trading systems, customer relationship management systems, market data providers, etc.) These data sets may include financial transaction records, customer information, and market conditions.

[0030] Specifically, by establishing connections with various data sources, using ETL tools to extract data from various data sources, and then cleaning and preprocessing the extracted data, removing invalid data and outliers, ensuring the accuracy and reliability of the data, and storing the preprocessed data in a data warehouse or data lake for subsequent processing and analysis.

[0031] In addition, multi-dimensional test cases are automatically generated based on the preset test rules and metadata information of the data set. These test cases cover different data types and complexities. Specifically, it is necessary to define the test rules, including the test objectives, test scope, and specific test requirements, and then parse the metadata information of the data set to understand the structure, type, and distribution of the data. Based on the test rules and metadata information, multi-dimensional test cases are dynamically generated using an adaptive generation algorithm. It is also necessary to verify whether the generated test cases comply with the test rules and metadata information to ensure the accuracy and effectiveness of the test cases.

[0032] Then, use the distributed computing framework (such as Hadoop, Spark, etc.) to process the multi-dimensional test cases in parallel and obtain the corresponding test results. Specifically, first distribute the multi-dimensional test cases to each node of the distributed computing framework to ensure the parallel processing of tasks, then execute the test cases in parallel on each node, record the test results, and summarize the test results of each node to generate complete test result data, and finally store the test results in a data warehouse or data lake for subsequent analysis and processing.

[0033] S110, calling a pre-trained analysis model to analyze the test results, and obtaining corresponding test analysis data, comparing the test analysis data with a preset standard, and generating a corresponding detailed test report.

[0034] First, load the pre-trained machine learning model and pre-process the test results. It is necessary to extract key features and indicators to ensure that the format and structure of the data meet the model requirements. Then use the model to infer the test results, identify potential abnormal data and their root causes, and output the model's analysis results, which include detailed information on the abnormal data and root cause analysis.

[0035] Then, the preset standards are defined, including thresholds for indicators such as test coverage and test pass rate. The test analysis data is then compared with the preset standards to generate comparison results, and a detailed test report is generated based on the comparison results. The detailed test report includes test coverage, test pass rate, abnormal data details, root cause analysis, and potential abnormal data. The detailed test report can also be output as a file or displayed on the user interface to provide comprehensive test results to help users quickly understand the test situation and potential problems.

[0036] S120, adjust the test parameters according to the root cause analysis in the detailed test report. During the test, adjust the computing resources according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. After the test is completed, the test process and detailed test report are solidified into reusable test cases based on the test script generation technology.

[0037] Among them, the root cause analysis results are extracted from the detailed test report to understand the reasons for the test failure. According to the root cause analysis results, the test parameters, such as the selection of test cases and test frequency, can be automatically adjusted.

[0038] At the same time, during the test process, the computing resources can be adjusted according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested, ensuring efficient resource utilization and load balancing. After the test is completed, the test script can be automatically generated according to the test process and detailed test report, including test cases, test parameters, test results, etc., and the generated test script can be stored in the version control system to ensure the traceability and reusability of the script. The generated test script can be reused in subsequent tests to improve the efficiency and consistency of the test.

[0039] By executing steps S100 to S120, efficient and accurate testing of complex data sets of financial transaction records, customer information and market conditions is achieved. The main functions include: automatically constructing multi-dimensional test cases to ensure the comprehensiveness and accuracy of the test; using a distributed computing framework to improve test efficiency and ensure rapid processing of large-scale data; calling pre-trained analysis models for intelligent analysis and providing detailed abnormal data reports; dynamically adjusting computing resources to improve resource utilization and load balancing; generating test script technology to ensure the reusability of the test process and results; real-time monitoring of data flows, dynamically adjusting the priority of key test cases, and improving the real-time and responsiveness of the test; predicting future load changes and optimizing resource allocation; real-time detection of data quality to ensure high data quality; dynamically adjusting the test frequency to optimize the use of test resources; adaptive sampling strategies to ensure the representativeness and coverage of test data. Through the combined effect of these technical means, the efficiency and accuracy of large-scale data testing are ensured, and the automation and intelligence level of testing is improved.

[0040] The testing process also includes: S131, constructing a data testing framework, and using the data testing framework to perform a comprehensive test on the data set to be tested during the transplantation process.

[0041] Among them, a data testing framework is built, which integrates data collection, conversion, verification and rollback mechanisms. During the data migration process, the constructed data testing framework is used to conduct comprehensive tests on the data to ensure data consistency, correctness and performance; by providing a comprehensive testing and verification mechanism, data loss and errors are prevented. Specifically, a data testing framework is designed and implemented, which should have the following functional modules: 1. Data collection: Collect data from the source and target to ensure data integrity and real-time performance.

[0042] 2. Data conversion: Convert the source data into the format required by the target end to ensure data compatibility and consistency.

[0043] 3. Data verification: Perform multiple verifications on the data, including verification of data structure, field type, data content and association relationships.

[0044] 4. Data rollback: If an error occurs during data migration, it can be rolled back to the previous state to ensure data security.

[0045] S132, after the migration of the data set to be tested is completed, the real-time verification data of the target end is obtained, and the pre-set automated data comparison and verification tool is called, and the data structure, field type, data content and association relationship between the data set to be tested and the real-time verification data are verified in real time based on the automated data comparison and verification tool, and the corresponding verification results are obtained, and the verification results are written into a detailed test report.

[0046] Among them, after the data migration is completed, real-time verification data is obtained from the target end for subsequent comparison and verification. And use the pre-set automated data comparison and verification tool to perform real-time verification on the data at the source and target ends to ensure data consistency. Specifically, first call the pre-set automated data comparison and verification tool, and use the tool to compare the test data set at the source end and the real-time verification data at the target end. The comparison specifically includes verification of data structure, field type, data content and association relationships, and then identify and record differences and potential errors found during the data comparison process. Use automated tools to ensure the integrity and consistency of data during the migration process, and promptly discover and record data differences and errors.

[0047] Finally, extract the verification results from the automated data comparison and verification tool, including the comparison results of data structure, field type, data content and association relationships, and write the verification results into a detailed test report. The report content should include the results of various consistency checks and the location of abnormal data. Similarly, output the generated detailed test report as a file or display it on the user interface for developers to view and analyze.

[0048] Through the execution steps from S131 to S132 above, comprehensive testing and verification of the data migration process is achieved, ensuring the integrity and accuracy of the data when migrating between different systems, environments or databases. Specifically, by building a data testing framework that integrates data collection, conversion, verification and rollback mechanisms, the data consistency, correctness and performance of the data migration process are comprehensively tested to ensure the accuracy and reliability of the data. At the same time, by obtaining real-time verification data from the target end after the data migration is completed, the data on the source and target ends are verified in real time using automated tools to ensure data consistency, and to promptly discover and record data differences and errors.

[0049] The detailed test report shows the results of each consistency check and the location of abnormal data, helping developers to quickly identify and solve problems. Through the joint action of these technical means, not only the integrity and accuracy of the data during the migration process are ensured.

[0050] In addition, the analysis models used in the embodiments of the present application are obtained through training based on a large amount of historical test correlations, and are applied as analysis models in the solutions of the present application only after the model training converges, and the hyperparameters of the analysis model can also be adjusted.

[0051] It should be pointed out here that in the process of adjusting computing resources according to the real-time load situation and historical load data of the test task corresponding to the test data set through the pre-set dynamic resource scheduling mechanism, the following steps are performed: S1201, collect current load data of each computing node and retrieve corresponding historical load data.

[0052] Among them, monitoring tools are deployed on each computing node to ensure that load data can be collected in real time. The current load data of each computing node is collected in real time through the monitoring tools. The current load data includes but is not limited to CPU usage, memory usage, disk I / O, network bandwidth, etc., and the collected load data is transmitted to the central data storage system (such as time series database InfluxDB, TimescaleDB, etc.) to ensure the real-time and integrity of the data.

[0053] Retrieve historical load data from the time series database, including the load conditions in the past period of time. Specifically, query the historical load data in the time series database, including CPU usage, memory usage, disk I / O, network bandwidth, etc. in the past period of time; then pre-process the historical load data, including data cleaning, denoising and standardization, to ensure data accuracy and consistency.

[0054] S1202, retrieve a pre-trained analysis model, input historical load data and current load data into the analysis model, and obtain corresponding load prediction results. The load prediction results are real-time predictions of load changes in a future period of time.

[0055] Among them, a pre-trained machine learning model, such as a time series prediction model, is loaded as an analysis model, and the historical load data and the current load data are merged to form an input data set. The analysis model is used to infer the input data set to predict the load changes in the future period, thereby obtaining the corresponding load prediction results. The load prediction results include CPU usage, memory usage, disk I / O, network bandwidth, etc. in the future period.

[0056] S1203: Adjust the computing resource allocation of each computing node based on the load prediction result.

[0057] First, the load prediction results are analyzed to determine the load conditions of each computing node in the future. Based on the prediction results, a resource allocation strategy is formulated. For example, if it is predicted that a computing node will have a high load in the future, the computing resources of the node can be increased in advance; if it is predicted that a computing node will have a low load in the future, some of the computing resources of the node can be released in advance. The computing resources of each computing node can be dynamically adjusted through the scheduler to ensure efficient resource utilization and load balancing.

[0058] By executing steps S1201 to S1203, dynamic scheduling of computing resources is achieved, ensuring efficient execution of test tasks and efficient use of resources. The main functions include: real-time monitoring of the current load of each computing node, intelligent prediction using historical load data, dynamic adjustment of computing resource allocation, ensuring efficient use of resources and load balancing, avoiding overloading of some nodes while other nodes are idle, thereby improving the execution efficiency of test tasks and resource utilization, and improving the efficiency and accuracy of the overall test.

[0059] During the testing process, there is a lot of data that needs to be tested. In order to improve the testing efficiency and give priority to testing important data, the method also includes: S121, obtaining corresponding real-time monitoring data stream.

[0060] Among them, using stream processing technology to collect data streams in real time and preprocessing the collected data can ensure timely response to data changes. It should be pointed out that real-time monitoring data includes current data flow, data type, and data source.

[0061] S122, calling a pre-set monitoring strategy, and identifying corresponding key test cases based on the monitoring strategy.

[0062] Among them, according to the pre-set monitoring strategy, key test cases are identified, such as transaction records of high-risk customers and data with large market fluctuations; specifically, the monitoring strategy is defined, including rules and standards for identifying key test cases. For example, transaction records of high-risk customers may include customers with credit scores below a certain threshold, and data with large market fluctuations may include data with stock price fluctuations exceeding a certain percentage; then the real-time monitoring data stream is matched with the monitoring strategy to identify key test cases that meet the rules, and the identified key test cases are marked to ensure that these cases are given priority in subsequent processing.

[0063] It should also be pointed out here that in the data testing process of the financial industry, the identification process of key test cases specifically includes: First, define the standards for key test cases: High-risk customers: Identify high-risk customers based on factors such as customer credit scores, historical transaction records, account balances, etc., for example, customers with credit scores below a certain threshold, or customers with frequent large-value transaction records; Data with large market fluctuations: Identify time periods or specific data with large market fluctuations based on the fluctuations of market data, for example, data with stock price fluctuations exceeding a certain percentage, or data with large fluctuations in foreign exchange rates; Abnormal transactions: Identify abnormal transaction records based on factors such as transaction amount, transaction frequency, and transaction time, for example, transactions with a single transaction amount exceeding a certain threshold, or transactions occurring during abnormal time periods. Business critical data: Identify data that is critical to business operations based on business needs, for example, transaction records involving large-value fund transfers, or data that affects the company's financial statements.

[0064] The monitoring strategy specifically includes: 1. Static rules: According to the preset static rules, key test cases are directly identified, for example, transaction records with a transaction amount exceeding 1 million yuan, or customers with a credit score below 600. 2. Dynamic rules: According to the analysis results of real-time data streams, the identification rules are dynamically adjusted. For example, if the transaction volume of a certain customer suddenly increases, the system can temporarily mark the transaction record of that customer as a key test case. 3. Machine learning model: Use machine learning models to classify and predict data and identify potential key test cases. For example, train a model to predict which transaction records may be risky.

[0065] S123, adjusting the priority of key test cases according to the real-time monitoring data flow, and executing the key test cases first based on the priority queue.

[0066] The priority assignment includes: 1. Static priority: According to the preset priority rules, a fixed priority is assigned to each test case. For example, the transaction records of high-risk customers have a priority of 1, and the data with large market fluctuations have a priority of 2. Dynamic priority: According to the analysis results of real-time data streams, the priority of test cases is dynamically adjusted. For example, if the transaction volume of a certain customer suddenly increases, the system can temporarily increase the priority of the customer's transaction records.

[0067] Assume there is a financial transaction dataset with the following fields: customer ID, transaction amount, transaction time, credit score. The following rules and strategies can be defined to identify key test cases: Rules for high-risk customers: customers with a credit score below 600; Strategy: Mark the transaction records of these customers as critical test cases with a priority of 1.

[0068] The rules corresponding to data with large market fluctuations are: transaction records with transaction amounts exceeding 1 million yuan; strategy: mark these transaction records as key test cases with a priority of 2.

[0069] Rules corresponding to abnormal transactions: transactions that occur during abnormal time periods (such as 2 a.m. to 4 a.m.); Strategy: mark these transaction records as critical test cases with a priority of 3.

[0070] Rules for business-critical data: transaction records involving large-value fund transfers; Strategy: mark these transaction records as critical test cases with a priority of 4.

[0071] Specifically, based on real-time monitoring of data flows, the priority of key test cases is evaluated. For example, if a customer's transaction volume suddenly increases, the priority of the customer's transaction records can be increased. The evaluated priority information is updated to the priority queue to ensure that high-priority test cases are placed at the front of the queue. Then, the scheduler is used to schedule test tasks according to the order in the priority queue. At the same time, the execution of tasks needs to be monitored in real time to ensure the priority execution of key test cases and record all operations during the execution process. Through the above detailed description, it can be ensured that in the data testing process of the financial industry, key test cases can be accurately identified and executed with priority, thereby improving the efficiency and quality of the test.

[0072] At the same time, during the testing process, it is necessary to ensure the quality of the test data, so the method also includes: S124, retrieve the corresponding real-time monitoring data stream, perform quality detection on the real-time monitoring data stream through a data quality detection module, and obtain the corresponding quality detection result.

[0073] Among them, the system configures a data quality detection module, defines detection rules and standards, such as integrity check, consistency check, format check, range check, and identification of missing values, null values, and abnormal values ​​in the data; then the real-time monitoring data stream is input into the data quality detection module for quality detection and the detection results are recorded. Correspondingly, the detection results include the detection results of integrity, consistency, format, and range, as well as the identified missing values, null values, and abnormal values.

[0074] S125: If there is a data abnormality pattern in the quality detection result, determine the abnormality level of the data abnormality pattern.

[0075] Among them, data anomaly patterns, such as missing values, null values, outliers, etc., are identified from the detection results. According to preset rules and standards, the severity of each data anomaly pattern is evaluated and the anomaly level is determined. For example, a small number of missing values ​​may be marked as low-level anomalies, and a large number of outliers may be marked as high-level anomalies.

[0076] In the embodiment of the present application, the abnormality level includes low level, medium level or high level.

[0077] S126: If the anomaly level is low, the automatic repair mechanism is started to repair the data problem corresponding to the data anomaly pattern. If the anomaly level is medium or high, an alarm is generated and the relevant personnel are notified. All operations of the relevant personnel in the process of detecting and repairing the data problem are recorded, and a data quality report is generated.

[0078] Among them, for low-level anomalies, the automatic repair mechanism is started to repair problems in the data. It should be pointed out here that the automatic repair mechanism defines repair rules and methods, such as filling missing values, correcting format errors, etc., and automatically repairs low-level abnormal data problems according to the configured repair rules; and verifies the repair results to ensure that data problems are effectively resolved, so that low-level anomalies can be automatically repaired, data quality can be improved, and manual intervention can be reduced.

[0079] For intermediate or advanced anomalies, alarm information is generated according to the anomaly level, including the anomaly pattern, anomaly level, affected data, etc. Relevant personnel can be notified via email, SMS, instant messaging tools, etc., and all operations performed by relevant personnel during the detection and repair of data problems need to be recorded, including detection methods, repair methods, repair time, etc.

[0080] Finally, based on the detection results and repair records, a data quality report is generated, including the detection results, abnormal patterns, abnormal levels, repair process, etc. The data quality report is output as a file or displayed on the user interface.

[0081] Through the above technical solutions, data quality detection and exception handling of real-time monitoring data streams are realized. The main functions include: real-time monitoring of data streams to ensure timely response to data changes; using data quality detection modules for quality detection to ensure data integrity, consistency and format correctness, and timely detection of missing values, null values ​​and abnormal values; determining the abnormal level of data abnormality patterns based on quality detection results to ensure the pertinence of subsequent processing; starting automatic repair mechanisms for low-level abnormalities to improve data quality and reduce manual intervention; generating alarms for intermediate or high-level abnormalities and notifying relevant personnel to ensure that problems are handled in a timely manner; recording the operations of relevant personnel to ensure traceability and transparency; generating detailed data quality reports to provide comprehensive data quality information. Through the joint action of these technical means, the high quality of data and the accuracy of testing are ensured, data problems are discovered and handled in a timely manner, and the efficiency and reliability of testing are improved.

[0082] During testing, the method also includes: S127, performing a test at a preset initial test frequency, and recording result data of each test.

[0083] Among them, according to business needs and historical experience, an initial test frequency is preset, for example, a test is performed once an hour, or multiple tests are performed every day, and then the test tasks are performed regularly according to the preset initial test frequency, and the result data of each test is recorded. The result data includes test coverage, test pass rate, abnormal data details, etc. The above data can be stored in a database or log file for subsequent analysis.

[0084] S128, analyzing the test results and extracting key indicators.

[0085] The result data of each test is collected from a database or log file, and key indicators are extracted from the test result data, such as test coverage, the number and type of abnormal data. For example, the test coverage can be expressed as the ratio of tested cases to total cases, and the number of abnormal data can be expressed as the number of detected abnormal data entries; and the extracted key indicators are analyzed to evaluate the effect and problems of the test, for example, whether the test coverage reaches the expected goal and whether the number and type of abnormal data exceed the normal range.

[0086] S129, determining real-time feedback data of the initial test frequency based on the key indicators, and adjusting the initial test frequency based on the real-time feedback data.

[0087] Among them, real-time feedback data is generated based on the extracted key indicators. For example, if the test coverage is low, the generated feedback data indicates that the test frequency needs to be increased; if the number of abnormal data is large, the generated feedback data indicates that the test frequency needs to be increased to promptly discover and fix problems.

[0088] Then, you can read the real-time feedback data from the database or log file, and formulate a frequency adjustment strategy based on the real-time feedback data. For example, if the test coverage is low, increase the test frequency; if the test pass rate is high, maintain the current frequency or appropriately reduce the frequency to save resources; according to the adjustment strategy, dynamically adjust the test frequency, for example, adjust the test frequency from once an hour to once every half an hour.

[0089] At the same time, record the adjusted test frequency and reasons for adjustment to ensure the traceability of the adjustment process; continue to perform test tasks under the adjusted test frequency, evaluate the adjustment effect, and ensure the optimization of the test frequency.

[0090] By executing the above steps S127 to S129, the test frequency is dynamically adjusted to ensure the efficiency and accuracy of the test. The main functions include: presetting the initial test frequency and recording the result data of each test to ensure the integrity and traceability of the test results; extracting key indicators through analysis of the test results to provide a basis for frequency adjustment; generating real-time feedback data based on key indicators to ensure the timeliness and pertinence of frequency adjustment; dynamically adjusting the test frequency to optimize the use of test resources and respond to data changes in a timely manner. Through the combined effect of these technical means, the flexibility and adaptability of the test are improved, ensuring the efficiency and accuracy of the test.

[0091] During the test process, for different data, when collecting data, it is necessary to determine the appropriate collection method to ensure the accuracy of the subsequent test process, so the method also includes: S101, determining corresponding test objectives and data characteristics.

[0092] First, you need to clearly define the test objectives, such as comprehensive coverage, performance testing, anomaly detection, trend analysis, etc. You also need to analyze data characteristics, including: 1. Data volume: Analyze the size of the data set to determine whether sampling is needed to reduce the computational burden; 2. Data distribution: Analyze the distribution of data, such as normal distribution, skewed distribution, etc.; 3. Data type: Analyze the type of data, such as numeric, categorical, text, etc.; 3. Data correlation: Analyze the correlation between data, such as the correlation of time series data.

[0093] S102: Determine a corresponding data sampling strategy based on the test objectives and data characteristics.

[0094] The data sampling strategy of this application includes but is not limited to: Random sampling: randomly extract samples from the data set, which is suitable for the case where the data is evenly distributed. Stratified sampling: divide the data into several layers according to certain characteristics of the data (such as customer type, transaction type, etc.), and then extract samples from each layer, which is suitable for the case where the data is unevenly distributed. Time window sampling: extract samples according to the time window (such as every hour, every day, etc.), which is suitable for time series data. Importance sampling: extract samples according to the importance and weight of the data, which is suitable for the case where it is necessary to focus on certain key data. Systematic sampling: extract samples at fixed intervals, which is suitable for the case where the data volume is large and evenly distributed.

[0095] Randomly extract samples from the data set. This is suitable for situations where the data is evenly distributed. Samples are extracted from the data set based on the selected sampling strategy.

[0096] S103, obtaining test results of data testing based on the sampling strategy, and adjusting the sampling strategy based on data characteristics and the test results.

[0097] Among them, according to the selected sampling strategy, the test task is executed, and the test results are recorded at the same time, including test coverage, test pass rate, abnormal data details, etc.; then the test results are analyzed and the effect of the sampling strategy is evaluated. For example, if the test coverage is low, the sampling ratio may need to be increased; if there are a lot of abnormal data, the sampling method may need to be adjusted.

[0098] According to the analysis results, the sampling strategy is dynamically adjusted, for example, from random sampling to stratified sampling, or from time window sampling to importance sampling; it is also necessary to verify whether the adjusted sampling strategy is effective to ensure the improvement of test results.

[0099] By executing the above steps S101 to S103, the test frequency is dynamically adjusted to ensure the efficiency and accuracy of the test. The main functions include: clarifying the test objectives and data characteristics during the test process to ensure that the test objectives are clear and the data characteristics are clear; selecting appropriate data sampling strategies according to the test objectives and data characteristics to improve the representativeness and coverage of the test; dynamically adjusting the sampling strategy based on the test results and data characteristics to ensure the representativeness and coverage of the test data and improve the efficiency and accuracy of the test. Through the joint action of these technical means, the efficiency and accuracy of the test are ensured, and the flexibility and adaptability of the test are improved.

[0100] The present application embodiment discloses a data testing system, referring to Figure 2 , the system includes but is not limited to: The test result acquisition module 200 acquires the data set to be tested, automatically constructs multi-dimensional test cases according to preset test rules and metadata information of the data set, and uses a distributed computing framework to process the multi-dimensional test cases in parallel to obtain corresponding test results, wherein the data set to be tested includes financial transaction records, customer information, and market conditions; A detailed test report generation module 210 retrieves a pre-trained analysis model to analyze the test results, obtains corresponding test analysis data, compares the test analysis data with a preset standard, and generates a corresponding detailed test report, wherein the detailed test report includes test coverage, test pass rate, abnormal data details, root cause analysis, and potential abnormal data; The computing resource adjustment module 220 adjusts the test parameters according to the root cause analysis in the detailed test report. During the test process, the computing resources are adjusted according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. After the test is completed, the test process and detailed test report are solidified into reusable test cases based on the test script generation technology.

[0101] Furthermore, the system also includes but is not limited to: A real-time monitoring data flow acquisition module is used to acquire the corresponding real-time monitoring data flow, wherein the real-time monitoring data includes the current data flow, data type, and data source; The key test case identification module retrieves the pre-set monitoring strategy and identifies the corresponding key test cases based on the monitoring strategy. The key test cases include the transaction records of high-risk customers and data with large market fluctuations. The execution module adjusts the priority of key test cases according to the real-time monitoring data flow, and prioritizes the execution of key test cases based on the priority queue.

[0102] Furthermore, the system also includes but is not limited to: The current load data collection module is used to collect the current load data of each computing node and retrieve the corresponding historical load data. The current load data includes CPU usage, memory usage, disk I / O, network bandwidth, etc. The historical load data is the load situation in the past period of time extracted from the time series database. The load forecast result acquisition module calls the pre-trained analysis model and inputs the historical load data and the current load data into the analysis model to obtain the corresponding load forecast result. The load forecast result is a real-time prediction of the load change in the future period. The node computing resource adjustment module is used to adjust the computing resource allocation of each computing node based on the load prediction results.

[0103] Furthermore, the system also includes but is not limited to: The quality inspection result acquisition module retrieves the corresponding real-time monitoring data stream, and performs quality inspection on the real-time monitoring data stream through the data quality inspection module to obtain the corresponding quality inspection results, wherein the quality inspection includes integrity, consistency, format, range, and identification of missing values, null values, and abnormal values ​​in the data; An abnormality level determination module, if there is a data abnormality pattern in the quality detection result, is used to determine the abnormality level of the data abnormality pattern, wherein the abnormality level includes low level, medium level or high level; The repair module is used to start the automatic repair mechanism to repair the data problems corresponding to the data anomaly pattern if the anomaly level is low. If the anomaly level is medium or high, an alarm is generated and the relevant personnel are notified. All operations of the relevant personnel in the process of detecting and repairing data problems are recorded, and a data quality report is generated.

[0104] Furthermore, the system also includes but is not limited to: During the test process, the test is performed at the preset initial test frequency, and the result data of each test is recorded, wherein the result data includes the test coverage, the test pass rate, and the abnormal data details; The key indicator extraction module is used to analyze the test results and extract key indicators, where the key indicators include test coverage, the number and type of abnormal data; The real-time feedback data determination module is used to determine the real-time feedback data of the initial test frequency based on the key indicators, and adjust the initial test frequency based on the real-time feedback data.

[0105] Furthermore, the system also includes but is not limited to: The test target determination module is used to determine the corresponding test targets and data characteristics during the test process, wherein the data characteristics include data volume, data distribution, data type, and data correlation; A data sampling strategy determination module is used to determine the corresponding data sampling strategy based on the test objectives and data characteristics; The sampling strategy adjustment module obtains the test results of data testing based on the sampling strategy, and adjusts the sampling strategy based on the data characteristics and the test results.

[0106] An embodiment of the present application further discloses a data testing method, including a processor, wherein a program of any one of the data testing methods described above is run in the processor.

[0107] The embodiment of the present application also discloses a storage medium storing a program of any one of the data testing methods described above.

[0108] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A data testing method, characterized in that: include: Obtain a data set to be tested, automatically construct a multi-dimensional test case according to preset test rules and metadata information of the data set, and use a distributed computing framework to parallel process the multi-dimensional test case to obtain corresponding test results, wherein the data set to be tested includes financial transaction records, customer information, and market conditions; Retrieving a pre-trained analysis model to analyze the test results, and obtaining corresponding test analysis data, comparing the test analysis data with preset standards, and generating a corresponding detailed test report, wherein the detailed test report includes test coverage, test pass rate, abnormal data details, root cause analysis, and potential abnormal data; Adjust the test parameters according to the root cause analysis in the detailed test report. During the test, adjust the computing resources according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. After the test is completed, solidify the test process and detailed test report into a reusable test case based on the test script generation technology; The testing process also includes: Construct a data testing framework, and use the data testing framework to conduct a comprehensive test on the data set to be tested during the migration process, wherein the data testing framework integrates data collection, conversion, verification and rollback mechanisms; the comprehensive test includes consistency, correctness and performance; After the migration of the data set to be tested is completed, the real-time verification data of the target end is obtained, and the pre-set automated data comparison and verification tool is called. The data structure, field type, data content and association relationship between the data set to be tested and the real-time verification data are verified in real time based on the automated data comparison and verification tool, and the corresponding verification results are obtained, and the verification results are written into a detailed test report.

2. The data testing method according to claim 1, characterized in that: During testing, the method also includes: Obtain the corresponding real-time monitoring data stream, wherein the real-time monitoring data includes the current data flow, data type, and data source; Retrieve the pre-set monitoring strategy and identify the corresponding key test cases based on the monitoring strategy, where the key test cases include transaction records of high-risk customers and data with large market fluctuations. Adjust the priority of key test cases based on real-time monitoring data flow, and prioritize the execution of key test cases based on the priority queue.

3. The data testing method according to claim 1, characterized in that: The method also includes: Collect the current load data of each computing node and retrieve the corresponding historical load data. The current load data includes CPU usage, memory usage, disk I / O, and network bandwidth. The historical load data is the load situation in the past period extracted from the time series database. Retrieve the pre-trained analysis model, input the historical load data and current load data into the analysis model, and obtain the corresponding load forecast result. The load forecast result is a real-time forecast of the load changes in the future period; The computing resource allocation of each computing node is adjusted based on the load prediction result.

4. The data testing method according to claim 2, characterized in that: The method also includes: Retrieve the corresponding real-time monitoring data stream, perform quality inspection on the real-time monitoring data stream through the data quality inspection module, and obtain the corresponding quality inspection results, where the quality inspection includes integrity, consistency, format, range, and identification of missing values, null values, and abnormal values ​​in the data; If there is a data anomaly pattern in the quality detection result, determine the anomaly level of the data anomaly pattern, wherein the anomaly level includes low, medium or high; If the anomaly level is low, the automatic repair mechanism is activated to repair the data problem corresponding to the data anomaly pattern. If the anomaly level is medium or high, an alarm is generated and the relevant personnel are notified. All operations of the relevant personnel in the process of detecting and repairing data problems are recorded, and a data quality report is generated.

5. The data testing method according to claim 4, characterized in that: The method also includes: During the test process, the test is performed at the preset initial test frequency, and the result data of each test is recorded, wherein the result data includes the test coverage, the test pass rate, and the abnormal data details; Analyze the test results and extract key indicators, including test coverage, number and type of abnormal data; Determine real-time feedback data of an initial test frequency based on the key indicator, and adjust the initial test frequency based on the real-time feedback data.

6. The data testing method according to claim 1, characterized in that: The method also includes: During the testing process, the corresponding test objectives and data characteristics are determined, where the data characteristics include data volume, data distribution, data type, and data correlation; Determine a corresponding data sampling strategy based on the test target and the data characteristics; A test result of data testing based on a sampling strategy is obtained, and the sampling strategy is adjusted based on the data characteristics and the test result.

7. A data testing system, characterized in that: include: A test result acquisition module acquires a data set to be tested, automatically constructs a multi-dimensional test case according to preset test rules and metadata information of the data set, and uses a distributed computing framework to perform parallel processing on the multi-dimensional test case to obtain corresponding test results, wherein the data set to be tested includes financial transaction records, customer information, and market conditions; A detailed test report generation module, which uses a pre-trained analysis model to analyze the test results, obtains corresponding test analysis data, compares the test analysis data with preset standards, and generates a corresponding detailed test report, wherein the detailed test report includes test coverage, test pass rate, abnormal data details, root cause analysis, and potential abnormal data; A computing resource adjustment module adjusts test parameters according to the root cause analysis in the detailed test report. During the test, the computing resources are adjusted according to the real-time load conditions and historical load data of the test tasks corresponding to the data set to be tested through a pre-set dynamic resource scheduling mechanism. After the test is completed, the test process and detailed test report are solidified into a reusable test case based on the test script generation technology; The testing process also includes: Construct a data testing framework, and use the data testing framework to conduct a comprehensive test on the data set to be tested during the migration process, wherein the data testing framework integrates data collection, conversion, verification and rollback mechanisms; the comprehensive test includes consistency, correctness and performance; After the migration of the data set to be tested is completed, the real-time verification data of the target end is obtained, and the pre-set automated data comparison and verification tool is called. The data structure, field type, data content and association relationship between the data set to be tested and the real-time verification data are verified in real time based on the automated data comparison and verification tool, and the corresponding verification results are obtained, and the verification results are written into a detailed test report.

8. The data testing system according to claim 7, characterized in that: The system also includes: A real-time monitoring data flow acquisition module is used to acquire the corresponding real-time monitoring data flow, wherein the real-time monitoring data includes the current data flow, data type, and data source; The key test case identification module retrieves the pre-set monitoring strategy and identifies the corresponding key test cases based on the monitoring strategy, wherein the key test cases include the transaction records of high-risk customers and data with large market fluctuations. The execution module adjusts the priority of key test cases according to the real-time monitoring data flow, and prioritizes the execution of key test cases based on the priority queue.

9. A data testing method, characterized in that: It comprises a processor, in which a program of the data testing method according to any one of claims 1 to 6 is run.

10. A storage medium, characterized in that: A program storing the data testing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Train display software testing method, device and system

    CN111124877A

  • Cluster load resource scheduling method and device, equipment, medium and product

    CN112860403A

  • Digital resource verification and test method

    CN117370179A

  • Automatic test method for reducing test technical threshold of intelligent terminal system

    CN117931620A

  • Database all-in-one machine configuration method

    CN118132263A

Cited By

  • Financial industry distributed system data consistency automatic test platform and method

    CN120492269A

  • Distributed storage test acceleration method and device, electronic equipment and storage medium

    CN121681398A

  • Measuring instrument dynamic calibration method and system based on load index and precision attenuation

    CN122548698A