Time sequence database testing method, system and equipment

By performing pattern analysis of the timing data of the timing database and automated test cases generation and execution, the problem of low efficiency of traditional manual testing is solved, and more efficient and accurate test coverage is achieved, ensuring the stability and reliability of the database.

CN119065982AActive Publication Date: 2024-12-03成都虚谷伟业科技有限公司

Patent Information

Application Number
CN202411207840.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2024-08-30
Publication Date
2024-12-03
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

Time-series databases are updated frequently and iterated, traditional manual testing methods are inefficient, and cannot fully cover new functions and possible defects, resulting in performance degradation or data inconsistency.

Method used

By obtaining the timing data of the timing database for pattern analysis, generating analytical data, creating test cases based on the analysis data, and automatically executing test cases with a preset test execution engine, reducing manual participation and improving test efficiency and coverage.

Benefits of technology

Automated testing is implemented, testing efficiency is improved, test cases are ensured to cover key functions and performance indicators, with higher accuracy, reduced manual errors, and enhanced database stability and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065982A_ABST
    Figure CN119065982A_ABST
Patent Text Reader

Abstract

The invention discloses a time sequence database testing method, system and equipment, and relates to the technical field of databases, the method comprises the following steps: obtaining time sequence data in a target time sequence database, and carrying out pattern analysis on the time sequence data to obtain time sequence analysis data, the time sequence analysis data is used for representing data characteristics of at least one piece of time sequence data; creating at least one test case according to the time sequence analysis data and a predefined test case creation rule, the test case having at least one item of data characteristics of the time sequence data; and executing the at least one test case according to a preset test execution engine and a predefined test case execution rule to obtain a test result. The method has the effect of improving the test efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of databases, and in particular to a time series database testing method, system and device. Background Art

[0002] Time series data, also known as time series data, refers to data arranged in chronological order. Time series data reflects the trend of one or more random variables changing over time. Time series databases are systems specifically used to store and process time series data. They need to support basic functions such as fast writing, persistence, and multi-dimensional aggregate queries of time series data. Time series databases have the advantages of high performance, high throughput, and scalability. They can safely and efficiently aggregate, store, analyze, and distribute TB or even PB-level data generated by a large amount of data collection physical devices every day. At the same time, their query and analysis capabilities provide considerable convenience for time series data analysis and user decision-making.

[0003] With the popularity and use of time series data in finance, the Internet of Things, energy and other fields, the demand for the use of time series databases has gradually increased. However, the update and iteration of the time series database system is relatively frequent. Due to the high dimensionality, large scale and complexity of time series data, such as data volume, number of sub-tables, multi-dimensional data fields, etc., ensuring the stability and reliability of the time series database after each version update has become an issue that must be considered. The testing of each iterative version not only includes new function testing, but also regression testing of the key core functions of previous versions; however, traditional manual testing methods are often time-consuming and labor-intensive, with low testing efficiency, and manual testing methods may not be able to fully cover all newly introduced functions and possible defects, resulting in performance degradation or data inconsistency after version iteration. Summary of the invention

[0004] In order to improve the testing efficiency, the present application provides a time series database testing method, system and device. In the first aspect, the present application provides a time series database testing method, which adopts the following technical solutions:

[0005] A time series database testing method, comprising:

[0006] Acquire time series data in a target time series database, and perform pattern analysis on the time series data to obtain time series analysis data, wherein the time series analysis data is used to characterize at least one data feature of the time series data;

[0007] Creating at least one test case according to the time series analysis data and a predefined test case creation rule, wherein the test case has at least one data feature of the time series data;

[0008] The at least one test case is executed according to a preset test execution engine and a predefined test case execution rule to obtain a test result.

[0009] By adopting the above technical solution, the time series data in the target time series database is obtained, and the time series data is subjected to pattern analysis to obtain the time series analysis data, which is used to characterize the data characteristics of at least one time series data; then, at least one test case is created according to the time series analysis data and predefined test case creation rules, and the test case has the data characteristics of at least one time series data; finally, at least one test case is executed according to a pre-set test execution engine and pre-defined test case execution rules to obtain a test result. The test method of the present application has a high degree of automation, and by automatically generating and executing test cases, the need for manual participation is reduced, which is more time-saving and labor-saving, thereby improving test efficiency, and compared with manual testing, the test cases cover key functions and performance indicators more comprehensively and with higher accuracy.

[0010] Optionally, the step of performing pattern analysis on the time series data to obtain time series analysis data includes:

[0011] Performing data preprocessing on the time series data to obtain preprocessed data;

[0012] Performing feature engineering processing on the preprocessed data to obtain data features;

[0013] The data features are input into the evaluated time series data analysis model to obtain time series analysis data.

[0014] By adopting the above technical solution, in order to obtain time series analysis data, the time series data is first preprocessed to obtain preprocessed data, and then feature engineering is performed on the preprocessed data to obtain data features. The data features are then input into an evaluated time series data analysis model to obtain time series analysis data.

[0015] Optionally, the step of performing feature engineering on the preprocessed data to obtain data features includes:

[0016] Performing feature construction and feature extraction on the preprocessed data to obtain intermediate features;

[0017] An application scenario of the time series data is obtained, and feature selection is performed on the intermediate features according to the application scenario to determine data features.

[0018] By adopting the above technical solution, in order to determine the data features, feature construction and feature extraction are performed on the preprocessed data to obtain intermediate features, and then the application scenario of the time series data is obtained, and feature selection is performed on the intermediate features according to the application scenario to determine the data features.

[0019] Optionally, the step of obtaining an application scenario of the time series data, and performing feature selection on the intermediate features according to the application scenario to determine data features includes:

[0020] Acquire an application scenario of the time series data, and determine a feature category of each intermediate feature according to the application scenario and the intermediate features;

[0021] For each feature category, the feature category is used as a target category, and the correlation between the target category and each non-target category is calculated;

[0022] Determine the weight corresponding to each feature category based on the application scenario, and calculate the evaluation value of each feature category according to the weight and the association degree;

[0023] The feature category is selected according to the size of the evaluation value, and the intermediate feature corresponding to the selected feature category is used as the data feature.

[0024] By adopting the above technical solution, in order to obtain data features, the application scenario of the time series data is first obtained, and the feature category of each intermediate feature is determined according to the application scenario and the intermediate features. For each feature category, the feature category is used as the target category, and the correlation between the target category and each non-target category is calculated. Then, the weight corresponding to each feature category is determined based on the application scenario, and the evaluation value of each feature category is calculated according to the weight and the correlation. Then, the feature category is selected according to the size of the evaluation value, and the intermediate feature corresponding to the selected feature category is used as the data feature.

[0025] Optionally, the step of generating the evaluated time series data analysis model includes:

[0026] Obtaining sample data, and dividing the sample data into a training set, a validation set, and a test set;

[0027] Acquire a pre-built time series data analysis model, and train the pre-built time series data analysis model according to the training set to obtain a trained time series data analysis model;

[0028] Optimizing the trained time series data analysis model according to the validation set to obtain an optimized time series data analysis model;

[0029] The optimized time series data analysis model is evaluated according to the test set to obtain an evaluated time series data analysis model.

[0030] By adopting the above technical solution, in order to obtain an evaluated time series data analysis model, sample data is first obtained, and the sample data is divided into a training set, a validation set and a test set, and then a pre-built time series data analysis model is obtained, and the pre-built time series data analysis model is trained according to the training set to obtain a trained time series data analysis model, and then the trained time series data analysis model is optimized according to the validation set to obtain an optimized time series data analysis model, and then the optimized time series data analysis model is evaluated according to the test set to obtain an evaluated time series data analysis model.

[0031] Optionally, after the step of executing the at least one test case according to the preset test execution engine and the predefined test case execution rule to obtain the test result, the method further includes:

[0032] Analyzing the test results to obtain test analysis data;

[0033] The predefined test case creation rules and the predefined test execution rules are optimized according to the test analysis data.

[0034] By adopting the above technical solution, in order to optimize the test case generation process and execution process and reduce manual intervention, the test results are first analyzed to obtain test analysis data, and then the pre-defined test case creation rules and pre-defined test execution rules are optimized based on the test analysis data.

[0035] Optionally, the step of optimizing the predefined test case creation rules and the predefined test execution rules according to the test analysis data includes: the predefined test case creation rules include creation parameters of the test case; the predefined test execution rules include execution priorities of each test case;

[0036] For each test case, obtaining the number of successful executions and the number of failed executions of the test case according to the test analysis data;

[0037] Calculating the execution success rate of the test case according to the number of successful executions and the number of failed executions;

[0038] Determine whether the execution success rate is lower than a preset value, and if so, adjust at least one of the creation parameter, execution priority, and execution frequency according to a preset rule.

[0039] By adopting the above technical solution, for each test case, the number of successful executions and the number of failed executions of the test case are obtained according to the test analysis data, and then the execution success rate of the test case is calculated according to the number of successful executions and the number of failed executions, and it is determined whether the execution success rate is lower than the preset value. If the execution success rate is lower than the preset value, at least one of the creation parameters, execution priority and execution frequency is adjusted according to the preset rules.

[0040] In a second aspect, the present application also provides a time series database testing system, which adopts the following technical solution:

[0041] A time series database testing system, comprising:

[0042] A time series data pattern analysis module, used to obtain time series data in a target time series database, and perform pattern analysis on the time series data to obtain time series analysis data, wherein the time series analysis data is used to characterize at least one data feature of the time series data;

[0043] an iterative test case generation module, configured to create at least one test case according to the time series analysis data and a predefined test case creation rule, wherein the test case has at least one data feature of the time series data;

[0044] The test execution engine module is used to execute the at least one test case according to a preset test execution engine and a predefined test case execution rule to obtain a test result.

[0045] The testing device further comprises a feedback learning module, wherein the feedback learning module comprises:

[0046] A test result analysis submodule, used to analyze the test results to obtain test analysis data;

[0047] The optimization submodule is used to optimize the predefined test case creation rules and the predefined test execution rules according to the test analysis data.

[0048] In a third aspect, the present application also provides a computer device, which adopts the following technical solution:

[0049] A computer device comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described in the first aspect when executing the computer program.

[0050] In summary, the present application includes at least the following beneficial technical effects: acquiring the time series data in the target time series database, and performing pattern analysis on the time series data to obtain time series analysis data, the time series analysis data is used to characterize the data characteristics of at least one time series data; then creating at least one test case based on the time series analysis data and predefined test case creation rules, the test case has the data characteristics of at least one time series data; finally, executing at least one test case according to a pre-set test execution engine and pre-defined test case execution rules to obtain a test result. The test method of the present application is highly automated, and by automatically generating and executing test cases, the need for manual participation is reduced, which is more time-saving and labor-saving, thereby improving test efficiency, and compared with manual testing methods, the test cases cover key functions and performance indicators more comprehensively and with higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the overall process of an embodiment of the present application.

[0052] Figure 2 It is a schematic diagram of the working process of the system of the embodiment of the present application.

[0053] Figure 3 It is a schematic diagram of the structure of the system of this application.

[0054] Figure 4 It is a structural block diagram of the computer device of the present application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical solutions and advantages of this application more clear, the following Figure 1-4 It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0056] The embodiment of the present application discloses a time series database testing method.

[0057] Reference Figure 1 , a time series database testing method, comprising the following steps:

[0058] Step S11, acquiring time series data in a target time series database, and performing pattern analysis on the time series data to obtain time series analysis data.

[0059] The time series analysis data is used to characterize the data characteristics of at least one time series data.

[0060] It should be noted that the reference Figure 2In step S11, the data pattern of the target time series database is analyzed by the time series data pattern analysis module to obtain the time series analysis data, which includes the characteristics of trend, seasonality, periodicity, etc., that is, the analysis of the time series of the time series data based on machine learning technology can identify the key patterns and abnormal behaviors of the time series data. In addition, the noise and abnormal values ​​in the time series data can be identified to improve the accuracy of the test. If the time series data is a data set of power consumption, the time series analysis data may include: daily periodicity of power consumption, that is, the power consumption increases significantly in a specific time period every day (such as 7 to 8 in the morning and 8 to 10 in the evening); weekly seasonality of power consumption, that is, the power consumption on weekends is lower than that on weekdays; abnormal behavior of power consumption, such as a sudden increase in power consumption during low-peak hours for several consecutive days, which indicates that there may be noise in the data or a special event has occurred.

[0061] Step S12: creating at least one test case according to the timing analysis data and predefined test case creation rules.

[0062] The test case has at least one data feature of time series data.

[0063] It should be noted that the reference Figure 2 In step S12, based on the timing analysis data output in step S11, the test case generation module automatically creates test cases for the target timing database; the generated test cases are used to verify the performance and reliability of the target timing database and the accuracy of the timing data, and the generated test cases involve aspects such as data processing, response time query, and data accuracy analysis. In the implementation process, different user scenarios and data traffic also need to be considered to ensure that the test covers key database functions and performance indicators; in addition, specific test scenarios will be created based on the timing analysis data. For example, when verifying daily periodicity, test cases are used to verify whether the database can accurately calculate and predict the peak power consumption during a specific period of each day; when performing performance testing, test cases are used to simulate the data loading performance and query performance on weekends and weekdays to ensure that the system remains stable when the data volume changes; when performing outlier processing, test cases are used to check how the target timing database handles and reports abnormal data, such as a sudden increase in power consumption.

[0064] Step S13, executing at least one test case according to a preset test execution engine and a predefined test case execution rule to obtain a test result.

[0065] It should be noted that the reference Figure 2In step S13, the test execution engine module automatically executes the test case created by the test case generation module according to the predefined test case execution rules to obtain the test results; the test execution engine module supports the automated testing of various target time series database operations, including data insertion, query, data analysis functions, etc., to ensure that the test covers key database functions and performance indicators. In addition, the test execution engine module can also simulate different load conditions to evaluate the performance of the target time series database under high load conditions.

[0066] It should be further explained that the reference Figure 2 After the test results are generated, they can be displayed on the terminal, and the tester can provide feedback to the feedback learning module based on the test results; in addition, the tester can also configure the test parameters, conduct tests, and then view the test results and the corresponding test reports.

[0067] In the above implementation, the time series data in the target time series database is obtained, and the time series data is subjected to pattern analysis to obtain the time series analysis data, which is used to characterize the data characteristics of at least one time series data; then, at least one test case is created based on the time series analysis data and predefined test case creation rules, and the test case has the data characteristics of at least one time series data; finally, at least one test case is executed according to a pre-set test execution engine and pre-defined test case execution rules to obtain a test result. The test method of the present application is highly automated, and by automatically generating and executing test cases, the need for manual participation is reduced, which is more time-saving and labor-saving, thereby improving test efficiency, and compared with manual testing, the test cases cover key functions and performance indicators more comprehensively and with higher accuracy.

[0068] As a further implementation method of the time series database testing method, the data characteristics of the time series data include at least one of data time series characteristics, data query characteristics and abnormal behavior characteristics. The data time series characteristics are used to characterize the data characteristics of the time series data in the time series; the data query characteristics are used to characterize the data characteristics of the time series data in the query structure; and the abnormal behavior characteristics are used to characterize the abnormal characteristics of the time series data in the dynamic changes.

[0069] As a further implementation method of the time series database testing method, the step of performing pattern analysis on the time series data to obtain time series analysis data includes the following steps:

[0070] Step S21, preprocessing the time series data to obtain preprocessed data.

[0071] It can be understood that the above-mentioned data preprocessing includes processing steps such as data cleaning, missing value processing, and noise smoothing.

[0072] Step S22, performing feature engineering processing on the preprocessed data to obtain data features.

[0073] It can be understood that by performing feature engineering on the preprocessed data, data with large amount of information and representativeness, namely data features, are selected from the preprocessed data.

[0074] Step S23, inputting the data features into the evaluated time series data analysis model to obtain time series analysis data.

[0075] It can be understood that in the above steps, the time series data pattern analysis module identifies the features and patterns in the time series data based on machine learning technology, and then captures the data features by building and training relevant models, and further analyzes the data features to obtain time series analysis data. The time series analysis data includes long-term dependencies, nonlinear features, and potential dynamic changes in the time series data.

[0076] In the above implementation, in order to obtain time series analysis data, the time series data is first preprocessed to obtain preprocessed data, and then feature engineering is performed on the preprocessed data to obtain data features. The data features are then input into an evaluated time series data analysis model to obtain time series analysis data.

[0077] As a further implementation method of the time series database testing method, the step of performing feature engineering on the preprocessed data to obtain data features includes the following steps:

[0078] Step S31, constructing and extracting features on the preprocessed data to obtain intermediate features.

[0079] It should be noted that through feature construction and feature extraction, selecting relevant features and constructing new features from preprocessed data is conducive to improving the predictive ability of the evaluated time series data analysis model; feature extraction methods include calculating sliding window statistics, Fourier transform, wavelet transform, etc. In addition, the above-mentioned feature extraction methods can capture the periodicity and trend of time series data.

[0080] Step S32, obtaining application scenarios of the time series data, and performing feature selection on intermediate features according to the application scenarios to determine data features.

[0081] In the above implementation, in order to determine the data features, feature construction and feature extraction are performed on the preprocessed data to obtain intermediate features, and then the application scenario of the time series data is obtained, and feature selection is performed on the intermediate features according to the application scenario to determine the data features.

[0082] As a further implementation method of the time series database testing method, the application scenario of the time series data is obtained, and the feature selection of the intermediate data features is performed according to the application scenario to determine the step of data features, including the following steps:

[0083] Step S41, obtaining the application scenario of the time series data, and determining the feature category of each intermediate feature according to the application scenario and the intermediate features.

[0084] Step S42: for each feature category, the feature category is used as a target category, and the association degree between the target category and each non-target category is calculated.

[0085] Specifically, for each feature category, the feature category is taken as the target category, and other feature categories other than the feature category are taken as non-target categories, and the correlation between the target category and each non-target category is calculated.

[0086] It should be noted that the correlation degree is used to indicate the correlation degree between the target category and the non-target category. In the present application, the correlation degree is expressed by a numerical value.

[0087] Step S43, determining the weight corresponding to each feature category based on the application scenario, and calculating the evaluation value of each feature category according to the weight and the correlation degree.

[0088] Step S44, selecting a feature category according to the size of the evaluation value, and using the intermediate feature corresponding to the selected feature category as the data feature.

[0089] In the above implementation, in order to obtain data features, the application scenario of the time series data is first obtained, and the feature category of each intermediate feature is determined based on the application scenario and the intermediate features. For each feature category, the feature category is used as the target category, and the correlation between the target category and each non-target category is calculated. Then, the weight corresponding to each feature category is determined based on the application scenario, and the evaluation value of each feature category is calculated based on the weight and the correlation. Then, the feature category is selected according to the size of the evaluation value, and the intermediate feature corresponding to the selected feature category is used as the data feature.

[0090] As a further implementation of the time series database testing method, the step of generating an evaluated time series data analysis model includes the following steps:

[0091] Step S51, obtaining sample data, and dividing the sample data into a training set, a validation set, and a test set.

[0092] Step S52: obtaining a pre-built time series data analysis model, and training the pre-built time series data analysis model according to the training set to obtain a trained time series data analysis model.

[0093] Step S53, optimizing the trained time series data analysis model according to the validation set to obtain an optimized time series data analysis model.

[0094] Step S54, evaluating the optimized time series data analysis model according to the test set to obtain an evaluated time series data analysis model.

[0095] In the above-mentioned embodiment, in order to obtain an evaluated time series data analysis model, sample data is first obtained, and the sample data is divided into a training set, a validation set and a test set, and then a pre-built time series data analysis model is obtained, and the pre-built time series data analysis model is trained according to the training set to obtain a trained time series data analysis model, and then the trained time series data analysis model is optimized according to the validation set to obtain an optimized time series data analysis model, and then the optimized time series data analysis model is evaluated according to the test set to obtain an evaluated time series data analysis model.

[0096] As a further implementation of the time series database testing method, after the step of executing at least one test case according to a preset test execution engine and a predefined test case execution rule to obtain a test result, the method further includes the following steps:

[0097] Step S61, analyzing the test results to obtain test analysis data.

[0098] Step S62: Optimize the predefined test case creation rules and the predefined test execution rules according to the test analysis data.

[0099] It should be noted that the reference Figure 2 , the feedback learning module analyzes the test results based on machine learning technology to discover problems in the test process, and then continuously optimizes the test case generation strategy and test execution process, so that the test method of this application can adaptively improve the test quality and efficiency, while providing predictive insights into future version iterations. In addition, the feedback learning module can also adjust the priority and frequency of test cases according to the test results to ensure that the most important test cases are executed most frequently. For example, if false positives and false negatives occur, it may be that the test case is too sensitive, resulting in an increase in false positives, or it may be that the test case is not sensitive enough and fails to detect the actual problem. At this time, the parameters of the test case can be adjusted according to the false positives and false negatives, that is, the conditions and thresholds of the test case can be adjusted; if a performance bottleneck occurs, for example, in a high-load test, the performance of certain operations on the database (such as complex query operations) is reduced, and performance tuning is required, that is, optimization for specific database operations, such as optimizing indexes or adjusting query algorithms.

[0100] It should be further explained that during the test process, the feedback learning module will continuously collect test data, analyze and identify the test results based on the machine learning model, and then adjust the test strategy. For example, if the feedback learning module finds that a test case often fails, the feedback learning module will adjust the generation parameters (i.e., creation parameters) of the test case or increase the execution priority of the test case, thereby improving the test efficiency and effectiveness and reducing manual intervention.

[0101] It is understandable that the feedback learning module enables the test framework to adjust itself according to the test results and adapt to the changing test requirements. In addition, the feedback learning module can also provide predictive insights into future version iterations, thereby discovering potential problems in advance, with good adaptability and predictability.

[0102] In the above implementation, in order to optimize the test case generation process and execution process and reduce manual intervention, the test results are first analyzed to obtain test analysis data, and then the predefined test case creation rules and predefined test execution rules are optimized based on the test analysis data.

[0103] As a further implementation method of the time series database testing method, the step of optimizing the predefined test case creation rules and the predefined test execution rules according to the test analysis data includes the following steps: the predefined test case creation rules include the creation parameters of the test case; the predefined test execution rules include the execution priority of each test case;

[0104] Step S71, for each test case, obtain the number of successful executions and the number of failed executions of the test case according to the test analysis data.

[0105] Step S72, calculating the execution success rate of the test case according to the number of successful executions and the number of failed executions.

[0106] Step S73, determining whether the execution success rate is lower than a preset value, and if so, adjusting at least one of the creation parameters, execution priority and execution frequency according to preset rules.

[0107] In the above embodiment, for each test case, the number of successful executions and the number of failed executions of the test case are obtained according to the test analysis data, and then the execution success rate of the test case is calculated according to the number of successful executions and the number of failed executions, and it is determined whether the execution success rate is lower than the preset value. If the execution success rate is lower than the preset value, at least one of the creation parameters, execution priority and execution frequency is adjusted according to the preset rules.

[0108] The embodiment of the present application also discloses a time series database testing system.

[0109] refer to Figure 3 , a time series database testing system, comprising:

[0110] A time series data pattern analysis module is used to obtain time series data in a target time series database and perform pattern analysis on the time series data to obtain time series analysis data, where the time series analysis data is used to characterize data characteristics of at least one time series data;

[0111] An iterative test case generation module, used to create at least one test case according to the time series analysis data and predefined test case creation rules, wherein the test case has at least one data feature of the time series data;

[0112] The test execution engine module is used to execute at least one test case according to a preset test execution engine and predefined test case execution rules to obtain a test result.

[0113] The test device also includes a feedback learning module, which includes:

[0114] The test result analysis submodule is used to analyze the test results and obtain test analysis data;

[0115] The optimization submodule is used to optimize the predefined test case creation rules and the predefined test execution rules according to the test analysis data.

[0116] The time series database testing system of the present invention can implement any one of the time series database testing methods, and the specific working process of the time series database testing system of the present invention can refer to the corresponding process in the above-mentioned time series database testing method.

[0117] The embodiment of the present application also discloses a computer device.

[0118] refer to Figure 4 A computer device includes a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, any one of the above-mentioned time series database testing methods is implemented.

[0119] The above are all preferred embodiments of the present application, and are not intended to limit the protection scope of the present application. Any feature disclosed in this specification (including the abstract and drawings), unless otherwise stated, can be replaced by other equivalent or alternative features with similar purposes. That is, unless otherwise stated, each feature is only an example of a series of equivalent or similar features.

Claims

1. A time series database testing method, characterized in that: include: Acquire time series data in a target time series database, and perform pattern analysis on the time series data to obtain time series analysis data, wherein the time series analysis data is used to characterize at least one data feature of the time series data; Creating at least one test case according to the time series analysis data and a predefined test case creation rule, wherein the test case has at least one data feature of the time series data; The at least one test case is executed according to a preset test execution engine and a predefined test case execution rule to obtain a test result.

2. A time series database testing method according to claim 1, characterized in that: The step of performing pattern analysis on the time series data to obtain time series analysis data includes: Performing data preprocessing on the time series data to obtain preprocessed data; Performing feature engineering processing on the preprocessed data to obtain data features; The data features are input into the evaluated time series data analysis model to obtain time series analysis data.

3. A time series database testing method according to claim 2, characterized in that: The step of performing feature engineering on the preprocessed data to obtain data features includes: Performing feature construction and feature extraction on the preprocessed data to obtain intermediate features; An application scenario of the time series data is obtained, and feature selection is performed on the intermediate features according to the application scenario to determine data features.

4. A time series database testing method according to claim 3, characterized in that: The step of obtaining the application scenario of the time series data, and performing feature selection on the intermediate features according to the application scenario to determine data features includes: Acquire an application scenario of the time series data, and determine a feature category of each intermediate feature according to the application scenario and the intermediate features; For each feature category, the feature category is used as a target category, and the correlation between the target category and each non-target category is calculated; Determine the weight corresponding to each feature category based on the application scenario, and calculate the evaluation value of each feature category according to the weight and the association degree; The feature category is selected according to the size of the evaluation value, and the intermediate feature corresponding to the selected feature category is used as the data feature.

5. A time series database testing method according to claim 3, characterized in that: The step of generating the evaluated time series data analysis model comprises: Obtaining sample data, and dividing the sample data into a training set, a validation set, and a test set; Acquire a pre-built time series data analysis model, and train the pre-built time series data analysis model according to the training set to obtain a trained time series data analysis model; Optimizing the trained time series data analysis model according to the validation set to obtain an optimized time series data analysis model; The optimized time series data analysis model is evaluated according to the test set to obtain an evaluated time series data analysis model.

6. A time series database testing method according to claim 1, characterized in that: After the step of executing the at least one test case according to the preset test execution engine and the predefined test case execution rules to obtain the test result, the method further includes: Analyzing the test results to obtain test analysis data; The predefined test case creation rules and the predefined test execution rules are optimized according to the test analysis data.

7. A time series database testing method according to claim 6, characterized in that: The step of optimizing the predefined test case creation rules and the predefined test execution rules according to the test analysis data comprises: the predefined test case creation rules include the creation parameters of the test case; the predefined test execution rules include the execution priority of each test case; For each test case, obtaining the number of successful executions and the number of failed executions of the test case according to the test analysis data; Calculating the execution success rate of the test case according to the number of successful executions and the number of failed executions; Determine whether the execution success rate is lower than a preset value, and if so, adjust at least one of the creation parameter, execution priority, and execution frequency according to a preset rule.

8. A time series database testing system, characterized in that: include: A time series data pattern analysis module, used to obtain time series data in a target time series database, and perform pattern analysis on the time series data to obtain time series analysis data, wherein the time series analysis data is used to characterize at least one data feature of the time series data; an iterative test case generation module, configured to create at least one test case according to the time series analysis data and a predefined test case creation rule, wherein the test case has at least one data feature of the time series data; The test execution engine module is used to execute the at least one test case according to a preset test execution engine and a predefined test case execution rule to obtain a test result.

9. A time series database testing system according to claim 8, characterized in that: The testing device further comprises a feedback learning module, wherein the feedback learning module comprises: A test result analysis submodule, used to analyze the test results to obtain test analysis data; The optimization submodule is used to optimize the predefined test case creation rules and the predefined test execution rules according to the test analysis data.

10. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

Citation Information

Patent Citations

  • Test method and system for sequencing test case priorities by using ensemble learning

    CN111427802A

  • Test case generation method based on neural network

    CN115757124A

  • Time sequence database stability test method

    CN116737549A

  • Priority analysis processing method and device for test cases

    CN116737575A

  • Time sequence database SDK (Software Development Kit)-oriented test method, device and equipment

    CN117453521A

Cited By

  • Automatic test method for encryption, decryption, transmission and storage of millions of data in industrial Internet of Things scene

    CN120750821A