Test method and system, electronic equipment and computer readable storage medium

By randomly combining test cases and using support vector machine models to identify relationships, the problems of limited test scope and insufficient accuracy in distributed storage testing are solved, achieving more efficient test accuracy and effectiveness.

CN118567992APending Publication Date: 2024-08-30JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410741327.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing technology has limitations in the test scope and rigidity of the test ideas in the testing of distributed storage, and cannot satisfy the randomness and contingency of users' distributed storage operations, resulting in poor test accuracy.

Method used

By obtaining the target test case set, randomly combining the combined test cases, inputting them into the pre-trained support vector machine model, identifying the relationship between the test cases, analyzing the identification results to determine the effectiveness of the combined test cases, and then conducting distributed Storage test.

Benefits of technology

It enhances the coupling and randomness between test cases, expands the test scenarios and scope, improves the test accuracy, and ensures the effectiveness of the test.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567992A
    Figure CN118567992A
Patent Text Reader

Abstract

The invention discloses a test method and system, electronic equipment and a computer readable storage medium, and relates to the technical field of testing, and the method comprises the steps: obtaining a target test case set for testing distributed storage; target test cases are selected from the target test case set for random combination, and target combined test cases are obtained; inputting the target combined test case into a pre-trained support vector machine model, wherein the support vector machine model is used for identifying a relationship between the test cases; obtaining a recognition result output by the support vector machine model; and analyzing the identification result, and if the analysis result represents that the target combination test case can be used for testing, testing the distributed storage by applying the target combination test case. The target test cases are randomly selected and combined to obtain the target combined test case for testing, the testing accuracy is improved, whether the target combined test case is applied to testing or not is evaluated through the support vector machine model, and the testing effectiveness is guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of testing technology, and more specifically, to a testing method, system, electronic device and computer-readable storage medium. Background Art

[0002] Distributed storage is a data storage technology that uses the disk space on each machine through the network and forms a virtual storage device with these distributed storage resources. Data is stored in each disk in a distributed manner. During the life cycle of distributed storage, in order to ensure that the functions of distributed storage can meet user needs, it is necessary to test the distributed storage, such as testing the distributed storage by writing a single test case.

[0003] However, a single test case only tests a single functional point and does not involve any other functional points. Therefore, there are disadvantages of limited test scope and rigid test ideas. In addition, in the use of distributed storage, users' operations on distributed storage are random and accidental. The testing of a single test case obviously cannot meet this characteristic of users, resulting in poor test accuracy of distributed storage.

[0004] In summary, how to improve the accuracy of distributed storage testing is an urgent problem to be solved by those skilled in the art. Summary of the invention

[0005] The purpose of this application is to provide a testing method, which can solve the technical problem of how to improve the accuracy of distributed storage testing to a certain extent. This application also provides a testing system, an electronic device and a computer-readable storage medium.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] A testing method comprising:

[0008] Obtain a target test case set for testing distributed storage;

[0009] Select target test cases from the target test case set and randomly combine them to obtain target combination test cases;

[0010] Inputting the target combination test case into a pre-trained support vector machine model, wherein the support vector machine model is used to identify the relationship between the test cases;

[0011] Obtaining a recognition result output by the support vector machine model;

[0012] The identification result is analyzed, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

[0013] In an exemplary embodiment, before inputting the target combination test case into a pre-trained support vector machine model, the method further includes:

[0014] Obtaining a training test case for training the support vector machine model;

[0015] Randomly dividing the training test cases into a training set and a test set;

[0016] Select training test cases from the training set and randomly combine them to obtain training combination test cases;

[0017] Determining the relationship between test cases in the training combination test case;

[0018] Converting the training combination test case into a training combination feature vector;

[0019] Performing two-norm processing on the training combined feature vector to obtain a training two-norm result;

[0020] Training the initial support vector machine model according to the training bi-norm result and the relationship between the test cases in the training combination test case to obtain the initially trained support vector machine model;

[0021] Verifying the initially trained support vector machine model through the test set;

[0022] If the verification fails, returning to the step of randomly dividing the training test cases into a training set and a test set;

[0023] If the verification is successful, the initially trained support vector machine model is used as the pre-trained support vector machine model.

[0024] In an exemplary embodiment, converting the training combination test case into a training combination feature vector includes:

[0025] Determining the total number of training test cases;

[0026] Determine the first bit value of the binary number corresponding to the total number;

[0027] Convert each of the training test cases into a first feature vector corresponding to the first digit value;

[0028] Determining the total number of levels of the training test cases;

[0029] Determine the second binary value corresponding to the total level number;

[0030] Converting each level of the training test case into a second feature vector corresponding to the second digit value;

[0031] For each of the training test cases, combining the first feature vector and the second feature vector corresponding to the training test case to obtain a training feature vector of the training test case;

[0032] The training feature vector corresponding to the training combination test case is used as the training combination feature vector.

[0033] In an exemplary embodiment, the kernel function of the support vector machine model includes a Gaussian radial basis function; the Gaussian radial basis function includes:

[0034] k(x, x')=e^(-||x-x'||^2 / (2*σ^2));

[0035] Wherein, k(x, x') represents the operation result of the Gaussian radial basis function; x and x' represent the input data points corresponding to the test case; e represents a natural constant; ^ represents an exponential operation; ||x-x'|| represents the Euclidean distance between x and x'; σ represents the bandwidth parameter of the Gaussian radial basis function.

[0036] In an exemplary embodiment, the step of selecting target test cases from the target test case set and randomly combining them to obtain target combination test cases includes:

[0037] Determining the level and weight value of the target test case in the target test case set;

[0038] The target test cases are selected according to the levels and weight values ​​of the target test cases for random combination to obtain the target combination test cases.

[0039] In an exemplary embodiment, determining the level of the target test case in the target test case set includes:

[0040] Determining the level of the target test case in the target test case set according to the type of the test case;

[0041] The level types of the target test cases include: cluster level, storage pool level, node level, logical volume level, directory level, tenant bucket level, fault level, and common feature level.

[0042] In an exemplary embodiment, determining the level of the target test case in the target test case set includes:

[0043] Determining the level of the target test case in the target test case set according to the priority of the test case;

[0044] The level types of the target test cases include: core function level, high priority, medium priority, and low priority.

[0045] A testing system, comprising:

[0046] A first acquisition module is used to acquire a target test case set for testing distributed storage;

[0047] A first combination module is used to select target test cases from the target test case set and randomly combine them to obtain target combination test cases;

[0048] A first input module, used for inputting the target combination test case into a pre-trained support vector machine model, wherein the support vector machine model is used for identifying the relationship between the test cases;

[0049] A second acquisition module is used to obtain the recognition result output by the support vector machine model;

[0050] The first test module is used to analyze the recognition result, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

[0051] An electronic device, comprising:

[0052] Memory for storing computer programs;

[0053] A processor is used to implement the steps of any of the above-mentioned testing methods when executing the computer program.

[0054] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any of the above-mentioned test methods when executed by a processor.

[0055] The present application provides a test method, which obtains a target test case set for testing distributed storage; selects target test cases from the target test case set for random combination to obtain target combination test cases; inputs the target combination test cases into a pre-trained support vector machine model, and the support vector machine model is used to identify the relationship between test cases; obtains the recognition result output by the support vector machine model; analyzes the recognition result, and in response to the analysis result characterizing that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage. The present application randomly selects target test cases from the target test case set for combination to obtain target combination test cases, which solves the limitations of traditional single test cases, enhances the coupling between each test case, and also increases the contingency and randomness in the test, expands the test scenario and scope, and is closer to the user's use process in scenarios where the distributed storage function is unfamiliar, and the test accuracy is high. After that, the relationship between the test cases is identified by the support vector machine model, and when the target combination test case is analyzed to be able to be used for testing, the target combination test case is applied for testing, which ensures the test validity. The present application provides a test system, electronic device and computer-readable storage medium that also solves the corresponding technical problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0057] Figure 1 A flow chart of a testing method provided in an embodiment of the present application;

[0058] Figure 2 A schematic diagram of the training of the support vector machine model in this application;

[0059] Figure 3 Schematic diagram of the processing of test cases during training;

[0060] Figure 4 A schematic diagram of the structure of a test system provided in an embodiment of the present application;

[0061] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0062] Figure 6 Another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0064] See also Figure 1 , Figure 1 A flowchart of a testing method provided in an embodiment of the present application.

[0065] A testing method provided in an embodiment of the present application may include the following steps:

[0066] Step S101: Obtain a target test case set for testing distributed storage.

[0067] In practical applications, testing distributed storage requires the use of test cases written by users, so the target test case set must be obtained first. For example, the target test case set can be obtained by collecting existing test cases. The number and type of target test cases included in the target test case set can be determined according to the application scenario. It should be noted that testing distributed storage can be testing the software functions of distributed storage, etc., which is not specifically limited in this application.

[0068] Step S102: Select target test cases from the target test case set and randomly combine them to obtain target combination test cases.

[0069] In actual applications, after obtaining the target test case set, considering that a single test case is equivalent to simulating a single operation of a user on distributed storage, and the user may operate the distributed storage continuously and in different ways, in order to more accurately simulate the user's usage of distributed storage, after obtaining the target test case set, target test cases can be selected from the target test case set for random combination to obtain target combination test cases, so as to test the distributed storage using the target combination test cases.

[0070] It should be noted that the number of target test cases selected from the target test case set can be flexibly adjusted as needed. For example, three target test cases can be selected from the target test case set to form a target combination test case, or five target test cases can be selected from the target test case set to form a target combination test case, etc. In addition, in the process of randomly combining the target test cases, only the execution order between the target test cases can be randomly combined, or the execution order between the target test cases can be randomly combined first, and then the execution times and execution events of the target test cases can be randomly combined, etc.

[0071] In practical applications, in the process of selecting target test cases from a target test case set and randomly combining them to obtain target combination test cases, differences between test cases are taken into consideration, such as the levels of test cases and the different impacts on distributed storage, etc. Therefore, the test cases can be randomly combined according to the differences between them. For example, the level and weight value of the target test cases in the target test case set can be determined. The weight value can be the weight value of the test case itself, or the weight value corresponding to the level of the test case, etc., and the weight value can be determined according to the degree of impact of the test case on distributed storage, etc.; target test cases are selected according to the level and weight value of the target test cases for random combination to obtain target combination test cases.

[0072] In specific application scenarios, the level of test cases can be flexibly determined according to actual needs. For example, in the process of determining the level of target test cases in the target test case set, the level of target test cases in the target test case set can be determined according to the type of test cases, and the level types of target test cases may include: cluster level, storage pool level, node level, logical volume level, directory level, tenant bucket level, fault level, public feature level, etc. For example, distributed storage environment deployment use cases belong to the cluster level, cluster node expansion and reduction belong to the node level, network fault use cases belong to the fault level, storage pool creation, deletion, editing, etc. belong to the storage pool level, logical volume operations and business reading and writing in block storage belong to the volume level, directory operations corresponding to file storage belong to the directory level, bucket object operations of object storage belong to the bucket level, etc. Of course, the level of the target test cases in the target test case set can also be determined according to the priority of the test cases, and the level types of the target test cases may include: core function level, high priority, medium priority, low priority, etc., among which, the core function test cases refer to the test case set that is most expected to be run and confirmed before all-in-one testing starts. If this part of the test cases fails, it will hinder the verification of most other test cases, such as the deployment and reset of distributed storage clusters, storage pool creation, etc.; high-priority test cases refer to the test cases that are most frequently executed to ensure that the functionality is stable, such as basic function testing, important function testing, and important errors and boundary testing, such as various addition, deletion, query and modification functions in web information systems, login functions, permission management, user management and other core functions; medium-priority test cases refer to more comprehensive verification of various aspects of the function, abnormal testing, boundary, interruption, network disconnection, fault tolerance, UI and other test cases, such as specification boundary testing, service high availability, etc.; low-priority test cases refer to those that are not often executed, performance, pressure, compatibility, stability, security, availability, etc.

[0073] In a specific application scenario, the test cases can be randomly combined based on their types, priorities and weights. For example, according to the priorities of the test cases, weight factors that are adaptively adjusted with the rounds of combination can be divided for target test cases at each level. For example, the weight factors of core function test cases, high priority test cases, medium priority test cases and low priority test cases can be set to 0.4, 0.3, 0.2 and 0.1 respectively, and the weight factors can be adaptively adjusted with the rounds of random combination. Then, the first value of the target test cases required for the random combination is determined, and the weight factor and the first value of the target test cases are multiplied to obtain the second values ​​of the target test cases at each level determined according to the priority. For example, the second values ​​of the required core function test cases, high priority test cases, medium priority test cases and low priority test cases are determined, and then the target test cases corresponding to the second values ​​are randomly selected from the target test cases at each level determined according to the type to obtain a target combination test case. For example, the target test cases corresponding to the second values ​​are randomly selected from the target test cases corresponding to the cluster level, storage pool level, node level, logical volume level, directory level, tenant bucket level, fault level and public feature level to obtain a target combination test case.

[0074] In this process, we first divide the target test cases of each level into weight factors that are adaptively adjusted with the combination rounds according to the priority of the test cases. On the one hand, the importance of the target test cases of each level determined by the priority is determined by the weight factor, which provides direction for the random combination. On the other hand, if the weight factor is always fixed, as the version iteration and test cycle increase, some test cases may be executed less. Therefore, as the test cycle increases, the test case weight factor is dynamically adjusted to balance the selection probability and execution number of each test case on the basis of random selection. That is, by setting the weight factor to adaptively adjust with the rounds of random combination, all types of target test cases can participate in the random combination as much as possible. ; Then, by determining the first value of the target test case required for the random combination, multiply the weight factor and the first value of the target test case to obtain the second value of the target test case at each level determined according to the priority, so as to clarify the number of target test cases at each level determined according to the priority that can participate in the random combination; finally, randomly select the target test cases corresponding to the second values ​​from the target test cases at each level determined according to the type to combine and obtain the target combination test case. In this way, the combination of the target test cases refers to both the priority and the type, and realizes the random combination by comprehensively considering the priority and type of the target test cases, which can ensure the orderliness of the random combination and improve the effectiveness of the target combination test cases.

[0075] Step S103: input the target combination test case into a pre-trained support vector machine model, and the support vector machine model is used to identify the relationship between the test cases.

[0076] Step S104: Obtain the recognition result output by the support vector machine model.

[0077] Step S105: Analyze the recognition result, and in response to the analysis result indicating that the target combination test case can be used for testing, apply the target combination test case to test the distributed storage.

[0078] In practical applications, after obtaining the target combination test case, considering that the target combination test case is obtained by randomly combining the target test cases, there is a situation where the target combination test case cannot be used to test the distributed storage or can be used to test the distributed storage. If the target combination test case that cannot be used to test the distributed storage is applied, invalid testing will result. In order to avoid this situation, considering that the relationship between the test cases determines whether the target combination test case can be used to test the distributed storage, after obtaining the target combination test case, it is necessary to use the support vector machine model used to identify the relationship between the test cases to test the target combination test case. Identify and then analyze the identification results. For example, if it is analyzed that there is a mutually exclusive relationship between the test cases of the target combination test case, which is not feasible and verifiable, then the target combination test case cannot be used for testing, and the target combination test case should not be used to test the distributed storage. After that, the next random combination can be executed; if the test cases of the target combination test case are parallel and have no coupling relationship, or the test cases of the target combination test case are parallel and coupled, then the target combination test case can be tested and the test results can be verified, that is, the target combination test case can be used to test the distributed storage.

[0079] It should be noted that in the process of applying the target combination test case to test the distributed storage, the test process can be further focused on according to the recognition results. For example, when there is a coupling relationship in the recognition results, the results of the test cases with the coupling relationship can be verified.

[0080] The present application provides a test method, which obtains a target test case set for testing distributed storage; selects target test cases from the target test case set for random combination to obtain target combination test cases; inputs the target combination test cases into a pre-trained support vector machine model, the support vector machine model is used to identify the relationship between test cases; obtains the recognition result output by the support vector machine model; analyzes the recognition result, and in response to the analysis result characterizing that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage. The present application randomly selects target test cases from the target test case set for combination to obtain target combination test cases, which solves the limitations of traditional single test cases, enhances the coupling between each test case, and also increases the contingency and randomness in the test, expands the test scenario and scope, and is closer to the user's use process in scenarios where the distributed storage function is unfamiliar, with high test accuracy, and then identifies the relationship between the test cases through the support vector machine model, and only applies the target combination test case for testing when it is analyzed that the target combination test case can be used for testing, thereby ensuring the effectiveness of the test.

[0081] See also Figure 2 and Figure 3 , Figure 2 This is a training diagram of the support vector machine model in this application. Figure 3 Schematic diagram of the processing of test cases during training.

[0082] A testing method provided in an embodiment of the present application, based on the above description, can further train the support vector machine model before inputting the target combination test case into the pre-trained support vector machine model, and can include the following steps:

[0083] Step S201: Obtain training test cases for training a support vector machine model.

[0084] Step S202: randomly divide the training test cases into a training set and a test set.

[0085] In practical applications, training test cases are required to train the support vector machine model. The training test cases are also test cases used to train the support vector machine model. The number and type of training test cases can be determined according to the application scenario. After obtaining the training test cases, the training test cases need to be randomly divided into training sets and test sets. For example, the training test cases can be divided into training sets and test sets in a ratio of 8:2. The training set is used to train the support vector machine model, and the test set is used to verify the quality of the trained support vector machine model.

[0086] Step S203: Select training test cases from the training set and randomly combine them to obtain training combination test cases.

[0087] Step S204: Determine the relationship between test cases in the training combination test case.

[0088] Step S205: Convert the training combination test case into a training combination feature vector.

[0089] Step S206: performing binary norm processing on the training combined feature vector to obtain a training binary norm result.

[0090] In practical applications, when training a support vector machine model using a training set, training test cases can be first selected from the training set for random combination to obtain training combination test cases, and the relationship between test cases in the training combination test cases can be determined to construct the training data required for the support vector machine model, wherein the relationship between test cases can include mutual exclusion, parallelism, coupling, etc. On this basis, considering that the test cases may be composed of characters, etc., which is not convenient for the support vector machine model to process them, in order to avoid this situation, the training combination test cases can be converted into training combination feature vectors, and then the training combination feature vectors are processed by the two norm to obtain the training two norm results, and then the training two norm results are used to train the support vector machine model.

[0091] In a specific application scenario, in the process of converting training combination test cases into training combination feature vectors, the training test cases can be vectorized according to their number and levels. For example, the total number of training test cases can be determined, the first digit of the binary number corresponding to the total number can be determined, and each training test case can be converted into a first feature vector corresponding to the first digit. The total number of levels of the training test cases can be determined, the second digit of the binary number corresponding to the total number of levels can be determined, and each level of the training test cases can be converted into a second feature vector corresponding to the second digit. For each training test case, the first feature vector and the second feature vector corresponding to the training test case are combined to obtain a training feature vector of the training test case, and the training feature vector corresponding to the training combination test case is used as the training combination feature vector.

[0092] For ease of understanding, assume that a test case set has a total of 100 test cases. 100 is converted into binary data as 1100100, and the first digit is 7. Then each test case can be represented by a 1*7 vector dimension. Assume that the levels of each test case include cluster level, node level, fault level, storage pool level, volume level, directory level, bucket level, etc. These different levels are represented by vectors of the same dimension. For example, a distributed storage has 10 use case levels. 10 is converted into binary data as 1010, and the second digit is 4. In this way, each test case in the 100 test sets can be represented by assembling the above two binary data into a 1*12 dimension of 11001001010.

[0093] It should be noted that two-norm processing usually refers to normalizing the feature vector so that each feature has a unit norm or a specific mean and standard deviation. The advantages of using two-norm to process test cases in this application are: scale invariance. Different test cases may have different scales or units. Through two-norm normalization, this scale difference can be eliminated, making all test cases numerically comparable; improving convergence speed. During the optimization process, if the scale difference of the test cases is large, it may cause the algorithm to converge more slowly. Through normalization, this effect can be reduced, so that the training process converges to the optimal solution faster; preventing overfitting. In some cases, the scale difference of the test cases may cause the model to be too sensitive to certain features, thereby increasing the risk of overfitting, and two-norm processing can help mitigate this effect. In addition, when processing the target combination test case, it can be vector converted and two-norm processed before being input into the support vector machine model for processing.

[0094] Step S207: Train the initial support vector machine model according to the training binary norm result and the relationship between the test cases in the training combination test case to obtain a preliminarily trained support vector machine model.

[0095] In practical applications, after obtaining the training two-norm results, the initial support vector machine model can be trained according to the training two-norm results and the relationship between test cases in the training combination test cases to obtain a preliminarily trained support vector machine model.

[0096] In specific application scenarios, considering that the support vector machine is a machine learning model based on statistical learning theory, it is based on the Vapnik structural risk minimization principle and tries to provide the generalization ability of the model, that is, the limited training set samples can still ensure that the error of the independent test set is kept as small as possible. This also means that even if the number of test cases cannot reach a massive amount, a relatively accurate machine learning model can be obtained through training. Therefore, this application identifies the relationship between test cases by training the support vector machine model. On this basis, because the basic idea of ​​the support vector machine is to find an optimal hyperplane in the feature space, and the support vectors refer to the training sample points closest to the hyperplane, and these support vectors are the key factors in determining the position of the hyperplane, given that the classification in this application is not simply linearly separable, and the Gaussian radial basis kernel function is mainly used to map the input data from the original space to a high-dimensional feature space, so that the original data is linearly separable in the new feature space. In addition, the kernel function is calculated in a low dimension, but the classification effect is expressed in a high dimension to avoid In order to solve the problem of linear inseparability by directly performing complex calculations in high-dimensional space, the kernel function of the support vector machine model is set to a Gaussian radial basis function in this application; and the Gaussian radial basis function can be k(x, x')=e^(-||x-x'||^2 / (2*σ^2)); wherein, k(x, x') represents the operation result of the Gaussian radial basis function; x and x' represent the input data points corresponding to the test case; e represents a natural constant; ^ represents an exponential operation; ||x-x'|| represents the Euclidean distance between x and x'; σ represents the bandwidth parameter of the Gaussian radial basis function.

[0097] Step S208: Verify the initially trained support vector machine model through the test set. If the verification fails, return to step S202; if the verification passes, execute step S209.

[0098] Step S209: using the initially trained support vector machine model as a pre-trained support vector machine model.

[0099] In practical applications, after completing the training of the support vector machine model based on the training set, the initially trained support vector machine model can be verified through the test set. If the verification fails, the process returns to the steps of randomly dividing the training test cases into the training set and the test set and the subsequent steps, so as to make the support vector machine model meet the requirements through multiple rounds of training; if the verification passes, the initially trained support vector machine model can be used as the pre-trained support vector machine model. It should be noted that the training end condition of the support vector machine model can be flexibly determined as needed, for example, the training can be ended after the training rounds of the support vector machine model reach the set rounds.

[0100] From this process, it can be seen that in the process of training the support vector machine model, the present application randomly divides the training test cases into training sets and test sets, trains the support vector machine model with the help of the training set, verifies the support vector machine model with the help of the test set, and can perform multiple trainings, which can effectively avoid the occurrence of over-learning and under-learning states. In addition, by processing the training combination test cases through vector conversion and two norms, the amount of data of the combination test cases can be reduced, and the scale can be guaranteed to be unchanged, thereby improving the convergence speed of the support vector machine model and preventing overfitting.

[0101] See also Figure 4 , Figure 4 A schematic diagram of the structure of a test system provided in an embodiment of the present application.

[0102] A test system provided in an embodiment of the present application may include:

[0103] A first acquisition module 101 is used to acquire a target test case set for testing distributed storage;

[0104] The first combination module 102 is used to select target test cases from the target test case set and randomly combine them to obtain target combination test cases;

[0105] A first input module 103, used to input the target combination test case into a pre-trained support vector machine model, the support vector machine model is used to identify the relationship between the test cases;

[0106] The second acquisition module 104 is used to obtain the recognition result output by the support vector machine model;

[0107] The first test module 105 is used to analyze the recognition result, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

[0108] A test system provided in an embodiment of the present application may further include:

[0109] A third acquisition module is used to acquire a training test case for training the support vector machine model before the first input module inputs the target combination test case into the pre-trained support vector machine model;

[0110] The first partitioning module is used to randomly partition the training test cases into a training set and a test set;

[0111] The second combination module is used to select training test cases from the training set and randomly combine them to obtain training combination test cases;

[0112] A first determination module is used to determine the relationship between test cases in the training combination test case;

[0113] The first processing module is used to convert the training combination test case into a training combination feature vector; perform a two-norm process on the training combination feature vector to obtain a training two-norm result;

[0114] The first training module is used to train the initial support vector machine model according to the training bi-norm result and the relationship between the test cases in the training combination test case to obtain a preliminarily trained support vector machine model;

[0115] The first verification module is used to verify the initially trained support vector machine model through the test set; if the verification fails, it returns to execute the step of randomly dividing the training test cases into a training set and a test set; if the verification passes, the initially trained support vector machine model is used as the pre-trained support vector machine model.

[0116] In a test system provided by an embodiment of the present application, a first processing module may include:

[0117] A first determining unit, used to determine the total number of training test cases;

[0118] A second determining unit, used to determine the first bit value of the binary number corresponding to the total number;

[0119] A first conversion unit, used to convert each training test case into a first feature vector corresponding to a first digit value;

[0120] The third determining unit is used to determine the total number of levels of the training test case and determine the second digit value of the binary corresponding to the total number of levels;

[0121] A second conversion unit, used for converting each level of the training test case into a second feature vector corresponding to a second digit value;

[0122] The first combining unit is used to combine the first feature vector and the second feature vector corresponding to each training test case to obtain the training feature vector of the training test case; and use the training feature vector corresponding to the training combination test case as the training combination feature vector.

[0123] In a test system provided by an embodiment of the present application, the kernel function of the support vector machine model includes a Gaussian radial basis function; the Gaussian radial basis function includes:

[0124] k(x, x')=e^(-||x-x'||^2 / (2*σ^2));

[0125] Wherein, k(x, x') represents the operation result of the Gaussian radial basis function; x and x' represent the input data points corresponding to the test case; e represents a natural constant; ^ represents an exponential operation; ||x-x'|| represents the Euclidean distance between x and x'; σ represents the bandwidth parameter of the Gaussian radial basis function.

[0126] In a test system provided by an embodiment of the present application, a first combination module may include:

[0127] A fourth determining unit, used to determine the level and weight value of the target test case in the target test case set;

[0128] The second combination unit is used to select target test cases according to the levels and weight values ​​of the target test cases for random combination to obtain target combination test cases.

[0129] In a testing system provided by an embodiment of the present application, the fourth determination unit can be used to: determine the level of the target test case in the target test case set according to the type of the test case; the level types of the target test case include: cluster level, storage pool level, node level, logical volume level, directory level, tenant bucket level, fault level, and common feature level.

[0130] In a test system provided by an embodiment of the present application, the fourth determination unit may be used to: determine the level of a target test case in a target test case set according to the priority of the test case;

[0131] The level types of target test cases include: core function level, high priority, medium priority, and low priority.

[0132] The present application also provides an electronic device and a computer-readable storage medium, both of which have the corresponding effects of a test method provided in an embodiment of the present application. Figure 5 , Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0133] An electronic device provided in an embodiment of the present application includes a memory 201 and a processor 202. The memory 201 stores a computer program. When the processor 202 executes the computer program, the following steps are implemented:

[0134] Obtain a target test case set for testing distributed storage;

[0135] Select target test cases from the target test case set and randomly combine them to obtain target combination test cases;

[0136] Input the target combination test cases into the pre-trained support vector machine model, and the support vector machine model is used to identify the relationship between the test cases;

[0137] Obtain the recognition results output by the support vector machine model;

[0138] The identification result is analyzed, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

[0139] See also Figure 6 , another electronic device provided in the embodiment of the present application may also include: an input port 203 connected to the processor 202, for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202, for displaying the processing results of the processor 202 to the outside; a communication module 205 connected to the processor 202, for realizing communication between the electronic device and the outside. The display unit 204 can be a display panel, a laser scanning display, etc.; the communication method adopted by the communication module 205 includes but is not limited to mobile high-definition link technology (Mobile High-Definition Link, MHL), Universal Serial Bus (Universal Serial Bus, USB), High-Definition Multimedia Interface (High-DefinitionMultimedia Interface, HDMI), wireless connection: wireless fidelity technology (WIreless Fidelity, WiFi), Bluetooth communication technology, low-power Bluetooth communication technology, and communication technology based on IEEE802.11s.

[0140] An embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0141] Obtain a target test case set for testing distributed storage;

[0142] Select target test cases from the target test case set and randomly combine them to obtain target combination test cases;

[0143] Input the target combination test cases into the pre-trained support vector machine model, and the support vector machine model is used to identify the relationship between the test cases;

[0144] Obtain the recognition results output by the support vector machine model;

[0145] The identification result is analyzed, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

[0146] The computer-readable storage medium involved in this application includes random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs (Compact Disc Read-Only Memory), or any other form of storage medium known in the technical field.

[0147] A computer program product provided in an embodiment of the present application includes a computer program / instruction, which, when executed by a processor, implements the steps of the test method described in any of the above embodiments.

[0148] For the description of the relevant parts of a test system, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of the present application, please refer to the detailed description of the corresponding parts in a test method provided in the embodiments of the present application, which will not be repeated here. In addition, the parts of the above-mentioned technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.

[0149] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0150] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A testing method, It is characterized in that include: Obtain a target test case set for testing distributed storage; Select target test cases from the target test case set and randomly combine them to obtain target combination test cases; Inputting the target combination test case into a pre-trained support vector machine model, wherein the support vector machine model is used to identify the relationship between the test cases; Obtaining a recognition result output by the support vector machine model; The identification result is analyzed, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

2. The method according to claim 1, It is characterized in that Before inputting the target combination test case into the pre-trained support vector machine model, the method further includes: Obtaining a training test case for training the support vector machine model; Randomly dividing the training test cases into a training set and a test set; Select training test cases from the training set and randomly combine them to obtain training combination test cases; Determining the relationship between test cases in the training combination test case; Converting the training combination test case into a training combination feature vector; Performing two-norm processing on the training combined feature vector to obtain a training two-norm result; Training the initial support vector machine model according to the training bi-norm result and the relationship between the test cases in the training combination test case to obtain the initially trained support vector machine model; Verifying the initially trained support vector machine model through the test set; If the verification fails, returning to the step of randomly dividing the training test cases into a training set and a test set; If the verification is successful, the initially trained support vector machine model is used as the pre-trained support vector machine model.

3. The method according to claim 2, It is characterized in that The converting the training combination test case into a training combination feature vector comprises: Determining the total number of training test cases; Determine the first bit value of the binary number corresponding to the total number; Convert each of the training test cases into a first feature vector corresponding to the first digit value; Determining the total number of levels of the training test cases; Determine the second binary value corresponding to the total level number; Converting each level of the training test case into a second feature vector corresponding to the second digit value; For each of the training test cases, combining the first feature vector and the second feature vector corresponding to the training test case to obtain a training feature vector of the training test case; The training feature vector corresponding to the training combination test case is used as the training combination feature vector.

4. The method according to claim 3, It is characterized in that The kernel function of the support vector machine model includes a Gaussian radial basis function; the Gaussian radial basis function includes: k(x, x')=e^(-||x-x'||^2 / (2*σ^2)); Wherein, k(x, x') represents the operation result of the Gaussian radial basis function; x and x' represent the input data points corresponding to the test case; e represents a natural constant; ^ represents an exponential operation; ||x-x'|| represents the Euclidean distance between x and x'; σ represents the bandwidth parameter of the Gaussian radial basis function.

5. The method according to any one of claims 1 to 4, It is characterized in that The step of selecting target test cases from the target test case set and randomly combining them to obtain target combination test cases comprises: Determining the level and weight value of the target test case in the target test case set; The target test cases are selected according to the levels and weight values ​​of the target test cases for random combination to obtain the target combination test cases.

6. The method according to claim 5, It is characterized in that Determining the level of the target test case in the target test case set includes: Determining the level of the target test case in the target test case set according to the type of the test case; The level types of the target test cases include: cluster level, storage pool level, node level, logical volume level, directory level, tenant bucket level, fault level, and common feature level.

7. The method according to claim 5, It is characterized in that Determining the level of the target test case in the target test case set includes: Determining the level of the target test case in the target test case set according to the priority of the test case; The level types of the target test cases include: core function level, high priority, medium priority, and low priority.

8. A testing system, It is characterized in that include: A first acquisition module is used to acquire a target test case set for testing distributed storage; A first combination module is used to select target test cases from the target test case set and randomly combine them to obtain target combination test cases; A first input module, used for inputting the target combination test case into a pre-trained support vector machine model, wherein the support vector machine model is used for identifying the relationship between the test cases; A second acquisition module is used to obtain the recognition result output by the support vector machine model; The first test module is used to analyze the recognition result, and in response to the analysis result indicating that the target combination test case can be used for testing, the target combination test case is applied to test the distributed storage.

9. An electronic device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the steps of the testing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the testing method according to any one of claims 1 to 7 are implemented.