A software testing data management system and method based on cloud platform
Through a cloud-based software test data management system, using methods such as data normalization and information entropy calculation, environmental differences are quantified and automatic compensation are automatically compensated, and the problem of data deviation between the test environment and the production environment is solved, improving the accuracy and efficiency of the test data.
Patent Information
- Application Number
- CN202510756712.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-09
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-06-09
AI Technical Summary
In the prior art, there are systematic differences between the test environment and the production environment during software testing in terms of hardware configuration and network delay, resulting in deviations from the behavioral characteristics of the test data from the real scene. Traditional methods rely on manual experience to adjust the test data parameters, which is inefficient, has large errors, and is difficult to quantify.
Through a cloud-based software test data management system, mathematical tools such as data normalization, information entropy calculation, probability distribution analysis, etc. are used to quantify environmental differences, automatically adjust the test data to compensate for environmental differences, and form closed-loop iterative optimization.
Quantitative comparison and automatic compensation of data characteristics between the test environment and the production environment are realized, manual intervention is reduced, the accuracy and efficiency of the test data are improved, and faults caused by environmental differences are avoided.
Smart Images

Figure CN120276997B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data analysis, and in particular to a software testing data management system and method based on a cloud platform. Background Art
[0002] With the rapid development of computer technology, computer-based automated testing systems are widely used. These systems generate massive amounts of test data, including raw data, interpretation results, test environment data, and indicator interpretation data from each test phase of the product under test. This data is stored in isolated silos across various test systems, making it difficult for manual management to conduct comprehensive data analysis. The widespread adoption and development of cloud computing has provided new solutions for software test data management. Cloud platforms offer advantages such as elastic scaling and the ability to quickly build test environments. They can provide computing resources on demand, reducing testing costs. They can also store and manage massive amounts of data and support data sharing and collaboration.
[0003] However, when testing software today, systemic differences exist between test and production environments in hardware configuration, network latency, and concurrency pressure. This can lead to deviations between the behavioral characteristics of test data and real-world scenarios (e.g., distorted response times and inflated transaction success rates). Traditional methods rely on manual experience to adjust test data parameters, resulting in low efficiency, large errors, and difficulty in quantification. Summary of the Invention
[0004] The purpose of the present invention is to provide a software testing data management system and method based on a cloud platform to solve the problems raised in the prior art.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A software test data management method based on a cloud platform, the method comprising the following steps:
[0007] S100: Collect data indicators from the software production environment and the test environment, normalize the collected data, screen the data indicators from the two environments, and extract the main influencing factors;
[0008] Furthermore, the specific steps to extract the main influencing factors are:
[0009] S101. Collect data indicators from the software production environment and the test environment, calculate the average value and standard deviation of each data indicator, and use the average value and standard deviation of each data indicator to achieve normalization. The formula is:
[0010] ;
[0011] In the formula, x normRepresents the normalized data indicator, x represents the collected data indicator, xp represents the average value of the data indicator, and xz represents the standard deviation of the data indicator;
[0012] S102. Use the normalized data indicators to construct a data matrix. Assume that the number of samples in the matrix is m. Calculate the covariance matrix of the data matrix. The formula is:
[0013] ;
[0014] In the formula, E represents the covariance matrix, Z represents the data matrix, and Z T represents the transposed matrix of the data matrix;
[0015] S103. Perform eigendecomposition on the calculated covariance matrix to obtain eigenvectors and eigenvalues, and select eigenvectors corresponding to k largest eigenvalues as main influencing factors, where the k value is set manually based on professional experience.
[0016] Raw data from production and test environments may have inconsistent dimensions due to differences in deployment architecture, data scale, and user behavior. Normalization can unify data standards and make data from different environments comparable. By screening key influencing factors (such as response time, error rate, and throughput), redundant metrics are eliminated, reducing data complexity, preventing interference from minor factors in analysis, and improving subsequent computational efficiency. Once key metrics are identified, in-depth analysis can be conducted on core factors to avoid confusion in analysis dimensions caused by too many metrics.
[0017] S200, respectively calculating the information entropy of each major influencing factor, using the information entropy to calculate the influence weight of each major influencing factor on the software test results, and constructing an environment difference weight matrix;
[0018] Furthermore, the specific steps for constructing the environmental difference weight matrix are:
[0019] S201, suppose the set of main influencing factors to be screened is F={f1, f2, f3, ..., f n}, f1, f2, f3, ..., f n Represents the first, second, third, ..., nth major influencing factors screened, where n is a positive integer; the information entropy of each major influencing factor is calculated using the formula:
[0020] ;
[0021] In the formula, H i represents the information entropy of the i-th major influencing factor, f ik represents the i-th main influencing factor in the k-th sample;
[0022] S202. Calculate the influence weight of each major influencing factor on the software test results using information entropy. The formula is:
[0023] ;
[0024] In the formula, w i represents the influence weight of the i-th major influencing factor, and n represents the total number of major influencing factors; the influence weights of all the major influencing factors calculated are integrated to construct the environmental difference weight matrix W=[w1, w2, w3, ..., w n ], w1, w2, w3, ..., w n Represents the influence weights of the first, second, third, ..., nth main influencing factors.
[0025] Information entropy calculates weights based on the uncertainty (chaos) of the data itself, avoiding bias in subjective assignments and making weights more aligned with actual data characteristics. The environmental difference weight matrix reflects the importance differences of different indicators in production / test environments, helping testers prioritize factors that have a greater impact on the results. The weight matrix can be iterated as data is updated to adapt to changes in indicator importance caused by software version iterations or environmental changes.
[0026] S300, extracting the probability distribution of each major influencing factor in the production environment and the test environment respectively, calculating the distribution difference using the distribution probability of the same major influencing factor in the two environments, and analyzing the distribution difference to determine whether compensation is required for software testing;
[0027] Furthermore, the specific steps to determine whether software testing requires compensation are as follows:
[0028] S301. Discretize the continuous data for each major influencing factor, bin the data range of each major influencing factor into h equal-width intervals; extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment. The formula is:
[0029] ;
[0030] In the formula, P (s u ) represents the probability distribution in the u-th interval, q u represents the frequency distribution of the u-th interval, represents the smoothing factor, h represents the total number of intervals; the probability distribution of each interval in the test environment is calculated using the same method as T (s u )
[0031] S302. Calculate the distribution difference between the two environments using the probability distribution in all intervals. The formula is:
[0032] ;
[0033] In the formula, D KL (P||T) represents the distribution difference of the main influencing factors in the two environments. The same calculation is used to obtain the distribution difference of all the main influencing factors. The difference threshold is set as D based on professional experience. threshold , use the difference threshold to judge the distribution difference of all major influencing factors. KL (P||T)>D threshold When the distribution difference is judged to have a significant impact on software testing, the compensation mechanism is triggered.
[0034] By comparing the probability distribution of the same factors in the two environments, we can identify the true differences between the test and production environments. Based on the quantified distribution differences, we can objectively determine whether compensation is necessary (for example, manually injecting marginal data when the test environment data distribution is too concentrated), thus avoiding misjudgments caused by empiricism. If the distribution differences of key factors are significant, we can provide early warning of the risk of insufficient test coverage, preventing failures caused by environmental differences after the launch.
[0035] S400, using the distribution difference to calculate the compensation intensity coefficient, using professional knowledge to calculate and extract the project criticality, data update frequency, and data fault tolerance threshold during software testing, and calculate the data sensitivity factor; using the compensation intensity coefficient and the data sensitivity factor to calculate the final compensation amount;
[0036] Furthermore, the specific steps for calculating the final compensation amount using the compensation intensity coefficient and the data sensitivity factor are as follows:
[0037] S401. Calculate the compensation intensity coefficient using the distribution difference. The formula is:
[0038] ;
[0039] In the formula, α represents the compensation intensity coefficient, α base Indicates the basic compensation intensity;
[0040] S402. For the normalized main influencing factors, set a sensitivity weight and multiply the normalized value to obtain the criticality of each main influencing factor. The sensitivity weight is within [0, 1]. Calculate the average value of each main influencing factor in the production environment and the test environment respectively. Calculate the difference between the average values of each main influencing factor in the two environments as the fault tolerance threshold. Calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor. The formula is:
[0041] ;
[0042] In the formula, Sd represents the data sensitivity factor, Cr represents the criticality, Fr represents the data update frequency, and Fa represents the fault tolerance threshold;
[0043] S403. Calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor. The formula is:
[0044] ;
[0045] In the formula, △ i represents the final compensation amount of the i-th major influencing factor, p i Indicates the data value of the i-th major influencing factor in the production environment, t i Indicates the data value of the i-th major influencing factor in the test environment, α i represents the compensation intensity coefficient of the i-th main influencing factor, w i represents the influence weight of the i-th major influencing factor, Sd i The data sensitivity factor of the i-th major influencing factor is represented by the same calculation to obtain the final compensation amount of all major influencing factors, and the final compensation amount set is constructed.
[0046] The compensation intensity coefficient combines the absolute value of the distribution difference (such as the probability difference), and the data sensitivity factor integrates the business characteristics (such as the higher requirements for data consistency in financial scenarios). Multiplying the two can achieve "on-demand compensation" and avoid overcompensation or undercompensation.
[0047] By quantifying sensitivity through business indicators such as criticality, update frequency, and fault tolerance threshold, we can prioritize compensation for data with the greatest business impact when resources are limited, thereby improving the cost-effectiveness of testing.
[0048] S500: When it is determined that software testing requires compensation, all major influencing factors are compensated using the final compensation amount; the distribution difference after compensation is recalculated, and a feedback update mechanism is constructed to update the compensation intensity coefficient and the environment difference weight matrix.
[0049] Furthermore, the specific steps of constructing a feedback update mechanism to update the compensation intensity coefficient and the environmental difference weight matrix are as follows:
[0050] S501. When the compensation mechanism is triggered, the final compensation amount of each major influencing factor in the final compensation amount set is used to perform data compensation in the test environment during software testing; the distribution difference D between the two environments is recalculated based on the compensated data. new , when D new ≤D threshold When the compensation is qualified, it is judged that the compensation is qualified; when it is not satisfied, it is judged that the compensation is unqualified; using D new The compensation intensity coefficient and environmental difference weight matrix are recalculated and updated for optimization.
[0051] After compensation, the distribution difference is recalculated and the weight matrix and compensation coefficient are updated, forming a closed loop of "analysis-compensation-verification-iteration", so that the solution can be continuously optimized as the environment changes.
[0052] The feedback mechanism can be integrated into the test tool chain to achieve automatic adjustment of the compensation strategy and reduce the cost of manual intervention.
[0053] A software testing data management system based on a cloud platform, comprising a data acquisition module, an influencing factor screening module, a weight matrix construction module, a compensation judgment module, a compensation amount calculation module, and an update verification module;
[0054] The data acquisition module is used to collect data indicators in the software production environment and data indicators in the test environment;
[0055] The impact factor screening module is used to normalize the collected data, screen the data indicators in the two environments, and extract the main impact factors;
[0056] The weight matrix construction module is used to calculate the information entropy of each major influencing factor respectively, calculate the influence weight of each major influencing factor on the software test results using the information entropy, and construct an environment difference weight matrix;
[0057] The compensation judgment module is used to calculate the distribution difference by using the distribution probability of the same main influencing factors in the two environments, and analyze the distribution difference to determine whether the software test needs compensation;
[0058] The compensation amount calculation module is used to calculate and extract the project criticality, data update frequency and data fault tolerance threshold during software testing using professional knowledge, calculate the data sensitivity factor; and calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor;
[0059] The update inspection module is used to compensate all major influencing factors using the final compensation amount; recalculate the distribution difference after compensation, and construct a feedback update mechanism to update the compensation intensity coefficient and the environmental difference weight matrix.
[0060] The weight matrix building module includes information entropy unit and influence weight unit;
[0061] The information entropy unit is used to calculate the information entropy of each major influencing factor;
[0062] The influence weight unit is used to calculate the influence weight of each major influencing factor on the software test result by using information entropy, and integrate and construct an environment difference weight matrix.
[0063] The compensation judgment module includes a probability distribution unit and a distribution difference unit;
[0064] The probability distribution unit is used to extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment;
[0065] The distribution difference unit is used to calculate the distribution difference between two environments using the probability distribution in all intervals.
[0066] The compensation amount calculation module includes a compensation intensity coefficient unit, a data sensitivity factor unit and a final compensation amount unit;
[0067] The compensation intensity coefficient unit is used to calculate the compensation intensity coefficient using the distribution difference;
[0068] The data sensitivity factor unit is used to calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor;
[0069] The final compensation amount unit is used to calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor.
[0070] Compared with the prior art, the present invention has the following beneficial effects:
[0071] The present invention avoids test deviations caused by subjective experience by using mathematical tools such as information entropy and probability distribution, and provides a quantitative basis for environmental difference analysis and compensation strategies.
[0072] This invention systematically solves the data difference problem between the test environment and the production environment through the complete link of "data normalization → weight quantization → difference analysis → precise compensation → dynamic iteration". BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 This is a module distribution diagram of a cloud platform-based software testing data management system of the present invention;
[0074] Figure 2 This is a schematic diagram of the steps of a cloud platform-based software testing data management method of the present invention. DETAILED DESCRIPTION
[0075] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0076] Example: Figure 1-Figure 2 As shown, the present invention provides a technical solution.
[0077] A software test data management method based on a cloud platform, the method comprising the following steps:
[0078] S100: Collect data indicators from the software production environment and the test environment, normalize the collected data, screen the data indicators from the two environments, and extract the main influencing factors;
[0079] The specific steps to extract the main influencing factors are:
[0080] S101. Collect data indicators from the software production environment and the test environment, calculate the average value and standard deviation of each data indicator, and use the average value and standard deviation of each data indicator to achieve normalization. The formula is:
[0081] ;
[0082] In the formula, x norm Represents the normalized data indicator, x represents the collected data indicator, xp represents the average value of the data indicator, and xz represents the standard deviation of the data indicator;
[0083] S102. Use the normalized data indicators to construct a data matrix. Assume that the number of samples in the matrix is m. Calculate the covariance matrix of the data matrix. The formula is:
[0084] ;
[0085] In the formula, E represents the covariance matrix, Z represents the data matrix, and Z T represents the transposed matrix of the data matrix;
[0086] S103. Perform eigendecomposition on the calculated covariance matrix to obtain eigenvectors and eigenvalues, and select eigenvectors corresponding to k largest eigenvalues as main influencing factors, where the k value is set manually based on professional experience.
[0087] Raw data from production and test environments may have inconsistent dimensions due to differences in deployment architecture, data scale, and user behavior. Normalization can unify data standards and make data from different environments comparable. By screening key influencing factors (such as response time, error rate, and throughput), redundant metrics are eliminated, reducing data complexity, preventing interference from minor factors in analysis, and improving subsequent computational efficiency. Once key metrics are identified, in-depth analysis can be conducted on core factors to avoid confusion in analysis dimensions caused by too many metrics.
[0088] S200, respectively calculating the information entropy of each major influencing factor, using the information entropy to calculate the influence weight of each major influencing factor on the software test results, and constructing an environment difference weight matrix;
[0089] The specific steps to construct the environmental difference weight matrix are:
[0090] S201, suppose the set of main influencing factors to be screened is F={f1, f2, f3, ..., f n}, f1, f2, f3, ..., f n Represents the first, second, third, ..., nth major influencing factors screened, where n is a positive integer; the information entropy of each major influencing factor is calculated using the formula:
[0091] ;
[0092] In the formula, H i represents the information entropy of the i-th major influencing factor, f ik represents the i-th main influencing factor in the k-th sample;
[0093] S202. Calculate the influence weight of each major influencing factor on the software test results using information entropy. The formula is:
[0094] ;
[0095] In the formula, w i represents the influence weight of the i-th major influencing factor, and n represents the total number of major influencing factors; the influence weights of all the major influencing factors calculated are integrated to construct the environmental difference weight matrix W=[w1, w2, w3, ..., w n ], w1, w2, w3, ..., w n Represents the influence weights of the first, second, third, ..., nth main influencing factors.
[0096] Information entropy calculates weights based on the uncertainty (chaos) of the data itself, avoiding bias in subjective assignments and making weights more aligned with actual data characteristics. The environmental difference weight matrix reflects the importance differences of different indicators in production / test environments, helping testers prioritize factors that have a greater impact on the results. The weight matrix can be iterated as data is updated to adapt to changes in indicator importance caused by software version iterations or environmental changes.
[0097] S300, extracting the probability distribution of each major influencing factor in the production environment and the test environment respectively, calculating the distribution difference using the distribution probability of the same major influencing factor in the two environments, and analyzing the distribution difference to determine whether compensation is required for software testing;
[0098] Furthermore, the specific steps to determine whether software testing requires compensation are as follows:
[0099] S301. Discretize the continuous data for each major influencing factor, bin the data range of each major influencing factor into h equal-width intervals; extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment. The formula is:
[0100] ;
[0101] In the formula, P (s u ) represents the probability distribution in the u-th interval, q u represents the frequency distribution of the u-th interval, represents the smoothing factor, h represents the total number of intervals; the probability distribution of each interval in the test environment is calculated using the same method as T (s u )
[0102] S302. Calculate the distribution difference between the two environments using the probability distribution in all intervals. The formula is:
[0103] ;
[0104] In the formula, D KL (P||T) represents the distribution difference of the main influencing factors in the two environments. The same calculation is used to obtain the distribution difference of all the main influencing factors. The difference threshold is set as D based on professional experience. threshold , use the difference threshold to judge the distribution difference of all major influencing factors. KL (P||T)>D threshold When the distribution difference is judged to have a significant impact on software testing, the compensation mechanism is triggered.
[0105] By comparing the probability distribution of the same factors in the two environments, we can identify the true differences between the test and production environments. Based on the quantified distribution differences, we can objectively determine whether compensation is necessary (for example, manually injecting marginal data when the test environment data distribution is too concentrated), thus avoiding misjudgments caused by empiricism. If the distribution differences of key factors are significant, we can provide early warning of the risk of insufficient test coverage, preventing failures caused by environmental differences after the launch.
[0106] S400, using the distribution difference to calculate the compensation intensity coefficient, using professional knowledge to calculate and extract the project criticality, data update frequency, and data fault tolerance threshold during software testing, and calculate the data sensitivity factor; using the compensation intensity coefficient and the data sensitivity factor to calculate the final compensation amount;
[0107] The specific steps for calculating the final compensation amount using the compensation intensity coefficient and the data sensitivity factor are as follows:
[0108] S401. Calculate the compensation intensity coefficient using the distribution difference. The formula is:
[0109] ;
[0110] In the formula, α represents the compensation intensity coefficient, α base Indicates the basic compensation intensity;
[0111] S402. For the normalized main influencing factors, set a sensitivity weight and multiply the normalized value to obtain the criticality of each main influencing factor. The sensitivity weight is within [0, 1]. Calculate the average value of each main influencing factor in the production environment and the test environment respectively. Calculate the difference between the average values of each main influencing factor in the two environments as the fault tolerance threshold. Calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor. The formula is:
[0112] ;
[0113] In the formula, Sd represents the data sensitivity factor, Cr represents the criticality, Fr represents the data update frequency, and Fa represents the fault tolerance threshold;
[0114] S403. Calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor. The formula is:
[0115] ;
[0116] In the formula, △ i represents the final compensation amount of the i-th major influencing factor, p i Indicates the data value of the i-th major influencing factor in the production environment, t i Indicates the data value of the i-th major influencing factor in the test environment, α i represents the compensation intensity coefficient of the i-th main influencing factor, w i represents the influence weight of the i-th major influencing factor, Sd i The data sensitivity factor of the i-th major influencing factor is represented by the same calculation to obtain the final compensation amount of all major influencing factors, and the final compensation amount set is constructed.
[0117] The compensation intensity coefficient combines the absolute value of the distribution difference (such as the probability difference), and the data sensitivity factor integrates the business characteristics (such as the higher requirements for data consistency in financial scenarios). Multiplying the two can achieve "on-demand compensation" and avoid overcompensation or undercompensation.
[0118] By quantifying sensitivity through business indicators such as criticality, update frequency, and fault tolerance threshold, we can prioritize compensation for data with the greatest business impact when resources are limited, thereby improving the cost-effectiveness of testing.
[0119] S500: When it is determined that software testing requires compensation, all major influencing factors are compensated using the final compensation amount; the distribution difference after compensation is recalculated, and a feedback update mechanism is constructed to update the compensation intensity coefficient and the environment difference weight matrix.
[0120] The specific steps of constructing a feedback update mechanism to update the compensation intensity coefficient and the environmental difference weight matrix are as follows:
[0121] S501. When the compensation mechanism is triggered, the final compensation amount of each major influencing factor in the final compensation amount set is used to perform data compensation in the test environment during software testing; the distribution difference D between the two environments is recalculated based on the compensated data. new , when D new ≤D threshold When the compensation is qualified, it is judged that the compensation is qualified; when it is not satisfied, it is judged that the compensation is unqualified; using D new The compensation intensity coefficient and environmental difference weight matrix are recalculated and updated for optimization.
[0122] After compensation, the distribution difference is recalculated and the weight matrix and compensation coefficient are updated, forming a closed loop of "analysis-compensation-verification-iteration", so that the solution can be continuously optimized as the environment changes.
[0123] The feedback mechanism can be integrated into the test tool chain to achieve automatic adjustment of the compensation strategy and reduce the cost of manual intervention.
[0124] A software testing data management system based on a cloud platform, comprising a data acquisition module, an influencing factor screening module, a weight matrix construction module, a compensation judgment module, a compensation amount calculation module, and an update verification module;
[0125] The data acquisition module is used to collect data indicators in the software production environment and data indicators in the test environment;
[0126] The impact factor screening module is used to normalize the collected data, screen the data indicators in the two environments, and extract the main impact factors;
[0127] The weight matrix construction module is used to calculate the information entropy of each major influencing factor respectively, calculate the influence weight of each major influencing factor on the software test results using the information entropy, and construct an environment difference weight matrix;
[0128] The compensation judgment module is used to calculate the distribution difference by using the distribution probability of the same main influencing factors in the two environments, and analyze the distribution difference to determine whether the software test needs compensation;
[0129] The compensation amount calculation module is used to calculate and extract the project criticality, data update frequency and data fault tolerance threshold during software testing using professional knowledge, calculate the data sensitivity factor; and calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor;
[0130] The update inspection module is used to compensate all major influencing factors using the final compensation amount; recalculate the distribution difference after compensation, and construct a feedback update mechanism to update the compensation intensity coefficient and the environmental difference weight matrix.
[0131] The weight matrix building module includes information entropy unit and influence weight unit;
[0132] The information entropy unit is used to calculate the information entropy of each major influencing factor;
[0133] The influence weight unit is used to calculate the influence weight of each major influencing factor on the software test result by using information entropy, and integrate and construct an environment difference weight matrix.
[0134] The compensation judgment module includes a probability distribution unit and a distribution difference unit;
[0135] The probability distribution unit is used to extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment;
[0136] The distribution difference unit is used to calculate the distribution difference between two environments using the probability distribution in all intervals.
[0137] The compensation amount calculation module includes a compensation intensity coefficient unit, a data sensitivity factor unit and a final compensation amount unit;
[0138] The compensation intensity coefficient unit is used to calculate the compensation intensity coefficient using the distribution difference;
[0139] The data sensitivity factor unit is used to calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor;
[0140] The final compensation amount unit is used to calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor.
[0141] Example: In the e-commerce system software test, the two main influencing factors collected were network latency and CPU core number. The network latency was 50ms in the test environment and 80ms in the production environment. The CPU core number was 8 cores in the test environment and 16 cores in the production environment.
[0142] Calculate the final compensation value respectively, △ network delay = 0.8×0.4×|80-50| / 80×2.5=0.3ms
[0143] △cpu=0.8×0.6×|16-8| / 16×3.0=0.72;
[0144] Compensate for the main influencing factors in the test environment, specifically:
[0145] At the network layer: add 30ms delay;
[0146] At the application layer: Adjust the number of threads from 100 to 100 × (1 + 0.75) = 172.
[0147] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and all variations within the meaning and range of equivalents of the claims are intended to be included therein. Any reference sign in a claim should not be construed as limiting the claim to which it relates.
Claims
1. A software test data management method based on a cloud platform, characterized by: The method comprises the following steps: S100: Collect data indicators from the software production environment and the test environment, normalize the collected data, screen the data indicators from the two environments, and extract the main influencing factors; S200, respectively calculating the information entropy of each major influencing factor, using the information entropy to calculate the influence weight of each major influencing factor on the software test results, and constructing an environment difference weight matrix; S300, extracting the probability distribution of each major influencing factor in the production environment and the test environment respectively, calculating the distribution difference using the distribution probability of the same major influencing factor in the two environments, and analyzing the distribution difference to determine whether compensation is required for software testing; S400, using the distribution difference to calculate the compensation intensity coefficient, using professional knowledge to calculate and extract the project criticality, data update frequency, and data fault tolerance threshold during software testing, and calculate the data sensitivity factor; using the compensation intensity coefficient and the data sensitivity factor to calculate the final compensation amount; S500: When it is determined that software testing requires compensation, all major influencing factors are compensated using the final compensation amount; the distribution difference after compensation is recalculated, and a feedback update mechanism is constructed to update the compensation intensity coefficient and the environment difference weight matrix.
2. The cloud platform-based software testing data management method according to claim 1, characterized in that: The specific steps of extracting the main influencing factors in S100 are: S101. Collect data indicators from the software production environment and the test environment, calculate the average value and standard deviation of each data indicator, and use the average value and standard deviation of each data indicator to achieve normalization. The formula is: ; In the formula, x norm Represents the normalized data indicator, x represents the collected data indicator, xp represents the average value of the data indicator, and xz represents the standard deviation of the data indicator; S102. Use the normalized data indicators to construct a data matrix. Assume that the number of samples in the matrix is m. Calculate the covariance matrix of the data matrix. The formula is: ; In the formula, E represents the covariance matrix, Z represents the data matrix, and Z T represents the transposed matrix of the data matrix; S103. Perform eigendecomposition on the calculated covariance matrix to obtain eigenvectors and eigenvalues, and select eigenvectors corresponding to k largest eigenvalues as main influencing factors, where the k value is set manually based on professional experience.
3. The cloud platform-based software testing data management method according to claim 2, characterized in that: The specific steps of constructing the environment difference weight matrix in S200 are: S201, suppose the set of main influencing factors to be screened is F={f1, f2, f3, ..., f n }, f1, f2, f3, ..., f n Represents the first, second, third, ..., nth major influencing factors screened, where n is a positive integer; the information entropy of each major influencing factor is calculated using the formula: ; In the formula, H i represents the information entropy of the i-th major influencing factor, f ik represents the i-th main influencing factor in the k-th sample; S202. Calculate the influence weight of each major influencing factor on the software test results using information entropy. The formula is: ; In the formula, w i represents the influence weight of the i-th major influencing factor, and n represents the total number of major influencing factors; the influence weights of all the major influencing factors calculated are integrated to construct the environmental difference weight matrix W=[w1, w2, w3, ..., w n ], w1, w2, w3, ..., w n Represents the influence weights of the first, second, third, ..., nth main influencing factors.
4. The cloud platform-based software testing data management method according to claim 3, characterized in that: The specific steps of determining whether software testing requires compensation in S300 are: S301. Discretize the continuous data for each major influencing factor, bin the data range of each major influencing factor into h equal-width intervals; extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment. The formula is: ; In the formula, P (s u ) represents the probability distribution in the u-th interval, q u represents the frequency distribution of the u-th interval, represents the smoothing factor, h represents the total number of intervals; the probability distribution of each interval in the test environment is calculated using the same method as T (s u ) S302. Calculate the distribution difference between the two environments using the probability distribution in all intervals. The formula is: ; In the formula, D KL (P||T) represents the distribution difference of the main influencing factors in the two environments. The same calculation is used to obtain the distribution difference of all the main influencing factors. The difference threshold is set as D based on professional experience. threshold , use the difference threshold to judge the distribution difference of all major influencing factors. KL (P||T)>D threshold When the distribution difference is judged to have a significant impact on software testing, the compensation mechanism is triggered.
5. The cloud platform-based software testing data management method according to claim 4, characterized in that: The specific steps of calculating the final compensation amount using the compensation intensity coefficient and the data sensitivity factor in S400 are as follows: S401. Calculate the compensation intensity coefficient using the distribution difference. The formula is: ; In the formula, α represents the compensation intensity coefficient, α base Indicates the basic compensation intensity; S402. For the normalized main influencing factors, set a sensitivity weight and multiply the normalized value to obtain the criticality of each main influencing factor. The sensitivity weight is within [0, 1]. Calculate the average value of each main influencing factor in the production environment and the test environment respectively. Calculate the difference between the average values of each main influencing factor in the two environments as the fault tolerance threshold. Calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor. The formula is: ; In the formula, Sd represents the data sensitivity factor, Cr represents the criticality, Fr represents the data update frequency, and Fa represents the fault tolerance threshold; S403. Calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor. The formula is: ; In the formula, △ i represents the final compensation amount of the i-th major influencing factor, p i Indicates the data value of the i-th major influencing factor in the production environment, t i Indicates the data value of the i-th major influencing factor in the test environment, α i represents the compensation intensity coefficient of the i-th main influencing factor, w i represents the influence weight of the i-th major influencing factor, Sd i The data sensitivity factor of the i-th major influencing factor is represented by the same calculation to obtain the final compensation amount of all major influencing factors, and the final compensation amount set is constructed.
6. The cloud platform-based software testing data management method according to claim 5, characterized in that: The specific steps of constructing the feedback update mechanism in S500 to update the compensation intensity coefficient and the environment difference weight matrix are as follows: S501. When the compensation mechanism is triggered, the final compensation amount of each major influencing factor in the final compensation amount set is used to perform data compensation in the test environment during software testing; the distribution difference D between the two environments is recalculated based on the compensated data. new , when D new ≤D threshold When the compensation is qualified, it is judged that the compensation is qualified; when it is not satisfied, it is judged that the compensation is unqualified; using D new The compensation intensity coefficient and environmental difference weight matrix are recalculated and updated for optimization.
7. A software testing data management system based on a cloud platform, characterized by: The software test data management system includes a data acquisition module, an influencing factor screening module, a weight matrix construction module, a compensation judgment module, a compensation amount calculation module and an update inspection module; The data acquisition module is used to collect data indicators in the software production environment and data indicators in the test environment; The impact factor screening module is used to normalize the collected data, screen the data indicators in the two environments, and extract the main impact factors; The weight matrix construction module is used to calculate the information entropy of each major influencing factor respectively, calculate the influence weight of each major influencing factor on the software test results using the information entropy, and construct an environment difference weight matrix; The compensation judgment module is used to calculate the distribution difference by using the distribution probability of the same main influencing factors in the two environments, and analyze the distribution difference to determine whether the software test needs compensation; The compensation calculation module is used to calculate and extract the project criticality, data update frequency and data fault tolerance threshold during software testing using professional knowledge, and calculate the data sensitivity factor; The final compensation amount is calculated using the compensation intensity coefficient and the data sensitivity factor; The update inspection module is used to compensate all major influencing factors using the final compensation amount; recalculate the distribution difference after compensation, and construct a feedback update mechanism to update the compensation intensity coefficient and the environmental difference weight matrix.
8. The cloud platform-based software testing data management system according to claim 7, characterized in that: The weight matrix building module includes an information entropy unit and an influence weight unit; The information entropy unit is used to calculate the information entropy of each major influencing factor; The influence weight unit is used to calculate the influence weight of each major influencing factor on the software test result by using information entropy, and integrate and construct an environment difference weight matrix.
9. The cloud platform-based software testing data management system according to claim 7, characterized in that: The compensation judgment module includes a probability distribution unit and a distribution difference unit; The probability distribution unit is used to extract the frequency distribution within each interval in the production environment and the test environment respectively, and calculate the probability distribution within each interval in the production environment; The distribution difference unit is used to calculate the distribution difference between two environments using the probability distribution in all intervals.
10. The cloud platform-based software testing data management system according to claim 7, characterized in that: The compensation amount calculation module includes a compensation intensity coefficient unit, a data sensitivity factor unit and a final compensation amount unit; The compensation intensity coefficient unit is used to calculate the compensation intensity coefficient using the distribution difference; The data sensitivity factor unit is used to calculate the data sensitivity factor using the criticality and fault tolerance threshold of each main influencing factor; The final compensation amount unit is used to calculate the final compensation amount using the compensation intensity coefficient and the data sensitivity factor.
Citation Information
Patent Citations
Volunteer work intention prediction method based on Logistic generalized linear regression model
CN109934407A
Data compensation method and system of sensor
CN119043401A